CMS 3D CMS Logo

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

#include <HLTMuonL2ToL1Map.h>

Public Member Functions

std::string getL1Keys (reco::TrackRef &l2muon)
 returns the indices of L1 seeds More...
 
 HLTMuonL2ToL1Map (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...
 
 ~HLTMuonL2ToL1Map ()
 

Private Attributes

std::vector< l1extra::L1MuonParticleReffiredL1Muons_
 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 27 of file HLTMuonL2ToL1Map.h.

Constructor & Destructor Documentation

◆ HLTMuonL2ToL1Map()

HLTMuonL2ToL1Map::HLTMuonL2ToL1Map ( 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 30 of file HLTMuonL2ToL1Map.h.

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

32  {
33  // get hold of muons that fired the previous level
35  iEvent.getByToken(previousCandToken, previousLevelCands);
36  previousLevelCands->getObjects(trigger::TriggerL1Mu, firedL1Muons_);
37 
38  // get hold of the seed map
39  iEvent.getByToken(seedMapToken, seedMapHandle_);
40  }
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
edm::Handle< SeedMap > seedMapHandle_
containes the map from a L2 seed to its sister seeds the track of which has been cleaned ...
int iEvent
Definition: GenABIO.cc:224
std::vector< l1extra::L1MuonParticleRef > firedL1Muons_
contains the vector of references to fired L1 candidates

◆ ~HLTMuonL2ToL1Map()

HLTMuonL2ToL1Map::~HLTMuonL2ToL1Map ( )
inline

Definition at line 42 of file HLTMuonL2ToL1Map.h.

42 {}

Member Function Documentation

◆ getL1Keys()

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

returns the indices of L1 seeds

Definition at line 59 of file HLTMuonL2ToL1Map.h.

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

Referenced by HLTMuonL2PreFilter::hltFilter().

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

◆ isTriggeredByL1()

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

checks if a L2 muon was seeded by a fired L1

Definition at line 45 of file HLTMuonL2ToL1Map.h.

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

Referenced by HLTMuonDimuonL2Filter::hltFilter(), and HLTMuonL2PreFilter::hltFilter().

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

Member Data Documentation

◆ firedL1Muons_

std::vector<l1extra::L1MuonParticleRef> HLTMuonL2ToL1Map::firedL1Muons_
private

contains the vector of references to fired L1 candidates

Definition at line 71 of file HLTMuonL2ToL1Map.h.

Referenced by HLTMuonL2ToL1Map(), and isTriggeredByL1().

◆ seedMapHandle_

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

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

Definition at line 74 of file HLTMuonL2ToL1Map.h.

Referenced by HLTMuonL2ToL1Map().