Stores association of Truth Particles (TP) to L1 Track-Trigger Clusters. More...
#include <TTClusterAssociationMap.h>
Public Member Functions | |
const TrackingParticlePtr & | findTrackingParticlePtr (TTClusterRefT< T > aCluster) const |
Get main TP associated to a cluster. (Non-NULL if isGenuine() below is true). More... | |
const std::vector< TrackingParticlePtr > & | findTrackingParticlePtrs (TTClusterRefT< T > aCluster) const |
Get all TPs associated to a cluster. More... | |
const std::vector< TTClusterRefT< T > > & | findTTClusterRefs (TrackingParticlePtr aTrackingParticle) const |
Operations. More... | |
const MapTPToVecClus< T > & | getTrackingParticleToTTClustersMap () const |
const MapClusToVecTP< T > & | getTTClusterToTrackingParticlesMap () const |
Get/set cluster <-> truth association maps. More... | |
bool | isCombinatoric (TTClusterRefT< T > aCluster) const |
Cluster is not "genuine" or "unknown". More... | |
bool | isGenuine (TTClusterRefT< T > aCluster) const |
bool | isUnknown (TTClusterRefT< T > aCluster) const |
Cluster "unknown": i.e. not associated with any TP. More... | |
void | setTrackingParticleToTTClustersMap (const MapTPToVecClus< T > &aMap) |
void | setTTClusterToTrackingParticlesMap (const MapClusToVecTP< T > &aMap) |
TTClusterAssociationMap () | |
Constructors. More... | |
~TTClusterAssociationMap () | |
Destructor. More... | |
Private Attributes | |
MapClusToVecTP< T > | clusterToTrackingParticleVectorMap_ |
Data members. More... | |
int | nclus |
MapTPToVecClus< T > | trackingParticleToClusterVectorMap_ |
Static Private Attributes | |
static const TrackingParticlePtr | nullTrackingParticlePtr_ |
Close class. More... | |
static const std::vector< TTClusterRefT< T > > | nullVecClusterRef_ |
static const std::vector< TrackingParticlePtr > | nullVecTrackingParticlePtr_ |
Stores association of Truth Particles (TP) to L1 Track-Trigger Clusters.
Contains two maps. One associates each cluster to a vector of all TPs that made its hits. The other associates each TP to a vector of all clusters it contributed to.
(The template structure is used to accomodate types other than PixelDigis, in case they are needed in future).
Definition at line 44 of file TTClusterAssociationMap.h.
TTClusterAssociationMap< T >::TTClusterAssociationMap | ( | ) |
Constructors.
Default Constructor NOTE: to be used with setSomething(...) methods
Set default data members
Definition at line 113 of file TTClusterAssociationMap.h.
TTClusterAssociationMap< T >::~TTClusterAssociationMap | ( | ) |
const TrackingParticlePtr & TTClusterAssociationMap< T >::findTrackingParticlePtr | ( | TTClusterRefT< T > | aCluster | ) | const |
Get main TP associated to a cluster. (Non-NULL if isGenuine() below is true).
Definition at line 144 of file TTClusterAssociationMap.h.
Referenced by tmtt::Stub::fillTruth().
const std::vector< TrackingParticlePtr > & TTClusterAssociationMap< T >::findTrackingParticlePtrs | ( | TTClusterRefT< T > | aCluster | ) | const |
Get all TPs associated to a cluster.
Definition at line 134 of file TTClusterAssociationMap.h.
Referenced by l1tVertexFinder::Stub::fillTruth(), and tmtt::Stub::fillTruth().
const std::vector< TTClusterRefT< T > > & TTClusterAssociationMap< T >::findTTClusterRefs | ( | TrackingParticlePtr | aTrackingParticle | ) | const |
Operations.
Definition at line 124 of file TTClusterAssociationMap.h.
|
inline |
Definition at line 55 of file TTClusterAssociationMap.h.
References TTClusterAssociationMap< T >::trackingParticleToClusterVectorMap_.
|
inline |
Get/set cluster <-> truth association maps.
Definition at line 54 of file TTClusterAssociationMap.h.
References TTClusterAssociationMap< T >::clusterToTrackingParticleVectorMap_.
bool TTClusterAssociationMap< T >::isCombinatoric | ( | TTClusterRefT< T > | aCluster | ) | const |
Cluster is not "genuine" or "unknown".
Get the TrackingParticles
If the vector is empty, then the cluster is UNKNOWN
If we are here, it means there are some TrackingParticles
Loop over the TrackingParticles
Get the TrackingParticle
Count the NULL TrackingParticles
Store the pointers (addresses) of the TrackingParticle to be able to count how many different there are
Count how many different TrackingParticle there are
COMBINATORIC means no NULLs and more than one good TP OR, in alternative, only one good TP but non-zero NULLS
Definition at line 270 of file TTClusterAssociationMap.h.
References edm::Ptr< T >::get(), edm::Ptr< T >::isNull(), jetsAK4_CHS_cff::sort, and tier0::unique().
bool TTClusterAssociationMap< T >::isGenuine | ( | TTClusterRefT< T > | aCluster | ) | const |
— Get quality of L1 cluster based on truth info. (exactly 1 of following 3 functions is always true) Cluster "genuine": i.e. cluster associated to exactly 1 TP. (If other TPs are associated, but have in total < 1% of Pt of main TP, or if they are null, then they are neglected here).
MC truth Table to define Genuine, Combinatoric and Unknown
N = number of NULL TP pointers D = number of GOOD TP pointers different from each other
OLD DEFINITION
>0 | U | C | CNEW DEFINITION SV 060617
>0 | U | G | G | C
Get the TrackingParticles
If the vector is empty, then the cluster is UNKNOWN
If we are here, it means there are some TrackingParticles
Loop over the TrackingParticles
Get the TrackingParticle
Count the NULL TrackingParticles
Get the TrackingParticle
Count the NULL TrackingParticles
Store the pointers (addresses) of the TrackingParticle to be able to count how many different there are
Count how many different TrackingParticle there are
Definition at line 177 of file TTClusterAssociationMap.h.
References edm::Ptr< T >::get(), edm::Ptr< T >::isNull(), TrackingParticle::p4(), jetsAK4_CHS_cff::sort, cmsswSequenceInfo::tp, and tier0::unique().
Referenced by tmtt::Stub::fillTruth().
bool TTClusterAssociationMap< T >::isUnknown | ( | TTClusterRefT< T > | aCluster | ) | const |
Cluster "unknown": i.e. not associated with any TP.
Get the TrackingParticles
If the vector is empty, then the cluster is UNKNOWN
If we are here, it means there are some TrackingParticles
Loop over the TrackingParticles
Get the TrackingParticle
Count the non-NULL TrackingParticles
Store the pointers (addresses) of the TrackingParticle to be able to count how many different there are
Count how many different TrackingParticle there are
UNKNOWN means no good TP is found
Definition at line 235 of file TTClusterAssociationMap.h.
References edm::Ptr< T >::get(), edm::Ptr< T >::isNull(), jetsAK4_CHS_cff::sort, and tier0::unique().
|
inline |
Definition at line 58 of file TTClusterAssociationMap.h.
References TTClusterAssociationMap< T >::trackingParticleToClusterVectorMap_.
|
inline |
Definition at line 57 of file TTClusterAssociationMap.h.
References TTClusterAssociationMap< T >::clusterToTrackingParticleVectorMap_.
|
private |
Data members.
Definition at line 83 of file TTClusterAssociationMap.h.
Referenced by TTClusterAssociationMap< T >::getTTClusterToTrackingParticlesMap(), and TTClusterAssociationMap< T >::setTTClusterToTrackingParticlesMap().
|
private |
Definition at line 86 of file TTClusterAssociationMap.h.
|
staticprivate |
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.
Definition at line 89 of file TTClusterAssociationMap.h.
|
staticprivate |
Definition at line 91 of file TTClusterAssociationMap.h.
|
staticprivate |
Definition at line 90 of file TTClusterAssociationMap.h.
|
private |
Definition at line 84 of file TTClusterAssociationMap.h.
Referenced by TTClusterAssociationMap< T >::getTrackingParticleToTTClustersMap(), and TTClusterAssociationMap< T >::setTrackingParticleToTTClustersMap().