MyMarlinTPC
170316
|
Using GBL with a step-wise helix. More...
#include <StepWiseHelixGeneralBrokenLineInterfaceProcessor.h>
Public Member Functions | |
virtual Processor * | newProcessor () |
StepWiseHelixGeneralBrokenLineInterfaceProcessor () | |
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 | _inputCollectionName |
Name of the input collection – track seeds. More... | |
std::string | _outputTrackCollectionName |
Name of the output track collection. More... | |
double | _bfieldScaleFactor |
scale factor for magnetic field (default: 1.0) More... | |
bool | _outputIsPersistent |
whether the output is to be stored or not (default: true) More... | |
std::string | _fitOptions |
list of iterations with 'h' Huber, 't' Tukey or 'c' Cauchy down-weighting More... | |
bool | _writeMillepedeOut |
selects output to Millepede-II binary file More... | |
std::string | _fileNameMillepedeFile |
name of Millepede-II binary file More... | |
int | _milleCalcMethod |
defines which parameter should be calculated for Millepede-II binary file More... | |
int | _milleMinHits |
defines minimum number of hits on track for output to Millepede binary file More... | |
bool | _encodedModuleID |
Module ID is encoded in CellID0. More... | |
double | _maxStep |
maximal step size (default: 10.) More... | |
double | _x0PerUnitLength |
X0 per unit length (TPC gas as homogeneous scatterer) (default: 0.) More... | |
bool | _thickScatterer |
selects thick (otherwise thin) scatterers for multiple scattering (default: false) More... | |
double | _defaultMomentum |
default momentum for multiple scattering (for Bfield off, GeV) (default: 10.) More... | |
Private Member Functions | |
void | calcLineSeed (const std::vector< TrackerHit *>, const double *, double &, double &, double &, double &, double &) const |
Simple seed for straight line. More... | |
Private Attributes | |
gbl::GblTrajectory * | _trajectory |
GBL trajectory. More... | |
gbl::MilleBinary * | _milleBinary |
Millepede-II binary file. More... | |
bool | _curvature |
flag for curved track (helix, else straight line) More... | |
std::vector< unsigned int > | _theLabels |
Labels of (global) MP-II parameters. More... | |
TVectorD * | _correctionVector |
correction vector from GBL fit (for track parameters) More... | |
TMatrixDSym * | _covarianceMatrix |
covariance matrix from GBL More... | |
int | _ndf |
number of degrees of freedom in GBL fit More... | |
double | _chisquare |
chi2 from GBL fit More... | |
double | _lostweight |
weight lost by down-weighting More... | |
double | _refPointS |
arc-length of reference point More... | |
unsigned int | _refPointIndex |
label of reference point More... | |
double | _Xcenter |
TPC center, X coordinate. More... | |
double | _Ycenter |
TPC center, Y coordinate. More... | |
Using GBL with a step-wise helix.
Processor interface to step-wise helix (or line) fitting with General Broken Lines, written by Claus Kleinwort
This processor interfaces the re-fitting functionality of the general broken line package by Claus Kleinwort. For information on the General Broken Lines, please refer to the publication and/or the wiki pages:
The standard behaviour is that a single, straightforward fit without any outlier rejection is performed. For multiple turns, including some outlier rejection; extend the fit options in the according steering parameter. The calculation of the measurement (pad) direction in XY uses "module.getLocalPadLayout().getCoordinateType()" to select polar or cartesian pad row geometry.
Optional
output is a Millepede-II binary file, which can be inspected"InputSeedTracks":string | The name of the input collection of track candidates (default: "TPCSeedTracks") |
"OutputTracks":string | The name of the output collection with the fitted tracks(default: "TPCTracks") |
"WriteOutputToStorage":bool | To set whether the output should be written to storage |
"BFieldScaleFactor":double | Optional parameter, scales magnetic field (map), use 1.0 (default) for field ON or 0.0 for field OFF |
"FitOptions":string | Optional parameter, defines if multiple passes with "h" huber, "t" tukey or "c" cauchy downweighting should be performed |
"WriteMillepedeBinary":bool | Optional parameter, set to "true" if you want a Millepede binary file (default:"false") |
"MillepedeFilename":string | Optional parameter to set the name of the Millepede binary file (default:"") |
"MillePedeCalcMethod":int | Optional parameter to define set of (global) parameters (default:0 = module alignment) |
"MillePedeMinHits":int | Optional parameter to define the minimum number of hits on track for output to Millepede binary file (default: 42) |
"EncodedModuleID":bool | Optional parameter, flag for encoding of module ID in CellID0 (default true) |
"MaxStep":double | Optional parameter, maximal step size (with constant magnetic field) (default 10.0) |
"X0PerUnitLength":bool | Optional parameter, X0 per unit length (TPC gas as homogeneous scatterer) (default: 0.) |
"ThickScatterer":bool | Optional parameter, selects thick (otherwise thin) scatterers for multiple scattering (default: false) |
"DefaultMomentum":bool | Optional parameter, default momentum for multiple scattering (for Bfield off, GeV) (default: 10.) |
WORK IN PROGRESS: currently only works for modules with concentric pad rows (using center from GEAR)
A detailed description is available as lcnote LC-TOOL-2014-008. Changes with respect to this note:
Definition at line 82 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
marlintpc::StepWiseHelixGeneralBrokenLineInterfaceProcessor::StepWiseHelixGeneralBrokenLineInterfaceProcessor | ( | ) |
Definition at line 47 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.cc.
References _bfieldScaleFactor, _defaultMomentum, _encodedModuleID, _fileNameMillepedeFile, _fitOptions, _inputCollectionName, _maxStep, _milleCalcMethod, _milleMinHits, _outputIsPersistent, _outputTrackCollectionName, _thickScatterer, _writeMillepedeOut, and _x0PerUnitLength.
Referenced by newProcessor().
|
private |
Simple seed for straight line.
Calculate seed from straight line defined by (radially) first and last hit
[in] | hitList | list of hits |
[in] | refPos | reference position |
[out] | omega | curvature, = 0. |
[out] | phi | XY slope |
[out] | d0 | XY offset |
[out] | tanLambda | ZS slope |
[out] | z0 | ZS offset |
Definition at line 412 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.cc.
Referenced by processEvent().
|
virtual |
Definition at line 392 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.cc.
Referenced by newProcessor().
|
virtual |
Definition at line 395 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.cc.
References _milleBinary.
Referenced by newProcessor().
|
virtual |
Initialize processor.
Definition at line 97 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.cc.
References _fileNameMillepedeFile, _milleBinary, _writeMillepedeOut, _Xcenter, and _Ycenter.
Referenced by newProcessor().
|
inlinevirtual |
Definition at line 85 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
References check(), end(), init(), processEvent(), processRunHeader(), and StepWiseHelixGeneralBrokenLineInterfaceProcessor().
|
virtual |
Process event.
Order hits by arc-length
Multiple scattering
Create vector of GBL points. from helper hits.
Create trajectory from list of GBL points.
Fit trajectory.
Fill output collection.
Definition at line 113 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.cc.
References _bfieldScaleFactor, _chisquare, _curvature, _defaultMomentum, _encodedModuleID, _fitOptions, _inputCollectionName, _lostweight, _maxStep, _milleBinary, _milleCalcMethod, _milleMinHits, _ndf, _outputIsPersistent, _outputTrackCollectionName, _refPointIndex, _thickScatterer, _trajectory, _writeMillepedeOut, _x0PerUnitLength, _Xcenter, _Ycenter, calcLineSeed(), marlintpc::simpleHelix::curvilinearToPerigeeJacobian(), marlintpc::simpleHelix::getArcLengthXY(), marlintpc::gblHelperHit::getEScaled(), marlintpc::gblHelperHit::getGlobalDerivatives(), marlintpc::gblHelperHit::getGlobalLabels(), marlintpc::gblHelperHit::getLocalToMeasurementProjection(), marlintpc::gblHelperHit::getNumGlobals(), marlintpc::simpleHelix::getPosAtArcLength(), marlintpc::gblHelperHit::getPrecision(), marlintpc::gblHelperHit::getResiduals(), marlintpc::localHelix::getSimpleHelix(), marlintpc::gblHelperHit::isMeasurement(), marlintpc::trackerAlcaSelector::isSelected(), marlintpc::gblHelperHit::isValid(), marlintpc::simpleHelix::perigeeToLCIOJacobian(), and marlintpc::localHelix::propagateTo().
Referenced by newProcessor().
|
virtual |
Definition at line 109 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.cc.
Referenced by newProcessor().
|
protected |
scale factor for magnetic field (default: 1.0)
Definition at line 103 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and StepWiseHelixGeneralBrokenLineInterfaceProcessor().
|
private |
chi2 from GBL fit
Definition at line 124 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent().
|
private |
correction vector from GBL fit (for track parameters)
Definition at line 121 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
|
private |
covariance matrix from GBL
Definition at line 122 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
|
private |
flag for curved track (helix, else straight line)
Definition at line 119 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent().
|
protected |
default momentum for multiple scattering (for Bfield off, GeV) (default: 10.)
Definition at line 114 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and StepWiseHelixGeneralBrokenLineInterfaceProcessor().
|
protected |
Module ID is encoded in CellID0.
Definition at line 110 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and StepWiseHelixGeneralBrokenLineInterfaceProcessor().
|
protected |
name of Millepede-II binary file
Definition at line 107 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by init(), and StepWiseHelixGeneralBrokenLineInterfaceProcessor().
|
protected |
list of iterations with 'h' Huber, 't' Tukey or 'c' Cauchy down-weighting
Definition at line 105 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and StepWiseHelixGeneralBrokenLineInterfaceProcessor().
|
protected |
Name of the input collection – track seeds.
Definition at line 101 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and StepWiseHelixGeneralBrokenLineInterfaceProcessor().
|
private |
weight lost by down-weighting
Definition at line 125 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent().
|
protected |
maximal step size (default: 10.)
Definition at line 111 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and StepWiseHelixGeneralBrokenLineInterfaceProcessor().
|
private |
Millepede-II binary file.
Definition at line 118 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by end(), init(), and processEvent().
|
protected |
defines which parameter should be calculated for Millepede-II binary file
Definition at line 108 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and StepWiseHelixGeneralBrokenLineInterfaceProcessor().
|
protected |
defines minimum number of hits on track for output to Millepede binary file
Definition at line 109 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and StepWiseHelixGeneralBrokenLineInterfaceProcessor().
|
private |
number of degrees of freedom in GBL fit
Definition at line 123 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent().
|
protected |
whether the output is to be stored or not (default: true)
Definition at line 104 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and StepWiseHelixGeneralBrokenLineInterfaceProcessor().
|
protected |
Name of the output track collection.
Definition at line 102 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and StepWiseHelixGeneralBrokenLineInterfaceProcessor().
|
private |
label of reference point
Definition at line 127 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent().
|
private |
arc-length of reference point
Definition at line 126 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
|
private |
Labels of (global) MP-II parameters.
Definition at line 120 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
|
protected |
selects thick (otherwise thin) scatterers for multiple scattering (default: false)
Definition at line 113 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and StepWiseHelixGeneralBrokenLineInterfaceProcessor().
|
private |
GBL trajectory.
Definition at line 117 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent().
|
protected |
selects output to Millepede-II binary file
Definition at line 106 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by init(), processEvent(), and StepWiseHelixGeneralBrokenLineInterfaceProcessor().
|
protected |
X0 per unit length (TPC gas as homogeneous scatterer) (default: 0.)
Definition at line 112 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and StepWiseHelixGeneralBrokenLineInterfaceProcessor().
|
private |
TPC center, X coordinate.
Definition at line 128 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by init(), and processEvent().
|
private |
TPC center, Y coordinate.
Definition at line 129 of file StepWiseHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by init(), and processEvent().