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

Track finder based on Fast Hough Transformation. More...

#include <RowBasedFastHoughTransformationProcessor.h>

Inheritance diagram for marlintpc::RowBasedFastHoughTransformationProcessor:

Public Member Functions

virtual Processor * newProcessor ()
 
 RowBasedFastHoughTransformationProcessor ()
 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...
 
bool _useXY
 Use XY (anode plane) measurement. More...
 
bool _useXZ
 Use XZ (drift time) measurement. More...
 
double _centerXY
 Center of XY (anode plane) measurement. More...
 
double _rangeXY
 Range of XY (anode plane) measurement. More...
 
double _centerXZ
 Center of XZ (drift time) measurement. More...
 
double _rangeXZ
 Range of XZ (drift time) measurement. More...
 
int _minRow
 Minimal number of (correlated) rows. More...
 
float _fracRow
 Relative minimum cube content. More...
 
int _maxRowDiff
 Row correation parameter. More...
 
int _maxCube
 Maximum number of (hyper) cubes to check. More...
 
int _minLevel
 Minimum number of (hyper) cubes splittings. More...
 
int _maxLevel
 Maximum number of (hyper) cubes splittings. More...
 
float _effCut
 Minimum hit density (hits/tracklength) More...
 
float _purCut
 Maximum hit density (hits/tracklength) More...
 
int _maxHitsPerRow
 Maximum number hits per row. 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...
 
bool _timePixFlag
 Is timepix data. More...
 

Private Attributes

int _scaleBits
 number of scale bits (2^(_scaleBits) = 1.0) More...
 
double _Bzc
 magnetic field strength (Bz*c) More...
 
double _Xcenter
 TPC center, X coordinate. More...
 
double _Ycenter
 TPC center, Y coordinate. More...
 

Detailed Description

Track finder based on Fast Hough Transformation.

Fast Hough transformation to construct tracks from space points.

The average track direction is in (local) X direction. The measured coordinates have to be shifted and rescaled to: X->u in [-1, +1], Y,Z -> v,w in [-0.5, 0.5]. The resolution in v and w should be comparable. The track projections v(u), w(u) are parametrized by series of Legendre polynomials L_i, in the (XY) bending plane up to order 2 and in the (XZ) plane with order 1.:

The track parameters a_i, b_i are in [-0.5, +0.5] (the initial hypercube). Each space point defines 2 hyperplanes (v(u)-v_meas=0, w(u)-w_meas=0) in the 5 (or 4) dimensional parameter space (a_i, b_i) with normal vectors (L_i(u), 0.) and (0., L_i(u)). The unit normal vector is used to calculate the distance of a hyperplane to the center of a hypercube. They intersect if the absolute value of the distance times the largest component of the unit normal vector is smaller than 0.5. The root cube is recursivly split for each dimension in two child cubes. Only childs containing a minimum number of rows are considered further until the hit density in a cube is compatible with a single track. The search stops with the first found track candidate.

Extended for timepix data (allow multiple hits per row).

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: "FHTTracks")
"CenterXYMeasurement":doubleCenter of XY (anode plane) measurement (default 60.)
"RangeXYMeasurement":doubleRange of XY (anode plane) measurement (default 200.)
"CenterXZMeasurement":doubleCenter of XY (drift time) measurement (default 300.)
"RangeXZMeasurement":doubleRange of XY (drift time) measurement (default 600.)
"BFieldScaleFactor":doubleOptional parameter, scales magnetic field (map), use 1.0 (default) for field ON or 0.0 for field OFF
"UseXYMeasurement":boolOptional parameter, flag for using XY (anode plane) measurement (default true)
"UseXZMeasurement":boolOptional parameter, flag for using XZ (drift time) measurement (default true)
"MinimumRows":intOptional parameter, minimal number of (correlated) rows (default 8)
"MaximumRowDifference":intOptional parameter, row correation parameter (max. distance of correlated rows) (default 1)
"FractionOfRows":floatOptional parameter, relative minimum cube content (rows >= fraction * (correlated) rows) (default 0.8)
"MaximumCubes":intOptional parameter, maximum number of (hyper) cubes to check (default 250)
"MinimumLevel":intOptional parameter, minimum number of (hyper) cubes splittings (default 5)
"MaximumLevel":intOptional parameter, maximum number of (hyper) cubes splittings (default 8)
"EfficienyCut":floatOptional parameter, minimum hit density (hits/tracklength) (default 0.8)
"PurityCut":floatOptional parameter, maximum hit density (hits/tracklength) (default 1.1)
"MaxHitsPerRow":intOptional parameter, mximum number of hits per row (default 1)
"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)
"TimePixFlag":boolOptional parameter, is timepix data(default false)
Author
C. Kleinwort (140205)
Todo:
  • (average) track direction different from X direction ?
  • hit cleaning for segment creation ?
  • replace hard coded radial row number for timepix data ?

