CMS 3D CMS Logo

HLTMuonL2ToL1Map.h
Go to the documentation of this file.
1 #ifndef HLTMuonL2ToL1Map_h
2 #define HLTMuonL2ToL1Map_h
3 
21 
23 
24 typedef edm::AssociationMap<edm::OneToMany<std::vector<L2MuonTrajectorySeed>, std::vector<L2MuonTrajectorySeed> > >
26 
28 public:
31  const edm::EDGetTokenT<SeedMap> seedMapToken,
32  const edm::Event& iEvent) {
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  }
41 
43 
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  }
57 
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  }
68 
69 private:
71  std::vector<l1extra::L1MuonParticleRef> firedL1Muons_;
72 
75 };
76 
77 #endif //HLTMuonL2ToL1Map_h
Handle.h
mps_fire.i
i
Definition: mps_fire.py:428
L1MuonParticleFwd.h
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs >
HLTMuonL2ToL1Map::seedMapHandle_
edm::Handle< SeedMap > seedMapHandle_
containes the map from a L2 seed to its sister seeds the track of which has been cleaned
Definition: HLTMuonL2ToL1Map.h:74
AssociationMap.h
TriggerFilterObjectWithRefs.h
HLTMuonL2ToL1Map::isTriggeredByL1
bool isTriggeredByL1(reco::TrackRef &l2muon)
checks if a L2 muon was seeded by a fired L1
Definition: HLTMuonL2ToL1Map.h:45
edm::RefVector
Definition: EDProductfwd.h:27
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
edm::Handle< trigger::TriggerFilterObjectWithRefs >
HLTMuonL2ToL1Map::~HLTMuonL2ToL1Map
~HLTMuonL2ToL1Map()
Definition: HLTMuonL2ToL1Map.h:42
trigger::TriggerRefsCollections::getObjects
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
Definition: TriggerRefsCollections.h:590
edm::Ref< TrackCollection >
HLTMuonL2ToL1Map::HLTMuonL2ToL1Map
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...
Definition: HLTMuonL2ToL1Map.h:30
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
L2MuonTrajectorySeedCollection.h
Track.h
TrackFwd.h
OneToMany.h
HLTMuonL2ToL1Map::getL1Keys
std::string getL1Keys(reco::TrackRef &l2muon)
returns the indices of L1 seeds
Definition: HLTMuonL2ToL1Map.h:59
Event.h
edm::AssociationMap
Definition: AssociationMap.h:48
trigger::TriggerL1Mu
enum start value shifted to 81 so as to avoid clashes with PDG codes
Definition: TriggerTypeDefs.h:30
iEvent
int iEvent
Definition: GenABIO.cc:224
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
SeedMap
edm::AssociationMap< edm::OneToMany< std::vector< L2MuonTrajectorySeed >, std::vector< L2MuonTrajectorySeed > > > SeedMap
Definition: HLTMuonL2ToL1Map.h:25
DetachedQuadStep_cff.seeds
seeds
Definition: DetachedQuadStep_cff.py:195
edm::Event
Definition: Event.h:73
HLTMuonL2ToL1Map
Definition: HLTMuonL2ToL1Map.h:27
HLTMuonL2ToL1Map::firedL1Muons_
std::vector< l1extra::L1MuonParticleRef > firedL1Muons_
contains the vector of references to fired L1 candidates
Definition: HLTMuonL2ToL1Map.h:71