CMS 3D CMS Logo

TTTrackAssociationMap.h
Go to the documentation of this file.
1 
18 #ifndef SimDataFormats_Associations_TTTrackAssociationMap_h
19 #define SimDataFormats_Associations_TTTrackAssociationMap_h
20 
37 
38 // Templated aliases
39 template <typename T>
40 using MapL1TrackToTP = std::map<TTTrackPtrT<T>, TrackingParticlePtr>;
41 template <typename T>
42 using MapTPToVecL1Track = std::map<TrackingParticlePtr, std::vector<TTTrackPtrT<T>>>;
43 
44 template <typename T>
46 public:
49 
52 
54 
57 
60 
63  theStubAssociationMap_ = aStubAssoMap;
64  }
65 
69 
73  const std::vector<TTTrackPtrT<T>>& findTTTrackPtrs(TrackingParticlePtr aTrackingParticle) const;
74 
77 
86  bool isGenuine(TTTrackPtrT<T> aTrack) const;
89  bool isLooselyGenuine(TTTrackPtrT<T> aTrack) const;
91  bool isUnknown(TTTrackPtrT<T> aTrack) const;
93  bool isCombinatoric(TTTrackPtrT<T> aTrack) const;
94 
95  // Cfg param allowing one incorrect 2S stub in "genuine" tracks.
96  void setAllowOneFalse2SStub(bool allowFalse2SStub);
98 
99 private:
104 
106 
107  // Allow functions to return reference to null.
109  static const std::vector<TTTrackPtr> nullVecTTTrackPtr_;
110 
111 };
112 
120 // Static constant data members.
121 template <typename T>
123 template <typename T>
124 const std::vector<TTTrackPtr> TTTrackAssociationMap<T>::nullVecTTTrackPtr_;
125 
128 template <typename T>
131 }
132 
134 template <typename T>
136 
138 template <>
140  TTTrackPtr aTrack) const;
141 
142 template <>
144  TrackingParticlePtr aTrackingParticle) const;
145 
147 template <>
149 
151 template <>
153 
154 template <>
156 
157 template <>
159 
160 #endif
const TrackingParticlePtr & findTrackingParticlePtr(TTTrackPtrT< T > aTrack) const
void setTTStubAssociationMap(edm::RefProd< TTStubAssociationMap< T >> aStubAssoMap)
Set stub <-> truth association object.
bool isUnknown(TTTrackPtrT< T > aTrack) const
More than one stub on track is "unknown".
std::map< TrackingParticlePtr, std::vector< TTTrackPtrT< T > >> MapTPToVecL1Track
MapL1TrackToTP< T > trackToTrackingParticleMap_
Data members.
bool isCombinatoric(TTTrackPtrT< T > aTrack) const
Both isLooselyGenuine() & isUnknown() are false.
static const std::vector< TTTrackPtr > nullVecTTTrackPtr_
Stores association of Truth Particles (TP) to L1 Track-Trigger Tracks.
~TTTrackAssociationMap()
Destructor.
bool isGenuine(TTTrackPtrT< T > aTrack) const
MapTPToVecL1Track< T > trackingParticleToTrackVectorMap_
void setAllowOneFalse2SStub(bool allowFalse2SStub)
bool isLooselyGenuine(TTTrackPtrT< T > aTrack) const
TTTrackAssociationMap()
Constructors.
edm::RefProd< TTStubAssociationMap< T > > theStubAssociationMap_
void setTTTrackToTrackingParticleMap(const MapL1TrackToTP< T > &aMap)
const std::vector< TTTrackPtrT< T > > & findTTTrackPtrs(TrackingParticlePtr aTrackingParticle) const
static const TrackingParticlePtr nullTrackingParticlePtr_
Close class.
void setTrackingParticleToTTTracksMap(const MapTPToVecL1Track< T > &aMap)
const MapTPToVecL1Track< T > & getTrackingParticleToTTTracksMap() const
const MapL1TrackToTP< T > & getTTTrackToTrackingParticleMap() const
Get/set stub <-> truth association maps.
std::map< TTTrackPtrT< T >, TrackingParticlePtr > MapL1TrackToTP
NOTE: this is needed even if it seems not.
Stores association of Truth Particles (TP) to L1 Track-Trigger Stubs.