CMS 3D CMS Logo

HeavyFlavorValidation.cc
Go to the documentation of this file.
1 
8 // Original Author: Zoltan Gecse
9 
10 #include <memory>
11 #include <initializer_list>
21 
37 
39 
43 
45 
46 #include "TLorentzVector.h"
47 
48 using namespace std;
49 using namespace edm;
50 using namespace reco;
51 using namespace l1extra;
52 using namespace trigger;
53 
55  public:
57  ~HeavyFlavorValidation() override;
58  protected:
59  void dqmBeginRun(const edm::Run&, const edm::EventSetup&) override;
60  void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;
61  void analyze(const edm::Event&, const edm::EventSetup&) override;
62  private:
63  int getMotherId( const Candidate * p );
64  void match( MonitorElement * me, vector<LeafCandidate> & from, vector<LeafCandidate> & to, double deltaRMatchingCut, vector<int> & map );
65  void myBook2D(DQMStore::IBooker & ibooker, TString name, vector<double> &xBins, TString xLabel, vector<double> &yBins, TString yLabel, TString title);
66  void myBook2D(DQMStore::IBooker & ibooker, TString name, vector<double> &xBins, TString xLabel, vector<double> &yBins, TString yLabel){
67  myBook2D(ibooker, name, xBins, xLabel, yBins, yLabel, name);
68  }
69  void myBookProfile2D(DQMStore::IBooker & ibooker, TString name, vector<double> &xBins, TString xLabel, vector<double> &yBins, TString yLabel, TString title);
70  void myBookProfile2D(DQMStore::IBooker & ibooker, TString name, vector<double> &xBins, TString xLabel, vector<double> &yBins, TString yLabel){
71  myBookProfile2D(ibooker, name, xBins, xLabel, yBins, yLabel, name);
72  }
73  void myBook1D(DQMStore::IBooker & ibooker, TString name, vector<double> &xBins, TString label, TString title );
74  void myBook1D(DQMStore::IBooker & ibooker, TString name, vector<double> &xBins, TString label ){
75  myBook1D(ibooker, name, xBins, label, name );
76  }
77 
87  int getFilterLevel(const std::string &moduleName, const HLTConfigProvider &hltConfig);
88 
89  string dqmFolder;
92 
101 
102  vector<int> motherIDs;
107  vector<double> deltaEtaBins;
108  vector<double> deltaPhiBins;
109  vector<double> muonPtBins;
110  vector<double> muonEtaBins;
111  vector<double> muonPhiBins;
112  vector<double> dimuonPtBins;
113  vector<double> dimuonEtaBins;
114  vector<double> dimuonDRBins;
115  map<TString, MonitorElement *> ME;
116  vector<pair<string,int> > filterNamesLevels;
117  const double muonMass;
118 };
119 
121 //get parameters
122  dqmFolder(pset.getUntrackedParameter<string>("DQMFolder")),
123  triggerProcessName(pset.getUntrackedParameter<string>("TriggerProcessName")),
124  triggerPathName(pset.getUntrackedParameter<string>("TriggerPathName")),
125  motherIDs(pset.getUntrackedParameter<vector<int> >("MotherIDs")),
126  genGlobDeltaRMatchingCut(pset.getUntrackedParameter<double>("GenGlobDeltaRMatchingCut")),
127  globL1DeltaRMatchingCut(pset.getUntrackedParameter<double>("GlobL1DeltaRMatchingCut")),
128  globL2DeltaRMatchingCut(pset.getUntrackedParameter<double>("GlobL2DeltaRMatchingCut")),
129  globL3DeltaRMatchingCut(pset.getUntrackedParameter<double>("GlobL3DeltaRMatchingCut")),
130  deltaEtaBins(pset.getUntrackedParameter<vector<double> >("DeltaEtaBins")),
131  deltaPhiBins(pset.getUntrackedParameter<vector<double> >("DeltaPhiBins")),
132  muonPtBins(pset.getUntrackedParameter<vector<double> >("MuonPtBins")),
133  muonEtaBins(pset.getUntrackedParameter<vector<double> >("MuonEtaBins")),
134  muonPhiBins(pset.getUntrackedParameter<vector<double> >("MuonPhiBins")),
135  dimuonPtBins(pset.getUntrackedParameter<vector<double> >("DimuonPtBins")),
136  dimuonEtaBins(pset.getUntrackedParameter<vector<double> >("DimuonEtaBins")),
137  dimuonDRBins(pset.getUntrackedParameter<vector<double> >("DimuonDRBins")),
138  muonMass(0.106)
139 {
140  triggerSummaryRAWTag = consumes<TriggerEventWithRefs>(InputTag( pset.getUntrackedParameter<string>("TriggerSummaryRAW"), "", triggerProcessName));
141  triggerSummaryAODTag = consumes<TriggerEvent>(InputTag( pset.getUntrackedParameter<string>("TriggerSummaryAOD"), "", triggerProcessName));
142  triggerResultsTag = InputTag( pset.getUntrackedParameter<string>("TriggerResults"), "", triggerProcessName);
143  triggerResultsToken = consumes<TriggerResults>(triggerResultsTag);
144  recoMuonsTag = pset.getParameter<InputTag>("RecoMuons");
145  recoMuonsToken = consumes<MuonCollection>(recoMuonsTag);
146  genParticlesTag = pset.getParameter<InputTag>("GenParticles");
147  genParticlesToken = consumes<GenParticleCollection>(genParticlesTag);
148 }
149 
150 void HeavyFlavorValidation::dqmBeginRun(const edm::Run& iRun, const edm::EventSetup & iSetup ) {
151  //discover HLT configuration
152  HLTConfigProvider hltConfig;
153  bool isChanged;
154  if(hltConfig.init(iRun, iSetup, triggerProcessName, isChanged)){
155  LogDebug("HLTriggerOfflineHeavyFlavor") << "Successfully initialized HLTConfigProvider with process name: "<<triggerProcessName<<endl;
156  }else{
157  LogWarning("HLTriggerOfflineHeavyFlavor") << "Could not initialize HLTConfigProvider with process name: "<<triggerProcessName<<endl;
158  return;
159  }
160  vector<string> triggerNames = hltConfig.triggerNames();
161  for (const auto &trigName : triggerNames) {
162  // TString triggerName = trigName;
163  if (trigName.find(triggerPathName) != std::string::npos) {
164  vector<string> moduleNames = hltConfig.moduleLabels( trigName );
165  for (const auto &moduleName : moduleNames) {
166  const int level = getFilterLevel(moduleName, hltConfig);
167  if (level > 0) {
168  filterNamesLevels.push_back( {moduleName, level} );
169  }
170  }
171  break;
172  }
173  }
174 
175  if(filterNamesLevels.empty()){
176  LogDebug("HLTriggerOfflineHeavyFlavor")<<"Bad Trigger Path: "<<triggerPathName<<endl;
177  return;
178  }else{
180  str.reserve(512); // avoid too many realloctions in the following loop (allows for filter names with roughly 100 chars each)
181  for (const auto &filters : filterNamesLevels) str = str + " " + filters.first;
182  LogDebug("HLTriggerOfflineHeavyFlavor")<<"Trigger Path: "<<triggerPathName<<" has filters:"<<str;
183  }
184 }
185 
186 
187 
189  edm::Run const & iRun,
190  edm::EventSetup const & iSetup) {
191  ibooker.cd();
193 
194  // create Monitor Elements
195  // Eta Pt Single
196  myBook2D(ibooker, "genMuon_genEtaPt", muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)");
197  myBook2D(ibooker, "globMuon_genEtaPt", muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)");
198  myBook2D(ibooker, "globMuon_recoEtaPt", muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)");
199 
200  for(size_t i=0; i<filterNamesLevels.size(); i++){
201  myBook2D(ibooker, TString::Format("filt%dMuon_recoEtaPt",int(i+1)), muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)", filterNamesLevels[i].first);
202  }
203  myBook2D(ibooker, "pathMuon_recoEtaPt", muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)", triggerPathName);
204  myBook2D(ibooker, "resultMuon_recoEtaPt", muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)");
205  // Eta Pt Single Resolution
206  myBookProfile2D(ibooker, "resGlobGen_genEtaPt", muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)");
207  for(size_t i=0; i<filterNamesLevels.size(); i++){
208  myBookProfile2D(ibooker, TString::Format("resFilt%dGlob_recoEtaPt",int(i+1)), muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)", filterNamesLevels[i].first);
209  }
210  myBookProfile2D(ibooker, "resPathGlob_recoEtaPt", muonEtaBins, "#mu eta", muonPtBins, " #mu pT (GeV)", triggerPathName);
211  // Eta Pt Double
212  myBook2D(ibooker, "genDimuon_genEtaPt", dimuonEtaBins, "#mu#mu eta", dimuonPtBins, " #mu#mu pT (GeV)");
213  myBook2D(ibooker, "globDimuon_genEtaPt", dimuonEtaBins, "#mu#mu eta", dimuonPtBins, " #mu#mu pT (GeV)");
214  myBook2D(ibooker, "globDimuon_recoEtaPt", dimuonEtaBins, "#mu#mu eta", dimuonPtBins, " #mu#mu pT (GeV)");
215  for(size_t i=0; i<filterNamesLevels.size(); i++){
216  myBook2D(ibooker, TString::Format("filt%dDimuon_recoEtaPt",int(i+1)), dimuonEtaBins, "#mu#mu eta", dimuonPtBins, " #mu#mu pT (GeV)", filterNamesLevels[i].first);
217  }
218  myBook2D(ibooker, "pathDimuon_recoEtaPt", dimuonEtaBins, "#mu#mu eta", dimuonPtBins, " #mu#mu pT (GeV)", triggerPathName);
219  myBook2D(ibooker, "resultDimuon_recoEtaPt", dimuonEtaBins, "#mu#mu eta", dimuonPtBins, " #mu#mu pT (GeV)");
220  for(size_t i=0; i<filterNamesLevels.size(); i++){
221  myBook2D(ibooker, TString::Format("diFilt%dDimuon_recoEtaPt",int(i+1)), dimuonEtaBins, "#mu#mu eta", dimuonPtBins, " #mu#mu pT (GeV)", filterNamesLevels[i].first);
222  }
223  myBook2D(ibooker, "diPathDimuon_recoEtaPt", dimuonEtaBins, "#mu#mu eta", dimuonPtBins, " #mu#mu pT (GeV)", triggerPathName);
224  // Eta Phi Single
225  myBook2D(ibooker, "genMuon_genEtaPhi", muonEtaBins, "#mu eta", muonPhiBins, "#mu phi");
226  myBook2D(ibooker, "globMuon_genEtaPhi", muonEtaBins, "#mu eta", muonPhiBins, "#mu phi");
227  myBook2D(ibooker, "globMuon_recoEtaPhi", muonEtaBins, "#mu eta", muonPhiBins, "#mu phi");
228  for(size_t i=0; i<filterNamesLevels.size(); i++){
229  myBook2D(ibooker, TString::Format("filt%dMuon_recoEtaPhi",int(i+1)), muonEtaBins, "#mu eta", muonPhiBins, "#mu phi", filterNamesLevels[i].first);
230  }
231  myBook2D(ibooker, "pathMuon_recoEtaPhi", muonEtaBins, "#mu eta", muonPhiBins, "#mu phi", triggerPathName);
232  myBook2D(ibooker, "resultMuon_recoEtaPhi", muonEtaBins, "#mu eta", muonPhiBins, "#mu phi");
233  // Rap Pt Double
234  myBook2D(ibooker, "genDimuon_genRapPt", dimuonEtaBins, "#mu#mu rapidity", dimuonPtBins, " #mu#mu pT (GeV)");
235  myBook2D(ibooker, "globDimuon_genRapPt", dimuonEtaBins, "#mu#mu rapidity", dimuonPtBins, " #mu#mu pT (GeV)");
236  myBook2D(ibooker, "globDimuon_recoRapPt", dimuonEtaBins, "#mu#mu rapidity", dimuonPtBins, " #mu#mu pT (GeV)");
237  for(size_t i=0; i<filterNamesLevels.size(); i++){
238  myBook2D(ibooker, TString::Format("filt%dDimuon_recoRapPt",int(i+1)), dimuonEtaBins, "#mu#mu rapidity", dimuonPtBins, " #mu#mu pT (GeV)", filterNamesLevels[i].first);
239  }
240  myBook2D(ibooker, "pathDimuon_recoRapPt", dimuonEtaBins, "#mu#mu rapidity", dimuonPtBins, " #mu#mu pT (GeV)", triggerPathName);
241  myBook2D(ibooker, "resultDimuon_recoRapPt", dimuonEtaBins, "#mu#mu rapidity", dimuonPtBins, " #mu#mu pT (GeV)");
242  for(size_t i=0; i<filterNamesLevels.size(); i++){
243  myBook2D(ibooker, TString::Format("diFilt%dDimuon_recoRapPt",int(i+1)), dimuonEtaBins, "#mu#mu rapidity", dimuonPtBins, " #mu#mu pT (GeV)", filterNamesLevels[i].first);
244  }
245  myBook2D(ibooker, "diPathDimuon_recoRapPt", dimuonEtaBins, "#mu#mu rapidity", dimuonPtBins, " #mu#mu pT (GeV)", triggerPathName);
246  // Pt DR Double
247  myBook2D(ibooker, "genDimuon_genPtDR", dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R at IP");
248  myBook2D(ibooker, "globDimuon_genPtDR", dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R at IP");
249  myBook2D(ibooker, "globDimuon_recoPtDR", dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R at IP");
250  for(size_t i=0; i<filterNamesLevels.size(); i++){
251  myBook2D(ibooker, TString::Format("filt%dDimuon_recoPtDR",int(i+1)), dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R at IP", filterNamesLevels[i].first);
252  }
253  myBook2D(ibooker, "pathDimuon_recoPtDR", dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R at IP", triggerPathName);
254  for(size_t i=0; i<filterNamesLevels.size(); i++){
255  myBook2D(ibooker, TString::Format("diFilt%dDimuon_recoPtDR",int(i+1)), dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R at IP", filterNamesLevels[i].first);
256  }
257  myBook2D(ibooker, "diPathDimuon_recoPtDR", dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R at IP", triggerPathName);
258  myBook2D(ibooker, "resultDimuon_recoPtDR", dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R at IP");
259  // Pt DRpos Double
260  myBook2D(ibooker, "globDimuon_recoPtDRpos", dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R in MS");
261  for(size_t i=0; i<filterNamesLevels.size(); i++){
262  myBook2D(ibooker, TString::Format("filt%dDimuon_recoPtDRpos",int(i+1)), dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R in MS", filterNamesLevels[i].first);
263  }
264  myBook2D(ibooker, "pathDimuon_recoPtDRpos", dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R in MS", triggerPathName);
265  for(size_t i=0; i<filterNamesLevels.size(); i++){
266  myBook2D(ibooker, TString::Format("diFilt%dDimuon_recoPtDRpos",int(i+1)), dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R in MS", filterNamesLevels[i].first);
267  }
268  myBook2D(ibooker, "diPathDimuon_recoPtDRpos", dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R in MS", triggerPathName);
269  myBook2D(ibooker, "resultDimuon_recoPtDRpos", dimuonPtBins, " #mu#mu pT (GeV)", dimuonDRBins, "#mu#mu #Delta R in MS");
270 
271  // Matching
272  myBook2D(ibooker, "globGen_deltaEtaDeltaPhi", deltaEtaBins, "#Delta eta", deltaPhiBins, "#Delta phi");
273  for(size_t i=0; i<filterNamesLevels.size(); i++){
274  myBook2D(ibooker, TString::Format("filt%dGlob_deltaEtaDeltaPhi",int(i+1)), deltaEtaBins, "#Delta eta", deltaPhiBins, "#Delta phi", filterNamesLevels[i].first);
275  }
276  myBook2D(ibooker, "pathGlob_deltaEtaDeltaPhi", deltaEtaBins, "#Delta eta", deltaPhiBins, "#Delta phi", triggerPathName);
277  // Size of containers
278  vector<double> sizeBins; sizeBins.push_back(10); sizeBins.push_back(0); sizeBins.push_back(10);
279  myBook1D(ibooker, "genMuon_size", sizeBins, "container size" );
280  myBook1D(ibooker, "globMuon_size", sizeBins, "container size" );
281  for(size_t i=0; i<filterNamesLevels.size(); i++){
282  myBook1D(ibooker, TString::Format("filt%dMuon_size",int(i+1)), sizeBins, "container size", filterNamesLevels[i].first);
283  }
284  myBook1D(ibooker, "pathMuon_size", sizeBins, "container size", triggerPathName );
285 }
286 
288  if(filterNamesLevels.empty()){
289  return;
290  }
291 //access the containers and create LeafCandidate copies
292  vector<LeafCandidate> genMuons;
294  iEvent.getByToken(genParticlesToken, genParticles);
295  if(genParticles.isValid()){
296  for(GenParticleCollection::const_iterator p=genParticles->begin(); p!= genParticles->end(); ++p){
297  if( p->status() == 1 && std::abs(p->pdgId())==13 &&
298  ( find( motherIDs.begin(), motherIDs.end(), -1 )!=motherIDs.end() || find( motherIDs.begin(), motherIDs.end(), getMotherId(&(*p)) )!=motherIDs.end() ) ){
299  genMuons.push_back( *p );
300  }
301  }
302  }else{
303  LogDebug("HLTriggerOfflineHeavyFlavor")<<"Could not access GenParticleCollection"<<endl;
304  }
305  sort(genMuons.begin(), genMuons.end(), GreaterByPt<LeafCandidate>());
306  ME["genMuon_size"]->Fill(genMuons.size());
307  LogDebug("HLTriggerOfflineHeavyFlavor")<<"GenParticleCollection from "<<genParticlesTag<<" has size: "<<genMuons.size()<<endl;
308 
309  vector<LeafCandidate> globMuons;
310  vector<LeafCandidate> globMuons_position;
311  Handle<MuonCollection> recoMuonsHandle;
312  iEvent.getByToken(recoMuonsToken, recoMuonsHandle);
313  if(recoMuonsHandle.isValid()){
314  for(MuonCollection::const_iterator p=recoMuonsHandle->begin(); p!= recoMuonsHandle->end(); ++p){
315  if(p->isGlobalMuon()){
316  globMuons.push_back(*p);
317  globMuons_position.push_back( LeafCandidate( p->charge(), math::XYZTLorentzVector(p->outerTrack()->innerPosition().x(), p->outerTrack()->innerPosition().y(), p->outerTrack()->innerPosition().z(), 0.) ) );
318  }
319  }
320  }else{
321  LogDebug("HLTriggerOfflineHeavyFlavor")<<"Could not access reco Muons"<<endl;
322  }
323  ME["globMuon_size"]->Fill(globMuons.size());
324  LogDebug("HLTriggerOfflineHeavyFlavor")<<"Global Muons from "<<recoMuonsTag<<" has size: "<<globMuons.size()<<endl;
325 
326 // access RAW trigger event
327  vector<vector<LeafCandidate> > muonsAtFilter;
328  vector<vector<LeafCandidate> > muonPositionsAtFilter;
329  for(size_t i=0; i<filterNamesLevels.size(); i++){
330  muonsAtFilter.push_back(vector<LeafCandidate>());
331  muonPositionsAtFilter.push_back(vector<LeafCandidate>());
332  }
333  Handle<TriggerEventWithRefs> rawTriggerEvent;
334  iEvent.getByToken( triggerSummaryRAWTag, rawTriggerEvent );
335  if( rawTriggerEvent.isValid() ){
336  for(size_t i=0; i<filterNamesLevels.size(); i++){
337  size_t index = rawTriggerEvent->filterIndex(InputTag( filterNamesLevels[i].first, "", triggerProcessName ));
338  if ( index < rawTriggerEvent->size() ){
339  if( filterNamesLevels[i].second==1 ){
340  vector<L1MuonParticleRef> l1Cands;
341  rawTriggerEvent->getObjects( index, TriggerL1Mu, l1Cands );
342  for(size_t j=0; j<l1Cands.size(); j++){
343  muonsAtFilter[i].push_back(*l1Cands[j]);
344  }
345  }else{
346  vector<RecoChargedCandidateRef> hltCands;
347  rawTriggerEvent->getObjects( index, TriggerMuon, hltCands );
348  for(size_t j=0; j<hltCands.size(); j++){
349  muonsAtFilter[i].push_back(*hltCands[j]);
350  if( filterNamesLevels[i].second==2 ){
351  muonPositionsAtFilter[i].push_back( LeafCandidate( hltCands[j]->charge(), math::XYZTLorentzVector(hltCands[j]->track()->innerPosition().x(), hltCands[j]->track()->innerPosition().y(), hltCands[j]->track()->innerPosition().z(), 0.) ) );
352  }
353  }
354  }
355  }
356  ME[TString::Format("filt%dMuon_size",int(i+1))]->Fill(muonsAtFilter[i].size());
357  LogDebug("HLTriggerOfflineHeavyFlavor")<<"Filter \""<<filterNamesLevels[i].first<<"\" has "<<muonsAtFilter[i].size()<<" muons"<<endl;
358  }
359  }else{
360  LogDebug("HLTriggerOfflineHeavyFlavor")<<"Could not access RAWTriggerEvent"<<endl;
361  }
362 
363 // access AOD trigger event
364  vector<LeafCandidate> pathMuons;
365  Handle<TriggerEvent> aodTriggerEvent;
366  iEvent.getByToken(triggerSummaryAODTag,aodTriggerEvent);
367  if(aodTriggerEvent.isValid()){
368  TriggerObjectCollection allObjects = aodTriggerEvent->getObjects();
369  for(int i=0; i<aodTriggerEvent->sizeFilters(); i++){
370  if(aodTriggerEvent->filterTag(i)==InputTag((filterNamesLevels.end()-1)->first,"",triggerProcessName)){
371  Keys keys = aodTriggerEvent->filterKeys(i);
372  for(size_t j=0; j<keys.size(); j++){
373  pathMuons.push_back( LeafCandidate( allObjects[keys[j]].id()>0 ? 1 : -1, math::PtEtaPhiMLorentzVector( allObjects[keys[j]].pt(), allObjects[keys[j]].eta(), allObjects[keys[j]].phi(), muonMass ) ) );
374  }
375  }
376  }
377  ME["pathMuon_size"]->Fill(pathMuons.size());
378  LogDebug("HLTriggerOfflineHeavyFlavor")<<"Path \""<<triggerPathName<<"\" has "<<pathMuons.size()<<" muons at last filter \""<<(filterNamesLevels.end()-1)->first<<"\""<<endl;
379  }else{
380  LogDebug("HLTriggerOfflineHeavyFlavor")<<"Could not access AODTriggerEvent"<<endl;
381  }
382 
383 // access Trigger Results
384  bool triggerFired = false;
386  iEvent.getByToken(triggerResultsToken,triggerResults);
387  if(triggerResults.isValid()){
388  LogDebug("HLTriggerOfflineHeavyFlavor")<<"Successfully initialized "<<triggerResultsTag<<endl;
389  const edm::TriggerNames & triggerNames = iEvent.triggerNames(*triggerResults);
390  bool hlt_exists = false;
391  for ( unsigned int i=0; i!=triggerNames.size(); i++) {
392  TString hlt_name = triggerNames.triggerName(i);
393  if (hlt_name.Contains(triggerPathName)) {
394  triggerFired = triggerResults->accept( i );
395  hlt_exists = true;
396  break;
397  }
398  }
399  if (!hlt_exists) {
400  LogDebug("HLTriggerOfflineHeavyFlavor")<<triggerResultsTag<<" has no trigger: "<<triggerPathName<<endl;
401  }
402  }else{
403  LogDebug("HLTriggerOfflineHeavyFlavor")<<"Could not initialize "<<triggerResultsTag<<endl;
404  }
405 
406 //create matching maps
407  vector<int> glob_gen(genMuons.size(),-1);
408  match( ME["globGen_deltaEtaDeltaPhi"], genMuons, globMuons, genGlobDeltaRMatchingCut, glob_gen );
409  vector<vector<int> > filt_glob;
410  for(size_t i=0; i<filterNamesLevels.size(); i++){
411  filt_glob.push_back( vector<int>(globMuons.size(),-1) );
412  if( filterNamesLevels[i].second == 1 ){
413  match( ME[TString::Format("filt%dGlob_deltaEtaDeltaPhi",int(i+1))], globMuons_position, muonsAtFilter[i] ,globL1DeltaRMatchingCut, filt_glob[i] );
414  }else if( filterNamesLevels[i].second == 2 ){
415  match( ME[TString::Format("filt%dGlob_deltaEtaDeltaPhi",int(i+1))], globMuons_position, muonPositionsAtFilter[i] ,globL2DeltaRMatchingCut, filt_glob[i] );
416  }else if( filterNamesLevels[i].second > 2){
417  match( ME[TString::Format("filt%dGlob_deltaEtaDeltaPhi",int(i+1))], globMuons, muonsAtFilter[i] ,globL3DeltaRMatchingCut, filt_glob[i] );
418  }
419  }
420  vector<int> path_glob(globMuons.size(),-1);
421  if( (filterNamesLevels.end()-1)->second == 1 ){
422  match( ME["pathGlob_deltaEtaDeltaPhi"], globMuons_position, pathMuons ,globL1DeltaRMatchingCut, path_glob );
423  }else if( (filterNamesLevels.end()-1)->second == 2 ){
424  match( ME["pathGlob_deltaEtaDeltaPhi"], globMuons, pathMuons ,globL2DeltaRMatchingCut, path_glob );
425  }else if( (filterNamesLevels.end()-1)->second > 2){
426  match( ME["pathGlob_deltaEtaDeltaPhi"], globMuons, pathMuons ,globL3DeltaRMatchingCut, path_glob );
427  }
428 
429 //fill histos
430  bool first = true;
431  for(size_t i=0; i<genMuons.size(); i++){
432  ME["genMuon_genEtaPt"]->Fill(genMuons[i].eta(), genMuons[i].pt());
433  ME["genMuon_genEtaPhi"]->Fill(genMuons[i].eta(), genMuons[i].phi());
434  if(glob_gen[i] != -1) {
435  ME["resGlobGen_genEtaPt"]->Fill(genMuons[i].eta(), genMuons[i].pt(), (globMuons[glob_gen[i]].pt()-genMuons[i].pt())/genMuons[i].pt() );
436  ME["globMuon_genEtaPt"]->Fill(genMuons[i].eta(), genMuons[i].pt());
437  ME["globMuon_genEtaPhi"]->Fill(genMuons[i].eta(), genMuons[i].phi());
438  ME["globMuon_recoEtaPt"]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].pt());
439  ME["globMuon_recoEtaPhi"]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].phi());
440  for(size_t f=0; f<filterNamesLevels.size(); f++) {
441  if(filt_glob[f][glob_gen[i]] != -1) {
442  ME[TString::Format("resFilt%dGlob_recoEtaPt",int(f+1))]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].pt(), (muonsAtFilter[f][filt_glob[f][glob_gen[i]]].pt()-globMuons[glob_gen[i]].pt())/globMuons[glob_gen[i]].pt() );
443  ME[TString::Format("filt%dMuon_recoEtaPt",int(f+1))]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].pt());
444  ME[TString::Format("filt%dMuon_recoEtaPhi",int(f+1))]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].phi());
445  }else{
446  break;
447  }
448  }
449  if(path_glob[glob_gen[i]] != -1){
450  ME["resPathGlob_recoEtaPt"]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].pt(), (pathMuons[path_glob[glob_gen[i]]].pt()-globMuons[glob_gen[i]].pt())/globMuons[glob_gen[i]].pt() );
451  ME["pathMuon_recoEtaPt"]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].pt());
452  ME["pathMuon_recoEtaPhi"]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].phi());
453  }
454 //highest pt muon
455  if( first ){
456  first = false;
457  if( triggerFired ){
458  ME["resultMuon_recoEtaPt"]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].pt());
459  ME["resultMuon_recoEtaPhi"]->Fill(globMuons[glob_gen[i]].eta(), globMuons[glob_gen[i]].phi());
460  }
461  }
462  }
463  }
464 
465 //fill dimuon histograms (highest pT, opposite charge)
466  int secondMuon = 0;
467  for(size_t j=1; j<genMuons.size(); j++){
468  if(genMuons[0].charge()*genMuons[j].charge()==-1){
469  secondMuon = j;
470  break;
471  }
472  }
473  if(secondMuon > 0){
474 //two generated
475  double genDimuonPt = (genMuons[0].p4()+genMuons[secondMuon].p4()).pt();
476  double genDimuonEta = (genMuons[0].p4()+genMuons[secondMuon].p4()).eta();
477  double genDimuonRap = (genMuons[0].p4()+genMuons[secondMuon].p4()).Rapidity();
478  double genDimuonDR = deltaR<LeafCandidate,LeafCandidate>( genMuons[0], genMuons[secondMuon] );
479  bool highPt = genMuons[0].pt()>7. && genMuons[secondMuon].pt()>7;
480  ME["genDimuon_genEtaPt"]->Fill( genDimuonEta, genDimuonPt );
481  ME["genDimuon_genRapPt"]->Fill( genDimuonRap, genDimuonPt );
482  if(highPt) ME["genDimuon_genPtDR"]->Fill( genDimuonPt, genDimuonDR );
483 //two global
484  if(glob_gen[0]!=-1 && glob_gen[secondMuon]!=-1){
485  ME["globDimuon_genEtaPt"]->Fill( genDimuonEta, genDimuonPt );
486  ME["globDimuon_genRapPt"]->Fill( genDimuonRap, genDimuonPt );
487  if(highPt) ME["globDimuon_genPtDR"]->Fill( genDimuonPt, genDimuonDR );
488  double globDimuonPt = (globMuons[glob_gen[0]].p4()+globMuons[glob_gen[secondMuon]].p4()).pt();
489  double globDimuonEta = (globMuons[glob_gen[0]].p4()+globMuons[glob_gen[secondMuon]].p4()).eta();
490  double globDimuonRap = (globMuons[glob_gen[0]].p4()+globMuons[glob_gen[secondMuon]].p4()).Rapidity();
491  double globDimuonDR = deltaR<LeafCandidate,LeafCandidate>( globMuons[glob_gen[0]], globMuons[glob_gen[secondMuon]] );
492  double globDimuonDRpos = deltaR<LeafCandidate,LeafCandidate>( globMuons_position[glob_gen[0]], globMuons_position[glob_gen[secondMuon]] );
493  ME["globDimuon_recoEtaPt"]->Fill( globDimuonEta, globDimuonPt );
494  ME["globDimuon_recoRapPt"]->Fill( globDimuonRap, globDimuonPt );
495  if(highPt) ME["globDimuon_recoPtDR"]->Fill( globDimuonPt, globDimuonDR );
496  if(highPt) ME["globDimuon_recoPtDRpos"]->Fill( globDimuonPt, globDimuonDRpos );
497 //two filter objects
498  for(size_t f=0; f<filterNamesLevels.size(); f++){
499  if(filt_glob[f][glob_gen[0]] != -1 && filt_glob[f][glob_gen[secondMuon]] != -1){
500  ME[TString::Format("diFilt%dDimuon_recoEtaPt",int(f+1))]->Fill( globDimuonEta, globDimuonPt );
501  ME[TString::Format("diFilt%dDimuon_recoRapPt",int(f+1))]->Fill( globDimuonRap, globDimuonPt );
502  if(highPt) ME[TString::Format("diFilt%dDimuon_recoPtDR",int(f+1))]->Fill( globDimuonPt, globDimuonDR );
503  if(highPt) ME[TString::Format("diFilt%dDimuon_recoPtDRpos",int(f+1))]->Fill( globDimuonPt, globDimuonDRpos );
504  }else{
505  break;
506  }
507  }
508 //one filter object
509  for(size_t f=0; f<filterNamesLevels.size(); f++){
510  if(filt_glob[f][glob_gen[0]] != -1 || filt_glob[f][glob_gen[secondMuon]] != -1){
511  ME[TString::Format("filt%dDimuon_recoEtaPt",int(f+1))]->Fill( globDimuonEta, globDimuonPt );
512  ME[TString::Format("filt%dDimuon_recoRapPt",int(f+1))]->Fill( globDimuonRap, globDimuonPt );
513  if(highPt) ME[TString::Format("filt%dDimuon_recoPtDR",int(f+1))]->Fill( globDimuonPt, globDimuonDR );
514  if(highPt) ME[TString::Format("filt%dDimuon_recoPtDRpos",int(f+1))]->Fill( globDimuonPt, globDimuonDRpos );
515  }else{
516  break;
517  }
518  }
519 //two path objects
520  if(path_glob[glob_gen[0]] != -1 && path_glob[glob_gen[secondMuon]] != -1){
521  ME["diPathDimuon_recoEtaPt"]->Fill( globDimuonEta, globDimuonPt );
522  ME["diPathDimuon_recoRapPt"]->Fill( globDimuonRap, globDimuonPt );
523  if(highPt) ME["diPathDimuon_recoPtDR"]->Fill( globDimuonPt, globDimuonDR );
524  if(highPt) ME["diPathDimuon_recoPtDRpos"]->Fill( globDimuonPt, globDimuonDRpos );
525  }
526 //one path object
527  if(path_glob[glob_gen[0]] != -1 || path_glob[glob_gen[secondMuon]] != -1){
528  ME["pathDimuon_recoEtaPt"]->Fill( globDimuonEta, globDimuonPt );
529  ME["pathDimuon_recoRapPt"]->Fill( globDimuonRap, globDimuonPt );
530  if(highPt) ME["pathDimuon_recoPtDR"]->Fill( globDimuonPt, globDimuonDR );
531  if(highPt) ME["pathDimuon_recoPtDRpos"]->Fill( globDimuonPt, globDimuonDRpos );
532  }
533 //trigger result
534  if( triggerFired ){
535  ME["resultDimuon_recoEtaPt"]->Fill( globDimuonEta, globDimuonPt );
536  ME["resultDimuon_recoRapPt"]->Fill( globDimuonRap, globDimuonPt );
537  if(highPt) ME["resultDimuon_recoPtDR"]->Fill( globDimuonPt, globDimuonDR );
538  if(highPt) ME["resultDimuon_recoPtDRpos"]->Fill( globDimuonPt, globDimuonDRpos );
539  }
540  }
541  }
542 }
543 
545  const Candidate* mother = p->mother();
546  if( mother ){
547  if( mother->pdgId() == p->pdgId() ){
548  return getMotherId(mother);
549  }else{
550  return mother->pdgId();
551  }
552  }else{
553  return 0;
554  }
555 }
556 
557 void HeavyFlavorValidation::match( MonitorElement * me, vector<LeafCandidate> & from, vector<LeafCandidate> & to, double dRMatchingCut, vector<int> & map ){
558  vector<double> dR(from.size());
559  for(size_t i=0; i<from.size(); i++){
560  map[i] = -1;
561  dR[i] = 10.;
562  //find closest
563  for(size_t j=0; j<to.size(); j++){
564  double dRtmp = deltaR<double>(from[i].eta(), from[i].phi(), to[j].eta(), to[j].phi());
565  if( dRtmp < dR[i] ){
566  dR[i] = dRtmp;
567  map[i] = j;
568  }
569  }
570  //fill matching histo
571  if( map[i] != -1 ){
572  me->Fill( to[map[i]].eta()-from[i].eta(), deltaPhi<double>(to[map[i]].phi(), from[i].phi()) );
573  }
574  //apply matching cut
575  if( dR[i] > dRMatchingCut ){
576  map[i] = -1;
577  }
578  //remove duplication
579  if( map[i] != -1 ){
580  for(size_t k=0; k<i; k++){
581  if( map[k] != -1 && map[i] == map[k] ){
582  if( dR[i] < dR[k] ){
583  map[k] = -1;
584  }else{
585  map[i] = -1;
586  }
587  break;
588  }
589  }
590  }
591  }
592 }
593 
594 void HeavyFlavorValidation::myBook2D(DQMStore::IBooker & ibooker, TString name, vector<double> &ptBins, TString ptLabel, vector<double> &etaBins, TString etaLabel, TString title )
595 {
596 // dqmStore->setCurrentFolder(dqmFolder+"/"+folder);
597  int ptN = ptBins.size()==3 ? (int)ptBins[0]+1 : ptBins.size();
598  Double_t *pt = new Double_t[ ptN ];
599  for(int i=0; i<ptN; i++){
600  pt[i] = ptBins.size()==3 ? ptBins[1] + i*(ptBins[2]-ptBins[1])/ptBins[0] : ptBins[i] ;
601  }
602  int etaN = etaBins.size()==3 ? (int)etaBins[0]+1 : etaBins.size();
603  Double_t *eta = new Double_t[ etaN ];
604  for(int i=0; i<etaN; i++){
605  eta[i] = etaBins.size()==3 ? etaBins[1] + i*(etaBins[2]-etaBins[1])/etaBins[0] : etaBins[i] ;
606  }
607  TH2F *h = new TH2F( name, name, ptN-1, pt, etaN-1, eta );
608  h->SetXTitle(ptLabel);
609  h->SetYTitle(etaLabel);
610  h->SetTitle(title);
611  ME[name] = ibooker.book2D( name.Data(), h );
612  delete h;
613 }
614 
615 void HeavyFlavorValidation::myBookProfile2D(DQMStore::IBooker & ibooker, TString name, vector<double> &ptBins, TString ptLabel, vector<double> &etaBins, TString etaLabel, TString title )
616 {
617 // dqmStore->setCurrentFolder(dqmFolder+"/"+folder);
618  int ptN = ptBins.size()==3 ? (int)ptBins[0]+1 : ptBins.size();
619  Double_t *pt = new Double_t[ ptN ];
620  for(int i=0; i<ptN; i++){
621  pt[i] = ptBins.size()==3 ? ptBins[1] + i*(ptBins[2]-ptBins[1])/ptBins[0] : ptBins[i] ;
622  }
623  int etaN = etaBins.size()==3 ? (int)etaBins[0]+1 : etaBins.size();
624  Double_t *eta = new Double_t[ etaN ];
625  for(int i=0; i<etaN; i++){
626  eta[i] = etaBins.size()==3 ? etaBins[1] + i*(etaBins[2]-etaBins[1])/etaBins[0] : etaBins[i] ;
627  }
628  TProfile2D *h = new TProfile2D( name, name, ptN-1, pt, etaN-1, eta );
629  h->SetXTitle(ptLabel);
630  h->SetYTitle(etaLabel);
631  h->SetTitle(title);
632  ME[name] = ibooker.bookProfile2D( name.Data(), h );
633  delete h;
634 }
635 
636 void HeavyFlavorValidation::myBook1D(DQMStore::IBooker & ibooker, TString name, vector<double> &bins, TString label, TString title )
637 {
638 // dqmStore->setCurrentFolder(dqmFolder+"/"+folder);
639  int binsN = bins.size()==3 ? (int)bins[0]+1 : bins.size();
640  Double_t *myBins = new Double_t[ binsN ];
641  for(int i=0; i<binsN; i++){
642  myBins[i] = bins.size()==3 ? bins[1] + i*(bins[2]-bins[1])/bins[0] : bins[i] ;
643  }
644  TH1F *h = new TH1F( name, name, binsN-1, myBins );
645  h->SetXTitle(label);
646  h->SetTitle(title);
647  ME[name] = ibooker.book1D( name.Data(), h );
648  delete h;
649 }
650 
652 {
653  // helper lambda to check if a string contains a substring
654  const auto contains = [](const std::string &s, const std::string &sub) -> bool {
655  return s.find(sub) != std::string::npos;
656  };
657 
658  // helper lambda to check if a string contains any of a list of substrings
659  const auto containsAny = [](const std::string &s, const std::vector<std::string> &subs) -> bool {
660  for (const auto &sub : subs) {
661  if (s.find(sub) != std::string::npos) return true;
662  }
663  return false;
664  };
665 
666  // helper lambda to check if string s is any of the strings in vector ms
667  const auto isAnyOf = [](const std::string &s, const std::vector<std::string>& ms) -> bool {
668  for (const auto &m : ms) {
669  if (s == m) return true;
670  }
671  return false;
672  };
673 
674  // tmadlener, 20.08.2017:
675  // define the valid module names for the different "levels", to add a little bit more stability
676  // to the checking compared to just doing some name matching.
677  // Note, that the name matching is not completely remved, since at level 4 and 5 some of the
678  // valid modules are the same, so that the name matching is still needed.
679  // With the current definition this yields the exact same levels as before, but weeds out some
680  // of the "false" positives at level 3 (naming matches also to some HLTMuonL1TFilter modules due to
681  // the 'forIterL3' in the name)
682  const std::string l1Filter = "HLTMuonL1TFilter";
683  const std::string l2Filter = "HLTMuonL2FromL1TPreFilter";
684  const std::vector<std::string> l3Filters = {"HLTMuonDimuonL3Filter", "HLTMuonL3PreFilter"};
685  const std::vector<std::string> l4Filters = {"HLTDisplacedmumuFilter", "HLTDiMuonGlbTrkFilter",
686  "HLTMuonTrackMassFilter"};
687  const std::vector<std::string> l5Filters = {"HLTmumutkFilter", "HLT2MuonMuonDZ", "HLTDisplacedmumuFilter"};
688 
689  if (contains(moduleName, "Filter") && hltConfig.moduleEDMType(moduleName) == "EDFilter") {
690  if (contains(moduleName, "L1") && !contains(moduleName, "ForIterL3") &&
691  hltConfig.moduleType(moduleName) == l1Filter) {
692  return 1;
693  }
694  if (contains(moduleName, "L2") && hltConfig.moduleType(moduleName) == l2Filter) {
695  return 2;
696  }
697  if (contains(moduleName, "L3") && isAnyOf(hltConfig.moduleType(moduleName), l3Filters)) {
698  return 3;
699  }
700  if (containsAny(moduleName, {"DisplacedmumuFilter", "DiMuon", "MuonL3Filtered", "TrackMassFiltered"}) &&
701  isAnyOf(hltConfig.moduleType(moduleName), l4Filters)) {
702  return 4;
703  }
704  if (containsAny(moduleName, {"Vertex", "Dz"}) &&
705  isAnyOf(hltConfig.moduleType(moduleName), l5Filters)) {
706  return 5;
707  }
708  }
709 
710  return -1;
711 }
712 
714 }
715 
716 //define this as a plug-in
#define LogDebug(id)
size
Write out results.
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
const std::string moduleType(const std::string &module) const
C++ class name of module.
bool contains(EventRange const &lh, EventID const &rh)
Definition: EventRange.cc:38
trigger::size_type sizeFilters() const
Definition: TriggerEvent.h:135
void myBook2D(DQMStore::IBooker &ibooker, TString name, vector< double > &xBins, TString xLabel, vector< double > &yBins, TString yLabel, TString title)
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
void analyze(const edm::Event &, const edm::EventSetup &) override
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:517
enum start value shifted to 81 so as to avoid clashes with PDG codes
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
bool accept() const
Has at least one path accepted the event?
const std::vector< std::string > & triggerNames() const
names of trigger paths
const Keys & filterKeys(trigger::size_type index) const
Definition: TriggerEvent.h:111
vector< pair< string, int > > filterNamesLevels
const std::string moduleEDMType(const std::string &module) const
C++ base class name of module.
virtual const Candidate * mother(size_type i=0) const =0
return pointer to mother
Strings::size_type size() const
Definition: TriggerNames.cc:31
void dqmBeginRun(const edm::Run &, const edm::EventSetup &) override
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
std::vector< TPRegexp > filters
Definition: eve_filter.cc:22
int getFilterLevel(const std::string &moduleName, const HLTConfigProvider &hltConfig)
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
EDGetTokenT< TriggerEvent > triggerSummaryAODTag
void Fill(long long x)
U second(std::pair< T, U > const &p)
PtEtaPhiMLorentzVectorD PtEtaPhiMLorentzVector
Lorentz vector with cartesian internal representation.
Definition: LorentzVector.h:25
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:29
Definition: ME.h:11
void myBookProfile2D(DQMStore::IBooker &ibooker, TString name, vector< double > &xBins, TString xLabel, vector< double > &yBins, TString yLabel, TString title)
char const * label
int getMotherId(const Candidate *p)
int iEvent
Definition: GenABIO.cc:224
std::string moduleName(Provenance const &provenance)
Definition: Provenance.cc:27
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
void setCurrentFolder(std::string const &fullpath)
Definition: DQMStore.cc:268
void match(MonitorElement *me, vector< LeafCandidate > &from, vector< LeafCandidate > &to, double deltaRMatchingCut, vector< int > &map)
const TriggerObjectCollection & getObjects() const
Definition: TriggerEvent.h:98
MonitorElement * bookProfile2D(Args &&...args)
Definition: DQMStore.h:114
virtual int pdgId() const =0
PDG identifier.
EDGetTokenT< TriggerEventWithRefs > triggerSummaryRAWTag
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:106
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double f[11][100]
void myBook1D(DQMStore::IBooker &ibooker, TString name, vector< double > &xBins, TString label, TString title)
static std::string const triggerResults
Definition: EdmProvDump.cc:45
bool isValid() const
Definition: HandleBase.h:74
HeavyFlavorValidation(const edm::ParameterSet &)
size_type filterIndex(const edm::InputTag &filterTag) const
index from tag
int k[5][pyjets_maxn]
const std::vector< std::string > & moduleLabels(unsigned int trigger) const
label(s) of module(s) on a trigger path
std::vector< TriggerObject > TriggerObjectCollection
collection of trigger physics objects (e.g., all isolated muons)
Definition: TriggerObject.h:81
const edm::InputTag filterTag(trigger::size_type index) const
Definition: TriggerEvent.h:103
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:109
void myBook2D(DQMStore::IBooker &ibooker, TString name, vector< double > &xBins, TString xLabel, vector< double > &yBins, TString yLabel)
EDGetTokenT< MuonCollection > recoMuonsToken
std::string const & triggerName(unsigned int index) const
Definition: TriggerNames.cc:22
std::vector< size_type > Keys
void getObjects(size_type filter, Vids &ids, VRphoton &photons) const
extract Ref<C>s for a specific filter and of specific physics type
bool init(const edm::Run &iRun, const edm::EventSetup &iSetup, const std::string &processName, bool &changed)
d&#39;tor
example_stream void bookHistograms(DQMStore::IBooker &,@example_stream edm::Run const &,@example_stream edm::EventSetup const &) override
susybsm::MuonSegment ms
Definition: classes.h:31
EDGetTokenT< GenParticleCollection > genParticlesToken
fixed size matrix
HLT enums.
void myBookProfile2D(DQMStore::IBooker &ibooker, TString name, vector< double > &xBins, TString xLabel, vector< double > &yBins, TString yLabel)
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
void myBook1D(DQMStore::IBooker &ibooker, TString name, vector< double > &xBins, TString label)
EDGetTokenT< TriggerResults > triggerResultsToken
map< TString, MonitorElement * > ME
#define str(s)
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
Definition: Event.cc:256
Definition: Run.h:45