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

◆ TTStubAssociationMap()

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 99 of file TTStubAssociationMap.h.

◆ ~TTStubAssociationMap()

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

Destructor.

Definition at line 109 of file TTStubAssociationMap.h.

109 {}

Member Function Documentation

◆ findTrackingParticlePtr()

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 113 of file TTStubAssociationMap.h.

114  {
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 }

◆ findTTStubRefs()

template<typename T >
std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > TTStubAssociationMap< T >::findTTStubRefs ( edm::Ptr< TrackingParticle aTrackingParticle) const

Definition at line 125 of file TTStubAssociationMap.h.

126  {
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 }

◆ getTrackingParticleToTTStubsMap()

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

◆ getTTStubToTrackingParticleMap()

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.

49  {
51  }

References TTStubAssociationMap< T >::stubToTrackingParticleMap.

◆ isCombinatoric()

template<typename T >
bool TTStubAssociationMap< T >::isCombinatoric ( edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > >  aStub) const

Defined by exclusion

Definition at line 147 of file TTStubAssociationMap.h.

147  {
149  if (this->isGenuine(aStub))
150  return false;
151 
152  if (this->isUnknown(aStub))
153  return false;
154 
155  return true;
156 }

◆ isGenuine()

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 138 of file TTStubAssociationMap.h.

138  {
140  if ((this->findTrackingParticlePtr(aStub)).isNull())
141  return false;
142 
143  return true;
144 }

◆ isUnknown()

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 159 of file TTStubAssociationMap.h.

159  {
161  //std::vector< edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > > theseClusters = aStub->getClusterRefs();
162 
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 }

◆ setTrackingParticleToTTStubsMap()

template<typename T >
void TTStubAssociationMap< T >::setTrackingParticleToTTStubsMap ( std::map< edm::Ptr< TrackingParticle >, std::vector< edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > > >  aMap)
inline

◆ setTTClusterAssociationMap()

template<typename T >
void TTStubAssociationMap< T >::setTTClusterAssociationMap ( edm::RefProd< TTClusterAssociationMap< T > >  aCluAssoMap)
inline

Definition at line 65 of file TTStubAssociationMap.h.

65  {
66  theClusterAssociationMap = aCluAssoMap;
67  }

References TTStubAssociationMap< T >::theClusterAssociationMap.

◆ setTTStubToTrackingParticleMap()

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 57 of file TTStubAssociationMap.h.

58  {
60  }

References TTStubAssociationMap< T >::stubToTrackingParticleMap.

Member Data Documentation

◆ stubToTrackingParticleMap

template<typename T >
std::map<edm::Ref<edmNew::DetSetVector<TTStub<T> >, TTStub<T> >, edm::Ptr<TrackingParticle> > TTStubAssociationMap< T >::stubToTrackingParticleMap
private

◆ theClusterAssociationMap

template<typename T >
edm::RefProd<TTClusterAssociationMap<T> > TTStubAssociationMap< T >::theClusterAssociationMap
private

◆ trackingParticleToStubVectorMap

template<typename T >
std::map<edm::Ptr<TrackingParticle>, std::vector<edm::Ref<edmNew::DetSetVector<TTStub<T> >, TTStub<T> > > > TTStubAssociationMap< T >::trackingParticleToStubVectorMap
private
edm::RefProd
Definition: EDProductfwd.h:25
TTStubAssociationMap::isGenuine
bool isGenuine(edm::Ref< edmNew::DetSetVector< TTStub< T > >, TTStub< T > > aStub) const
MC Truth methods.
Definition: TTStubAssociationMap.h:138
TTClusterAssociationMap::isUnknown
bool isUnknown(edm::Ref< edmNew::DetSetVector< TTCluster< T > >, TTCluster< T > > aCluster) const
Definition: TTClusterAssociationMap.h:215
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
edm::RefProd::isNull
bool isNull() const
Checks for null.
Definition: RefProd.h:115
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
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