SND@LHC Software
Loading...
Searching...
No Matches
genfit::TrackCandHit Class Reference

Hit object for use in TrackCand. Provides IDs and sorting parameters. More...

#include <TrackCandHit.h>

Inheritance diagram for genfit::TrackCandHit:
Collaboration diagram for genfit::TrackCandHit:

Public Member Functions

 TrackCandHit (int detId=-1, int hitId=-1, int planeId=-1, double sortingParameter=0.)
 
virtual ~TrackCandHit ()
 
virtual TrackCandHitclone () const
 
int getDetId () const
 
int getHitId () const
 
int getPlaneId () const
 
double getSortingParameter () const
 
void setSortingParameter (double sortingParameter)
 
virtual void Print (Option_t *option="") const
 

Protected Member Functions

 TrackCandHit (const TrackCandHit &other)
 protect from calling copy c'tor from outside the class. Use clone() if you want a copy!
 
TrackCandHitoperator= (const TrackCandHit &)
 protect from calling assignment operator from outside the class. Use clone() instead!
 

Protected Attributes

int detId_
 
int hitId_
 
int planeId_
 
double sortingParameter_
 

Friends

bool operator== (const TrackCandHit &lhs, const TrackCandHit &rhs)
 Equality operator. Does not check sortingParameter.
 
bool operator!= (const TrackCandHit &lhs, const TrackCandHit &rhs)
 
bool operator< (const TrackCandHit &lhs, const TrackCandHit &rhs)
 Compare sortingParameter, needed for sorting.
 

Detailed Description

Hit object for use in TrackCand. Provides IDs and sorting parameters.

Definition at line 34 of file TrackCandHit.h.

Constructor & Destructor Documentation

◆ TrackCandHit() [1/2]

genfit::TrackCandHit::TrackCandHit ( int  detId = -1,
int  hitId = -1,
int  planeId = -1,
double  sortingParameter = 0. 
)

Definition at line 26 of file TrackCandHit.cc.

30 : detId_(detId),
31 hitId_(hitId),
32 planeId_(planeId),
33 sortingParameter_(sortingParameter)
34{
35 ;
36}

◆ ~TrackCandHit()

virtual genfit::TrackCandHit::~TrackCandHit ( )
inlinevirtual

Definition at line 43 of file TrackCandHit.h.

43{;}

◆ TrackCandHit() [2/2]

genfit::TrackCandHit::TrackCandHit ( const TrackCandHit other)
inlineprotected

protect from calling copy c'tor from outside the class. Use clone() if you want a copy!

Definition at line 75 of file TrackCandHit.h.

75 :
76 TObject(other), detId_(other.detId_), hitId_(other.hitId_), planeId_(other.planeId_), sortingParameter_(other.sortingParameter_) {;}

Member Function Documentation

◆ clone()

virtual TrackCandHit * genfit::TrackCandHit::clone ( ) const
inlinevirtual

Reimplemented in genfit::WireTrackCandHit.

Definition at line 45 of file TrackCandHit.h.

45{return new TrackCandHit(*this);}
TrackCandHit(int detId=-1, int hitId=-1, int planeId=-1, double sortingParameter=0.)

◆ getDetId()

int genfit::TrackCandHit::getDetId ( ) const
inline

Definition at line 48 of file TrackCandHit.h.

48{return detId_;}

◆ getHitId()

int genfit::TrackCandHit::getHitId ( ) const
inline

Definition at line 49 of file TrackCandHit.h.

49{return hitId_;}

◆ getPlaneId()

int genfit::TrackCandHit::getPlaneId ( ) const
inline

Definition at line 50 of file TrackCandHit.h.

50{return planeId_;}

◆ getSortingParameter()

double genfit::TrackCandHit::getSortingParameter ( ) const
inline

Definition at line 51 of file TrackCandHit.h.

51{return sortingParameter_;}

◆ operator=()

TrackCandHit & genfit::TrackCandHit::operator= ( const TrackCandHit )
protected

protect from calling assignment operator from outside the class. Use clone() instead!

◆ Print()

void genfit::TrackCandHit::Print ( Option_t *  option = "") const
virtual

Reimplemented in genfit::WireTrackCandHit.

Definition at line 39 of file TrackCandHit.cc.

39 {
40 std::cout << " TrackCandHit. DetId = " << detId_
41 << " \t HitId = " << hitId_
42 << " \t PlaneId = " << planeId_
43 << " \t SortingParameter = " << sortingParameter_ << "\n";
44}

◆ setSortingParameter()

void genfit::TrackCandHit::setSortingParameter ( double  sortingParameter)
inline

Definition at line 54 of file TrackCandHit.h.

54{sortingParameter_ = sortingParameter;}

Friends And Related Symbol Documentation

◆ operator!=

bool operator!= ( const TrackCandHit lhs,
const TrackCandHit rhs 
)
friend

Definition at line 62 of file TrackCandHit.h.

62 {
63 return !(lhs == rhs);
64 }

◆ operator<

bool operator< ( const TrackCandHit lhs,
const TrackCandHit rhs 
)
friend

Compare sortingParameter, needed for sorting.

Definition at line 68 of file TrackCandHit.h.

68 {
69 return (lhs.sortingParameter_ < rhs.sortingParameter_);
70 }

◆ operator==

bool operator== ( const TrackCandHit lhs,
const TrackCandHit rhs 
)
friend

Equality operator. Does not check sortingParameter.

Definition at line 47 of file TrackCandHit.cc.

47 {
48 if(lhs.detId_ == rhs.detId_ &&
49 lhs.hitId_ == rhs.hitId_ &&
50 lhs.planeId_ == rhs.planeId_)
51 return true;
52 return false;
53}

Member Data Documentation

◆ detId_

int genfit::TrackCandHit::detId_
protected

Definition at line 82 of file TrackCandHit.h.

◆ hitId_

int genfit::TrackCandHit::hitId_
protected

Definition at line 83 of file TrackCandHit.h.

◆ planeId_

int genfit::TrackCandHit::planeId_
protected

Definition at line 84 of file TrackCandHit.h.

◆ sortingParameter_

double genfit::TrackCandHit::sortingParameter_
protected

Definition at line 85 of file TrackCandHit.h.


The documentation for this class was generated from the following files: