#include <HLTMuonL2ToL1Map.h>
Public Member Functions | |
std::string | getL1Keys (reco::TrackRef &l2muon) |
returns the indices of L1 seeds | |
HLTMuonL2ToL1Map (edm::InputTag &previousCandTag, edm::InputTag &seedMapTag, edm::Event &iEvent) | |
construct with the InputTag of the L1 filter object, the InputTag of the L2 seed map ("hltL2Muons") and the Event | |
bool | isTriggeredByL1 (reco::TrackRef &l2muon) |
checks if a L2 muon was seeded by a fired L1 | |
~HLTMuonL2ToL1Map () | |
Private Attributes | |
std::vector < l1extra::L1MuonParticleRef > | 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 |
This is a helper class to check L2 to L1 links
Definition at line 24 of file HLTMuonL2ToL1Map.h.
HLTMuonL2ToL1Map::HLTMuonL2ToL1Map | ( | edm::InputTag & | previousCandTag, |
edm::InputTag & | seedMapTag, | ||
edm::Event & | iEvent | ||
) | [inline, explicit] |
construct with the InputTag of the L1 filter object, the InputTag of the L2 seed map ("hltL2Muons") and the Event
Definition at line 28 of file HLTMuonL2ToL1Map.h.
References firedL1Muons_, edm::Event::getByLabel(), seedMapHandle_, and trigger::TriggerL1Mu.
{ // get hold of muons that fired the previous level edm::Handle<trigger::TriggerFilterObjectWithRefs> previousLevelCands; iEvent.getByLabel(previousCandTag, previousLevelCands); previousLevelCands->getObjects(trigger::TriggerL1Mu, firedL1Muons_); // get hold of the seed map iEvent.getByLabel(seedMapTag, seedMapHandle_); }
HLTMuonL2ToL1Map::~HLTMuonL2ToL1Map | ( | ) | [inline] |
Definition at line 38 of file HLTMuonL2ToL1Map.h.
{ }
std::string HLTMuonL2ToL1Map::getL1Keys | ( | reco::TrackRef & | l2muon | ) | [inline] |
returns the indices of L1 seeds
Definition at line 55 of file HLTMuonL2ToL1Map.h.
References i, and edm::RefVector< C, T, F >::size().
Referenced by HLTMuonL2PreFilter::hltFilter().
{ std::ostringstream ss; const edm::RefVector<L2MuonTrajectorySeedCollection>& seeds = (*seedMapHandle_)[l2muon->seedRef().castTo<edm::Ref<L2MuonTrajectorySeedCollection> >()]; for(size_t i=0; i<seeds.size(); i++){ ss<<seeds[i]->l1Particle().key()<<" "; } return ss.str(); }
bool HLTMuonL2ToL1Map::isTriggeredByL1 | ( | reco::TrackRef & | l2muon | ) | [inline] |
checks if a L2 muon was seeded by a fired L1
Definition at line 42 of file HLTMuonL2ToL1Map.h.
References spr::find(), firedL1Muons_, i, and edm::RefVector< C, T, F >::size().
Referenced by HLTMuonL2PreFilter::hltFilter(), and HLTMuonDimuonL2Filter::hltFilter().
{ bool isTriggered = false; const edm::RefVector<L2MuonTrajectorySeedCollection>& seeds = (*seedMapHandle_)[l2muon->seedRef().castTo<edm::Ref<L2MuonTrajectorySeedCollection> >()]; for(size_t i=0; i<seeds.size(); i++){ if(find(firedL1Muons_.begin(), firedL1Muons_.end(), seeds[i]->l1Particle()) != firedL1Muons_.end()){ isTriggered = true; break; } } return isTriggered; }
std::vector<l1extra::L1MuonParticleRef> HLTMuonL2ToL1Map::firedL1Muons_ [private] |
contains the vector of references to fired L1 candidates
Definition at line 66 of file HLTMuonL2ToL1Map.h.
Referenced by HLTMuonL2ToL1Map(), and isTriggeredByL1().
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 69 of file HLTMuonL2ToL1Map.h.
Referenced by HLTMuonL2ToL1Map().