#include <AdaptiveVertexFitter.h>
Public Types | |
typedef ReferenceCountingPointer< LinearizedTrackState< 5 > > | RefCountedLinearizedTrackState |
typedef ReferenceCountingPointer< VertexTrack< 5 > > | RefCountedVertexTrack |
Public Member Functions | |
AdaptiveVertexFitter (const AdaptiveVertexFitter &original) | |
AdaptiveVertexFitter (const AnnealingSchedule &ann=GeometricAnnealing(), const LinearizationPointFinder &linP=DefaultLinearizationPointFinder(), const VertexUpdator< 5 > &updator=KalmanVertexUpdator< 5 >(), const VertexTrackCompatibilityEstimator< 5 > &estor=KalmanVertexTrackCompatibilityEstimator< 5 >(), const VertexSmoother< 5 > &smoother=DummyVertexSmoother< 5 >(), const AbstractLTSFactory< 5 > <sf=LinearizedTrackStateFactory()) | |
AdaptiveVertexFitter * | clone () const override |
bool | gsfIntermediarySmoothing () const |
void | gsfIntermediarySmoothing (bool sm) |
void | setParameters (const edm::ParameterSet &) |
void | setParameters (double maxshift=0.0001, double maxlpshift=0.1, unsigned maxstep=30, double weightthreshold=.001) |
void | setWeightThreshold (float w) |
CachingVertex< 5 > | vertex (const std::vector< reco::TransientTrack > &) const override |
CachingVertex< 5 > | vertex (const std::vector< reco::TransientTrack > &, const GlobalPoint &linPoint) const override |
CachingVertex< 5 > | vertex (const std::vector< reco::TransientTrack > &, const GlobalPoint &priorPos, const GlobalError &priorError) const override |
CachingVertex< 5 > | vertex (const std::vector< reco::TransientTrack > &tracks, const reco::BeamSpot &beamSpot) const override |
CachingVertex< 5 > | vertex (const std::vector< RefCountedVertexTrack > &) const override |
CachingVertex< 5 > | vertex (const std::vector< RefCountedVertexTrack > &, const GlobalPoint &priorPos, const GlobalError &priorError) const override |
CachingVertex< 5 > | vertex (const std::vector< RefCountedVertexTrack > &, const reco::BeamSpot &spot) const override |
~AdaptiveVertexFitter () override | |
Public Member Functions inherited from VertexFitter< 5 > | |
virtual CachingVertex< N > | vertex (const std::vector< typename CachingVertex< N >::RefCountedVertexTrack > &tracks) const=0 |
virtual CachingVertex< N > | vertex (const std::vector< typename CachingVertex< N >::RefCountedVertexTrack > &tracks, const GlobalPoint &priorPos, const GlobalError &priorError) const=0 |
virtual CachingVertex< N > | vertex (const std::vector< typename CachingVertex< N >::RefCountedVertexTrack > &tracks, const reco::BeamSpot &spot) const=0 |
VertexFitter () | |
virtual | ~VertexFitter () |
Private Member Functions | |
CachingVertex< 5 > | fit (const std::vector< RefCountedVertexTrack > &tracks, const VertexState &priorSeed, bool withPrior) const |
double | getWeight (float chi2) const |
std::vector< RefCountedVertexTrack > | linearizeTracks (const std::vector< reco::TransientTrack > &, const VertexState &) const |
std::vector< RefCountedVertexTrack > | reLinearizeTracks (const std::vector< RefCountedVertexTrack > &tracks, const CachingVertex< 5 > &vertex) const |
std::vector< RefCountedVertexTrack > | reWeightTracks (const std::vector< RefCountedLinearizedTrackState > &, const CachingVertex< 5 > &seed) const |
std::vector< RefCountedVertexTrack > | reWeightTracks (const std::vector< RefCountedVertexTrack > &, const CachingVertex< 5 > &seed) const |
std::vector< RefCountedVertexTrack > | weightTracks (const std::vector< RefCountedLinearizedTrackState > &, const VertexState &seed) const |
Private Attributes | |
bool | gsfIntermediarySmoothing_ |
AnnealingSchedule * | theAssProbComputer |
VertexTrackCompatibilityEstimator< 5 > * | theComp |
LinearizationPointFinder * | theLinP |
const AbstractLTSFactory< 5 > * | theLinTrkFactory |
double | theMaxLPShift |
double | theMaxShift |
int | theMaxStep |
int | theNr |
VertexSmoother< 5 > * | theSmoother |
VertexUpdator< 5 > * | theUpdator |
double | theWeightThreshold |
An iterative reweighted fitter. Very robust, very adaptive.
See CMS Note 2007/008.
Exceptions VertexException( "Supplied fewer than two tracks" ) VertexException( "fewer than 2 significant tracks (w>threshold)" )
Definition at line 29 of file AdaptiveVertexFitter.h.
typedef ReferenceCountingPointer<LinearizedTrackState<5> > AdaptiveVertexFitter::RefCountedLinearizedTrackState |
Definition at line 32 of file AdaptiveVertexFitter.h.
Definition at line 31 of file AdaptiveVertexFitter.h.
AdaptiveVertexFitter::AdaptiveVertexFitter | ( | const AnnealingSchedule & | ann = GeometricAnnealing() , |
const LinearizationPointFinder & | linP = DefaultLinearizationPointFinder() , |
||
const VertexUpdator< 5 > & | updator = KalmanVertexUpdator<5>() , |
||
const VertexTrackCompatibilityEstimator< 5 > & | estor = KalmanVertexTrackCompatibilityEstimator<5>() , |
||
const VertexSmoother< 5 > & | smoother = DummyVertexSmoother<5>() , |
||
const AbstractLTSFactory< 5 > & | ltsf = LinearizedTrackStateFactory() |
||
) |
Reimplemented constructors to use any kind of linearisation point finder, vertex updator and smoother. If no smoother is to be used, do not specify an instance for it.
Definition at line 102 of file AdaptiveVertexFitter.cc.
References setParameters().
Referenced by clone().
AdaptiveVertexFitter::AdaptiveVertexFitter | ( | const AdaptiveVertexFitter & | original | ) |
Definition at line 121 of file AdaptiveVertexFitter.cc.
|
override |
Definition at line 135 of file AdaptiveVertexFitter.cc.
References theAssProbComputer, theComp, theLinP, theLinTrkFactory, theSmoother, and theUpdator.
|
overridevirtual |
Fit vertex out of a VertexSeed
Implements VertexFitter< 5 >.
Definition at line 327 of file AdaptiveVertexFitter.cc.
References AdaptiveVertexFitter().
|
private |
perform the fit
Definition at line 451 of file AdaptiveVertexFitter.cc.
References VertexUpdator< N >::add(), AnnealingSchedule::anneal(), hltPixelTracks_cff::chi2, AnnealingSchedule::currentTemp(), VertexState::error(), FrontierConditions_GlobalTag_cff::file, getId(), gsfIntermediarySmoothing_, mps_fire::i, AnnealingSchedule::isAnnealed(), LogDebug, visualization-live-secondInstance_cfg::m, mag(), L1TEGammaOffline_cfi::nVertex, VertexState::position(), CachingVertex< N >::position(), reLinearizeTracks(), AnnealingSchedule::resetAnnealing(), reWeightTracks(), VertexSmoother< N >::smooth(), theAssProbComputer, theMaxLPShift, theMaxShift, theMaxStep, theSmoother, theUpdator, theWeightThreshold, PDWG_EXOHSCP_cff::tracks, and AnnealingSchedule::weight().
Referenced by trackingPlots.Iteration::modules(), and vertex().
|
private |
Definition at line 329 of file AdaptiveVertexFitter.cc.
References hltPixelTracks_cff::chi2, MillePedeFileConverter_cfg::e, theAssProbComputer, AnnealingSchedule::weight(), and mps_merge::weight.
Referenced by reWeightTracks(), and weightTracks().
|
inline |
|
inline |
Definition at line 135 of file AdaptiveVertexFitter.h.
References gsfIntermediarySmoothing_.
Referenced by AdaptiveGsfVertexFitter::AdaptiveGsfVertexFitter().
|
private |
Linearize tracks, for the first time in the iteration.
Construct a container of VertexTrack from a set of reco::TransientTracks. As this is the first iteration of the adaptive fit, the initial error does not enter in the computation of the weights. This is to avoid that all tracks get the same weight when using a very large initial error matrix.
Definition at line 283 of file AdaptiveVertexFitter.cc.
References MillePedeFileConverter_cfg::e, cppFunctionSkipper::exception, mps_fire::i, AbstractLTSFactory< N >::linearizedTrackState(), SurveyInfoScenario_cff::seed, theLinTrkFactory, PDWG_EXOHSCP_cff::tracks, and weightTracks().
Referenced by vertex().
|
private |
Construct new a container of VertexTrack with a new linearization point and vertex seed, from an existing set of VertexTrack, from which only the recTracks will be used.
tracks | The original container of VertexTracks, from which the reco::TransientTracks will be extracted. |
vertex | The seed to use for the VertexTracks. This position will also be used as the new linearization point. |
Construct new a container of VertexTrack with a new linearization point and vertex seed, from an existing set of VertexTrack, from which only the recTracks will be used.
Definition at line 304 of file AdaptiveVertexFitter.cc.
References MillePedeFileConverter_cfg::e, cppFunctionSkipper::exception, mps_fire::i, AbstractLTSFactory< N >::linearizedTrackState(), reWeightTracks(), SurveyInfoScenario_cff::seed, theLinTrkFactory, PDWG_EXOHSCP_cff::tracks, vertex(), and CachingVertex< N >::vertexState().
Referenced by fit().
|
private |
Construct a new container of VertexTracks with new weights accounting for vertex error, from an existing set of LinearizedTracks.
Definition at line 344 of file AdaptiveVertexFitter.cc.
References hltPixelTracks_cff::chi2, AnnealingSchedule::currentTemp(), HLT_2018_cff::distance, MillePedeFileConverter_cfg::e, VertexTrackCompatibilityEstimator< N >::estimate(), cppFunctionSkipper::exception, FrontierConditions_GlobalTag_cff::file, getId(), getWeight(), mps_fire::i, visualization-live-secondInstance_cfg::m, CachingVertex< N >::position(), SurveyInfoScenario_cff::seed, theAssProbComputer, theComp, theNr, vertex(), CachingVertex< N >::vertexState(), VertexTrackFactory< N >::vertexTrack(), and AnnealingSchedule::weight().
Referenced by fit(), reLinearizeTracks(), and reWeightTracks().
|
private |
Construct new a container of VertexTracks with new weights accounting for vertex error, from an existing set of VertexTracks. From these the LinearizedTracks will be reused.
Construct new a container of VertexTrack with new weights accounting for vertex error, from an existing set of VertexTracks. From these the LinearizedTracks will be reused.
Definition at line 437 of file AdaptiveVertexFitter.cc.
References mps_fire::i, reWeightTracks(), SurveyInfoScenario_cff::seed, and PDWG_EXOHSCP_cff::tracks.
void AdaptiveVertexFitter::setParameters | ( | const edm::ParameterSet & | s | ) |
Sets parameters. The following parameters are expected: maxshift, maxlpshift, maxstep, weightthreshold
Definition at line 151 of file AdaptiveVertexFitter.cc.
References alignCSCRings::s, and setParameters().
void AdaptiveVertexFitter::setParameters | ( | double | maxshift = 0.0001 , |
double | maxlpshift = 0.1 , |
||
unsigned | maxstep = 30 , |
||
double | weightthreshold = .001 |
||
) |
Reads the configurable parameters.
maxshift | if the vertex moves further than this (in cm), then we re-iterate. |
maxlpshift | if the vertex moves further than this, then we re-linearize the tracks. |
maxstep | that's the maximum of iterations that we allow for. |
weightthreshold | that's the minimum track weight for a track to be considered "significant". If fewer than two tracks are significant, an exception is thrown. |
Definition at line 144 of file AdaptiveVertexFitter.cc.
References theMaxLPShift, theMaxShift, theMaxStep, theWeightThreshold, and HLT_2018_cff::weightthreshold.
Referenced by AdaptiveGsfVertexFitter::AdaptiveGsfVertexFitter(), AdaptiveVertexFitter(), ConfigurableAdaptiveFitter::configure(), and setParameters().
void AdaptiveVertexFitter::setWeightThreshold | ( | float | w | ) |
Set the weight threshold should be used only to find (once) a good value FIXME this should disappear in the final version
Definition at line 119 of file AdaptiveVertexFitter.cc.
References theWeightThreshold, and w.
Referenced by PFTauPrimaryVertexProducerBase::produce(), and AdaptiveVertexReconstructor::setupFitters().
|
overridevirtual |
Method returning the fitted vertex, from a container of reco::TransientTracks. The linearization point will be searched with the given LP finder. No prior vertex position will be used in the vertex fit.
Implements VertexFitter< 5 >.
Definition at line 158 of file AdaptiveVertexFitter.cc.
References fit(), LinearizationPointFinder::getLinearizationPoint(), linearizeTracks(), SurveyInfoScenario_cff::seed, theLinP, and PDWG_EXOHSCP_cff::tracks.
Referenced by SplitVertexResolution::analyze(), PrimaryVertexResolution::Plots::calculateAndFillResolution(), Tau.Tau::dxy(), V0Fitter::fitAll(), PFDisplacedVertexFinder::fitVertexFromSeed(), PFTauPrimaryVertexProducerBase::produce(), TemplatedInclusiveVertexFinder< InputContainer, VTX >::produce(), reLinearizeTracks(), reWeightTracks(), TrackVertexArbitration< VTX >::trackVertexArbitrator(), AdaptiveGsfVertexFitter::vertex(), and AdaptiveVertexReconstructor::vertices().
|
overridevirtual |
Fit vertex out of a std::vector of reco::TransientTracks. Uses the specified linearization point.
Fit vertex out of a set of reco::TransientTracks. Uses the specified linearization point.
Implements VertexFitter< 5 >.
Definition at line 199 of file AdaptiveVertexFitter.cc.
References fit(), linearizeTracks(), SurveyInfoScenario_cff::seed, and PDWG_EXOHSCP_cff::tracks.
Referenced by Tau.Tau::dxy().
|
overridevirtual |
Fit vertex out of a set of reco::TransientTracks. Uses the position as both the linearization point AND as prior estimate of the vertex position. The error is used for the weight of the prior estimate.
Implements VertexFitter< 5 >.
Definition at line 247 of file AdaptiveVertexFitter.cc.
References fit(), linearizeTracks(), SurveyInfoScenario_cff::seed, and PDWG_EXOHSCP_cff::tracks.
Referenced by Tau.Tau::dxy().
|
overridevirtual |
Fit vertex out of a set of TransientTracks. The specified BeamSpot will be used as priot, but NOT for the linearization. The specified LinearizationPointFinder will be used to find the linearization point.
Implements VertexFitter< 5 >.
Definition at line 216 of file AdaptiveVertexFitter.cc.
References pwdgSkimBPark_cfi::beamSpot, fit(), LinearizationPointFinder::getLinearizationPoint(), linearizeTracks(), theLinP, and PDWG_EXOHSCP_cff::tracks.
Referenced by Tau.Tau::dxy().
|
override |
Method returning the fitted vertex, from a container of VertexTracks. For the first loop, the LinearizedTrack contained in the VertexTracks will be used. If subsequent loops are needed, the new VertexTracks will be created with the last estimate of the vertex as linearization point. No prior vertex position will be used in the vertex fit.
Definition at line 175 of file AdaptiveVertexFitter.cc.
References fit(), SurveyInfoScenario_cff::seed, and PDWG_EXOHSCP_cff::tracks.
Referenced by Tau.Tau::dxy().
|
override |
Fit vertex out of a set of VertexTracks Uses the position and error for the prior estimate of the vertex. This position is not used to relinearize the tracks.
Definition at line 265 of file AdaptiveVertexFitter.cc.
References fit(), SurveyInfoScenario_cff::seed, and PDWG_EXOHSCP_cff::tracks.
Referenced by Tau.Tau::dxy().
|
override |
Same as above, only now also with BeamSpot constraint.
Definition at line 186 of file AdaptiveVertexFitter.cc.
References fit(), and PDWG_EXOHSCP_cff::tracks.
Referenced by Tau.Tau::dxy().
|
private |
Weight the tracks, for the first time, using KalmanChiSquare.
track weighting, as opposed to re-weighting, must always be done with a reset annealer!
Definition at line 393 of file AdaptiveVertexFitter.cc.
References hltPixelTracks_cff::chi2, AnnealingSchedule::currentTemp(), HLT_2018_cff::distance, VertexTrackCompatibilityEstimator< N >::estimate(), FrontierConditions_GlobalTag_cff::file, getId(), getWeight(), mps_fire::i, visualization-live-secondInstance_cfg::m, AnnealingSchedule::resetAnnealing(), SurveyInfoScenario_cff::seed, theAssProbComputer, theComp, theNr, VertexTrackFactory< N >::vertexTrack(), and AnnealingSchedule::weight().
Referenced by linearizeTracks().
|
private |
Definition at line 203 of file AdaptiveVertexFitter.h.
Referenced by fit(), and gsfIntermediarySmoothing().
|
private |
Definition at line 200 of file AdaptiveVertexFitter.h.
Referenced by fit(), getWeight(), reWeightTracks(), weightTracks(), and ~AdaptiveVertexFitter().
|
private |
Definition at line 201 of file AdaptiveVertexFitter.h.
Referenced by reWeightTracks(), weightTracks(), and ~AdaptiveVertexFitter().
|
private |
Definition at line 197 of file AdaptiveVertexFitter.h.
Referenced by vertex(), and ~AdaptiveVertexFitter().
|
private |
Definition at line 202 of file AdaptiveVertexFitter.h.
Referenced by linearizeTracks(), reLinearizeTracks(), and ~AdaptiveVertexFitter().
|
private |
Definition at line 192 of file AdaptiveVertexFitter.h.
Referenced by fit(), and setParameters().
|
private |
Definition at line 191 of file AdaptiveVertexFitter.h.
Referenced by fit(), and setParameters().
|
private |
Definition at line 193 of file AdaptiveVertexFitter.h.
Referenced by fit(), and setParameters().
|
mutableprivate |
Definition at line 195 of file AdaptiveVertexFitter.h.
Referenced by reWeightTracks(), and weightTracks().
|
private |
Definition at line 199 of file AdaptiveVertexFitter.h.
Referenced by fit(), and ~AdaptiveVertexFitter().
|
private |
Definition at line 198 of file AdaptiveVertexFitter.h.
Referenced by fit(), and ~AdaptiveVertexFitter().
|
private |
Definition at line 194 of file AdaptiveVertexFitter.h.
Referenced by fit(), setParameters(), and setWeightThreshold().