CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
TTStubAssociationMap< T > Class Template Reference

NOTE: this is needed even if it seems not. More...

#include <TTStubAssociationMap.h>

Public Member Functions

edm::Ptr< TrackingParticlefindTrackingParticlePtr (edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub) const
 Operations. More...
 
std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > findTTStubRefs (edm::Ptr< TrackingParticle > aTrackingParticle) const
 
std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > > getTrackingParticleToTTStubsMap () const
 
std::map< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >, edm::Ptr< TrackingParticle > > getTTStubToTrackingParticleMap () const
 Maps. More...
 
bool isCombinatoric (edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub) const
 
bool isGenuine (edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub) const
 MC Truth methods. More...
 
bool isUnknown (edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub) const
 
void setTrackingParticleToTTStubsMap (std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > > aMap)
 
void setTTClusterAssociationMap (edm::RefProd< TTClusterAssociationMap< T > > aCluAssoMap)
 
void setTTStubToTrackingParticleMap (std::map< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >, edm::Ptr< TrackingParticle > > aMap)
 
 TTStubAssociationMap ()
 Constructors. More...
 
 ~TTStubAssociationMap ()
 Destructor. More...
 

Private Attributes

std::map< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >, edm::Ptr< TrackingParticle > > stubToTrackingParticleMap
 Data members. More...
 
edm::RefProd< TTClusterAssociationMap< T > > theClusterAssociationMap
 
std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > > trackingParticleToStubVectorMap
 

Detailed Description

template<typename T>
class TTStubAssociationMap< T >

NOTE: this is needed even if it seems not.

Class to store the MC truth of L1 Track Trigger stubs.

After moving from SimDataFormats to DataFormats, the template structure of the class was maintained in order to accomodate any types other than PixelDigis in case there is such a need in the future.

Author
Nicola Pozzobon
Date
2013, Jul 19

Definition at line 36 of file TTStubAssociationMap.h.

Constructor & Destructor Documentation

template<typename T >
TTStubAssociationMap< T >::TTStubAssociationMap ( )

Constructors.

Close class.

Implementation of methods

Here, in the header file, the methods which do not depend on the specific type <T> that can fit the template. Other methods, with type-specific features, are implemented in the source file.Default Constructor NOTE: to be used with setSomething(...) methods

Set default data members

Definition at line 88 of file TTStubAssociationMap.h.

References TTStubAssociationMap< T >::stubToTrackingParticleMap, TTStubAssociationMap< T >::theClusterAssociationMap, and TTStubAssociationMap< T >::trackingParticleToStubVectorMap.

89 {
94  theClusterAssociationMap = *aRefProd;
95 }
edm::RefProd< TTClusterAssociationMap< T > > theClusterAssociationMap
std::map< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >, edm::Ptr< TrackingParticle > > stubToTrackingParticleMap
Data members.
std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > > trackingParticleToStubVectorMap
template<typename T >
TTStubAssociationMap< T >::~TTStubAssociationMap ( )

Destructor.

Definition at line 99 of file TTStubAssociationMap.h.

99 {}

Member Function Documentation

template<typename T >
edm::Ptr< TrackingParticle > TTStubAssociationMap< T >::findTrackingParticlePtr ( edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >  aStub) const

Operations.

Default: return NULL

Definition at line 103 of file TTStubAssociationMap.h.

References TTStubAssociationMap< T >::stubToTrackingParticleMap, and groupFilesInBlocks::temp.

Referenced by TTStubAssociationMap< T >::isGenuine(), and TTStubAssociationMap< T >::setTTClusterAssociationMap().

104 {
105  if ( stubToTrackingParticleMap.find( aStub ) != stubToTrackingParticleMap.end() )
106  {
107  return stubToTrackingParticleMap.find( aStub )->second;
108  }
109 
112  return *temp;
113 }
std::map< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >, edm::Ptr< TrackingParticle > > stubToTrackingParticleMap
Data members.
template<typename T >
std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > TTStubAssociationMap< T >::findTTStubRefs ( edm::Ptr< TrackingParticle aTrackingParticle) const

Definition at line 116 of file TTStubAssociationMap.h.

References TTStubAssociationMap< T >::trackingParticleToStubVectorMap.

Referenced by TTStubAssociationMap< T >::setTTClusterAssociationMap().

117 {
118  if ( trackingParticleToStubVectorMap.find( aTrackingParticle ) != trackingParticleToStubVectorMap.end() )
119  {
120  return trackingParticleToStubVectorMap.find( aTrackingParticle )->second;
121  }
122 
123  std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > tempVector;
124  tempVector.clear();
125  return tempVector;
126 }
Class to store the L1 Track Trigger stubs.
Definition: TTStub.h:22
std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > > trackingParticleToStubVectorMap
template<typename T>
std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > > TTStubAssociationMap< T >::getTrackingParticleToTTStubsMap ( ) const
inline