A detailed description is available as lcnote LC-TOOL-2014-006.

Definition at line 92 of file RowBasedFastHoughTransformationProcessor.h.

Constructor & Destructor Documentation

◆ RowBasedFastHoughTransformationProcessor()

marlintpc::RowBasedFastHoughTransformationProcessor::RowBasedFastHoughTransformationProcessor ( )

Member Function Documentation

◆ check()

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

Definition at line 408 of file RowBasedFastHoughTransformationProcessor.cc.

Referenced by newProcessor().

◆ end()

void marlintpc::RowBasedFastHoughTransformationProcessor::end ( )
virtual

Definition at line 412 of file RowBasedFastHoughTransformationProcessor.cc.

Referenced by newProcessor().

◆ init()

void marlintpc::RowBasedFastHoughTransformationProcessor::init ( )
virtual

Initialize processor.

Definition at line 97 of file RowBasedFastHoughTransformationProcessor.cc.

Referenced by newProcessor().

◆ newProcessor()

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

◆ processEvent()

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

Process event.

  • Prepare input: map of rows with vectors of hits
  • While sufficient input (unused (correlated) rows)
  1. From unused hits get x range and number of (correlated) rows (row <= lastRow + _maxRowDiff)
  2. Build hyperplanes, root cube entries (distances)
  3. Subdivide root cube
  4. Process candidate
  • Fill output collection.

Definition at line 107 of file RowBasedFastHoughTransformationProcessor.cc.

References _bfieldScaleFactor, _Bzc, _centerXY, _centerXZ, _effCut, _encodedModuleID, _fracRow, _inputColName, _maxCube, _maxGap, _maxHitsPerRow, _maxLevel, _maxRowDiff, _minLevel, _minRow, _outputColName, _purCut, _rangeXY, _rangeXZ, _refAtPCA, _scaleBits, _timePixFlag, _unusedCut, _useXY, _useXZ, _Xcenter, _Ycenter, marlintpc::rb_Segment::addHit(), marlintpc::rb_HyperCube::divide(), marlintpc::rb_Segment::fillRowMap(), marlintpc::rb_Segment::getFirstRow(), marlintpc::rb_Segment::getHitList(), marlintpc::rb_Segment::getLastRow(), marlintpc::rb_Segment::getNdf(), and marlintpc::rb_Segment::match().

Referenced by newProcessor().

◆ processRunHeader()

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

Definition at line 102 of file RowBasedFastHoughTransformationProcessor.cc.

Referenced by newProcessor().

Member Data Documentation

◆ _bfieldScaleFactor

double marlintpc::RowBasedFastHoughTransformationProcessor::_bfieldScaleFactor
protected

scale factor for magnetic field (default: 1.0)

Definition at line 115 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _Bzc

double marlintpc::RowBasedFastHoughTransformationProcessor::_Bzc
private

magnetic field strength (Bz*c)

Definition at line 139 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent().

◆ _centerXY

double marlintpc::RowBasedFastHoughTransformationProcessor::_centerXY
protected

Center of XY (anode plane) measurement.

Definition at line 118 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _centerXZ

double marlintpc::RowBasedFastHoughTransformationProcessor::_centerXZ
protected

Center of XZ (drift time) measurement.

