CMS 3D CMS Logo

HLTMuonL2ToL1TMap.h
Go to the documentation of this file.
1 #ifndef HLTMuonL2ToL1TMap_h
2 #define HLTMuonL2ToL1TMap_h
3 
21 
24 
25 typedef edm::AssociationMap<edm::OneToMany<std::vector<L2MuonTrajectorySeed>, std::vector<L2MuonTrajectorySeed> > >
27 
29 public:
32  const edm::EDGetTokenT<SeedMap> seedMapToken,
33  const edm::Event& iEvent) {
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  }
42 
44 
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  }
58 
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  }
69 
70 private:
72  std::vector<l1t::MuonRef> firedL1Muons_;
73 
76 };
77 
78 #endif //HLTMuonL2ToL1TMap_h
HLTMuonL2ToL1TMap::HLTMuonL2ToL1TMap
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...
Definition: HLTMuonL2ToL1TMap.h:31
SeedMap
edm::AssociationMap< edm::OneToMany< std::vector< L2MuonTrajectorySeed >, std::vector< L2MuonTrajectorySeed > > > SeedMap
Definition: HLTMuonL2ToL1TMap.h:26
Handle.h
mps_fire.i
i
Definition: mps_fire.py:355
HLTMuonL2ToL1TMap::seedMapHandle_
edm::Handle< SeedMap > seedMapHandle_
containes the map from a L2 seed to its sister seeds the track of which has been cleaned
Definition: HLTMuonL2ToL1TMap.h:75
edm::EDGetTokenT< trigger::TriggerFilterObjectWithRefs >
AssociationMap.h
Muon.h
HLTMuonL2ToL1TMap::isTriggeredByL1
bool isTriggeredByL1(reco::TrackRef &l2muon)
checks if a L2 muon was seeded by a fired L1
Definition: HLTMuonL2ToL1TMap.h:46
TriggerFilterObjectWithRefs.h
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 >
trigger::TriggerRefsCollections::getObjects
void getObjects(Vids &ids, VRphoton &refs) const
various physics-level getters:
Definition: TriggerRefsCollections.h:452
edm::Ref< TrackCollection >
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
L2MuonTrajectorySeedCollection.h
Track.h
TrackFwd.h
OneToMany.h
HLTMuonL2ToL1TMap
Definition: HLTMuonL2ToL1TMap.h:28
EDGetToken.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
InitialStep_cff.seeds
seeds
Definition: InitialStep_cff.py:232
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
HLTMuonL2ToL1TMap::~HLTMuonL2ToL1TMap
~HLTMuonL2ToL1TMap()
Definition: HLTMuonL2ToL1TMap.h:43
HLTMuonL2ToL1TMap::getL1Keys
std::string getL1Keys(reco::TrackRef &l2muon)
returns the indices of L1 seeds
Definition: HLTMuonL2ToL1TMap.h:60
HLTMuonL2ToL1TMap::firedL1Muons_
std::vector< l1t::MuonRef > firedL1Muons_
contains the vector of references to fired L1 candidates
Definition: HLTMuonL2ToL1TMap.h:72
edm::Event
Definition: Event.h:73