#include <TrackAssociatorByChi2.h>
Public Types | |
typedef std::map< double, SimTrack > | Chi2SimMap |
typedef std::pair< reco::Track, Chi2SimMap > | RecoToSimPair |
typedef std::vector < RecoToSimPair > | RecoToSimPairAssociation |
Private Attributes | |
edm::InputTag | bsSrc |
double | chi2cut |
bool | onlyDiagonal |
edm::ESHandle< MagneticField > | theMF |
Class that performs the association of reco::Tracks and TrackingParticles evaluating the chi2 of reco tracks parameters and sim tracks parameters. The cut can be tuned from the config file: see data/TrackAssociatorByChi2.cfi. Note that the Association Map is filled with -ch2 and not chi2 because it is ordered using std::greater: the track with the lowest association chi2 will be the first in the output map.It is possible to use only diagonal terms (associator by pulls) seeting onlyDiagonal = true in the PSet
Definition at line 42 of file TrackAssociatorByChi2.h.
typedef std::map<double, SimTrack> TrackAssociatorByChi2::Chi2SimMap |
Definition at line 45 of file TrackAssociatorByChi2.h.
typedef std::pair< reco::Track, Chi2SimMap> TrackAssociatorByChi2::RecoToSimPair |
Definition at line 46 of file TrackAssociatorByChi2.h.
typedef std::vector< RecoToSimPair > TrackAssociatorByChi2::RecoToSimPairAssociation |
Definition at line 47 of file TrackAssociatorByChi2.h.
|
inline |
Constructor with PSet.
Definition at line 50 of file TrackAssociatorByChi2.h.
References onlyDiagonal, and theMF.
|
inline |
Constructor with magnetic field, double, bool and InputTag.
Definition at line 62 of file TrackAssociatorByChi2.h.
References bsSrc, chi2cut, onlyDiagonal, and theMF.
|
inline |
GenToRecoCollection TrackAssociatorByChi2::associateGenToReco | ( | const edm::RefToBaseVector< reco::Track > & | tC, |
const edm::RefVector< reco::GenParticleCollection > & | tPCH, | ||
const edm::Event * | event = 0 , |
||
const edm::EventSetup * | setup = 0 |
||
) | const |
Association Sim To Reco with Collections (Gen Particle version)
Definition at line 345 of file TrackAssociatorByChi2.cc.
References edm::RefToBaseVector< T >::begin(), edm::RefToBaseVector< T >::end(), edm::Event::getByLabel(), i, edm::AssociationMap< Tag >::insert(), j, LogDebug, edm::AssociationMap< Tag >::post_insert(), edm::RefVector< C, T, F >::product(), edm::RefVector< C, T, F >::size(), and mathSSE::sqrt().
Referenced by MultiTrackValidatorGenPs::analyze(), and associateGenToReco().
|
inlinevirtual |
compare reco to sim the handle of reco::Track and GenParticle collections
Definition at line 159 of file TrackAssociatorByChi2.h.
References associateGenToReco(), event(), edm::HandleBase::id(), j, edm::RefToBaseVector< T >::push_back(), edm::RefVector< C, T, F >::push_back(), and HcalObjRepresent::setup().
RecoToGenCollection TrackAssociatorByChi2::associateRecoToGen | ( | const edm::RefToBaseVector< reco::Track > & | tC, |
const edm::RefVector< reco::GenParticleCollection > & | tPCH, | ||
const edm::Event * | event = 0 , |
||
const edm::EventSetup * | setup = 0 |
||
) | const |
Association Sim To Reco with Collections (Gen Particle version)
Definition at line 288 of file TrackAssociatorByChi2.cc.
References edm::RefToBaseVector< T >::begin(), edm::RefToBaseVector< T >::end(), edm::Event::getByLabel(), i, edm::AssociationMap< Tag >::insert(), j, LogDebug, edm::AssociationMap< Tag >::post_insert(), edm::RefVector< C, T, F >::product(), and edm::RefVector< C, T, F >::size().
Referenced by MultiTrackValidatorGenPs::analyze(), and associateRecoToGen().
|
inlinevirtual |
compare reco to sim the handle of reco::Track and GenParticle collections
Definition at line 143 of file TrackAssociatorByChi2.h.
References associateRecoToGen(), event(), edm::HandleBase::id(), j, edm::RefToBaseVector< T >::push_back(), edm::RefVector< C, T, F >::push_back(), and HcalObjRepresent::setup().
double TrackAssociatorByChi2::associateRecoToSim | ( | reco::TrackCollection::const_iterator | , |
TrackingParticleCollection::const_iterator | , | ||
const reco::BeamSpot & | |||
) | const |
compare reco::TrackCollection and TrackingParticleCollection iterators: returns the chi2
Referenced by KVFTest::analyze().
|
virtual |
Association Reco To Sim with Collections.
Implements TrackAssociatorBase.
Definition at line 173 of file TrackAssociatorByChi2.cc.
References edm::RefToBaseVector< T >::begin(), edm::RefToBaseVector< T >::end(), edm::Event::getByLabel(), i, edm::AssociationMap< Tag >::insert(), j, LogDebug, edm::AssociationMap< Tag >::post_insert(), edm::RefVector< C, T, F >::product(), and edm::RefVector< C, T, F >::size().
|
inlinevirtual |
compare reco to sim the handle of reco::Track and TrackingParticle collections
Reimplemented from TrackAssociatorBase.
Definition at line 116 of file TrackAssociatorByChi2.h.
References TrackAssociatorBase::associateRecoToSim(), event(), and HcalObjRepresent::setup().
|
virtual |
Association Sim To Reco with Collections.
Implements TrackAssociatorBase.
Definition at line 230 of file TrackAssociatorByChi2.cc.
References edm::RefToBaseVector< T >::begin(), edm::RefToBaseVector< T >::end(), edm::Event::getByLabel(), i, edm::AssociationMap< Tag >::insert(), j, LogDebug, edm::AssociationMap< Tag >::post_insert(), edm::RefVector< C, T, F >::product(), edm::RefVector< C, T, F >::size(), and mathSSE::sqrt().
|
inlinevirtual |
compare reco to sim the handle of reco::Track and TrackingParticle collections
Reimplemented from TrackAssociatorBase.
Definition at line 124 of file TrackAssociatorByChi2.h.
References TrackAssociatorBase::associateSimToReco(), event(), and HcalObjRepresent::setup().
double TrackAssociatorByChi2::compareTracksParam | ( | reco::TrackCollection::const_iterator | , |
edm::SimTrackContainer::const_iterator | , | ||
const math::XYZTLorentzVectorD | , | ||
GlobalVector | , | ||
reco::TrackBase::CovarianceMatrix | , | ||
const reco::BeamSpot & | |||
) | const |
compare reco::TrackCollection and edm::SimTrackContainer iterators: returns the chi2
TrackAssociatorByChi2::RecoToSimPairAssociation TrackAssociatorByChi2::compareTracksParam | ( | const reco::TrackCollection & | rtColl, |
const edm::SimTrackContainer & | stColl, | ||
const edm::SimVertexContainer & | svColl, | ||
const reco::BeamSpot & | bs | ||
) | const |
compare collections reco to sim
Definition at line 41 of file TrackAssociatorByChi2.cc.
References reco::deltaPhi(), f, i, and j.
double TrackAssociatorByChi2::getChi2 | ( | reco::TrackBase::ParameterVector & | rParameters, |
reco::TrackBase::CovarianceMatrix & | recoTrackCovMatrix, | ||
Basic3DVector< double > & | momAtVtx, | ||
Basic3DVector< double > & | vert, | ||
int & | charge, | ||
const reco::BeamSpot & | bs | ||
) | const |
basic method where chi2 is computed
Definition at line 84 of file TrackAssociatorByChi2.cc.
References reco::deltaPhi(), f, LogDebug, and funct::sin().
pair< bool, TrackBase::ParameterVector > TrackAssociatorByChi2::parametersAtClosestApproach | ( | Basic3DVector< double > | vertex, |
Basic3DVector< double > | momAtVtx, | ||
float | charge, | ||
const reco::BeamSpot & | bs | ||
) | const |
propagate the track parameters of TrackinParticle from production vertex to the point of closest approach to the beam line.
Definition at line 145 of file TrackAssociatorByChi2.cc.
References FreeTrajectoryState::charge(), funct::cos(), Geom::halfPi(), PV3DBase< T, PVType, FrameType >::mag(), FreeTrajectoryState::momentum(), AlCaHLTBitMon_ParallelJobs::p, PV3DBase< T, PVType, FrameType >::perp(), PV3DBase< T, PVType, FrameType >::phi(), FreeTrajectoryState::position(), funct::sin(), PV3DBase< T, PVType, FrameType >::theta(), TrajectoryStateClosestToBeamLine::trackStateAtPCA(), findQualityFiles::v, PV3DBase< T, PVType, FrameType >::x(), Basic3DVector< T >::x(), PV3DBase< T, PVType, FrameType >::y(), Basic3DVector< T >::y(), PV3DBase< T, PVType, FrameType >::z(), and Basic3DVector< T >::z().
Referenced by VertexFitterResult::fill().
|
private |
Definition at line 179 of file TrackAssociatorByChi2.h.
Referenced by TrackAssociatorByChi2().
|
private |
Definition at line 177 of file TrackAssociatorByChi2.h.
Referenced by TrackAssociatorByChi2().
|
private |
Definition at line 178 of file TrackAssociatorByChi2.h.
Referenced by TrackAssociatorByChi2().
|
private |
Definition at line 176 of file TrackAssociatorByChi2.h.
Referenced by TrackAssociatorByChi2().