SimTracker
TrackAssociatorProducers
plugins
TrackAssociatorByPositionImpl.h
Go to the documentation of this file.
1
#ifndef TrackAssociatorByPositionImpl_h
2
#define TrackAssociatorByPositionImpl_h
3
10
#include "
SimDataFormats/Associations/interface/TrackToTrackingParticleAssociatorBaseImpl.h
"
11
#include "
SimDataFormats/Track/interface/SimTrackContainer.h
"
12
#include "
FWCore/Framework/interface/ESHandle.h
"
13
#include "
FWCore/Framework/interface/EventSetup.h
"
14
#include "
SimDataFormats/Vertex/interface/SimVertexContainer.h
"
15
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
16
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
17
18
#include "
TrackingTools/GeomPropagators/interface/Propagator.h
"
19
#include "
Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h
"
20
21
#include "
TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h
"
22
23
#include "
SimDataFormats/TrackingHit/interface/PSimHitContainer.h
"
24
25
#include <map>
26
27
//Note that the Association Map is filled with -ch2 and not chi2 because it is ordered using std::greater:
28
//the track with the lowest association chi2 will be the first in the output map.
29
30
class
TrackAssociatorByPositionImpl
:
public
reco::TrackToTrackingParticleAssociatorBaseImpl
{
31
public
:
32
typedef
std::pair<TrackingParticleRef, TrackPSimHitRef>
SimHitTPPair
;
33
typedef
std::vector<SimHitTPPair>
SimHitTPAssociationList
;
34
enum class
Method
{
chi2
,
dist
,
momdr
,
posdr
};
35
36
TrackAssociatorByPositionImpl
(
const
TrackingGeometry
* geo,
37
const
Propagator
* prop,
38
const
SimHitTPAssociationList
* assocList,
39
double
qMinCut,
40
double
qCut,
41
double
positionMinimumDistance
,
42
Method
method
,
43
bool
minIfNoMatch,
44
bool
considerAllSimHits)
45
:
theGeometry
(geo),
46
thePropagator
(prop),
47
theSimHitsTPAssoc
(assocList),
48
theQminCut
(qMinCut),
49
theQCut
(qCut),
50
thePositionMinimumDistance
(
positionMinimumDistance
),
51
theMethod
(
method
),
52
theMinIfNoMatch
(minIfNoMatch),
53
theConsiderAllSimHits
(considerAllSimHits) {}
54
56
57
reco::RecoToSimCollection
associateRecoToSim
(
const
edm::RefToBaseVector<reco::Track>
&,
58
const
edm::RefVector<TrackingParticleCollection>
&)
const override
;
59
61
62
reco::SimToRecoCollection
associateSimToReco
(
const
edm::RefToBaseVector<reco::Track>
&,
63
const
edm::RefVector<TrackingParticleCollection>
&)
const override
;
64
65
private
:
66
double
quality
(
const
TrajectoryStateOnSurface
&,
const
TrajectoryStateOnSurface
&)
const
;
67
68
const
TrackingGeometry
*
theGeometry
;
69
const
Propagator
*
thePropagator
;
70
const
SimHitTPAssociationList
*
theSimHitsTPAssoc
;
71
double
theQminCut
;
72
double
theQCut
;
73
double
thePositionMinimumDistance
;
74
Method
theMethod
;
75
bool
theMinIfNoMatch
;
76
bool
theConsiderAllSimHits
;
77
78
FreeTrajectoryState
getState
(
const
reco::Track
&)
const
;
79
TrajectoryStateOnSurface
getState
(
const
TrackingParticleRef
&,
const
SimHitTPAssociationList
& simHitsTPAssoc)
const
;
80
//edm::InputTag _simHitTpMapTag;
81
};
82
83
#endif
Propagator.h
TrajectoryStateOnSurface.h
TrackToTrackingParticleAssociatorBaseImpl.h
TrackAssociatorByPositionImpl::associateSimToReco
reco::SimToRecoCollection associateSimToReco(const edm::RefToBaseVector< reco::Track > &, const edm::RefVector< TrackingParticleCollection > &) const override
compare reco to sim the handle of reco::Track and TrackingParticle collections
Definition:
TrackAssociatorByPositionImpl.cc:169
TrackAssociatorByPositionImpl::theConsiderAllSimHits
bool theConsiderAllSimHits
Definition:
TrackAssociatorByPositionImpl.h:76
TrackAssociatorByPositionImpl::Method::chi2
MessageLogger.h
TrackingGeometry
Definition:
TrackingGeometry.h:26
ESHandle.h
TrackAssociatorByPositionImpl::thePropagator
const Propagator * thePropagator
Definition:
TrackAssociatorByPositionImpl.h:69
TrackAssociatorByPositionImpl::quality
double quality(const TrajectoryStateOnSurface &, const TrajectoryStateOnSurface &) const
Definition:
TrackAssociatorByPositionImpl.cc:81
TrackAssociatorByPositionImpl::Method::momdr
AlcaSiPixelAliHarvester0T_cff.method
method
Definition:
AlcaSiPixelAliHarvester0T_cff.py:41
PSimHitContainer.h
TrackAssociatorByPositionImpl::Method::dist
edm::RefVector< TrackingParticleCollection >
TrackAssociatorByPositionImpl::theSimHitsTPAssoc
const SimHitTPAssociationList * theSimHitsTPAssoc
Definition:
TrackAssociatorByPositionImpl.h:70
TrackAssociatorByPositionImpl::theMethod
Method theMethod
Definition:
TrackAssociatorByPositionImpl.h:74
edm::Ref< TrackingParticleCollection >
Propagator
Definition:
Propagator.h:44
TrackAssociatorByPositionImpl::Method::posdr
TrajectoryStateOnSurface
Definition:
TrajectoryStateOnSurface.h:16
trackAssociatorByPosition_cfi.positionMinimumDistance
positionMinimumDistance
Definition:
trackAssociatorByPosition_cfi.py:12
reco::TrackToTrackingParticleAssociatorBaseImpl
Definition:
TrackToTrackingParticleAssociatorBaseImpl.h:33
TrackAssociatorByPositionImpl::thePositionMinimumDistance
double thePositionMinimumDistance
Definition:
TrackAssociatorByPositionImpl.h:73
reco::Track
Definition:
Track.h:27
TrackAssociatorByPositionImpl::getState
FreeTrajectoryState getState(const reco::Track &) const
Definition:
TrackAssociatorByPositionImpl.cc:76
TrackAssociatorByPositionImpl::theGeometry
const TrackingGeometry * theGeometry
Definition:
TrackAssociatorByPositionImpl.h:68
TrackAssociatorByPositionImpl::theMinIfNoMatch
bool theMinIfNoMatch
Definition:
TrackAssociatorByPositionImpl.h:75
edm::AssociationMap< edm::OneToManyWithQualityGeneric< edm::View< reco::Track >, TrackingParticleCollection, double > >
TrackAssociatorByPositionImpl::theQCut
double theQCut
Definition:
TrackAssociatorByPositionImpl.h:72
edm::RefToBaseVector< reco::Track >
TrackAssociatorByPositionImpl::SimHitTPPair
std::pair< TrackingParticleRef, TrackPSimHitRef > SimHitTPPair
Definition:
TrackAssociatorByPositionImpl.h:32
TrackAssociatorByPositionImpl
Definition:
TrackAssociatorByPositionImpl.h:30
TrackAssociatorByPositionImpl::Method
Method
Definition:
TrackAssociatorByPositionImpl.h:34
FreeTrajectoryState
Definition:
FreeTrajectoryState.h:27
TrackAssociatorByPositionImpl::associateRecoToSim
reco::RecoToSimCollection associateRecoToSim(const edm::RefToBaseVector< reco::Track > &, const edm::RefVector< TrackingParticleCollection > &) const override
compare reco to sim the handle of reco::Track and TrackingParticle collections
Definition:
TrackAssociatorByPositionImpl.cc:117
TrackAssociatorByPositionImpl::TrackAssociatorByPositionImpl
TrackAssociatorByPositionImpl(const TrackingGeometry *geo, const Propagator *prop, const SimHitTPAssociationList *assocList, double qMinCut, double qCut, double positionMinimumDistance, Method method, bool minIfNoMatch, bool considerAllSimHits)
Definition:
TrackAssociatorByPositionImpl.h:36
EventSetup.h
ParameterSet.h
GlobalTrackingGeometry.h
SimTrackContainer.h
SimVertexContainer.h
TrackAssociatorByPositionImpl::SimHitTPAssociationList
std::vector< SimHitTPPair > SimHitTPAssociationList
Definition:
TrackAssociatorByPositionImpl.h:33
TrackAssociatorByPositionImpl::theQminCut
double theQminCut
Definition:
TrackAssociatorByPositionImpl.h:71
Generated for CMSSW Reference Manual by
1.8.16