Definition at line 51 of file TTStubAssociationMap.h.

References TTStubAssociationMap< T >::trackingParticleToStubVectorMap.

std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > > trackingParticleToStubVectorMap
template<typename T>
std::map< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >, edm::Ptr< TrackingParticle > > TTStubAssociationMap< T >::getTTStubToTrackingParticleMap ( ) const
inline

Maps.

Data members: getABC( ... ) Helper methods: findABC( ... )

Definition at line 49 of file TTStubAssociationMap.h.

References TTStubAssociationMap< T >::stubToTrackingParticleMap.

50  { return stubToTrackingParticleMap; }
std::map< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >, edm::Ptr< TrackingParticle > > stubToTrackingParticleMap
Data members.
template<typename T >
bool TTStubAssociationMap< T >::isCombinatoric ( edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >  aStub) const

Defined by exclusion

Definition at line 141 of file TTStubAssociationMap.h.

References TTStubAssociationMap< T >::isGenuine(), and TTStubAssociationMap< T >::isUnknown().

Referenced by TTStubAssociationMap< T >::setTTClusterAssociationMap().

142 {
144  if ( this->isGenuine( aStub ) )
145  return false;
146 
147  if ( this->isUnknown( aStub ) )
148  return false;
149 
150  return true;
151 }
bool isUnknown(edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub) const
bool isGenuine(edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub) const
MC Truth methods.
template<typename T >
bool TTStubAssociationMap< T >::isGenuine ( edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >  aStub) const

MC Truth methods.

MC truth.

Check if there is a SimTrack

Definition at line 131 of file TTStubAssociationMap.h.

References TTStubAssociationMap< T >::findTrackingParticlePtr().

Referenced by TTStubAssociationMap< T >::isCombinatoric(), and TTStubAssociationMap< T >::setTTClusterAssociationMap().

132 {
134  if ( (this->findTrackingParticlePtr( aStub )).isNull() )
135  return false;
136 
137  return true;
138 }
edm::Ptr< TrackingParticle > findTrackingParticlePtr(edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub) const
Operations.
template<typename T >
bool TTStubAssociationMap< T >::isUnknown ( edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >  aStub) const

UNKNOWN means that both clusters are unknown

Sanity check

Definition at line 154 of file TTStubAssociationMap.h.

References edm::RefProd< C >::isNull(), TTClusterAssociationMap< T >::isUnknown(), and TTStubAssociationMap< T >::theClusterAssociationMap.

Referenced by TTStubAssociationMap< T >::isCombinatoric(), and TTStubAssociationMap< T >::setTTClusterAssociationMap().

155 {
157  //std::vector< edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > > theseClusters = aStub->getClusterRefs();
158 
161  {
162  return true;
163  }
164 
165  if ( theClusterAssociationMap->isUnknown( aStub->getClusterRef(0) ) &&
166  theClusterAssociationMap->isUnknown( aStub->getClusterRef(1) ) )
167  return true;
168 
169  return false;
170 }
edm::RefProd< TTClusterAssociationMap< T > > theClusterAssociationMap
bool isNull() const
Checks for null.
Definition: RefProd.h:128
bool isUnknown(edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > aCluster) const
template<typename T>
void TTStubAssociationMap< T >::setTrackingParticleToTTStubsMap ( std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > >  aMap)
inline

Definition at line 56 of file TTStubAssociationMap.h.

References TTStubAssociationMap< T >::trackingParticleToStubVectorMap.

std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > > trackingParticleToStubVectorMap
template<typename T>
void TTStubAssociationMap< T >::setTTClusterAssociationMap ( edm::RefProd< TTClusterAssociationMap< T > >  aCluAssoMap)
inline
template<typename T>
void TTStubAssociationMap< T >::setTTStubToTrackingParticleMap ( std::map< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >, edm::Ptr< TrackingParticle > >  aMap)
inline

Definition at line 54 of file TTStubAssociationMap.h.

References TTStubAssociationMap< T >::stubToTrackingParticleMap.

55  { stubToTrackingParticleMap = aMap; }
std::map< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >, edm::Ptr< TrackingParticle > > stubToTrackingParticleMap
Data members.

Member Data Documentation

template<typename T>
std::map< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >, edm::Ptr< TrackingParticle > > TTStubAssociationMap< T >::stubToTrackingParticleMap
private
template<typename T>
edm::RefProd< TTClusterAssociationMap< T > > TTStubAssociationMap< T >::theClusterAssociationMap
private
template<typename T>
std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > > TTStubAssociationMap< T >::trackingParticleToStubVectorMap
private