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