CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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::L1MuonParticleRef
firedL1Muons_
 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 24 of file HLTMuonL2ToL1Map.h.

Constructor & Destructor Documentation

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 28 of file HLTMuonL2ToL1Map.h.

References firedL1Muons_, edm::Event::getByToken(), seedMapHandle_, and trigger::TriggerL1Mu.

28  {
29  // get hold of muons that fired the previous level
31  iEvent.getByToken(previousCandToken, previousLevelCands);
32  previousLevelCands->getObjects(trigger::TriggerL1Mu, firedL1Muons_);
33 
34  // get hold of the seed map
35  iEvent.getByToken(seedMapToken, seedMapHandle_);
36  }
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:462
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 ...
std::vector< l1extra::L1MuonParticleRef > firedL1Muons_
contains the vector of references to fired L1 candidates
HLTMuonL2ToL1Map::~HLTMuonL2ToL1Map ( )
inline

Definition at line 38 of file HLTMuonL2ToL1Map.h.

38  {
39  }

Member Function Documentation

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

returns the indices of L1 seeds

Definition at line 55 of file HLTMuonL2ToL1Map.h.

References i, edm::RefVector< C, T, F >::size(), and contentValuesCheck::ss.

Referenced by HLTMuonL2PreFilter::hltFilter().

55  {
56  std::ostringstream ss;
57  const edm::RefVector<L2MuonTrajectorySeedCollection>& seeds = (*seedMapHandle_)[l2muon->seedRef().castTo<edm::Ref<L2MuonTrajectorySeedCollection> >()];
58  for(size_t i=0; i<seeds.size(); i++){
59  ss<<seeds[i]->l1Particle().key()<<" ";
60  }
61  return ss.str();
62  }
int i
Definition: DBlmapReader.cc:9
size_type size() const
Size of the RefVector.
Definition: RefVector.h:99
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 HLTMuonDimuonL2Filter::hltFilter(), and HLTMuonL2PreFilter::hltFilter().

42  {
43  bool isTriggered = false;
44  const edm::RefVector<L2MuonTrajectorySeedCollection>& seeds = (*seedMapHandle_)[l2muon->seedRef().castTo<edm::Ref<L2MuonTrajectorySeedCollection> >()];
45  for(size_t i=0; i<seeds.size(); i++){
46  if(find(firedL1Muons_.begin(), firedL1Muons_.end(), seeds[i]->l1Particle()) != firedL1Muons_.end()){
47  isTriggered = true;
48  break;
49  }
50  }
51  return isTriggered;
52  }
int i
Definition: DBlmapReader.cc:9
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
std::vector< l1extra::L1MuonParticleRef > firedL1Muons_
contains the vector of references to fired L1 candidates
size_type size() const
Size of the RefVector.
Definition: RefVector.h:99

Member Data Documentation

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().