CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
l1tVertexFinder::L1TrackTruthMatched Class Reference

Simple wrapper class for TTTrack, with match to a tracking particle. More...

#include <L1TrackTruthMatched.h>

Inheritance diagram for l1tVertexFinder::L1TrackTruthMatched:
l1tVertexFinder::L1Track

Public Member Functions

const TPgetMatchedTP () const
 
const int getMatchedTPidx () const
 
 L1TrackTruthMatched (const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ >> &aTrack, const std::map< edm::Ptr< TrackingParticle >, edm::RefToBase< TrackingParticle >> &tpPtrToRefMap, const edm::ValueMap< TP > &tpValueMap, edm::Handle< TTTrackAssMap > mcTruthTTTrackHandle)
 
 ~L1TrackTruthMatched ()
 
- Public Member Functions inherited from l1tVertexFinder::L1Track
float chi2dof () const
 
float eta () const
 
unsigned int getNumStubs () const
 
const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ > > & getTTTrackPtr () const
 
 L1Track (const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ >> &aTrack)
 
float phi0 () const
 
float pt () const
 
float z0 () const
 
 ~L1Track ()
 

Private Attributes

const TPmatchedTP_
 
int matchedTPidx_
 

Detailed Description

Simple wrapper class for TTTrack, with match to a tracking particle.

Definition at line 25 of file L1TrackTruthMatched.h.

Constructor & Destructor Documentation

◆ L1TrackTruthMatched()

l1tVertexFinder::L1TrackTruthMatched::L1TrackTruthMatched ( const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ >> &  aTrack,
const std::map< edm::Ptr< TrackingParticle >, edm::RefToBase< TrackingParticle >> &  tpPtrToRefMap,
const edm::ValueMap< TP > &  tpValueMap,
edm::Handle< TTTrackAssMap mcTruthTTTrackHandle 
)
inline

Definition at line 27 of file L1TrackTruthMatched.h.

References HLT_2024v11_cff::distance, TTTrackAssociationMap< T >::findTrackingParticlePtr(), matchedTP_, and matchedTPidx_.

31  : L1Track(aTrack), matchedTPidx_(-1) {
32  auto mcTruthTP = mcTruthTTTrackHandle->findTrackingParticlePtr(aTrack);
33  if (!mcTruthTP.isNull()) {
34  auto tpTranslation = tpPtrToRefMap.find(mcTruthTP);
35  if (tpTranslation != tpPtrToRefMap.end()) {
36  matchedTP_ = &tpValueMap[tpTranslation->second];
37  matchedTPidx_ = std::distance(tpPtrToRefMap.begin(), tpTranslation);
38  } else {
39  matchedTP_ = nullptr;
40  }
41  } else {
42  matchedTP_ = nullptr;
43  }
44  }
const TrackingParticlePtr & findTrackingParticlePtr(TTTrackPtrT< T > aTrack) const
L1Track(const edm::Ptr< TTTrack< Ref_Phase2TrackerDigi_ >> &aTrack)
Definition: L1Track.h:19

◆ ~L1TrackTruthMatched()

l1tVertexFinder::L1TrackTruthMatched::~L1TrackTruthMatched ( )
inline

Definition at line 45 of file L1TrackTruthMatched.h.

45 {}

Member Function Documentation

◆ getMatchedTP()

const TP* l1tVertexFinder::L1TrackTruthMatched::getMatchedTP ( ) const
inline

Definition at line 48 of file L1TrackTruthMatched.h.

References matchedTP_.

◆ getMatchedTPidx()

const int l1tVertexFinder::L1TrackTruthMatched::getMatchedTPidx ( ) const
inline

Definition at line 51 of file L1TrackTruthMatched.h.

References matchedTPidx_.

Member Data Documentation

◆ matchedTP_

const TP* l1tVertexFinder::L1TrackTruthMatched::matchedTP_
private

Definition at line 54 of file L1TrackTruthMatched.h.

Referenced by getMatchedTP(), and L1TrackTruthMatched().

◆ matchedTPidx_

int l1tVertexFinder::L1TrackTruthMatched::matchedTPidx_
private

Definition at line 55 of file L1TrackTruthMatched.h.

Referenced by getMatchedTPidx(), and L1TrackTruthMatched().