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

Track finder based on triplets of rows. More...

#include <RowTripletBasedTrackFinderProcessor.h>

Inheritance diagram for marlintpc::RowTripletBasedTrackFinderProcessor:

Public Member Functions

virtual Processor * newProcessor ()
 
 RowTripletBasedTrackFinderProcessor ()
 Construct processor. More...
 
virtual void init ()
 Initialize processor. More...
 
virtual void processRunHeader (EVENT::LCRunHeader *run)
 
virtual void processEvent (EVENT::LCEvent *evt)
 Process event. More...
 
virtual void check (EVENT::LCEvent *evt)
 
virtual void end ()
 

Protected Attributes

std::string _inputColName
 Name of the input collection. More...
 
std::string _outputColName
 Name of the output collection. More...
 
double _bfieldScaleFactor
 scale factor for magnetic field (default: 1.0) More...
 
double _distCut
 Coarse cut on XY and Z residuals for triplet preselection. More...
 
double _trpCut
 Chi2 cut for triplet definition on XY and Z residuals. More...
 
double _posCut
 Chi2 cut for triplet position matching in XY and Z. More...
 
double _dirCut
 Chi2 cut for triplet direction matching in XY and Z. More...
 
double _segCut
 Chi2/Ndf cut for segment matching (Ndf=4 for B off, 5 for B on) More...
 
double _unusedCut
 Chi2 cut for matching unused hits in XY and Z. More...
 
int _maxGap
 Cut for (row) distance to segment for matching unused hits in XY and Z. More...
 
bool _encodedModuleID
 Module ID is encoded in CellID0. More...
 
bool _refAtPCA
 Use Pca as reference point (else 1. hit) More...
 

Private Member Functions

bool areNeighbourModules (gear::TPCModule *, gear::TPCModule *, bool)
 Check if modules are neighbours. More...
 

Private Attributes

double _Bzc
 magnetic field strength (Bz*c) More...
 
std::map< int, std::vector< int > > _modNeighbours
 neighbour modules More...
 
double _Xcenter
 TPC center, X coordinate. More...
 
double _Ycenter
 TPC center, Y coordinate. More...
 

Detailed Description

Track finder based on triplets of rows.

Inspired by H1 pattern recognition by V. Blobel (Univ. Hamburg).

Input are the (position, measurement direction and errors) of the TPC hits and module parameters (offset and extend) from GEAR.

In each module (with hits):

Segments from each module are combined with compatible segments from the corresponding neighbouring modules to build track candidates. As reference point for the track canidates the first hit is used (optional: PCA).

The hits on the track candidates are ordered by row number, no multiple hits in a row are allowed. All matching criteria use chi2 cuts based on the hit measurement errors. The calculation of the measurement (pad) direction in XY uses "module.getLocalPadLayout().getCoordinateType()" to select polar or cartesian pad row geometry.

Parameters
"InputHits":stringThe name of the input collection of TPC hits (default: "TPCHits")
"OutputTracks":stringThe name of the output collection with the found tracks (default: "TripletTracks")
"BFieldScaleFactor":doubleOptional parameter, scales magnetic field (map), use 1.0 (default) for field ON or 0.0 for field OFF
"TripletPreSelectionDistCut":doubleOptional parameter, coarse cut on XY and Z residuals for triplet preselection (default 10.)
"TripletDefinitionChi2Cut":doubleOptional parameter, Chi2 cut for triplet definition on XY and Z residuals (default 20.)
"TripletPositionMatchingChi2Cut":doubleOptional parameter, Chi2 cut for triplet position matching in XY and Z (default 20.)
"TripletDirectionMatchingChi2Cut":doubleOptional parameter, Chi2 cut for triplet direction matching in XY and Z (default 20.)
"SegmentMatchingChi2Cut":doubleOptional parameter, Chi2/Ndf cut for segment matching (Ndf=4 for B off, 5 for B on) (default 30.)
"UnusedHitMatchingChi2Cut":doubleOptional parameter, Chi2 cut for matching unused hits in XY and Z (default 20.)
"UnusedHitMaxGapCut:intOptional parameter, maximal (row) gap for matching unused hits in XY and Z (default 4)
"EncodedModuleID":boolOptional parameter, flag for encoding of module ID in CellID0 (default true)
"ReferencePointAtPca":boolOptional parameter, use PCA as reference point, else 1. hit (default false)
Author
C. Kleinwort (130729)
Todo:
  • definition of module neighbourhood from POLAR module extend ?
  • better resolve equivalent (indirectly matching) overlapping segments ?

