CMS 3D CMS Logo

TTTrackAssociationMap.cc
Go to the documentation of this file.
1 
9 
10 
12 template< >
14 {
15  if ( trackToTrackingParticleMap.find( aTrack ) != trackToTrackingParticleMap.end() )
16  {
17  return trackToTrackingParticleMap.find( aTrack )->second;
18  }
19 
22  return *temp;
23 }
24 
25 template< >
26 std::vector< edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ > > > TTTrackAssociationMap< Ref_Phase2TrackerDigi_ >::findTTTrackPtrs( edm::Ptr< TrackingParticle > aTrackingParticle ) const
27 {
28  if ( trackingParticleToTrackVectorMap.find( aTrackingParticle ) != trackingParticleToTrackVectorMap.end() )
29  {
30  return trackingParticleToTrackVectorMap.find( aTrackingParticle )->second;
31  }
32 
34  std::vector< edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ > > > tempVec;
35  tempVec.clear();
36  return tempVec;
37 }
38 
40 template< >
42 {
44  if ( (this->findTrackingParticlePtr( aTrack )).isNull() )
45  return false;
46 
47  return true;
48 }
49 
51 template< >
53 {
55  if ( (this->findTrackingParticlePtr( aTrack )).isNull() )
56  return false;
57 
59  std::vector< edm::Ref< edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > >, TTStub< Ref_Phase2TrackerDigi_ > > > TP_Stubs = theStubAssociationMap->findTTStubRefs( this->findTrackingParticlePtr( aTrack ) );
60  std::vector< edm::Ref< edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > >, TTStub< Ref_Phase2TrackerDigi_ > > > TRK_Stubs = aTrack->getStubRefs();
61 
62  for ( unsigned int js = 0; js < TRK_Stubs.size(); js++ )
63  {
68  if ( std::find( TP_Stubs.begin(), TP_Stubs.end(), TRK_Stubs.at(js) ) == TP_Stubs.end() )
69  {
70  return false;
71  }
72  }
73 
74  return true;
75 }
76 
77 
78 template< >
80 {
82  if ( this->isLooselyGenuine( aTrack ) )
83  return false;
84 
85  if ( this->isUnknown( aTrack ) )
86  return false;
87 
88  return true;
89 }
90 
91 template< >
93 {
95  int unknownstubs=0;
96 
97  std::vector< edm::Ref< edmNew::DetSetVector< TTStub< Ref_Phase2TrackerDigi_ > >, TTStub< Ref_Phase2TrackerDigi_ > > > theseStubs = aTrack->getStubRefs();
98  for ( unsigned int i = 0; i < theseStubs.size(); i++ )
99  {
100  if ( theStubAssociationMap->isUnknown( theseStubs.at(i) ) == false )
101  {
102  ++unknownstubs;
103  if (unknownstubs>=2) return false;
104  }
105  }
106 
107  return true;
108 }
109 
110 
bool isCombinatoric(edm::Ptr< TTTrack< T > > aTrack) const
std::vector< edm::Ptr< TTTrack< T > > > findTTTrackPtrs(edm::Ptr< TrackingParticle > aTrackingParticle) const
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
bool isGenuine(edm::Ptr< TTTrack< T > > aTrack) const
MC Truth methods.
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
edm::Ptr< TrackingParticle > findTrackingParticlePtr(edm::Ptr< TTTrack< T > > aTrack) const
Operations.
Class to store the L1 Track Trigger tracks.
Definition: TTTrack.h:23
bool isUnknown(edm::Ptr< TTTrack< T > > aTrack) const
bool isLooselyGenuine(edm::Ptr< TTTrack< T > > aTrack) const