1 #ifndef ROWTRIPLETBASEDTRACKFINDERPROCESSOR_H 
    2 #define ROWTRIPLETBASEDTRACKFINDERPROCESSOR_H 
    4 #include <marlin/Processor.h> 
    5 #include <marlin/Global.h> 
    9 #include <gear/TPCModule.h> 
   12 #include "EVENT/TrackerHit.h" 
   19 #include "TMatrixDSym.h" 
   77                 virtual Processor* newProcessor() {
 
   85                 virtual void processRunHeader(EVENT::LCRunHeader* run);
 
   89                 virtual void check(EVENT::LCEvent* evt);
 
  111                 std::map<int, std::vector<int> > _modNeighbours; 
 
  115                 bool areNeighbourModules(gear::TPCModule*, gear::TPCModule*, 
bool);
 
  124                 rb_Hit(
const int iHit, 
const int mod, 
const int row, 
const EVENT::TrackerHit& aHit);
 
  132                 void getPos(
double*) 
const;
 
  133                 double getVarXY(
const double = 0.) 
const;
 
  134                 double getVarZ(
const double = 0.) 
const;
 
  139                 double getDistXY(
const double, 
const double, 
const double, 
const double) 
const;
 
  140                 double getDistZ(
const double) 
const;
 
  144                 const int _hitModule; 
 
  149                 const double _hitPhiMeas; 
 
  150                 const double _hitVarXY; 
 
  151                 const double _hitVarR; 
 
  152                 const double _hitVarZ; 
 
  156                 double _calcPhiMeas(
const EVENT::TrackerHit& aHit);
 
  157                 double _getVarXY(FloatVec);
 
  158                 double _getVarR(FloatVec);
 
  159                 double _getVarZ(FloatVec);
 
  163 typedef std::vector<rb_Hit*> hitListType;
 
  164 typedef std::map<int, hitListType> rowHitMapType;
 
  165 typedef std::map<int, rowHitMapType> modHitMapType;
 
  176                 bool match(
rb_Hit*, 
const double, 
const double) 
const;
 
  178                 void getParameters(
double&, 
double&, 
double&, 
double&, 
double&, 
double&, 
double&, 
double&, 
double&, 
double&) 
const;
 
  211                 void getPos(
double*) 
const;
 
  219                 void getPosCloseTo(
const double, 
const double, 
double*, 
double&) 
const;
 
  238 typedef std::vector<rb_Triplet*> trpListType;
 
  249                 rb_Segment(
double, hitListType, 
unsigned int = 1);
 
  250                 rb_Segment(std::vector<rb_Segment*> segments);
 
  257                 void getPar(
double *) 
const;
 
  259                 const TVectorD& 
getPar() 
const;
 
  260                 const TMatrixDSym& 
getCov() 
const;
 
  263                 void match(hitListType&, hitListType&, 
const double) 
const;
 
  272                 hitListType _hitList; 
 
  280                 TVectorD _parameters; 
 
  281                 TMatrixDSym _covariance; 
 
  283                 void fitSegment(
double);
 
  286 typedef std::vector<rb_Segment*> segListType;
 
  287 typedef std::map<int, segListType> modSegMapType;
 
  300                 std::map<int, std::vector<int> > 
getClasses();
 
  303                 std::map<int, int> _index; 
 
  304                 std::vector<std::pair<int, int> > _matches;  
 
  308 #endif // ROWTRIPLETBASEDTRACKFINDERPROCESSOR_H 
simpleEquiClasses()
Construct simple equivalence class. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1333
 
void setId(int)
Set segment ID. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1087
 
double getDistZ(const double) const 
Get distance to point in Z. 
Definition: RowTripletBasedTrackFinderProcessor.cc:617
 
Row based segment. 
Definition: RowTripletBasedTrackFinderProcessor.h:246
 
const TVectorD & getPar() const 
Get parameter vector. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1069
 
double getPhiMeas() const 
Get XY measurement direction. 
Definition: RowTripletBasedTrackFinderProcessor.cc:579
 
double getVarXY(const double=0.) const 
Get XY variance. 
Definition: RowTripletBasedTrackFinderProcessor.cc:566
 
double getChi2() const 
Get chi2 from segment fit. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1049
 
int getHitNum() const 
Get index to input hit collection. 
Definition: RowTripletBasedTrackFinderProcessor.cc:523
 
void getPosCloseTo(const double, const double, double *, double &) const 
Get position close to reference point. 
Definition: RowTripletBasedTrackFinderProcessor.cc:865
 
void getPos(double *) const 
Get position. 
Definition: RowTripletBasedTrackFinderProcessor.cc:556
 
void addHit(rb_Hit *)
Add (unused) hit to segment. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1318
 
const TMatrixDSym & getCov() const 
Get covariance matrix. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1074
 
void getLCIOStateAtRefPoint(const double *, TVectorD &, TMatrixDSym &) const 
Get segment state at reference point. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1194
 
void setUsed(const double)
Set use flag. 
Definition: RowTripletBasedTrackFinderProcessor.cc:592
 
double getPhiMeas() const 
Get XY measurement direction (average of outer hits). 
Definition: RowTripletBasedTrackFinderProcessor.cc:798
 
double getY() const 
Get Y coordinate. 
Definition: RowTripletBasedTrackFinderProcessor.cc:752
 
void addMatch(std::pair< int, int >)
Add match. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1349
 
void getRefPoint(double *) const 
Get reference point. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1037
 
int getId() const 
Get segment ID. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1079
 
int getFirstRow() const 
Get first row number. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1024
 
rb_Doublet(rb_Hit *, rb_Hit *)
Construct row based doublet. 
Definition: RowTripletBasedTrackFinderProcessor.cc:626
 
double getCosBeta() const 
Get cos(beta). 
Definition: RowTripletBasedTrackFinderProcessor.cc:598
 
int getLastRow() const 
Get first last number. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1029
 
double _posCut
Chi2 cut for triplet position matching in XY and Z. 
Definition: RowTripletBasedTrackFinderProcessor.h:100
 
double getTanl() const 
Get slope in ZS. 
Definition: RowTripletBasedTrackFinderProcessor.cc:808
 
double getCosBeta() const 
Get cos(beta). 
Definition: RowTripletBasedTrackFinderProcessor.cc:813
 
rb_Triplet(rb_Doublet &, rb_Hit *)
Construct row based triplet. 
Definition: RowTripletBasedTrackFinderProcessor.cc:726
 
double getX() const 
Get X coordinate. 
Definition: RowTripletBasedTrackFinderProcessor.cc:747
 
std::map< int, std::vector< int > > getClasses()
Get equivalence classes. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1361
 
void addIndex(int)
Add index. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1341
 
std::string _outputColName
Name of the output collection. 
Definition: RowTripletBasedTrackFinderProcessor.h:96
 
double _segCut
Chi2/Ndf cut for segment matching (Ndf=4 for B off, 5 for B on) 
Definition: RowTripletBasedTrackFinderProcessor.h:102
 
rb_Hit(const int iHit, const int mod, const int row, const EVENT::TrackerHit &aHit)
Construct row based hit. 
Definition: RowTripletBasedTrackFinderProcessor.cc:460
 
double getY() const 
Get Y coordinate. 
Definition: RowTripletBasedTrackFinderProcessor.cc:543
 
bool match(rb_Hit *, const double, const double) const 
Match doublet with third hit. 
Definition: RowTripletBasedTrackFinderProcessor.cc:671
 
Row based triplet. 
Definition: RowTripletBasedTrackFinderProcessor.h:204
 
Equivalence classes. 
Definition: RowTripletBasedTrackFinderProcessor.h:295
 
rb_Segment(double, trpListType)
Construct row based segment from (unused hits of) triplets. 
Definition: RowTripletBasedTrackFinderProcessor.cc:890
 
double getPhi() const 
Get direction in XY. 
Definition: RowTripletBasedTrackFinderProcessor.cc:803
 
Row based doublet. 
Definition: RowTripletBasedTrackFinderProcessor.h:173
 
bool match(rb_Segment *, const double, const int) const 
Match segment with other segment. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1102
 
double _unusedCut
Chi2 cut for matching unused hits in XY and Z. 
Definition: RowTripletBasedTrackFinderProcessor.h:103
 
double getDistXY(const double, const double, const double, const double) const 
Get distance to point in XY (along direction) 
Definition: RowTripletBasedTrackFinderProcessor.cc:609
 
bool match(rb_Triplet *, const double, const double) const 
Match triplet with other triplet. 
Definition: RowTripletBasedTrackFinderProcessor.cc:831
 
double getVarZ(const double=0.) const 
Get Z variance. 
Definition: RowTripletBasedTrackFinderProcessor.cc:574
 
double getX() const 
Get X coordinate. 
Definition: RowTripletBasedTrackFinderProcessor.cc:538
 
Row based hit. 
Definition: RowTripletBasedTrackFinderProcessor.h:122
 
RowTripletBasedTrackFinderProcessor()
Construct processor. 
Definition: RowTripletBasedTrackFinderProcessor.cc:38
 
int getRow() const 
Get row number (of center hit). 
Definition: RowTripletBasedTrackFinderProcessor.cc:742
 
const hitListType & getHitList() const 
Get list of hits. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1064
 
int getNdf() const 
Get number of degrees of freedom (of segment fit). 
Definition: RowTripletBasedTrackFinderProcessor.cc:1044
 
rb_Hit * getHit(const int) const 
Get hit. 
Definition: RowTripletBasedTrackFinderProcessor.cc:717
 
std::string _inputColName
Name of the input collection. 
Definition: RowTripletBasedTrackFinderProcessor.h:95
 
bool _refAtPCA
Use Pca as reference point (else 1. hit) 
Definition: RowTripletBasedTrackFinderProcessor.h:106
 
int _maxGap
Cut for (row) distance to segment for matching unused hits in XY and Z. 
Definition: RowTripletBasedTrackFinderProcessor.h:104
 
double getVarXYDir() const 
Get XY variance (direction: phi). 
Definition: RowTripletBasedTrackFinderProcessor.cc:780
 
virtual void init()
Initialize processor. 
Definition: RowTripletBasedTrackFinderProcessor.cc:76
 
int getMod() const 
Get module number. 
Definition: RowTripletBasedTrackFinderProcessor.cc:528
 
bool _encodedModuleID
Module ID is encoded in CellID0. 
Definition: RowTripletBasedTrackFinderProcessor.h:105
 
double getVarXYPos(const double=0.) const 
Get XY variance (position). 
Definition: RowTripletBasedTrackFinderProcessor.cc:775
 
double _bfieldScaleFactor
scale factor for magnetic field (default: 1.0) 
Definition: RowTripletBasedTrackFinderProcessor.h:97
 
double getBzc() const 
Get Bz*c. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1019
 
void getParameters(double &, double &, double &, double &, double &, double &, double &, double &, double &, double &) const 
Get parameters. 
Definition: RowTripletBasedTrackFinderProcessor.cc:698
 
double getVarZDir() const 
Get Z variance (direction: tan(lambda)). 
Definition: RowTripletBasedTrackFinderProcessor.cc:793
 
void getPos(double *) const 
Get position. 
Definition: RowTripletBasedTrackFinderProcessor.cc:765
 
int getRow() const 
Get row number. 
Definition: RowTripletBasedTrackFinderProcessor.cc:533
 
virtual void processEvent(EVENT::LCEvent *evt)
Process event. 
Definition: RowTripletBasedTrackFinderProcessor.cc:104
 
double getVarZPos(const double=0.) const 
Get Z variance (position). 
Definition: RowTripletBasedTrackFinderProcessor.cc:788
 
rb_Hit * getHit(const int) const 
Get hit. 
Definition: RowTripletBasedTrackFinderProcessor.cc:879
 
double getZ() const 
Get Z coordinate. 
Definition: RowTripletBasedTrackFinderProcessor.cc:548
 
double _distCut
Coarse cut on XY and Z residuals for triplet preselection. 
Definition: RowTripletBasedTrackFinderProcessor.h:98
 
bool getUsed() const 
Get use flag. 
Definition: RowTripletBasedTrackFinderProcessor.cc:584
 
void print() const 
Print. 
Definition: RowTripletBasedTrackFinderProcessor.cc:467
 
Track finder based on triplets of rows. 
Definition: RowTripletBasedTrackFinderProcessor.h:74
 
double getZ() const 
Get Z coordinate. 
Definition: RowTripletBasedTrackFinderProcessor.cc:757
 
void fillRowMap(std::map< int, int > &) const 
Fill row map. 
Definition: RowTripletBasedTrackFinderProcessor.cc:1307
 
double _dirCut
Chi2 cut for triplet direction matching in XY and Z. 
Definition: RowTripletBasedTrackFinderProcessor.h:101
 
double _trpCut
Chi2 cut for triplet definition on XY and Z residuals. 
Definition: RowTripletBasedTrackFinderProcessor.h:99