A detailed description is available as lcnote LC-TOOL-2014-004. Changes with respect to this note:

Definition at line 77 of file RowTripletBasedTrackFinderProcessor.h.

Constructor & Destructor Documentation

◆ RowTripletBasedTrackFinderProcessor()

marlintpc::RowTripletBasedTrackFinderProcessor::RowTripletBasedTrackFinderProcessor ( )

Member Function Documentation

◆ areNeighbourModules()

bool marlintpc::RowTripletBasedTrackFinderProcessor::areNeighbourModules ( gear::TPCModule *  mod1,
gear::TPCModule *  mod2,
bool  cartesian 
)
private

Check if modules are neighbours.

Parameters
[in]mod1first module
[in]mod2second module
[in]cartesianflag for cartesian coordinates
Returns
flag
Todo:
implement non cartesian (=polar) case

Use getModuleExtent to define module center and extension, cut on distance normalized to (projected) extension (squared)

Definition at line 438 of file RowTripletBasedTrackFinderProcessor.cc.

Referenced by init().

◆ check()

void marlintpc::RowTripletBasedTrackFinderProcessor::check ( EVENT::LCEvent *  evt)
virtual

Definition at line 422 of file RowTripletBasedTrackFinderProcessor.cc.

Referenced by newProcessor().

◆ end()

void marlintpc::RowTripletBasedTrackFinderProcessor::end ( )
virtual

Definition at line 426 of file RowTripletBasedTrackFinderProcessor.cc.

Referenced by newProcessor().

◆ init()

void marlintpc::RowTripletBasedTrackFinderProcessor::init ( )
virtual

Initialize processor.

Definition at line 76 of file RowTripletBasedTrackFinderProcessor.cc.

References _modNeighbours, _Xcenter, _Ycenter, and areNeighbourModules().

Referenced by newProcessor().

◆ newProcessor()

virtual Processor* marlintpc::RowTripletBasedTrackFinderProcessor::newProcessor ( )
inlinevirtual

◆ processEvent()

void marlintpc::RowTripletBasedTrackFinderProcessor::processEvent ( EVENT::LCEvent *  evt)
virtual

Process event.

  • Prepare input: map of modules with maps of rows with vectors of hits
  • For each module independently build track segments from triplets.
  1. Look for triplets.
  2. Look for segments = triplet chains.
  3. Link segments (in module).
  4. Link unused hits to segments.
  • Link segments between modules.
  • Fill output collection.

Definition at line 104 of file RowTripletBasedTrackFinderProcessor.cc.

References _bfieldScaleFactor, _Bzc, _dirCut, _distCut, _encodedModuleID, _inputColName, _maxGap, _modNeighbours, _outputColName, _posCut, _refAtPCA, _segCut, _trpCut, _unusedCut, _Xcenter, _Ycenter, marlintpc::simpleEquiClasses::addIndex(), marlintpc::simpleEquiClasses::addMatch(), marlintpc::simpleEquiClasses::getClasses(), marlintpc::rb_Segment::getNdf(), and marlintpc::rb_Doublet::match().

Referenced by newProcessor().

◆ processRunHeader()

void marlintpc::RowTripletBasedTrackFinderProcessor::processRunHeader ( EVENT::LCRunHeader *  run)
virtual

Definition at line 99 of file RowTripletBasedTrackFinderProcessor.cc.

Referenced by newProcessor().

Member Data Documentation

◆ _bfieldScaleFactor

