Analysis Software
Documentation for sPHENIX simulation software
|
Generic GBL implementation. More...
#include <GenFit/blob/master/GBL/include/GblFitter.h>
Public Member Functions | |
GblFitter () | |
virtual | ~GblFitter () |
void | setOptions (const std::string &internalIterations="", bool enableScatterers=true, bool enableIntermediateScatterer=true, unsigned int externalIterations=1, unsigned int recalcJacobians=1) |
Set options of the fitter/GBL. | |
void | setMSOptions (bool enableScatterers=true, bool enableIntermediateScatterer=true) |
Set multiple scattering options of the fitter/GBL. | |
void | getScattererFromMatList (double &length, double &theta, double &s, double &ds, const double p, const double mass, const double charge, const std::vector< genfit::MatStep > &steps) const |
Evaluates moments of radiation length distribution from list of material steps and computes parameters describing a corresponding thick scatterer. | |
void | processTrackWithRep (Track *trk, const AbsTrackRep *rep, bool resortHits=false) override |
double | constructGblInfo (Track *trk, const AbsTrackRep *rep) |
Propagate seed, populate track with scatterers and GblFitterInfos with reference state set. | |
void | updateGblInfo (gbl::GblTrajectory &traj, genfit::Track *trk, const genfit::AbsTrackRep *rep) |
Populate all fitter infos in track for rep with results of trajectory fit. | |
std::vector< gbl::GblPoint > | collectGblPoints (genfit::Track *trk, const genfit::AbsTrackRep *rep) |
Constructs all GBL points and returns them in vector for trajectory construction. | |
void | cleanGblInfo (Track *trk, const AbsTrackRep *rep) const |
Remove all previous gbl fitter data from track Also removes trackpoints without measurement. | |
void | sortHits (Track *trk, const AbsTrackRep *rep) const |
Sort hits in track by arc-len using extrapolation. | |
void | setTrackSegmentController (GblTrackSegmentController *controler) |
Public Member Functions inherited from genfit::AbsFitter | |
AbsFitter () | |
virtual | ~AbsFitter () |
void | processTrack (Track *, bool resortHits=false) |
virtual void | setDebugLvl (unsigned int lvl=1) |
Private Member Functions | |
GblFitter (const GblFitter &) | |
GblFitter & | operator= (GblFitter const &) |
Private Attributes | |
std::string | m_gblInternalIterations |
bool | m_enableScatterers |
bool | m_enableIntermediateScatterer |
unsigned int | m_externalIterations |
unsigned int | m_recalcJacobians |
double | scatEpsilon |
GblTrackSegmentController * | m_segmentController |
Additional Inherited Members | |
Protected Attributes inherited from genfit::AbsFitter | |
unsigned int | debugLvl_ |
Generic GBL implementation.
The interface class to GBL track fit
Definition at line 53 of file GblFitter.h.
View newest version in sPHENIX GitHub at line 53 of file GblFitter.h
|
private |
|
inline |
Default (and only) constructor
Definition at line 74 of file GblFitter.h.
View newest version in sPHENIX GitHub at line 74 of file GblFitter.h
|
virtual |
Destructor
Definition at line 90 of file GblFitter.cc.
View newest version in sPHENIX GitHub at line 90 of file GblFitter.cc
void GblFitter::cleanGblInfo | ( | Track * | trk, |
const AbsTrackRep * | rep | ||
) | const |
Remove all previous gbl fitter data from track Also removes trackpoints without measurement.
trk | The track |
rep | Representation for which to clean data |
Definition at line 233 of file GblFitter.cc.
View newest version in sPHENIX GitHub at line 233 of file GblFitter.cc
References genfit::TrackPoint::deleteFitterInfo(), genfit::Track::deletePoint(), genfit::Track::getNumPoints(), genfit::Track::getPoint(), genfit::TrackPoint::hasRawMeasurements(), and genfit::TrackPoint::setScatterer().
std::vector< gbl::GblPoint > GblFitter::collectGblPoints | ( | genfit::Track * | trk, |
const genfit::AbsTrackRep * | rep | ||
) |
Constructs all GBL points and returns them in vector for trajectory construction.
Definition at line 274 of file GblFitter.cc.
View newest version in sPHENIX GitHub at line 274 of file GblFitter.cc
References genfit::GblFitterInfo::constructGblPoint(), genfit::TrackPoint::getFitterInfo(), genfit::Track::getNumPoints(), and genfit::Track::getPoint().
double GblFitter::constructGblInfo | ( | Track * | trk, |
const AbsTrackRep * | rep | ||
) |
Propagate seed, populate track with scatterers and GblFitterInfos with reference state set.
trk | Track to attach with infos at given rep |
rep | TrackRep to which fitter info shall be attached |
Definition at line 376 of file GblFitter.cc.
View newest version in sPHENIX GitHub at line 376 of file GblFitter.cc
References genfit::AbsMeasurement::constructPlane(), Acts::Test::dim, genfit::AbsTrackRep::extrapolateBy(), genfit::StateOnPlane::extrapolateToPlane(), genfit::AbsTrackRep::extrapolateToPlane(), genfit::AbsTrackRep::getCharge(), genfit::AbsTrackRep::getDim(), genfit::AbsTrackRep::getDir(), genfit::AbsTrackRep::getForwardJacobianAndNoise(), genfit::AbsTrackRep::getMass(), genfit::AbsTrackRep::getMomMag(), genfit::Track::getNumPoints(), genfit::Track::getNumPointsWithMeasurement(), genfit::StateOnPlane::getPlane(), genfit::Track::getPoint(), genfit::Track::getPointWithMeasurement(), genfit::StateOnPlane::getPos(), genfit::TrackPoint::getRawMeasurement(), getScattererFromMatList(), genfit::TrackPoint::getSortingParameter(), genfit::Track::getStateSeed(), genfit::AbsTrackRep::getSteps(), genfit::Track::getTimeSeed(), genfit::Track::insertPoint(), Acts::PrimitivesView3DTest::plane, scatEpsilon, genfit::TrackPoint::setFitterInfo(), genfit::GblFitterInfo::setJacobian(), genfit::AbsTrackRep::setPosMom(), genfit::TrackPoint::setScatterer(), genfit::TrackPoint::setSortingParameter(), and genfit::AbsTrackRep::setTime().
void GblFitter::getScattererFromMatList | ( | double & | length, |
double & | theta, | ||
double & | s, | ||
double & | ds, | ||
const double | p, | ||
const double | mass, | ||
const double | charge, | ||
const std::vector< genfit::MatStep > & | steps | ||
) | const |
Evaluates moments of radiation length distribution from list of material steps and computes parameters describing a corresponding thick scatterer.
Based on input from Claus Kleinwort (DESY), adapted for continuous material distribution represented by a sum of step functions. Returned thick scatterer can be represented by two GBL scattering points. Calculates variance of theta from total sum of radiation lengths instead of summimg squares of individual deflection angle variances.
length | returned: Length of the track |
theta | returned: Variation of distribution of deflection angle |
s | returned: First moment of material scattering distribution |
ds | returned: Second moment (variance) of material scattering distribution |
p | Particle momentum magnitude (GeV/c) |
mass | Mass of particle (GeV/c/c) |
steps | Vector of material steps from (RKTrackRep) extrapolation |
Definition at line 315 of file GblFitter.cc.
View newest version in sPHENIX GitHub at line 315 of file GblFitter.cc
References Acts::UnitConstants::e, i, genfit::MatStep::material_, N, genfit::Material::radiationLength, rho, physmon_simulation::s, step, genfit::MatStep::stepSize_, xmax, and xmin.
|
overridevirtual |
Performs fit on a Track. Hit resorting currently supported (use only if necessary /wire chamber/ ... will extrapolate along whole track to sort the hits).
Implements genfit::AbsFitter.
Definition at line 106 of file GblFitter.cc.
View newest version in sPHENIX GitHub at line 106 of file GblFitter.cc
References Chi2, Acts::UnitConstants::e, gbl::GblTrajectory::fit(), genfit::StateOnPlane::getCharge(), genfit::FieldManager::getFieldVal(), genfit::Track::getFittedState(), genfit::TrackPoint::getFitterInfo(), genfit::FieldManager::getInstance(), genfit::Track::getNumPoints(), genfit::Track::getNumPointsWithMeasurement(), genfit::Track::getPoint(), genfit::GblFitStatus::hasCurvature(), genfit::TrackPoint::hasFitterInfo(), gbl::GblPoint::hasMeasurement(), gbl::GblPoint::hasScatterer(), merge_hashes::p, genfit::GblFitterInfo::recalculateJacobian(), genfit::FitStatus::setCharge(), genfit::FitStatus::setChi2(), genfit::GblFitStatus::setCurvature(), genfit::Track::setFitStatus(), genfit::FitStatus::setIsFitConvergedFully(), genfit::FitStatus::setIsFitConvergedPartially(), genfit::FitStatus::setIsFitted(), genfit::GblFitStatus::setIsFittedWithReferenceTrack(), genfit::FitStatus::setNdf(), genfit::FitStatus::setNFailedPoints(), genfit::GblFitStatus::setNumIterations(), and genfit::GblFitStatus::setTrackLen().
|
inline |
Set multiple scattering options of the fitter/GBL.
enableScatterers | If false, no scatterers will be added to GBL trajectory |
enableIntermediateScatterer | True to simulate thick sctatterers by two thin scatterers 1st at detector plane and intermediate between each two planes |
Definition at line 119 of file GblFitter.h.
View newest version in sPHENIX GitHub at line 119 of file GblFitter.h
References m_enableIntermediateScatterer, and m_enableScatterers.
|
inline |
Set options of the fitter/GBL.
internalIterations | GBL down-weighting in iterations. One letter (T,H,C) per iteration. Seems "HH" is resonable for outliers. Default "" is OK. Separate by comma for each external iteration (usually last), e.g., for 3 iterations: ",,HH" to down-weight at last one |
enableScatterers | If false, no scatterers will be added to GBL trajectory |
enableIntermediateScatterer | True to simulate thick sctatterers by two thin scatterers 1st at detector plane and intermediate between each two planes |
externalIterations | Sets number of times GblTrajectory.fit(...) will be called in processTrackWithRep(...). Called external iterations. State is updated each time with GBL results. If =0, GblFitterInfos will filled by reference states and GblFitStatus in track able to construct simple GBL trajectory (for fit by GBL of output to Mille binary) / get list of points 1st at detector plane and intermediate between each two planes |
recalcJacobians | Number of iteration up to which Jacobians should be recalculated / planes/meas updated after the fit. 0 = do not recalculate Jacobians. 1 = recalculate after first GBL fit. 2 = after 1st and 2nd GBL fit etc. |
Definition at line 100 of file GblFitter.h.
View newest version in sPHENIX GitHub at line 100 of file GblFitter.h
References m_enableIntermediateScatterer, m_enableScatterers, m_externalIterations, m_gblInternalIterations, and m_recalcJacobians.
void GblFitter::setTrackSegmentController | ( | GblTrackSegmentController * | controler | ) |
Definition at line 97 of file GblFitter.cc.
View newest version in sPHENIX GitHub at line 97 of file GblFitter.cc
void GblFitter::sortHits | ( | Track * | trk, |
const AbsTrackRep * | rep | ||
) | const |
Sort hits in track by arc-len using extrapolation.
trk | The track |
rep | The track representation |
Definition at line 244 of file GblFitter.cc.
View newest version in sPHENIX GitHub at line 244 of file GblFitter.cc
References genfit::AbsMeasurement::constructPlane(), genfit::StateOnPlane::extrapolateToPlane(), genfit::Track::getNumPointsWithMeasurement(), genfit::Track::getPointWithMeasurement(), genfit::TrackPoint::getRawMeasurement(), genfit::Track::getStateSeed(), genfit::Track::getTimeSeed(), Acts::PrimitivesView3DTest::plane, genfit::AbsTrackRep::setPosMom(), genfit::TrackPoint::setSortingParameter(), genfit::AbsTrackRep::setTime(), and genfit::Track::sort().
void GblFitter::updateGblInfo | ( | gbl::GblTrajectory & | traj, |
genfit::Track * | trk, | ||
const genfit::AbsTrackRep * | rep | ||
) |
Populate all fitter infos in track for rep with results of trajectory fit.
Updates also seed state in track (from forward prediction at first point)
(The trajectory can only be cut before track end, cannot have missing points in between (if valid))
TODO ?? Re-construct all points in GblFitterInfos (updated) and collect them in fit status
traj | The fitted GblTrajectory |
trk | The track with fitter infos from whose points traj was created |
rep | The representation to which this fit status belong |
Definition at line 289 of file GblFitter.cc.
View newest version in sPHENIX GitHub at line 289 of file GblFitter.cc
References genfit::TrackPoint::getFitterInfo(), genfit::Track::getNumPoints(), genfit::Track::getPoint(), gbl::GblTrajectory::isValid(), and genfit::GblFitterInfo::updateFitResults().
|
private |
Definition at line 61 of file GblFitter.h.
View newest version in sPHENIX GitHub at line 61 of file GblFitter.h
Referenced by setMSOptions(), and setOptions().
|
private |
Definition at line 60 of file GblFitter.h.
View newest version in sPHENIX GitHub at line 60 of file GblFitter.h
Referenced by setMSOptions(), and setOptions().
|
private |
Definition at line 62 of file GblFitter.h.
View newest version in sPHENIX GitHub at line 62 of file GblFitter.h
Referenced by setOptions().
|
private |
Definition at line 59 of file GblFitter.h.
View newest version in sPHENIX GitHub at line 59 of file GblFitter.h
Referenced by setOptions().
|
private |
Definition at line 63 of file GblFitter.h.
View newest version in sPHENIX GitHub at line 63 of file GblFitter.h
Referenced by setOptions().
|
private |
Definition at line 67 of file GblFitter.h.
View newest version in sPHENIX GitHub at line 67 of file GblFitter.h
|
private |
Definition at line 66 of file GblFitter.h.
View newest version in sPHENIX GitHub at line 66 of file GblFitter.h