MyMarlinTPC
170316
|
Row based segment. More...
#include <RowTripletBasedTrackFinderProcessor.h>
Public Member Functions | |
rb_Segment (double, trpListType) | |
Construct row based segment from (unused hits of) triplets. More... | |
rb_Segment (double, hitListType, unsigned int=1) | |
Construct row based segment from (unused) hits in list. More... | |
rb_Segment (std::vector< rb_Segment *> segments) | |
double | getBzc () const |
Get Bz*c. More... | |
int | getFirstRow () const |
Get first row number. More... | |
int | getLastRow () const |
Get first last number. More... | |
void | getRefPoint (double *) const |
Get reference point. More... | |
int | getNdf () const |
Get number of degrees of freedom (of segment fit). More... | |
double | getChi2 () const |
Get chi2 from segment fit. More... | |
void | getPar (double *) const |
Get (all five helix) parameters from segment fit. More... | |
const hitListType & | getHitList () const |
Get list of hits. More... | |
const TVectorD & | getPar () const |
Get parameter vector. More... | |
const TMatrixDSym & | getCov () const |
Get covariance matrix. More... | |
bool | match (rb_Segment *, const double, const int) const |
Match segment with other segment. More... | |
bool | match (rb_Hit *, const double) const |
Match segment with unused hit. More... | |
void | match (hitListType &, hitListType &, const double) const |
Match segment with (list of) unused hits. More... | |
void | getLCIOStateAtRefPoint (const double *, TVectorD &, TMatrixDSym &) const |
Get segment state at reference point. More... | |
void | fillRowMap (std::map< int, int > &) const |
Fill row map. More... | |
int | getId () const |
Get segment ID. More... | |
void | setId (int) |
Set segment ID. More... | |
void | addHit (rb_Hit *) |
Add (unused) hit to segment. More... | |
Private Member Functions | |
void | calcRefPoint () |
Calculate reference point (from first and last hit). More... | |
void | fitSegment (double) |
Fit segment from hits. More... | |
Private Attributes | |
int | _segId |
segment ID More... | |
hitListType | _hitList |
pointers to hits More... | |
double | _bzc |
magnetic field strength (Bz*c) More... | |
double | _refX |
X of reference point. More... | |
double | _refY |
Y of reference point. More... | |
double | _refZ |
Z of reference point. More... | |
int | _npar |
number of parameters (5: helix, 4: line) More... | |
int | _ndf |
number of degrees of freedom of segment fit More... | |
double | _chi2 |
chi2 from segment fit More... | |
TVectorD | _parameters |
parameter vector More... | |
TMatrixDSym | _covariance |
covariance matrix More... | |
Row based segment.
Is build from (the unused hits) of matching triplets (from equivalence classes) and fitted in XY and ZS (or from other matching segments).
Definition at line 249 of file RowTripletBasedTrackFinderProcessor.h.
marlintpc::rb_Segment::rb_Segment | ( | double | Bzc, |
trpListType | triplets | ||
) |
Construct row based segment from (unused hits of) triplets.
Build and fit segments. Corresponding hits are flagged as used.
[in] | Bzc | Bz*c |
[in] | triplets | list of triplets |
Definition at line 890 of file RowTripletBasedTrackFinderProcessor.cc.
References _hitList, fitSegment(), marlintpc::rb_Hit::getRow(), marlintpc::rb_Hit::getUsed(), and marlintpc::rb_Hit::setUsed().
Referenced by rb_Segment().
marlintpc::rb_Segment::rb_Segment | ( | double | Bzc, |
hitListType | hits, | ||
unsigned int | maxHitsPerRow = 1 |
||
) |
Construct row based segment from (unused) hits in list.
Build and fit segments. Corresponding hits are flagged as used.
[in] | Bzc | Bz*c |
[in] | hits | list of hits |
[in] | maxHitsPerRow | maximum number of hits per row |
Definition at line 918 of file RowTripletBasedTrackFinderProcessor.cc.
References _bzc, _chi2, _covariance, _hitList, _ndf, _npar, _parameters, _refX, _refY, _refZ, _segId, calcRefPoint(), fitSegment(), marlintpc::rb_Hit::getRow(), marlintpc::simpleHelix::getStateAt(), marlintpc::rb_Hit::getUsed(), rb_Segment(), and marlintpc::rb_Hit::setUsed().
marlintpc::rb_Segment::rb_Segment | ( | std::vector< rb_Segment *> | segments | ) |
void marlintpc::rb_Segment::addHit | ( | rb_Hit * | hit | ) |
Add (unused) hit to segment.
Keeping row based ordering of hits. Hit is flagged as used.
hit | hit to add |
Definition at line 1308 of file RowTripletBasedTrackFinderProcessor.cc.
References _hitList, marlintpc::rb_Hit::getRow(), and marlintpc::rb_Hit::setUsed().
Referenced by marlintpc::RowBasedFastHoughTransformationProcessor::processEvent().
|
private |
Calculate reference point (from first and last hit).
Definition at line 1209 of file RowTripletBasedTrackFinderProcessor.cc.
References _hitList, _refX, _refY, and _refZ.
Referenced by fitSegment(), and rb_Segment().
void marlintpc::rb_Segment::fillRowMap | ( | std::map< int, int > & | rowMap | ) | const |
Fill row map.
[in,out] | rowMap | row map |
Definition at line 1297 of file RowTripletBasedTrackFinderProcessor.cc.
References _hitList.
Referenced by marlintpc::RowBasedFastHoughTransformationProcessor::processEvent().
|
private |
Fit segment from hits.
Definition at line 1219 of file RowTripletBasedTrackFinderProcessor.cc.
References _chi2, _covariance, _hitList, _ndf, _npar, _parameters, _refX, _refY, _refZ, marlintpc::simpleFitXY::addPoint(), marlintpc::simpleFitZS::addPoint(), calcRefPoint(), marlintpc::simpleFitXY::fit(), marlintpc::simpleFitZS::fit(), marlintpc::simpleHelix::getArcLengthXY(), marlintpc::simpleFitXY::getCov(), marlintpc::simpleFitZS::getCov(), marlintpc::simpleFitXY::getPar(), and marlintpc::simpleFitZS::getPar().
Referenced by rb_Segment().
double marlintpc::rb_Segment::getBzc | ( | ) | const |
double marlintpc::rb_Segment::getChi2 | ( | ) | const |
Get chi2 from segment fit.
Definition at line 1049 of file RowTripletBasedTrackFinderProcessor.cc.
References _chi2.
Referenced by marlintpc::RowBasedPadPulseRoadSearchProcessor::processEvent().
const TMatrixDSym & marlintpc::rb_Segment::getCov | ( | ) | const |
Get covariance matrix.
Definition at line 1074 of file RowTripletBasedTrackFinderProcessor.cc.
References _covariance.
Referenced by getLCIOStateAtRefPoint(), and match().
int marlintpc::rb_Segment::getFirstRow | ( | ) | const |
Get first row number.
Definition at line 1024 of file RowTripletBasedTrackFinderProcessor.cc.
References _hitList.
Referenced by match(), and marlintpc::RowBasedFastHoughTransformationProcessor::processEvent().
const hitListType & marlintpc::rb_Segment::getHitList | ( | ) | const |
Get list of hits.
Definition at line 1064 of file RowTripletBasedTrackFinderProcessor.cc.
References _hitList.
Referenced by marlintpc::RowBasedFastHoughTransformationProcessor::processEvent().
int marlintpc::rb_Segment::getId | ( | ) | const |
Get segment ID.
Definition at line 1079 of file RowTripletBasedTrackFinderProcessor.cc.
References _segId.
int marlintpc::rb_Segment::getLastRow | ( | ) | const |
Get first last number.
Definition at line 1029 of file RowTripletBasedTrackFinderProcessor.cc.
References _hitList.
Referenced by match(), and marlintpc::RowBasedFastHoughTransformationProcessor::processEvent().
void marlintpc::rb_Segment::getLCIOStateAtRefPoint | ( | const double * | refPos, |
TVectorD & | newPar, | ||
TMatrixDSym & | newCov | ||
) | const |
Get segment state at reference point.
Propagate track state at point and transform from helix to LCIO representation.
[in] | refPos | reference point (X coordinate) |
[out] | newPar | parameter vector |
[out] | newCov | covariance matrix |
Definition at line 1194 of file RowTripletBasedTrackFinderProcessor.cc.
References _bzc, _npar, getCov(), getPar(), getRefPoint(), marlintpc::simpleHelix::getStateAt(), and marlintpc::simpleHelix::helixToLCIOJacobian().
int marlintpc::rb_Segment::getNdf | ( | ) | const |
Get number of degrees of freedom (of segment fit).
Definition at line 1044 of file RowTripletBasedTrackFinderProcessor.cc.
References _ndf.
Referenced by marlintpc::RowTripletBasedTrackFinderProcessor::processEvent(), marlintpc::RowBasedFastHoughTransformationProcessor::processEvent(), and marlintpc::RowBasedPadPulseRoadSearchProcessor::processEvent().
void marlintpc::rb_Segment::getPar | ( | double * | par | ) | const |
Get (all five helix) parameters from segment fit.
[out] | par | helix parameter (curvature is zero for Bz*c = 0.) |
Definition at line 1057 of file RowTripletBasedTrackFinderProcessor.cc.
References _npar, and _parameters.
Referenced by match().
const TVectorD & marlintpc::rb_Segment::getPar | ( | ) | const |
Get parameter vector.
Definition at line 1069 of file RowTripletBasedTrackFinderProcessor.cc.
References _parameters.
Referenced by getLCIOStateAtRefPoint(), and match().
void marlintpc::rb_Segment::getRefPoint | ( | double * | position | ) | const |
Get reference point.
[out] | position | position of reference point |
Definition at line 1037 of file RowTripletBasedTrackFinderProcessor.cc.
References _refX, _refY, and _refZ.
Referenced by getLCIOStateAtRefPoint(), and match().
bool marlintpc::rb_Segment::match | ( | rb_Segment * | seg, |
const double | chi2Cut, | ||
const int | trpStepSize | ||
) | const |
Match segment with other segment.
Compare the (4 (line) or 5 (helix)) track parameters (at the mid point). The segments must not overlap (in rows) and the (row) gap must be smaller than the average length.
[in] | seg | segment to compare with |
[in] | chi2Cut | chi2/ndf cut for segment matching |
[in] | trpStepSize | triplet step size (=2) |
Definition at line 1102 of file RowTripletBasedTrackFinderProcessor.cc.
References _bzc, _npar, getCov(), getFirstRow(), getLastRow(), getPar(), getRefPoint(), and marlintpc::simpleHelix::getStateAt().
Referenced by match(), and marlintpc::RowBasedFastHoughTransformationProcessor::processEvent().
bool marlintpc::rb_Segment::match | ( | rb_Hit * | hit, |
const double | chi2Cut | ||
) | const |
Match segment with unused hit.
Compare the (2) positional track parameters at the hit with the hit measurements (are zero there) and errors.
[in] | hit | hit to compare with |
[in] | chi2Cut | chi2 cut for hit matching |
Definition at line 1146 of file RowTripletBasedTrackFinderProcessor.cc.
References _bzc, _npar, getCov(), marlintpc::simpleHelix::getExpectedPlanePos(), getPar(), marlintpc::rb_Hit::getPhiMeas(), marlintpc::rb_Hit::getPos(), getRefPoint(), marlintpc::simpleHelix::getStateAt(), marlintpc::rb_Hit::getVarXY(), and marlintpc::rb_Hit::getVarZ().
void marlintpc::rb_Segment::match | ( | hitListType & | hits, |
hitListType & | matchingHits, | ||
const double | chi2Cut | ||
) | const |
Match segment with (list of) unused hits.
[in] | hits | hits to compare with |
[in] | matchingHits | matching hits |
[in] | chi2Cut | chi2 cut for hit matching |
Definition at line 1178 of file RowTripletBasedTrackFinderProcessor.cc.
References match().
void marlintpc::rb_Segment::setId | ( | int | id | ) |
Set segment ID.
[in] | id | ID |
Definition at line 1087 of file RowTripletBasedTrackFinderProcessor.cc.
References _segId.
|
private |
magnetic field strength (Bz*c)
Definition at line 276 of file RowTripletBasedTrackFinderProcessor.h.
Referenced by getBzc(), getLCIOStateAtRefPoint(), match(), and rb_Segment().
|
private |
chi2 from segment fit
Definition at line 282 of file RowTripletBasedTrackFinderProcessor.h.
Referenced by fitSegment(), getChi2(), and rb_Segment().
|
private |
covariance matrix
Definition at line 284 of file RowTripletBasedTrackFinderProcessor.h.
Referenced by fitSegment(), getCov(), and rb_Segment().
|
private |
pointers to hits
Definition at line 275 of file RowTripletBasedTrackFinderProcessor.h.
Referenced by addHit(), calcRefPoint(), fillRowMap(), fitSegment(), getFirstRow(), getHitList(), getLastRow(), and rb_Segment().
|
private |
number of degrees of freedom of segment fit
Definition at line 281 of file RowTripletBasedTrackFinderProcessor.h.
Referenced by fitSegment(), getNdf(), and rb_Segment().
|
private |
number of parameters (5: helix, 4: line)
Definition at line 280 of file RowTripletBasedTrackFinderProcessor.h.
Referenced by fitSegment(), getLCIOStateAtRefPoint(), getPar(), match(), and rb_Segment().
|
private |
parameter vector
Definition at line 283 of file RowTripletBasedTrackFinderProcessor.h.
Referenced by fitSegment(), getPar(), and rb_Segment().
|
private |
X of reference point.
Definition at line 277 of file RowTripletBasedTrackFinderProcessor.h.
Referenced by calcRefPoint(), fitSegment(), getRefPoint(), and rb_Segment().
|
private |
Y of reference point.
Definition at line 278 of file RowTripletBasedTrackFinderProcessor.h.
Referenced by calcRefPoint(), fitSegment(), getRefPoint(), and rb_Segment().
|
private |
Z of reference point.
Definition at line 279 of file RowTripletBasedTrackFinderProcessor.h.
Referenced by calcRefPoint(), fitSegment(), getRefPoint(), and rb_Segment().
|
private |
segment ID
Definition at line 274 of file RowTripletBasedTrackFinderProcessor.h.
Referenced by getId(), rb_Segment(), and setId().