MyMarlinTPC
170316
|
Using GBL with a simple helix. More...
#include <SimpleHelixGeneralBrokenLineInterfaceProcessor.h>
Public Member Functions | |
virtual Processor * | newProcessor () |
SimpleHelixGeneralBrokenLineInterfaceProcessor () | |
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... | |
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... | |
std::string | _fileNameMillepedeFile |
name of Millepede-II binary file More... | |
bool | _encodedModuleID |
Module ID is encoded in CellID0. 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 simple helix.
Processor interface to simple 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) |
"X0PerUnitLength":double | 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":double | 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 80 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
marlintpc::SimpleHelixGeneralBrokenLineInterfaceProcessor::SimpleHelixGeneralBrokenLineInterfaceProcessor | ( | ) |
Definition at line 46 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.cc.
References _bfieldScaleFactor, _defaultMomentum, _encodedModuleID, _fileNameMillepedeFile, _fitOptions, _inputCollectionName, _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 410 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.cc.
Referenced by processEvent().
|
virtual |
Definition at line 390 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.cc.
Referenced by newProcessor().
|
virtual |
Definition at line 393 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.cc.
References _milleBinary.
Referenced by newProcessor().
|
virtual |
Initialize processor.
Definition at line 98 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.cc.
References _fileNameMillepedeFile, _milleBinary, _writeMillepedeOut, _Xcenter, and _Ycenter.
Referenced by newProcessor().
|
inlinevirtual |
Definition at line 83 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
References check(), end(), init(), processEvent(), processRunHeader(), and SimpleHelixGeneralBrokenLineInterfaceProcessor().
|
virtual |
Process event.
Order hits by arc-length
Add reference point if not at a hit (or close by)
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 114 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.cc.
References _bfieldScaleFactor, _chisquare, _curvature, _defaultMomentum, _encodedModuleID, _fitOptions, _inputCollectionName, _lostweight, _milleBinary, _milleCalcMethod, _milleMinHits, _ndf, _outputIsPersistent, _outputTrackCollectionName, _refPointIndex, _thickScatterer, _trajectory, _writeMillepedeOut, _x0PerUnitLength, _Xcenter, _Ycenter, marlintpc::simpleHelix::analyticalHelixJacobian(), calcLineSeed(), marlintpc::simpleHelix::curvilinearToPerigeeJacobian(), marlintpc::simpleHelix::getArcLengthXY(), marlintpc::gblHelperHit::getEScaled(), marlintpc::gblHelperHit::getGlobalDerivatives(), marlintpc::gblHelperHit::getGlobalLabels(), marlintpc::gblHelperHit::getLocalToMeasurementProjection(), marlintpc::gblHelperHit::getNumGlobals(), marlintpc::gblHelperHit::getPhi(), marlintpc::gblHelperHit::getPrecision(), marlintpc::gblHelperHit::getResiduals(), marlintpc::gblHelperHit::getS(), marlintpc::gblHelperHit::isMeasurement(), marlintpc::trackerAlcaSelector::isSelected(), marlintpc::gblHelperHit::isValid(), and marlintpc::simpleHelix::perigeeToLCIOJacobian().
Referenced by newProcessor().
|
virtual |
Definition at line 110 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.cc.
Referenced by newProcessor().
|
protected |
scale factor for magnetic field (default: 1.0)
Definition at line 101 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and SimpleHelixGeneralBrokenLineInterfaceProcessor().
|
private |
chi2 from GBL fit
Definition at line 121 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent().
|
private |
correction vector from GBL fit (for track parameters)
Definition at line 118 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
|
private |
covariance matrix from GBL
Definition at line 119 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
|
private |
flag for curved track (helix, else straight line)
Definition at line 116 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent().
|
protected |
default momentum for multiple scattering (for Bfield off, GeV) (default: 10.)
Definition at line 111 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and SimpleHelixGeneralBrokenLineInterfaceProcessor().
|
protected |
Module ID is encoded in CellID0.
Definition at line 108 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and SimpleHelixGeneralBrokenLineInterfaceProcessor().
|
protected |
name of Millepede-II binary file
Definition at line 107 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by init(), and SimpleHelixGeneralBrokenLineInterfaceProcessor().
|
protected |
list of iterations with 'h' Huber, 't' Tukey or 'c' Cauchy down-weighting
Definition at line 103 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and SimpleHelixGeneralBrokenLineInterfaceProcessor().
|
protected |
Name of the input collection – track seeds.
Definition at line 99 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and SimpleHelixGeneralBrokenLineInterfaceProcessor().
|
private |
weight lost by down-weighting
Definition at line 122 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent().
|
private |
Millepede-II binary file.
Definition at line 115 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by end(), init(), and processEvent().
|
protected |
defines which parameter should be calculated for Millepede-II binary file
Definition at line 105 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and SimpleHelixGeneralBrokenLineInterfaceProcessor().
|
protected |
defines minimum number of hits on track for output to Millepede binary file
Definition at line 106 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and SimpleHelixGeneralBrokenLineInterfaceProcessor().
|
private |
number of degrees of freedom in GBL fit
Definition at line 120 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent().
|
protected |
whether the output is to be stored or not (default: true)
Definition at line 102 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and SimpleHelixGeneralBrokenLineInterfaceProcessor().
|
protected |
Name of the output track collection.
Definition at line 100 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and SimpleHelixGeneralBrokenLineInterfaceProcessor().
|
private |
label of reference point
Definition at line 124 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent().
|
private |
arc-length of reference point
Definition at line 123 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
|
private |
Labels of (global) MP-II parameters.
Definition at line 117 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
|
protected |
selects thick (otherwise thin) scatterers for multiple scattering (default: false)
Definition at line 110 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and SimpleHelixGeneralBrokenLineInterfaceProcessor().
|
private |
GBL trajectory.
Definition at line 114 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent().
|
protected |
selects output to Millepede-II binary file
Definition at line 104 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by init(), processEvent(), and SimpleHelixGeneralBrokenLineInterfaceProcessor().
|
protected |
X0 per unit length (TPC gas as homogeneous scatterer) (default: 0.)
Definition at line 109 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by processEvent(), and SimpleHelixGeneralBrokenLineInterfaceProcessor().
|
private |
TPC center, X coordinate.
Definition at line 125 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by init(), and processEvent().
|
private |
TPC center, Y coordinate.
Definition at line 126 of file SimpleHelixGeneralBrokenLineInterfaceProcessor.h.
Referenced by init(), and processEvent().