CMS 3D CMS Logo

TTTrackAssociationMap.cc
Go to the documentation of this file.
1 
9 
11 template <>
14  if (trackToTrackingParticleMap.find(aTrack) != trackToTrackingParticleMap.end()) {
15  return trackToTrackingParticleMap.find(aTrack)->second;
16  }
17 
20  return *temp;
21 }
22 
23 template <>
24 std::vector<edm::Ptr<TTTrack<Ref_Phase2TrackerDigi_> > > TTTrackAssociationMap<Ref_Phase2TrackerDigi_>::findTTTrackPtrs(
25  edm::Ptr<TrackingParticle> aTrackingParticle) const {
26  if (trackingParticleToTrackVectorMap.find(aTrackingParticle) != trackingParticleToTrackVectorMap.end()) {
27  return trackingParticleToTrackVectorMap.find(aTrackingParticle)->second;
28  }
29 
31  std::vector<edm::Ptr<TTTrack<Ref_Phase2TrackerDigi_> > > tempVec;
32  tempVec.clear();
33  return tempVec;
34 }
35 
37 template <>
41  if ((this->findTrackingParticlePtr(aTrack)).isNull())
42  return false;
43 
44  return true;
45 }
46 
48 template <>
51  if ((this->findTrackingParticlePtr(aTrack)).isNull())
52  return false;
53 
55  std::vector<edm::Ref<edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_> >, TTStub<Ref_Phase2TrackerDigi_> > >
56  TP_Stubs = theStubAssociationMap->findTTStubRefs(this->findTrackingParticlePtr(aTrack));
57  std::vector<edm::Ref<edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_> >, TTStub<Ref_Phase2TrackerDigi_> > >
58  TRK_Stubs = aTrack->getStubRefs();
59 
60  bool one2SStub = false;
61  for (unsigned int js = 0; js < TRK_Stubs.size(); js++) {
67  if (std::find(TP_Stubs.begin(), TP_Stubs.end(), TRK_Stubs.at(js)) == TP_Stubs.end()) {
68  if (!AllowOneFalse2SStub || TRK_Stubs.at(js)->moduleTypePS() || one2SStub) // Has to be first false 2S stub
69  {
70  return false;
71  } else {
72  one2SStub = true;
73  }
74  }
75  }
76 
77  return true;
78 }
79 
80 template <>
84  if (this->isLooselyGenuine(aTrack))
85  return false;
86 
87  if (this->isUnknown(aTrack))
88  return false;
89 
90  return true;
91 }
92 
93 template <>
96  int unknownstubs = 0;
97 
98  std::vector<edm::Ref<edmNew::DetSetVector<TTStub<Ref_Phase2TrackerDigi_> >, TTStub<Ref_Phase2TrackerDigi_> > >
99  theseStubs = aTrack->getStubRefs();
100  for (unsigned int i = 0; i < theseStubs.size(); i++) {
101  if (theStubAssociationMap->isUnknown(theseStubs.at(i)) == false) {
102  ++unknownstubs;
103  if (unknownstubs >= 2)
104  return false;
105  }
106  }
107 
108  return true;
109 }
110 
111 template <>
113  AllowOneFalse2SStub = allowFalse2SStub;
114 }
115 
116 template <>
118  return AllowOneFalse2SStub;
119 }
mps_fire.i
i
Definition: mps_fire.py:355
TTTrackAssociationMap::isLooselyGenuine
bool isLooselyGenuine(edm::Ptr< TTTrack< T > > aTrack) const
TTTrack
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:26
TTTrackAssociationMap::getAllowOneFalse2SStub
bool getAllowOneFalse2SStub()
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
groupFilesInBlocks.temp
list temp
Definition: groupFilesInBlocks.py:142
TTTrackAssociationMap::findTrackingParticlePtr
edm::Ptr< TrackingParticle > findTrackingParticlePtr(edm::Ptr< TTTrack< T > > aTrack) const
Operations.
TTStub
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
TTTrackAssociationMap::isUnknown
bool isUnknown(edm::Ptr< TTTrack< T > > aTrack) const
TTTrackAssociationMap::findTTTrackPtrs
std::vector< edm::Ptr< TTTrack< T > > > findTTTrackPtrs(edm::Ptr< TrackingParticle > aTrackingParticle) const
TTTrackAssociationMap::isGenuine
bool isGenuine(edm::Ptr< TTTrack< T > > aTrack) const
MC Truth methods.
TTTrackAssociationMap::isCombinatoric
bool isCombinatoric(edm::Ptr< TTTrack< T > > aTrack) const
edm::Ptr< TrackingParticle >
TTTrackAssociationMap.h
TTTrackAssociationMap::setAllowOneFalse2SStub
void setAllowOneFalse2SStub(bool allowFalse2SStub)