CMS 3D CMS Logo

TTStubAssociationMap.h
Go to the documentation of this file.
1 
13 #ifndef L1_TRACK_TRIGGER_STUB_ASSOCIATION_FORMAT_H
14 #define L1_TRACK_TRIGGER_STUB_ASSOCIATION_FORMAT_H
15 
24 //#include "DataFormats/SiPixelDigi/interface/PixelDigi.h"
34 
35 template <typename T>
37 public:
40 
43 
46 
48  std::map<edm::Ref<edmNew::DetSetVector<TTStub<T> >, TTStub<T> >, edm::Ptr<TrackingParticle> >
51  }
52  std::map<edm::Ptr<TrackingParticle>, std::vector<edm::Ref<edmNew::DetSetVector<TTStub<T> >, TTStub<T> > > >
55  }
56 
60  }
64  }
66  theClusterAssociationMap = aCluAssoMap;
67  }
68 
71  std::vector<edm::Ref<edmNew::DetSetVector<TTStub<T> >, TTStub<T> > > findTTStubRefs(
72  edm::Ptr<TrackingParticle> aTrackingParticle) const;
73 
78 
79 private:
81  std::map<edm::Ref<edmNew::DetSetVector<TTStub<T> >, TTStub<T> >, edm::Ptr<TrackingParticle> >
83  std::map<edm::Ptr<TrackingParticle>, std::vector<edm::Ref<edmNew::DetSetVector<TTStub<T> >, TTStub<T> > > >
86 
87 };
88 
96 template <typename T>
101  stubToTrackingParticleMap.clear();
102  trackingParticleToStubVectorMap.clear();
104  theClusterAssociationMap = *aRefProd;
105 }
106 
108 template <typename T>
110 
112 template <typename T>
115  if (stubToTrackingParticleMap.find(aStub) != stubToTrackingParticleMap.end()) {
116  return stubToTrackingParticleMap.find(aStub)->second;
117  }
118 
120  //edm::Ptr< TrackingParticle >* temp = new edm::Ptr< TrackingParticle >();
122 }
123 
124 template <typename T>
125 std::vector<edm::Ref<edmNew::DetSetVector<TTStub<T> >, TTStub<T> > > TTStubAssociationMap<T>::findTTStubRefs(
126  edm::Ptr<TrackingParticle> aTrackingParticle) const {
127  if (trackingParticleToStubVectorMap.find(aTrackingParticle) != trackingParticleToStubVectorMap.end()) {
128  return trackingParticleToStubVectorMap.find(aTrackingParticle)->second;
129  }
130 
131  std::vector<edm::Ref<edmNew::DetSetVector<TTStub<T> >, TTStub<T> > > tempVector;
132  tempVector.clear();
133  return tempVector;
134 }
135 
137 template <typename T>
140  if ((this->findTrackingParticlePtr(aStub)).isNull())
141  return false;
142 
143  return true;
144 }
145 
146 template <typename T>
149  if (this->isGenuine(aStub))
150  return false;
151 
152  if (this->isUnknown(aStub))
153  return false;
154 
155  return true;
156 }
157 
158 template <typename T>
161  //std::vector< edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > > theseClusters = aStub->getClusterRefs();
162 
164  if (theClusterAssociationMap.isNull()) {
165  return true;
166  }
167 
168  if (theClusterAssociationMap->isUnknown(aStub->clusterRef(0)) &&
169  theClusterAssociationMap->isUnknown(aStub->clusterRef(1)))
170  return true;
171 
172  return false;
173 }
174 
175 #endif
edm::RefProd
Definition: EDProductfwd.h:25
RefProd.h
TTStubAssociationMap::isGenuine
bool isGenuine(edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub) const
MC Truth methods.
Definition: TTStubAssociationMap.h:138
TTClusterAssociationMap
NOTE: this is needed even if it seems not.
Definition: TTClusterAssociationMap.h:33
TTStubAssociationMap::findTTStubRefs
std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > findTTStubRefs(edm::Ptr< TrackingParticle > aTrackingParticle) const
Definition: TTStubAssociationMap.h:125
TTStubAssociationMap::~TTStubAssociationMap
~TTStubAssociationMap()
Destructor.
Definition: TTStubAssociationMap.h:109
TTClusterAssociationMap.h
edm::Ref
Definition: AssociativeIterator.h:58
TTStubAssociationMap::findTrackingParticlePtr
edm::Ptr< TrackingParticle > findTrackingParticlePtr(edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub) const
Operations.
Definition: TTStubAssociationMap.h:113
TTStubAssociationMap::stubToTrackingParticleMap
std::map< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >, edm::Ptr< TrackingParticle > > stubToTrackingParticleMap
Data members.
Definition: TTStubAssociationMap.h:82
TTStubAssociationMap
NOTE: this is needed even if it seems not.
Definition: TTStubAssociationMap.h:36
TTStub
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
TTStubAssociationMap::trackingParticleToStubVectorMap
std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > > trackingParticleToStubVectorMap
Definition: TTStubAssociationMap.h:84
Phase2TrackerDigi.h
TTStubAssociationMap::setTTStubToTrackingParticleMap
void setTTStubToTrackingParticleMap(std::map< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >, edm::Ptr< TrackingParticle > > aMap)
Definition: TTStubAssociationMap.h:57
TTStubAssociationMap::isCombinatoric
bool isCombinatoric(edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub) const
Definition: TTStubAssociationMap.h:147
Ptr.h
MeasurementPoint.h
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
TTStubAssociationMap::setTrackingParticleToTTStubsMap
void setTrackingParticleToTTStubsMap(std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > > aMap)
Definition: TTStubAssociationMap.h:61
DetSetVector.h
TTStubAssociationMap::theClusterAssociationMap
edm::RefProd< TTClusterAssociationMap< T > > theClusterAssociationMap
Definition: TTStubAssociationMap.h:85
edm::Ptr< TrackingParticle >
TTStubAssociationMap::isUnknown
bool isUnknown(edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub) const
Definition: TTStubAssociationMap.h:159
TrackingParticle.h
edmNew::DetSetVector
Definition: DetSetNew.h:13
Ref.h
DetId.h
TTStubAssociationMap::getTrackingParticleToTTStubsMap
std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > > getTrackingParticleToTTStubsMap() const
Definition: TTStubAssociationMap.h:53
TTStubAssociationMap::getTTStubToTrackingParticleMap
std::map< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >, edm::Ptr< TrackingParticle > > getTTStubToTrackingParticleMap() const
Maps.
Definition: TTStubAssociationMap.h:49
TTStub.h
DetSet.h
genParticles_cff.map
map
Definition: genParticles_cff.py:11
SimTrack.h
GlobalPoint.h
SimTrackContainer.h
TTStubAssociationMap::TTStubAssociationMap
TTStubAssociationMap()
Constructors.
Definition: TTStubAssociationMap.h:99
DetSetVectorNew.h
TTStubAssociationMap::setTTClusterAssociationMap
void setTTClusterAssociationMap(edm::RefProd< TTClusterAssociationMap< T > > aCluAssoMap)
Definition: TTStubAssociationMap.h:65
EncodedEventId.h