Definition at line 120 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _effCut

float marlintpc::RowBasedFastHoughTransformationProcessor::_effCut
protected

Minimum hit density (hits/tracklength)

Definition at line 128 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _encodedModuleID

bool marlintpc::RowBasedFastHoughTransformationProcessor::_encodedModuleID
protected

Module ID is encoded in CellID0.

Definition at line 133 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _fracRow

float marlintpc::RowBasedFastHoughTransformationProcessor::_fracRow
protected

Relative minimum cube content.

Definition at line 123 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _inputColName

std::string marlintpc::RowBasedFastHoughTransformationProcessor::_inputColName
protected

Name of the input collection.

Definition at line 113 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _maxCube

int marlintpc::RowBasedFastHoughTransformationProcessor::_maxCube
protected

Maximum number of (hyper) cubes to check.

Definition at line 125 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _maxGap

int marlintpc::RowBasedFastHoughTransformationProcessor::_maxGap
protected

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

Definition at line 132 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _maxHitsPerRow

int marlintpc::RowBasedFastHoughTransformationProcessor::_maxHitsPerRow
protected

Maximum number hits per row.

Definition at line 130 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _maxLevel

int marlintpc::RowBasedFastHoughTransformationProcessor::_maxLevel
protected

Maximum number of (hyper) cubes splittings.

Definition at line 127 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _maxRowDiff

int marlintpc::RowBasedFastHoughTransformationProcessor::_maxRowDiff
protected

Row correation parameter.

Definition at line 124 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _minLevel

int marlintpc::RowBasedFastHoughTransformationProcessor::_minLevel
protected

Minimum number of (hyper) cubes splittings.

Definition at line 126 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _minRow

int marlintpc::RowBasedFastHoughTransformationProcessor::_minRow
protected

Minimal number of (correlated) rows.

Definition at line 122 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _outputColName

std::string marlintpc::RowBasedFastHoughTransformationProcessor::_outputColName
protected

Name of the output collection.

Definition at line 114 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _purCut

float marlintpc::RowBasedFastHoughTransformationProcessor::_purCut
protected

Maximum hit density (hits/tracklength)

Definition at line 129 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _rangeXY

double marlintpc::RowBasedFastHoughTransformationProcessor::_rangeXY
protected

Range of XY (anode plane) measurement.

Definition at line 119 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _rangeXZ

double marlintpc::RowBasedFastHoughTransformationProcessor::_rangeXZ
protected

Range of XZ (drift time) measurement.

Definition at line 121 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _refAtPCA

bool marlintpc::RowBasedFastHoughTransformationProcessor::_refAtPCA
protected

Use Pca as reference point (else 1. hit)

Definition at line 134 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _scaleBits

int marlintpc::RowBasedFastHoughTransformationProcessor::_scaleBits
private

number of scale bits (2^(_scaleBits) = 1.0)

Definition at line 138 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent().

◆ _timePixFlag

bool marlintpc::RowBasedFastHoughTransformationProcessor::_timePixFlag
protected

Is timepix data.

Definition at line 135 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _unusedCut

double marlintpc::RowBasedFastHoughTransformationProcessor::_unusedCut
protected

Chi2 cut for matching unused hits in XY and Z.

Definition at line 131 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _useXY

bool marlintpc::RowBasedFastHoughTransformationProcessor::_useXY
protected

Use XY (anode plane) measurement.

Definition at line 116 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _useXZ

bool marlintpc::RowBasedFastHoughTransformationProcessor::_useXZ
protected

Use XZ (drift time) measurement.

Definition at line 117 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent(), and RowBasedFastHoughTransformationProcessor().

◆ _Xcenter

double marlintpc::RowBasedFastHoughTransformationProcessor::_Xcenter
private

TPC center, X coordinate.

Definition at line 140 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent().

◆ _Ycenter

double marlintpc::RowBasedFastHoughTransformationProcessor::_Ycenter
private

TPC center, Y coordinate.

Definition at line 141 of file RowBasedFastHoughTransformationProcessor.h.

Referenced by processEvent().


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