MarlinTPC  1.2.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
marlintpc::TrackFinderRectangularProcessor Class Reference

Processor to find linear tracks using linear regression, based on a modified version of the track following algorithm. More...

#include <TrackFinderRectangularProcessor.h>

Inheritance diagram for marlintpc::TrackFinderRectangularProcessor:

Public Member Functions

virtual Processor * newProcessor ()
 
virtual void init ()
 Called at the begin of the job before anything is read. More...
 
virtual void processRunHeader (lcio::LCRunHeader *run)
 Called for every run.
 
virtual void processEvent (lcio::LCEvent *evt)
 Called for every event - the working horse.
 
virtual void check (lcio::LCEvent *evt)
 
virtual void end ()
 Called after data processing for clean up.
 

Protected Member Functions

void zeroFlags (bool *IsIn)
 Set flags if hit is in a track to zero.
 
void addTrackCandidateFlags ()
 Add the hits of the track candidate to the isInTrack flag array.
 
void createNewIsInTrackFlags ()
 
IMPL::TrackerHitImpl extrapolateNextHit (double y)
 Extrapolate the next expected hit on the track.
 
void doRegression (EVENT::Track *trackCandidate)
 Calculate the track parameters from the hits. More...
 

Protected Attributes

std::string _inputColName
 
std::string _outputColName
 
int _outputIsTransient
 give the status which is set to the transient flag of the output collection it is an int instead of a boolean, because the processor parameter cannot be a boolean
 
gear::PadRowLayout2D const * _padLayout
 The pad layout as defined in GEAR.
 
int _rowHeight
 
int _minTrackHits
 Minimum number of hits on track.
 
int _maxSkipRows
 Maximum number of missing hits.
 
float _deltaX
 Maximum distances between predicted and measured hit.
 
float _deltaY
 
float _deltaZ
 
int _nRun
 !!!!! This information should come from the conditions data! Implemented as processor parameter for first tests! More...
 
int _nEvt
 The total number of events.
 
int _verbosityLevel
 Flag about verbosity of the processor. More...
 
bool * isInTrack
 Array of flags whether a hit is in a track.
 
bool * isInTrackCandidate
 Array of flags whether a hit is in the current track candidate.
 
unsigned int nHits
 Number of hits in the current event.
 
struct {
   float   a
 
   float   b
 
   float   c
 
   float   d
 
straightLine
 Straight line for linear regression. More...
 

Detailed Description

Processor to find linear tracks using linear regression, based on a modified version of the track following algorithm.

It assumes the hits being equidistantly spaced in y, which is the case for a TPC with rectangular pad layout (straight rows).

Input - Prerequisites

Collection of TrackerHits, sorted in y, x and z (in this order). A sorting function might be implemented in a later version or provided as a separate processor. For the time being the HitFinder has provide sorted hits.

Output

Collection of Tracks

Parameters
InputCollectionNameName of input data collection (default: TPCHits)
OutputCollectionNameName of output data collection (default: TPCSeedTracks)
SetOutputTransientIf not 0 the output collection is set transient (default: 0)

This processor is intended to work as a finder, the fitting is done by a more advanced fitting algorithm. In this case the output can be set transient, so the seed tracks are not written to disk.
As the finding algorithm performs a linear regression, which is equivalent to a $\chi^2$ minimisation for straight tracks, all track parameters are available and the track fitting can be skipped. In this case the output collection name should be changed to TPCTracks.

Parameters
MinTrackHitsMinimum number of hits on the track
MaxSkipRowsMaximum number of subsequently missing hits
DeltaXMaximum x distances between predicted and measured hit
DeltaYMaximum y distances between predicted and measured hit
DeltaZMaximum z distances between predicted and measured hit

Member Function Documentation

void marlintpc::TrackFinderRectangularProcessor::doRegression ( EVENT::Track *  trackCandidate)
protected

Calculate the track parameters from the hits.

This is done by linear regression, which is equivalent to a $\chi^2$ minimisation for a straight line.

The straight line is parameterised in the xy and the zy plane:
x=ay+b ; z=c*y+d
Calculate a and b ; c and d analytically by linear regression. (As track is going predominantly along the y direction, this coordinate is set to the centre of the pad and regarded without uncertainty)

\[a=\frac{\sum y_i\sum x_i-n\sum y_i x_i} {(\sum y_i)^2 - n \sum y_i^2}\]

\[b=\frac{\sum y_i\sum y_i x_i - n\sum y_i^2 x_i} {(\sum y_i)^2 - n \sum y_i^2}\]

(see for instance W. Walcher, Praktikum der Physik, Teubner Taschenbücher Physik, 1994)

References _verbosityLevel, and straightLine.

Referenced by processEvent().

void marlintpc::TrackFinderRectangularProcessor::init ( )
virtual

Called at the begin of the job before anything is read.

Use to initialize the processor, e.g. book histograms.

References _nEvt, _nRun, _padLayout, and _verbosityLevel.

Member Data Documentation

std::string marlintpc::TrackFinderRectangularProcessor::_inputColName
protected
  • the name of the input collection

Referenced by processEvent().

int marlintpc::TrackFinderRectangularProcessor::_nRun
protected

!!!!! This information should come from the conditions data! Implemented as processor parameter for first tests!

The number of runs

Referenced by end(), init(), and processRunHeader().

std::string marlintpc::TrackFinderRectangularProcessor::_outputColName
protected
  • the name of the output collection

Referenced by processEvent().

int marlintpc::TrackFinderRectangularProcessor::_verbosityLevel
protected

Flag about verbosity of the processor.

To help to understand and to debug the algorithm a lot of output can be switched on.

  • 0 : quiet, only report errors
  • 1 : normal, default, status of processor parameters and event statistics
  • 2 : rebort about every event
  • 3 : report about every track candidate
  • 4 : report about every hit
  • 5 : rebort about everything

Referenced by addTrackCandidateFlags(), doRegression(), end(), extrapolateNextHit(), init(), processEvent(), and zeroFlags().

struct { ... } marlintpc::TrackFinderRectangularProcessor::straightLine

Straight line for linear regression.


The staright line is defined with 4 parameters:
x=ay+b ; z=cy+d

Referenced by doRegression(), extrapolateNextHit(), and processEvent().


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