MyMarlinTPC  170316
Public Member Functions | Private Member Functions | Private Attributes | List of all members
marlintpc::rb_Segment Class Reference

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 hitListTypegetHitList () 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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ rb_Segment() [1/3]

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.

Parameters
[in]BzcBz*c
[in]tripletslist 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().

◆ rb_Segment() [2/3]

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.

Parameters
[in]BzcBz*c
[in]hitslist of hits
[in]maxHitsPerRowmaximum 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().

◆ rb_Segment() [3/3]

marlintpc::rb_Segment::rb_Segment ( std::vector< rb_Segment *>  segments)

Member Function Documentation

◆ addHit()

void marlintpc::rb_Segment::addHit ( rb_Hit hit)

Add (unused) hit to segment.

Keeping row based ordering of hits. Hit is flagged as used.

Parameters
hithit 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().

◆ calcRefPoint()

void marlintpc::rb_Segment::calcRefPoint ( )
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().

◆ fillRowMap()

void marlintpc::rb_Segment::fillRowMap ( std::map< int, int > &  rowMap) const

Fill row map.

Parameters
[in,out]rowMaprow map

Definition at line 1297 of file RowTripletBasedTrackFinderProcessor.cc.

References _hitList.

Referenced by marlintpc::RowBasedFastHoughTransformationProcessor::processEvent().

◆ fitSegment()

void marlintpc::rb_Segment::fitSegment ( double  Bzc)
private

◆ getBzc()

double marlintpc::rb_Segment::getBzc ( ) const

Get Bz*c.

Definition at line 1019 of file RowTripletBasedTrackFinderProcessor.cc.

References _bzc.

◆ getChi2()

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().

◆ getCov()

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().

◆ getFirstRow()

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().

◆ getHitList()

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().

◆ getId()

int marlintpc::rb_Segment::getId ( ) const

Get segment ID.

Definition at line 1079 of file RowTripletBasedTrackFinderProcessor.cc.

References _segId.

◆ getLastRow()

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().

◆ getLCIOStateAtRefPoint()

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.

Parameters
[in]refPosreference point (X coordinate)
[out]newParparameter vector
[out]newCovcovariance matrix

Definition at line 1194 of file RowTripletBasedTrackFinderProcessor.cc.

References _bzc, _npar, getCov(), getPar(), getRefPoint(), marlintpc::simpleHelix::getStateAt(), and marlintpc::simpleHelix::helixToLCIOJacobian().

◆ getNdf()

int marlintpc::rb_Segment::getNdf ( ) const

◆ getPar() [1/2]

void marlintpc::rb_Segment::getPar ( double *  par) const

Get (all five helix) parameters from segment fit.

Parameters
[out]parhelix parameter (curvature is zero for Bz*c = 0.)

Definition at line 1057 of file RowTripletBasedTrackFinderProcessor.cc.

References _npar, and _parameters.

Referenced by match().

◆ getPar() [2/2]

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().

◆ getRefPoint()

void marlintpc::rb_Segment::getRefPoint ( double *  position) const

Get reference point.

Parameters
[out]positionposition of reference point

Definition at line 1037 of file RowTripletBasedTrackFinderProcessor.cc.

References _refX, _refY, and _refZ.

Referenced by getLCIOStateAtRefPoint(), and match().

◆ match() [1/3]

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.

Parameters
[in]segsegment to compare with
[in]chi2Cutchi2/ndf cut for segment matching
[in]trpStepSizetriplet step size (=2)
Returns
matching flag

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().

◆ match() [2/3]

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.

Parameters
[in]hithit to compare with
[in]chi2Cutchi2 cut for hit matching
Returns
matching flag

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().

◆ match() [3/3]

void marlintpc::rb_Segment::match ( hitListType hits,
hitListType matchingHits,
const double  chi2Cut 
) const

Match segment with (list of) unused hits.

Parameters
[in]hitshits to compare with
[in]matchingHitsmatching hits
[in]chi2Cutchi2 cut for hit matching

Definition at line 1178 of file RowTripletBasedTrackFinderProcessor.cc.

References match().

◆ setId()

void marlintpc::rb_Segment::setId ( int  id)

Set segment ID.

Parameters
[in]idID

Definition at line 1087 of file RowTripletBasedTrackFinderProcessor.cc.

References _segId.

Member Data Documentation

◆ _bzc

double marlintpc::rb_Segment::_bzc
private

magnetic field strength (Bz*c)

Definition at line 276 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by getBzc(), getLCIOStateAtRefPoint(), match(), and rb_Segment().

◆ _chi2

double marlintpc::rb_Segment::_chi2
private

chi2 from segment fit

Definition at line 282 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by fitSegment(), getChi2(), and rb_Segment().

◆ _covariance

TMatrixDSym marlintpc::rb_Segment::_covariance
private

covariance matrix

Definition at line 284 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by fitSegment(), getCov(), and rb_Segment().

◆ _hitList

hitListType marlintpc::rb_Segment::_hitList
private

◆ _ndf

int marlintpc::rb_Segment::_ndf
private

number of degrees of freedom of segment fit

Definition at line 281 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by fitSegment(), getNdf(), and rb_Segment().

◆ _npar

int marlintpc::rb_Segment::_npar
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().

◆ _parameters

TVectorD marlintpc::rb_Segment::_parameters
private

parameter vector

Definition at line 283 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by fitSegment(), getPar(), and rb_Segment().

◆ _refX

double marlintpc::rb_Segment::_refX
private

X of reference point.

Definition at line 277 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by calcRefPoint(), fitSegment(), getRefPoint(), and rb_Segment().

◆ _refY

double marlintpc::rb_Segment::_refY
private

Y of reference point.

Definition at line 278 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by calcRefPoint(), fitSegment(), getRefPoint(), and rb_Segment().

◆ _refZ

double marlintpc::rb_Segment::_refZ
private

Z of reference point.

Definition at line 279 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by calcRefPoint(), fitSegment(), getRefPoint(), and rb_Segment().

◆ _segId

int marlintpc::rb_Segment::_segId
private

segment ID

Definition at line 274 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by getId(), rb_Segment(), and setId().


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