double marlintpc::RowTripletBasedTrackFinderProcessor::_bfieldScaleFactor
protected

scale factor for magnetic field (default: 1.0)

Definition at line 100 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by processEvent(), and RowTripletBasedTrackFinderProcessor().

◆ _Bzc

double marlintpc::RowTripletBasedTrackFinderProcessor::_Bzc
private

magnetic field strength (Bz*c)

Definition at line 113 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by processEvent().

◆ _dirCut

double marlintpc::RowTripletBasedTrackFinderProcessor::_dirCut
protected

Chi2 cut for triplet direction matching in XY and Z.

Definition at line 104 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by processEvent(), and RowTripletBasedTrackFinderProcessor().

◆ _distCut

double marlintpc::RowTripletBasedTrackFinderProcessor::_distCut
protected

Coarse cut on XY and Z residuals for triplet preselection.

Definition at line 101 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by processEvent(), and RowTripletBasedTrackFinderProcessor().

◆ _encodedModuleID

bool marlintpc::RowTripletBasedTrackFinderProcessor::_encodedModuleID
protected

Module ID is encoded in CellID0.

Definition at line 108 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by processEvent(), and RowTripletBasedTrackFinderProcessor().

◆ _inputColName

std::string marlintpc::RowTripletBasedTrackFinderProcessor::_inputColName
protected

Name of the input collection.

Definition at line 98 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by processEvent(), and RowTripletBasedTrackFinderProcessor().

◆ _maxGap

int marlintpc::RowTripletBasedTrackFinderProcessor::_maxGap
protected

Cut for (row) distance to segment for matching unused hits in XY and Z.

Definition at line 107 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by processEvent(), and RowTripletBasedTrackFinderProcessor().

◆ _modNeighbours

std::map<int, std::vector<int> > marlintpc::RowTripletBasedTrackFinderProcessor::_modNeighbours
private

neighbour modules

Definition at line 114 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by init(), and processEvent().

◆ _outputColName

std::string marlintpc::RowTripletBasedTrackFinderProcessor::_outputColName
protected

Name of the output collection.

Definition at line 99 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by processEvent(), and RowTripletBasedTrackFinderProcessor().

◆ _posCut

double marlintpc::RowTripletBasedTrackFinderProcessor::_posCut
protected

Chi2 cut for triplet position matching in XY and Z.

Definition at line 103 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by processEvent(), and RowTripletBasedTrackFinderProcessor().

◆ _refAtPCA

bool marlintpc::RowTripletBasedTrackFinderProcessor::_refAtPCA
protected

Use Pca as reference point (else 1. hit)

Definition at line 109 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by processEvent(), and RowTripletBasedTrackFinderProcessor().

◆ _segCut

double marlintpc::RowTripletBasedTrackFinderProcessor::_segCut
protected

Chi2/Ndf cut for segment matching (Ndf=4 for B off, 5 for B on)

Definition at line 105 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by processEvent(), and RowTripletBasedTrackFinderProcessor().

◆ _trpCut

double marlintpc::RowTripletBasedTrackFinderProcessor::_trpCut
protected

Chi2 cut for triplet definition on XY and Z residuals.

Definition at line 102 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by processEvent(), and RowTripletBasedTrackFinderProcessor().

◆ _unusedCut

double marlintpc::RowTripletBasedTrackFinderProcessor::_unusedCut
protected

Chi2 cut for matching unused hits in XY and Z.

Definition at line 106 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by processEvent(), and RowTripletBasedTrackFinderProcessor().

◆ _Xcenter

double marlintpc::RowTripletBasedTrackFinderProcessor::_Xcenter
private

TPC center, X coordinate.

Definition at line 115 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by init(), and processEvent().

◆ _Ycenter

double marlintpc::RowTripletBasedTrackFinderProcessor::_Ycenter
private

TPC center, Y coordinate.

Definition at line 116 of file RowTripletBasedTrackFinderProcessor.h.

Referenced by init(), and processEvent().


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