|
MarlinTPC
1.2.0
|
Processor to find linear tracks using linear regression, based on a modified version of the track following algorithm. More...
#include <TrackFinderRectangularProcessor.h>
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... | |
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).
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.
Collection of Tracks
| InputCollectionName | Name of input data collection (default: TPCHits) |
| OutputCollectionName | Name of output data collection (default: TPCSeedTracks) |
| SetOutputTransient | If 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
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.
| MinTrackHits | Minimum number of hits on the track |
| MaxSkipRows | Maximum number of subsequently missing hits |
| DeltaX | Maximum x distances between predicted and measured hit |
| DeltaY | Maximum y distances between predicted and measured hit |
| DeltaZ | Maximum z distances between predicted and measured hit |
|
protected |
Calculate the track parameters from the hits.
This is done by linear regression, which is equivalent to a
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)
(see for instance W. Walcher, Praktikum der Physik, Teubner Taschenbücher Physik, 1994)
References _verbosityLevel, and straightLine.
Referenced by processEvent().
|
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.
|
protected |
Referenced by processEvent().
|
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().
|
protected |
Referenced by processEvent().
|
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().
1.8.6