CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
HLTMuonL2ToL1TMap Class Reference

#include <HLTMuonL2ToL1TMap.h>

Public Member Functions

std::string getL1Keys (reco::TrackRef &l2muon)
 returns the indices of L1 seeds More...
 
 HLTMuonL2ToL1TMap (const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > &previousCandToken, const edm::EDGetTokenT< SeedMap > seedMapToken, const edm::Event &iEvent)
 construct with the Token of the L1 filter object, the Token of the L2 seed map ("hltL2Muons") and the Event More...
 
bool isTriggeredByL1 (reco::TrackRef &l2muon)
 checks if a L2 muon was seeded by a fired L1 More...
 
 ~HLTMuonL2ToL1TMap ()
 

Private Attributes

std::vector< l1t::MuonReffiredL1Muons_
 contains the vector of references to fired L1 candidates More...
 
edm::Handle< SeedMapseedMapHandle_
 containes the map from a L2 seed to its sister seeds the track of which has been cleaned More...
 

Detailed Description

This is a helper class to check L2 to L1 links

Author
Z. Gecse

Definition at line 28 of file HLTMuonL2ToL1TMap.h.

Constructor & Destructor Documentation

◆ HLTMuonL2ToL1TMap()

HLTMuonL2ToL1TMap::HLTMuonL2ToL1TMap ( const edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs > &  previousCandToken,
const edm::EDGetTokenT< SeedMap seedMapToken,
const edm::Event iEvent 
)
inlineexplicit

construct with the Token of the L1 filter object, the Token of the L2 seed map ("hltL2Muons") and the Event

Definition at line 31 of file HLTMuonL2ToL1TMap.h.

References firedL1Muons_, trigger::TriggerRefsCollections::getObjects(), iEvent, seedMapHandle_, and trigger::TriggerL1Mu.

33  {
34  // get hold of muons that fired the previous level
36  iEvent.getByToken(previousCandToken, previousLevelCands);
37  previousLevelCands->getObjects(trigger::TriggerL1Mu, firedL1Muons_);
38 
39  // get hold of the seed map
40  iEvent.getByToken(seedMapToken, seedMapHandle_);
41  }
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
enum start value shifted to 81 so as to avoid clashes with PDG codes
int iEvent
Definition: GenABIO.cc:224
std::vector< l1t::MuonRef > firedL1Muons_
contains the vector of references to fired L1 candidates
edm::Handle< SeedMap > seedMapHandle_
containes the map from a L2 seed to its sister seeds the track of which has been cleaned ...

◆ ~HLTMuonL2ToL1TMap()

HLTMuonL2ToL1TMap::~HLTMuonL2ToL1TMap ( )
inline

Definition at line 43 of file HLTMuonL2ToL1TMap.h.

43 {}

Member Function Documentation

◆ getL1Keys()

std::string HLTMuonL2ToL1TMap::getL1Keys ( reco::TrackRef l2muon)
inline

returns the indices of L1 seeds

Definition at line 60 of file HLTMuonL2ToL1TMap.h.

References mps_fire::i, HLT_2024v14_cff::seeds, and contentValuesCheck::ss.

Referenced by HLTMuonL2FromL1TPreFilter::hltFilter().

60  {
61  std::ostringstream ss;
63  (*seedMapHandle_)[l2muon->seedRef().castTo<edm::Ref<L2MuonTrajectorySeedCollection> >()];
64  for (size_t i = 0; i < seeds.size(); i++) {
65  ss << seeds[i]->l1tParticle().key() << " ";
66  }
67  return ss.str();
68  }

◆ isTriggeredByL1()

bool HLTMuonL2ToL1TMap::isTriggeredByL1 ( reco::TrackRef l2muon)
inline

checks if a L2 muon was seeded by a fired L1

Definition at line 46 of file HLTMuonL2ToL1TMap.h.

References spr::find(), firedL1Muons_, mps_fire::i, and HLT_2024v14_cff::seeds.

Referenced by HLTMuonDimuonL2FromL1TFilter::hltFilter(), and HLTMuonL2FromL1TPreFilter::hltFilter().

46  {
47  bool isTriggered = false;
49  (*seedMapHandle_)[l2muon->seedRef().castTo<edm::Ref<L2MuonTrajectorySeedCollection> >()];
50  for (size_t i = 0; i < seeds.size(); i++) {
51  if (find(firedL1Muons_.begin(), firedL1Muons_.end(), seeds[i]->l1tParticle()) != firedL1Muons_.end()) {
52  isTriggered = true;
53  break;
54  }
55  }
56  return isTriggered;
57  }
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::vector< l1t::MuonRef > firedL1Muons_
contains the vector of references to fired L1 candidates

Member Data Documentation

◆ firedL1Muons_

std::vector<l1t::MuonRef> HLTMuonL2ToL1TMap::firedL1Muons_
private

contains the vector of references to fired L1 candidates

Definition at line 72 of file HLTMuonL2ToL1TMap.h.

Referenced by HLTMuonL2ToL1TMap(), and isTriggeredByL1().

◆ seedMapHandle_

edm::Handle<SeedMap> HLTMuonL2ToL1TMap::seedMapHandle_
private

containes the map from a L2 seed to its sister seeds the track of which has been cleaned

Definition at line 75 of file HLTMuonL2ToL1TMap.h.

Referenced by HLTMuonL2ToL1TMap().