CMS 3D CMS Logo

ZCounting.cc
Go to the documentation of this file.
10 
14 
15 #include <boost/foreach.hpp>
16 #include <TLorentzVector.h>
17 
19 
20 using namespace ZCountingTrigger;
21 
22 //
23 // -------------------------------------- Constructor --------------------------------------------
24 //
26  fHLTObjTag (iConfig.getParameter<edm::InputTag>("TriggerEvent")),
27  fHLTTag (iConfig.getParameter<edm::InputTag>("TriggerResults")),
28  fPVName (iConfig.getUntrackedParameter<std::string>("edmPVName","offlinePrimaryVertices")),
29  fMuonName (iConfig.getUntrackedParameter<std::string>("edmName","muons")),
30  fTrackName (iConfig.getUntrackedParameter<std::string>("edmTrackName","generalTracks"))
31 {
32  edm::LogInfo("ZCounting") << "Constructor ZCounting::ZCounting " << std::endl;
33 
34  //Get parameters from configuration file
35  fHLTTag_token = consumes<edm::TriggerResults>(fHLTTag);
36  fHLTObjTag_token = consumes<trigger::TriggerEvent>(fHLTObjTag);
37  fPVName_token = consumes<reco::VertexCollection>(fPVName);
38  fMuonName_token = consumes<reco::MuonCollection>(fMuonName);
39  fTrackName_token = consumes<reco::TrackCollection>(fTrackName);
40 
41  //Cuts
42  IDTypestr_ = iConfig.getUntrackedParameter<std::string>("IDType");
43  IsoTypestr_ = iConfig.getUntrackedParameter<std::string>("IsoType");
44  IsoCut_ = iConfig.getUntrackedParameter<double>("IsoCut");
45 
46  if (IDTypestr_ == "Loose") IDType_ = LooseID;
47  else if(IDTypestr_ == "Medium") IDType_ = MediumID;
48  else if(IDTypestr_ == "Tight") IDType_ = TightID;
49  else IDType_ = NoneID;
50 
51  if (IsoTypestr_ == "Tracker-based") IsoType_ = TrackerIso;
52  else if(IsoTypestr_ == "PF-based") IsoType_ = PFIso;
53  else IsoType_ = NoneIso;
54 
55  PtCutL1_ = iConfig.getUntrackedParameter<double>("PtCutL1");
56  PtCutL2_ = iConfig.getUntrackedParameter<double>("PtCutL2");
57  EtaCutL1_ = iConfig.getUntrackedParameter<double>("EtaCutL1");
58  EtaCutL2_ = iConfig.getUntrackedParameter<double>("EtaCutL2");
59 
60  MassBin_ = iConfig.getUntrackedParameter<int>("MassBin");
61  MassMin_ = iConfig.getUntrackedParameter<double>("MassMin");
62  MassMax_ = iConfig.getUntrackedParameter<double>("MassMax");
63 
64  LumiBin_ = iConfig.getUntrackedParameter<int>("LumiBin");
65  LumiMin_ = iConfig.getUntrackedParameter<double>("LumiMin");
66  LumiMax_ = iConfig.getUntrackedParameter<double>("LumiMax");
67 
68  PVBin_ = iConfig.getUntrackedParameter<int>("PVBin");
69  PVMin_ = iConfig.getUntrackedParameter<double>("PVMin");
70  PVMax_ = iConfig.getUntrackedParameter<double>("PVMax");
71 
72  VtxNTracksFitCut_ = iConfig.getUntrackedParameter<double>("VtxNTracksFitMin");
73  VtxNdofCut_ = iConfig.getUntrackedParameter<double>("VtxNdofMin");
74  VtxAbsZCut_ = iConfig.getUntrackedParameter<double>("VtxAbsZMax");
75  VtxRhoCut_ = iConfig.getUntrackedParameter<double>("VtxRhoMax");
76 }
77 
78 //
79 // -------------------------------------- Destructor --------------------------------------------
80 //
82 {
83  edm::LogInfo("ZCounting") << "Destructor ZCounting::~ZCounting " << std::endl;
84 }
85 
86 //
87 // -------------------------------------- beginRun --------------------------------------------
88 //
90 {
91  edm::LogInfo("ZCounting") << "ZCounting::beginRun" << std::endl;
92 
93  // Triggers
95 
96 }
97 //
98 // -------------------------------------- bookHistos --------------------------------------------
99 //
101 {
102  edm::LogInfo("ZCounting") << "ZCounting::bookHistograms" << std::endl;
103 
104  ibooker_.cd();
105  ibooker_.setCurrentFolder("ZCounting/Histograms");
106 
107  h_mass_HLT_pass_central = ibooker_.book2D("h_mass_HLT_pass_central", "h_mass_HLT_pass_central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
108  h_mass_HLT_pass_forward = ibooker_.book2D("h_mass_HLT_pass_forward", "h_mass_HLT_pass_forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
109  h_mass_HLT_fail_central = ibooker_.book2D("h_mass_HLT_fail_central", "h_mass_HLT_fail_central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
110  h_mass_HLT_fail_forward = ibooker_.book2D("h_mass_HLT_fail_forward", "h_mass_HLT_fail_forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
111 
112  h_mass_SIT_pass_central = ibooker_.book2D("h_mass_SIT_pass_central", "h_mass_SIT_pass_central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
113  h_mass_SIT_pass_forward = ibooker_.book2D("h_mass_SIT_pass_forward", "h_mass_SIT_pass_forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
114  h_mass_SIT_fail_central = ibooker_.book2D("h_mass_SIT_fail_central", "h_mass_SIT_fail_central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
115  h_mass_SIT_fail_forward = ibooker_.book2D("h_mass_SIT_fail_forward", "h_mass_SIT_fail_forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
116 
117  h_mass_Sta_pass_central = ibooker_.book2D("h_mass_Sta_pass_central", "h_mass_Sta_pass_central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
118  h_mass_Sta_pass_forward = ibooker_.book2D("h_mass_Sta_pass_forward", "h_mass_Sta_pass_forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
119  h_mass_Sta_fail_central = ibooker_.book2D("h_mass_Sta_fail_central", "h_mass_Sta_fail_central", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
120  h_mass_Sta_fail_forward = ibooker_.book2D("h_mass_Sta_fail_forward", "h_mass_Sta_fail_forward", LumiBin_, LumiMin_, LumiMax_, MassBin_, MassMin_, MassMax_);
121 
122  h_npv = ibooker_.book2D("h_npv", "h_npv", LumiBin_, LumiMin_, LumiMax_, PVBin_, PVMin_, PVMax_);
123  h_yield_Z = ibooker_.book1D("h_yield_Z", "h_yield_Z", LumiBin_, LumiMin_, LumiMax_);
124 
125 }
126 //
127 // -------------------------------------- beginLuminosityBlock --------------------------------------------
128 //
130 {
131  edm::LogInfo("ZCounting") << "ZCounting::beginLuminosityBlock" << std::endl;
132 }
133 
134 
135 //
136 // -------------------------------------- Analyze --------------------------------------------
137 //
138 //--------------------------------------------------------------------------------------------------
140 {// Fill event tree on the fly
141  edm::LogInfo("ZCounting") << "ZCounting::analyze" << std::endl;
142 
143  //-------------------------------
144  //--- Vertex
145  //-------------------------------
147  iEvent.getByToken(fPVName_token,hVertexProduct);
148  if(!hVertexProduct.isValid()) return;
149 
150  const reco::VertexCollection *pvCol = hVertexProduct.product();
151  const reco::Vertex* pv = &(*pvCol->begin());
152  int nvtx = 0;
153 
154  for(auto const & itVtx : *hVertexProduct) {
155  if(itVtx.isFake()) continue;
156  if(itVtx.tracksSize() < VtxNTracksFitCut_) continue;
157  if(itVtx.ndof() < VtxNdofCut_) continue;
158  if(fabs(itVtx.z()) > VtxAbsZCut_) continue;
159  if(itVtx.position().Rho() > VtxRhoCut_) continue;
160 
161  if(nvtx==0) {
162  pv = &itVtx;
163  }
164  nvtx++;
165  }
166 
167  h_npv->Fill(iEvent.luminosityBlock(), nvtx);
168 
169  // Good vertex requirement
170  if(nvtx==0) return;
171 
172  //-------------------------------
173  //--- Trigger
174  //-------------------------------
176  iEvent.getByToken(fHLTTag_token,hTrgRes);
177  if(!hTrgRes.isValid()) return;
178 
180  iEvent.getByToken(fHLTObjTag_token,hTrgEvt);
181 
182  const edm::TriggerNames &triggerNames = iEvent.triggerNames(*hTrgRes);
183  bool config_changed = false;
184  if(fTriggerNamesID != triggerNames.parameterSetID()) {
185  fTriggerNamesID = triggerNames.parameterSetID();
186  config_changed = true;
187  }
188  if(config_changed) {
189  initHLT(*hTrgRes, triggerNames);
190  }
191 
192  TriggerBits triggerBits;
193  for(unsigned int irec=0; irec<fTrigger->fRecords.size(); irec++) {
194  if(fTrigger->fRecords[irec].hltPathIndex == (unsigned int)-1) continue;
195  if(hTrgRes->accept(fTrigger->fRecords[irec].hltPathIndex)) {
196  triggerBits [fTrigger->fRecords[irec].baconTrigBit] = true;
197  }
198  }
199  //if(fSkipOnHLTFail && triggerBits == 0) return;
200 
201  // Trigger requirement
202  if(!isMuonTrigger(*fTrigger, triggerBits)) return;
203 
204  //-------------------------------
205  //--- Muons and Tracks
206  //-------------------------------
208  iEvent.getByToken(fMuonName_token,hMuonProduct);
209  if(!hMuonProduct.isValid()) return;
210 
212  iEvent.getByToken(fTrackName_token,hTrackProduct);
213  if(!hTrackProduct.isValid()) return;
214 
215  TLorentzVector vTag(0.,0.,0.,0.);
216  TLorentzVector vProbe(0.,0.,0.,0.);
217  TLorentzVector vTrack(0.,0.,0.,0.);
218 
219  // Tag loop
220  for(auto const & itMu1 : *hMuonProduct) {
221 
222  float pt1 = itMu1.muonBestTrack()->pt();
223  float eta1 = itMu1.muonBestTrack()->eta();
224  float phi1 = itMu1.muonBestTrack()->phi();
225  float q1 = itMu1.muonBestTrack()->charge();
226 
227  // Tag selection: kinematic cuts, lepton selection and trigger matching
228  if(pt1 < PtCutL1_) continue;
229  if(fabs(eta1) > EtaCutL1_) continue;
230  if(!(passMuonID(itMu1, *pv, IDType_) && passMuonIso(itMu1, IsoType_, IsoCut_))) continue;
231  if(!isMuonTriggerObj(*fTrigger, TriggerTools::matchHLT(eta1, phi1, fTrigger->fRecords, *hTrgEvt))) continue;
232 
233  vTag.SetPtEtaPhiM(pt1, eta1, phi1, MUON_MASS);
234 
235  // Probe loop over muons
236  for(auto const & itMu2 : *hMuonProduct) {
237  if(&itMu2 == &itMu1) continue;
238 
239  float pt2 = itMu2.muonBestTrack()->pt();
240  float eta2 = itMu2.muonBestTrack()->eta();
241  float phi2 = itMu2.muonBestTrack()->phi();
242  float q2 = itMu2.muonBestTrack()->charge();
243 
244  // Probe selection: kinematic cuts and opposite charge requirement
245  if(pt2 < PtCutL2_) continue;
246  if(fabs(eta2) > EtaCutL2_) continue;
247  if(q1 == q2) continue;
248 
249  vProbe.SetPtEtaPhiM(pt2, eta2, phi2, MUON_MASS);
250 
251  // Mass window
252  TLorentzVector vDilep = vTag + vProbe;
253  float dilepMass = vDilep.M();
254  if((dilepMass < MassMin_) || (dilepMass > MassMax_)) continue;
255 
256  bool isTagCentral = false;
257  bool isProbeCentral = false;
258  if(fabs(eta1) < MUON_BOUND) isTagCentral = true;
259  if(fabs(eta2) < MUON_BOUND) isProbeCentral = true;
260 
261  // Determine event category for efficiency calculation
262  if(passMuonID(itMu2, *pv, IDType_) && passMuonIso(itMu2, IsoType_, IsoCut_)){
263  if(isMuonTriggerObj(*fTrigger, TriggerTools::matchHLT(eta2, phi2, fTrigger->fRecords, *hTrgEvt))){
264  // category 2HLT: both muons passing trigger requirements
265  if(&itMu1>&itMu2) continue; // make sure we don't double count MuMu2HLT category
266 
267  // Fill twice for each event, since both muons pass trigger
268  if(isTagCentral){
269  h_mass_HLT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
270  h_mass_SIT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
271  h_mass_Sta_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
272  }
273  else
274  {
275  h_mass_HLT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
276  h_mass_SIT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
277  h_mass_Sta_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
278  }
279 
280  if(isProbeCentral){
281  h_mass_HLT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
282  h_mass_SIT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
283  h_mass_Sta_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
284  }
285  else
286  {
287  h_mass_HLT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
288  h_mass_SIT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
289  h_mass_Sta_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
290  }
291 
292  }
293  else{
294  // category 1HLT: probe passing selection but not trigger
295  if(isProbeCentral){
296  h_mass_HLT_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
297  h_mass_SIT_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
298  h_mass_Sta_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
299  }
300  else
301  {
302  h_mass_HLT_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
303  h_mass_SIT_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
304  h_mass_Sta_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
305  }
306 
307  }
308  // category 2HLT + 1HLT: Fill once for Z yield
309  h_yield_Z->Fill(iEvent.luminosityBlock());
310  }
311  else if(itMu2.isGlobalMuon()){
312  // category NoSel: probe is a GLB muon but failing selection
313  if(isProbeCentral){
314  h_mass_SIT_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
315  h_mass_Sta_pass_central->Fill(iEvent.luminosityBlock(), dilepMass);
316  }
317  else
318  {
319  h_mass_SIT_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
320  h_mass_Sta_pass_forward->Fill(iEvent.luminosityBlock(), dilepMass);
321  }
322  }
323  else if(itMu2.isStandAloneMuon()){
324  // category STA: probe is a STA muon
325  if(isProbeCentral){
326  h_mass_Sta_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
327  }
328  else
329  {
330  h_mass_Sta_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
331  }
332  }
333  else if(itMu2.innerTrack()->hitPattern().trackerLayersWithMeasurement() >= 6 && itMu2.innerTrack()->hitPattern().numberOfValidPixelHits() >= 1){
334  // cateogry Trk: probe is a tracker track
335  if(isProbeCentral){
336  h_mass_Sta_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
337  }
338  else
339  {
340  h_mass_Sta_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
341  }
342  }
343 
344  }// End of probe loop over muons
345 
346  // Probe loop over tracks, only for standalone efficiency calculation
347  for(auto const & itTrk : *hTrackProduct) {
348 
349  // Check track is not a muon
350  bool isMuon = false;
351  for(auto const & itMu : *hMuonProduct) {
352  if(itMu.innerTrack().isNonnull() && itMu.innerTrack().get() == &itTrk) {
353  isMuon = true;
354  break;
355  }
356  }
357  if(isMuon) continue;
358 
359  float pt2 = itTrk.pt();
360  float eta2 = itTrk.eta();
361  float phi2 = itTrk.phi();
362  float q2 = itTrk.charge();
363 
364  // Probe selection: kinematic cuts and opposite charge requirement
365  if(pt2 < PtCutL2_) continue;
366  if(fabs(eta2) > EtaCutL2_) continue;
367  if(q1 == q2) continue;
368 
369  vTrack.SetPtEtaPhiM(pt2, eta2, phi2, MUON_MASS);
370 
371  TLorentzVector vDilep = vTag + vTrack;
372  float dilepMass = vDilep.M();
373  if((dilepMass < MassMin_) || (dilepMass > MassMax_)) continue;
374 
375  bool isTrackCentral = false;
376  if(fabs(eta2) > MUON_BOUND) isTrackCentral = true;
377 
378  if(itTrk.hitPattern().trackerLayersWithMeasurement() >= 6 && itTrk.hitPattern().numberOfValidPixelHits() >= 1){
379  if(isTrackCentral) h_mass_Sta_fail_central->Fill(iEvent.luminosityBlock(), dilepMass);
380  else h_mass_Sta_fail_forward->Fill(iEvent.luminosityBlock(), dilepMass);
381  }
382 
383  }//End of probe loop over tracks
384 
385  }//End of tag loop
386 
387 }
388 
389 //
390 // -------------------------------------- endLuminosityBlock --------------------------------------------
391 //
393 {
394  edm::LogInfo("ZCounting") << "ZCounting::endLuminosityBlock" << std::endl;
395 }
396 
397 //
398 // -------------------------------------- functions --------------------------------------------
399 //
400 
402 {
403  for(unsigned int irec=0; irec<fTrigger->fRecords.size(); irec++) {
404  fTrigger->fRecords[irec].hltPathName = "";
405  fTrigger->fRecords[irec].hltPathIndex = (unsigned int)-1;
406  const std::string pattern = fTrigger->fRecords[irec].hltPattern;
407  if(edm::is_glob(pattern)) { // handle pattern with wildcards (*,?)
408  std::vector<std::vector<std::string>::const_iterator> matches = edm::regexMatch(triggerNames.triggerNames(), pattern);
409  if(matches.empty()) {
410  edm::LogWarning("ZCounting") << "requested pattern [" << pattern << "] does not match any HLT paths" << std::endl;
411  } else {
412  BOOST_FOREACH(std::vector<std::string>::const_iterator match, matches) {
413  fTrigger->fRecords[irec].hltPathName = *match;
414  }
415  }
416  } else { // take full HLT path name given
417  fTrigger->fRecords[irec].hltPathName = pattern;
418  }
419  // Retrieve index in trigger menu corresponding to HLT path
420  unsigned int index = triggerNames.triggerIndex(fTrigger->fRecords[irec].hltPathName);
421  if(index < result.size()) { // check for valid index
422  fTrigger->fRecords[irec].hltPathIndex = index;
423  }
424  }
425 }
426 
427 //--------------------------------------------------------------------------------------------------
428 bool ZCounting::isMuonTrigger(const ZCountingTrigger::TTrigger &triggerMenu, const TriggerBits &hltBits)
429 {
430  return triggerMenu.pass("HLT_IsoMu27_v*",hltBits);
431 }
432 
433 //--------------------------------------------------------------------------------------------------
434 bool ZCounting::isMuonTriggerObj(const ZCountingTrigger::TTrigger &triggerMenu, const TriggerObjects &hltMatchBits)
435 {
436  return triggerMenu.passObj("HLT_IsoMu27_v*","hltL3crIsoL1sMu22Or25L1f0L2f10QL3f27QL3trkIsoFiltered0p07",hltMatchBits);
437 }
438 //--------------------------------------------------------------------------------------------------
440 {//Muon ID selection, using internal function "DataFormats/MuonReco/src/MuonSelectors.cc
441 
442  if (idType == LooseID && muon::isLooseMuon(muon)) return true;
443  else if(idType == MediumID && muon::isMediumMuon(muon)) return true;
444  else if(idType == TightID && muon::isTightMuon(muon, vtx)) return true;
445  else if(idType == NoneID) return true;
446  else return false;
447 }
448 //--------------------------------------------------------------------------------------------------
449 bool ZCounting::passMuonIso(const reco::Muon& muon, const MuonIsoTypes &isoType, const float isoCut)
450 {//Muon isolation selection, up-to-date with MUO POG recommendation
451 
452  if(isoType == TrackerIso && muon.isolationR03().sumPt < isoCut) return true;
453  else if(isoType == PFIso && muon.pfIsolationR04().sumChargedHadronPt + std::max(0.,muon.pfIsolationR04().sumNeutralHadronEt + muon.pfIsolationR04().sumPhotonEt - 0.5*muon.pfIsolationR04().sumPUPt) < isoCut) return true;
454  else if(isoType == NoneIso) return true;
455  else return false;
456 }
457 
MonitorElement * h_mass_Sta_fail_central
Definition: ZCounting.h:129
ZCounting(const edm::ParameterSet &ps)
Definition: ZCounting.cc:25
T getUntrackedParameter(std::string const &, T const &) const
MonitorElement * h_mass_Sta_pass_central
Definition: ZCounting.h:127
double IsoCut_
Definition: ZCounting.h:89
MonitorElement * h_mass_SIT_fail_central
Definition: ZCounting.h:124
double PtCutL1_
Definition: ZCounting.h:91
float sumPt
sum-pt of tracks
Definition: MuonIsolation.h:7
std::string fPVName
Definition: ZCounting.h:75
bool isMuon(const Candidate &part)
Definition: pdgIdUtils.h:11
double LumiMax_
Definition: ZCounting.h:102
bool isMediumMuon(const reco::Muon &, bool run2016_hip_mitigation=false)
void beginLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup) override
Definition: ZCounting.cc:129
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:508
bool passObj(const std::string &iName, const std::string &iObjName, const TriggerObjects &iTrigObj) const
Definition: TTrigger.cc:63
void cd(void)
Definition: DQMStore.cc:269
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:17
std::string fTrackName
Definition: ZCounting.h:79
MonitorElement * h_mass_SIT_pass_forward
Definition: ZCounting.h:123
bool accept() const
Has at least one path accepted the event?
bool is_glob(std::string const &pattern)
Definition: RegexMatch.cc:18
edm::InputTag fHLTObjTag
Definition: ZCounting.h:71
MonitorElement * h_yield_Z
Definition: ZCounting.h:133
edm::LuminosityBlockNumber_t luminosityBlock() const
Definition: EventBase.h:63
MuonIsoTypes IsoType_
Definition: ZCounting.h:88
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
bool passMuonID(const reco::Muon &muon, const reco::Vertex &vtx, const MuonIDTypes &idType)
Definition: ZCounting.cc:439
std::string fMuonName
Definition: ZCounting.h:77
MonitorElement * h_mass_HLT_pass_forward
Definition: ZCounting.h:118
float sumPhotonEt
sum pt of PF photons
Strings const & triggerNames() const
Definition: TriggerNames.cc:24
double LumiMin_
Definition: ZCounting.h:101
double q2[4]
Definition: TauolaWrapper.h:88
std::bitset< kNTrigObjectBit > TriggerObjects
Definition: TriggerDefs.h:9
edm::InputTag fHLTTag
Definition: ZCounting.h:72
bool isLooseMuon(const reco::Muon &)
float sumNeutralHadronEt
sum pt of neutral hadrons
void Fill(long long x)
ParameterSetID const & parameterSetID() const
Definition: TriggerNames.cc:42
edm::EDGetTokenT< reco::TrackCollection > fTrackName_token
Definition: ZCounting.h:80
std::string IDTypestr_
Definition: ZCounting.h:85
const double MUON_MASS
Definition: ZCounting.h:113
edm::EDGetTokenT< reco::MuonCollection > fMuonName_token
Definition: ZCounting.h:78
double VtxRhoCut_
Definition: ZCounting.h:111
float sumPUPt
sum pt of charged Particles not from PV (for Pu corrections)
int iEvent
Definition: GenABIO.cc:230
MonitorElement * h_mass_Sta_pass_forward
Definition: ZCounting.h:128
edm::ParameterSetID fTriggerNamesID
Definition: ZCounting.h:70
unsigned int triggerIndex(std::string const &name) const
Definition: TriggerNames.cc:32
edm::EDGetTokenT< reco::VertexCollection > fPVName_token
Definition: ZCounting.h:76
unsigned int size() const
Get number of paths stored.
int PVBin_
Definition: ZCounting.h:104
std::bitset< kNTrigBit > TriggerBits
Definition: TriggerDefs.h:7
double VtxNTracksFitCut_
Definition: ZCounting.h:108
bool isMuonTrigger(const ZCountingTrigger::TTrigger &triggerMenu, const TriggerBits &hltBits)
Definition: ZCounting.cc:428
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
void initHLT(const edm::TriggerResults &, const edm::TriggerNames &)
Definition: ZCounting.cc:401
def pv(vc)
Definition: MetAnalyzer.py:6
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: ZCounting.cc:100
double VtxNdofCut_
Definition: ZCounting.h:109
bool isValid() const
Definition: HandleBase.h:74
MuonIDTypes IDType_
Definition: ZCounting.h:87
MonitorElement * h_npv
Definition: ZCounting.h:132
double PtCutL2_
Definition: ZCounting.h:92
MonitorElement * h_mass_Sta_fail_forward
Definition: ZCounting.h:130
void analyze(edm::Event const &e, edm::EventSetup const &eSetup) override
Definition: ZCounting.cc:139
const double MUON_BOUND
Definition: ZCounting.h:114
edm::EDGetTokenT< trigger::TriggerEvent > fHLTObjTag_token
Definition: ZCounting.h:73
void endLuminosityBlock(edm::LuminosityBlock const &lumi, edm::EventSetup const &eSetup) override
Definition: ZCounting.cc:392
MonitorElement * h_mass_SIT_fail_forward
Definition: ZCounting.h:125
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:277
T const * product() const
Definition: Handle.h:81
MonitorElement * book2D(Args &&...args)
Definition: DQMStore.h:133
double q1[4]
Definition: TauolaWrapper.h:87
bool pass(const std::string &iName, const TriggerBits &iTrig) const
Definition: TTrigger.cc:55
const MuonPFIsolation & pfIsolationR04() const
Definition: Muon.h:168
MonitorElement * h_mass_HLT_pass_central
Definition: ZCounting.h:117
int MassBin_
Definition: ZCounting.h:96
int LumiBin_
Definition: ZCounting.h:100
edm::EDGetTokenT< edm::TriggerResults > fHLTTag_token
Definition: ZCounting.h:74
~ZCounting() override
Definition: ZCounting.cc:81
MonitorElement * h_mass_HLT_fail_forward
Definition: ZCounting.h:120
std::vector< std::vector< std::string >::const_iterator > regexMatch(std::vector< std::string > const &strings, std::regex const &regexp)
Definition: RegexMatch.cc:30
void dqmBeginRun(edm::Run const &, edm::EventSetup const &) override
Definition: ZCounting.cc:89
HLT enums.
double EtaCutL1_
Definition: ZCounting.h:93
bool passMuonIso(const reco::Muon &muon, const MuonIsoTypes &isoType, const float isoCut)
Definition: ZCounting.cc:449
double MassMax_
Definition: ZCounting.h:98
std::pair< typename Association::data_type::first_type, double > match(Reference key, Association association, bool bestMatchByMaxValue)
Generic matching function.
Definition: Utils.h:10
double PVMax_
Definition: ZCounting.h:106
bool isTightMuon(const reco::Muon &, const reco::Vertex &)
double MassMin_
Definition: ZCounting.h:97
MonitorElement * h_mass_SIT_pass_central
Definition: ZCounting.h:122
std::unique_ptr< ZCountingTrigger::TTrigger > fTrigger
Definition: ZCounting.h:83
std::string IsoTypestr_
Definition: ZCounting.h:86
double EtaCutL2_
Definition: ZCounting.h:94
double PVMin_
Definition: ZCounting.h:105
edm::TriggerNames const & triggerNames(edm::TriggerResults const &triggerResults) const override
Definition: Event.cc:272
MonitorElement * h_mass_HLT_fail_central
Definition: ZCounting.h:119
bool isMuonTriggerObj(const ZCountingTrigger::TTrigger &triggerMenu, const TriggerObjects &hltMatchBits)
Definition: ZCounting.cc:434
const MuonIsolation & isolationR03() const
Definition: Muon.h:162
Definition: Run.h:43
double VtxAbsZCut_
Definition: ZCounting.h:110
float sumChargedHadronPt
sum-pt of charged Hadron