FairShip
Loading...
Searching...
No Matches
TrackInfo Class Reference

#include <TrackInfo.h>

Inheritance diagram for TrackInfo:
Collaboration diagram for TrackInfo:

Public Member Functions

 TrackInfo ()
 
 TrackInfo (const genfit::Track *tr)
 
 TrackInfo (const TrackInfo &ti)
 
 ~TrackInfo () override
 
unsigned int N () const
 
unsigned int detId (Int_t n) const
 
float wL (Int_t n) const
 
float wR (Int_t n) const
 
void Print (const Option_t *opt="") const override
 

Protected Member Functions

 ClassDefOverride (TrackInfo, 2)
 

Protected Attributes

std::vector< unsigned int > fDetIDs
 array of measurements
 
std::vector< float > fWL
 
std::vector< float > fWR
 

Detailed Description

Definition at line 15 of file TrackInfo.h.

Constructor & Destructor Documentation

◆ TrackInfo() [1/3]

TrackInfo::TrackInfo ( )

Default constructor

Definition at line 11 of file TrackInfo.cxx.

11: TObject() {}

◆ TrackInfo() [2/3]

TrackInfo::TrackInfo ( const genfit::Track *  tr)
explicit

Standard constructor

Definition at line 14 of file TrackInfo.cxx.

14 {
15 for (unsigned int i = 0; i < tr->getNumPointsWithMeasurement(); i += 1) {
16 genfit::TrackPoint* tp = tr->getPointWithMeasurement(i);
17 genfit::AbsMeasurement* rawM = tp->getRawMeasurement();
18 genfit::KalmanFitterInfo* info =
19 static_cast<genfit::KalmanFitterInfo*>(tp->getFitterInfo());
20 fDetIDs.push_back(rawM->getDetId());
21 if (info) {
22 fWL.push_back(info->getWeights()[0]);
23 fWR.push_back(info->getWeights()[1]);
24 } else {
25 // std::cout << "no info"<<std::endl;
26 fWL.push_back(0);
27 fWR.push_back(0);
28 }
29 // std::cout << "weights " << ((fWL)[i])<<" "<<((fWR)[i])<<"
30 // "<<((fDetIDs)[i])<<std::endl;
31 }
32}
std::vector< float > fWR
Definition: TrackInfo.h:40
std::vector< float > fWL
Definition: TrackInfo.h:39
std::vector< unsigned int > fDetIDs
array of measurements
Definition: TrackInfo.h:38
int i
Definition: ShipAna.py:97

◆ TrackInfo() [3/3]

TrackInfo::TrackInfo ( const TrackInfo ti)

Copy constructor

Definition at line 35 of file TrackInfo.cxx.

36 : TObject(ti), fDetIDs(ti.fDetIDs), fWL(ti.fWL), fWR(ti.fWR) {}

◆ ~TrackInfo()

TrackInfo::~TrackInfo ( )
override

Destructor

Definition at line 38 of file TrackInfo.cxx.

38{}

Member Function Documentation

◆ ClassDefOverride()

TrackInfo::ClassDefOverride ( TrackInfo  ,
 
)
protected

◆ detId()

unsigned int TrackInfo::detId ( Int_t  n) const
inline

Definition at line 30 of file TrackInfo.h.

30{ return fDetIDs[n]; }

◆ N()

unsigned int TrackInfo::N ( ) const
inline

Accessors

Definition at line 29 of file TrackInfo.h.

29{ return fDetIDs.size(); }

◆ Print()

void TrackInfo::Print ( const Option_t *  opt = "") const
inlineoverride

Definition at line 35 of file TrackInfo.h.

35{ ; }

◆ wL()

float TrackInfo::wL ( Int_t  n) const
inline

Definition at line 31 of file TrackInfo.h.

31{ return fWL[n]; }

◆ wR()

float TrackInfo::wR ( Int_t  n) const
inline

Definition at line 32 of file TrackInfo.h.

32{ return fWR[n]; }

Member Data Documentation

◆ fDetIDs

std::vector<unsigned int> TrackInfo::fDetIDs
protected

array of measurements

Definition at line 38 of file TrackInfo.h.

◆ fWL

std::vector<float> TrackInfo::fWL
protected

Definition at line 39 of file TrackInfo.h.

◆ fWR

std::vector<float> TrackInfo::fWR
protected

Definition at line 40 of file TrackInfo.h.


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