ATLAS Offline Software
DQTGlobalWZFinderTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // ********************************************************************
6 //
7 // NAME: DQTGlobalWZFinderTool.cxx
8 // PACKAGE: DataQualityTools
9 //
10 // AUTHORS: Jahred Adelman (jahred.adelman@cern.ch)
11 // Simon Viel (svielcern.ch)
12 // Sam King (samking@physics.ubc.ca)
13 // Koos van Nieuwkoop (jvannieu@cern.ch)
14 //
15 // ********************************************************************
16 
19 
20 #include "GaudiKernel/MsgStream.h"
21 #include "GaudiKernel/ITHistSvc.h"
22 
23 #include "xAODTracking/Vertex.h"
26 #include "xAODMuon/MuonContainer.h"
31 
32 #include "xAODJet/Jet.h"
33 #include "xAODJet/JetContainer.h"
34 
37 
38 #include <vector>
39 
40 #include "TProfile.h"
41 #include "LWHists/TH1F_LW.h"
42 #include "LWHists/TH2F_LW.h"
43 
44 using xAOD::Jet;
45 using xAOD::JetContainer;
46 using Gaudi::Units::GeV;
47 using Gaudi::Units::mm;
48 
49 //----------------------------------------------------------------------------------
51  const std::string & name,
52  const IInterface* parent)
54  m_muon_Pt(nullptr),
55  m_muon_Eta(nullptr),
56  m_ele_Et(nullptr),
57  m_ele_Eta(nullptr),
58  m_electronEtCut(25),
59  m_muonPtCut(25),
60  m_metCut(25),
61  m_zCutLow(66.0),
62  m_zCutHigh(116.0),
63  m_muonSelectionTool("CP::MuonSelectionTool/MuonSelectionTool"),
64  m_isolationSelectionTool("CP::IsolationSelectionTool/IsolationSelectionTool"),
65  m_Jpsi_mm_trigger{"CATEGORY_primary_bphys"},
66  m_Z_mm_trigger{"CATEGORY_monitoring_muonIso", "CATEGORY_monitoring_muonNonIso"},
67  m_Z_ee_trigger{"CATEGORY_primary_single_ele"}
68  // ,m_JetContainerKey("AntiKt4EMTopoJets")
69 //----------------------------------------------------------------------------------
70 
71 {
72  m_path = "GLOBAL/DQTGlobalWZFinder";
73  // declareProperty("JetCollectionName", m_JetContainerKey);
74  declareProperty("ElectronEtCut",m_electronEtCut);
75  declareProperty("MuonPtCut",m_muonPtCut);
76  declareProperty("MetCut",m_metCut);
77  declareProperty("ZCutLow", m_zCutLow);
78  declareProperty("ZCutHigh", m_zCutHigh);
79  declareProperty("doTrigger", m_doTrigger = 1);
80  declareProperty("ZmmTriggers", m_Z_mm_trigger);
81  declareProperty("ZeeTriggers", m_Z_ee_trigger);
82  declareProperty("MuonSelectionTool", m_muonSelectionTool);
83  declareProperty("IsolationSelectionTool", m_isolationSelectionTool);
84 
85  m_W_mt_ele = 0;
86  m_W_mt_mu = 0;
87  m_W_pt_v_met_ele = 0;
88  m_W_pt_v_met_mu = 0;
89  m_Z_mass_opsele = 0;
90  m_Z_mass_opsmu = 0;
91  m_Z_mass_ssele = 0;
92  m_Z_mass_ssmu = 0;
93  m_Z_Q_ele = 0;
94  m_Z_Q_mu = 0;
95  m_metHist = 0;
96  m_metPhiHist = 0;
97 
98  m_livetime_lb = nullptr;
99  m_lblength_lb = nullptr;
100  m_mu_lb = nullptr;
101  m_Z_ee_trig_ps = nullptr;
102  m_Z_mm_trig_ps = nullptr;
103 
104 
105 }
106 
107 
109  ATH_CHECK(m_muonSelectionTool.retrieve());
112  ATH_CHECK(m_MissingETContainerKey.initialize());
114  ATH_CHECK(m_MuonContainerKey.initialize());
115  ATH_CHECK(m_VertexContainerKey.initialize());
116  // ATH_CHECK(m_JetContainerKey.initialize());
118 }
119 
120 //----------------------------------------------------------------------------------
122 //----------------------------------------------------------------------------------
123 {
124 }
125 
127 {
131 
132  bool failure(false);
133 
134  std::string fullPathDQTGlobalWZFinder=m_path;
135 
136 
137  const EventContext& ctx = Gaudi::Hive::currentContext();
139  if(! thisEventInfo.isValid()) {
140  ATH_MSG_ERROR("Could not find EventInfo in evtStore()");
141  return StatusCode::FAILURE;
142  } else {
143  m_this_lb = thisEventInfo->lumiBlock() ;
144  }
145 
146  failure |= registerHist(fullPathDQTGlobalWZFinder, m_livetime_lb = new TProfile("m_livetime_lb", "Livetime", 1, m_this_lb-0.5, m_this_lb+0.5), lumiBlock, ATTRIB_UNMANAGED, "merge").isFailure();
147  failure |= registerHist(fullPathDQTGlobalWZFinder, m_lblength_lb = new TProfile("m_lblength_lb", "LB length", 1, m_this_lb-0.5, m_this_lb+0.5), lumiBlock, ATTRIB_UNMANAGED, "merge").isFailure();
148  failure |= registerHist(fullPathDQTGlobalWZFinder, m_mu_lb = new TProfile("m_mu_lb", "#mu", 1, m_this_lb-0.5, m_this_lb+0.5), lumiBlock, ATTRIB_UNMANAGED, "merge").isFailure();
149  failure |= registerHist(fullPathDQTGlobalWZFinder, m_Z_ee_trig_ps = new TProfile("m_Z_ee_trig_ps", "Z->ee trigger PS", 1, m_this_lb-0.5, m_this_lb+0.5), lumiBlock, ATTRIB_UNMANAGED, "merge").isFailure();
150  failure |= registerHist(fullPathDQTGlobalWZFinder, m_Z_mm_trig_ps = new TProfile("m_Z_mm_trig_ps", "Z->#mu#mu trigger PS", 1, m_this_lb-0.5, m_this_lb+0.5), lumiBlock, ATTRIB_UNMANAGED, "merge").isFailure();
151  failure |= registerHist(fullPathDQTGlobalWZFinder, m_ZBosonCounter_El = TH1F_LW::create("m_Z_Counter_el","Z to e e Count per Lumi Block", 1, m_this_lb-0.5, m_this_lb+0.5), lumiBlock, ATTRIB_UNMANAGED, "merge").isFailure();
152  failure |= registerHist(fullPathDQTGlobalWZFinder, m_ZBosonCounter_Mu = TH1F_LW::create("m_Z_Counter_mu","Z to mu mu Count per Lumi Block", 1, m_this_lb-0.5, m_this_lb+0.5), lumiBlock, ATTRIB_UNMANAGED, "merge").isFailure();
153 
154  if (!failure) {
158  }
159 
160  return (failure ? StatusCode::FAILURE : StatusCode::SUCCESS);
161 }
162 
163 //----------------------------------------------------------------------------------
165 //StatusCode DQTGlobalWZFinderTool::bookHistograms( bool isNewEventsBlock, bool isNewLumiBlock, bool isNewRun )
166 //----------------------------------------------------------------------------------
167 {
168  bool failure(false);
169 
170  MsgStream log(msgSvc(), name());
171 
172  //Initialize counters for rate monitors
173  for (int index =0 ; index < 2 ; index++) {
177 
181 
184  }
185 
186  //if (newRun) {
187  ATH_MSG_DEBUG("in bookHistograms() and m_doRunCosmics = " << m_doRunCosmics << " and m_doRunBeam = " << m_doRunBeam);
188  ATH_MSG_DEBUG("Using base path " << m_path);
189 
190  failure = bookDQTGlobalWZFinderTool();
191  //}
192  //else if (newEventsBlock || newLumiBlock) {
193  // return StatusCode::SUCCESS;
194  //}
195  if (failure) {return StatusCode::FAILURE;}
196  else {return StatusCode::SUCCESS;}
197 }
198 
199 
200 
201 //----------------------------------------------------------------------------------
203 //----------------------------------------------------------------------------------
204 {
205  bool failure(false);
206  // if (isNewEventsBlock || isNewLumiBlock || isNewRun) {
207  MsgStream log(msgSvc(), name());
208 
209  std::string fullPathDQTGlobalWZFinder=m_path;
210 
211  if (m_doRunBeam) {
212  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_W_mt_ele = TH1F_LW::create("m_W_mt_ele","W#rightarrowe#nu M_{T} ",40,20*1000,400*1000)).isFailure();
213  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_W_mt_mu = TH1F_LW::create("m_W_mt_mu","W#rightarrow#mu#nu M_{T} ",40,20*1000,400*1000)).isFailure();
214  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_W_pt_v_met_ele = TH2F_LW::create("m_W_pt_v_met_ele","W#rightarrowe#nu e E_{T} vs met ",100,5*1000,200*1000, 100, 5*1000, 200*1000)).isFailure();
215  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_W_pt_v_met_mu = TH2F_LW::create("m_W_pt_v_met_mu","W#rightarrow#mu#nu #mu p_{T} vs met ",100,5*1000,200*1000, 100, 5*1000, 200*1000)).isFailure();
216  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_metHist = TH1F_LW::create("m_metHist","MET",50,0*1000,500*1000)).isFailure();
217  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_metPhiHist = TH1F_LW::create("m_metPhiHist","MET phi",10,-1.6,1.6)).isFailure();
218  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_JPsi_mass_opsmu = TH1F_LW::create("m_JPsi_mass_opsmu","JPsi#rightarrow#mu#mu (op. sign) Mass ",40, 2600, 3600)).isFailure();
219  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_Upsilon_mass_opsmu = TH1F_LW::create("m_Upsilon_mass_opsmu", "Upsilon#rightarrow#mu#mu", 40, 4500, 14500)).isFailure();
220  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_Z_Q_ele = TH1F_LW::create("m_Z_Q_ele","Z#rightarrowee Charge ",7, -3, 3)).isFailure();
221  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_Z_Q_mu = TH1F_LW::create("m_Z_Q_mu","Z#rightarrow#mu#mu Charge ",7, -3, 3)).isFailure();
222  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_muon_Pt = TH1F_LW::create("m_muon_Pt", "Selected Muon p_{T}", 50, 0, 200)).isFailure();
223  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_muon_Eta = TH1F_LW::create("m_muon_Eta", "Selected Muon #eta", 50, -2.5, 2.5)).isFailure();
224  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_ele_Et = TH1F_LW::create("m_ele_Et", "Selected Electron E_{T}", 50, 0, 200)).isFailure();
225  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_ele_Eta = TH1F_LW::create("m_ele_Eta", "Selected Electron #eta", 50, -2.5, 2.5)).isFailure();
226 
227  int nzbins = int(ceilf( m_zCutHigh - m_zCutLow ));
228  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_Z_mass_opsele = TH1F_LW::create("m_Z_mass_opsele","Z#rightarrowee (op. sign) Mass ", nzbins, m_zCutLow*GeV, m_zCutHigh*GeV), lumiBlock).isFailure();
229  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_Z_mass_opsmu = TH1F_LW::create("m_Z_mass_opsmu","Z#rightarrow#mu#mu (op. sign) Mass ", nzbins, m_zCutLow*GeV, m_zCutHigh*GeV), lumiBlock).isFailure();
230  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_Z_mass_ssele = TH1F_LW::create("m_Z_mass_ssele","Z#rightarrowee (same sign) Mass ", nzbins, m_zCutLow*GeV, m_zCutHigh*GeV), lumiBlock).isFailure();
231  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_Z_mass_ssmu = TH1F_LW::create("m_Z_mass_ssmu","Z#rightarrow#mu#mu (same sign) Mass ", nzbins, m_zCutLow*GeV, m_zCutHigh*GeV), lumiBlock).isFailure();
232 
233  //Resonance particle rate monitoring
234  m_minLumiBlock = 0.0;
235  m_maxLumiBlock = 1200.0;
236  m_numBins = 30.0;
237  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_JPsiCounter_Mu = TH1F_LW::create("m_JPsi_Counter_mu", "JPsi to mu mu Count per Lumi Block", m_numBins, m_minLumiBlock+0.5, m_maxLumiBlock+0.5)).isFailure();
238  failure = failure | registerHist(fullPathDQTGlobalWZFinder, m_UpsilonCounter_Mu = TH1F_LW::create("m_Upsilon_Counter_mu", "Upsilon to mu mu Count per Lumi Block", m_numBins, m_minLumiBlock+0.5, m_maxLumiBlock+0.5)).isFailure();
239 
240  }
241 
242  if (failure) {
243  log << MSG::ERROR << "Error Booking histograms " << endmsg;
244  }
245 
246  return failure;
247 
248 }
249 
250 
251 //----------------------------------------------------------------------------------
253 //----------------------------------------------------------------------------------
254 {
255  MsgStream log(msgSvc(), name());
256 
257  if (m_doRunBeam) {
258  StatusCode sc = StatusCode::SUCCESS;
259 
260  //Get LumiBlock and EventNumber
262  if(! thisEventInfo.isValid()) {
263  ATH_MSG_ERROR("Could not find EventInfo in evtStore()");
264  return StatusCode::FAILURE;
265  } else {
266  m_this_lb = thisEventInfo->lumiBlock() ;
267  m_eventNumber = thisEventInfo->eventNumber();
268  }
269 
270  Float_t evtWeight = 1;
271  if (thisEventInfo->eventType(xAOD::EventInfo::IS_SIMULATION)) {
272  evtWeight = thisEventInfo->mcEventWeight();
273  ATH_MSG_DEBUG("Event Weight: " << evtWeight);
274  }
275 
276  //Get MET
277 
278  Double_t phiMet = 0, metMet = 0;
280  if ( missETcont.isValid() ) {
281  const xAOD::MissingET* missET = nullptr;
282  missET = (*missETcont)["FinalClus"];
283  if (!missET){
284  ATH_MSG_WARNING("Cannot retrieve xAOD::MissingET FinalClus");
285  }
286  else {
287  phiMet = missET->phi();
288  metMet = missET->met();
289  }
290  }
291  else {
292  ATH_MSG_WARNING("Cannot retrieve xAOD::MissingETContainer " << m_MissingETContainerKey);
293  }
294 
295  ATH_MSG_DEBUG(" MET = " << metMet << " and met phi = " << phiMet);
296 
297 
298  //Get Electrons
299 
301  if ( ! elecTES.isValid() ) {
302  ATH_MSG_ERROR("No electron container" << m_ElectronContainerKey << " found in evtStore");
303  return StatusCode::FAILURE;
304  }
305 
306  ATH_MSG_DEBUG("ElectronContainer successfully retrieved");
307 
308 
309  //Get Muons
310 
312  if (! muons.isValid() ) {
313  ATH_MSG_ERROR("evtStore() does not contain muon Collection with name "<< m_MuonContainerKey);
314  return StatusCode::FAILURE;
315  }
316 
317  ATH_MSG_DEBUG("Got muon collection!");
318 
319  std::vector<const xAOD::Electron*> goodelectrons;
320  std::vector<const xAOD::Muon*> goodmuonsZ;
321  std::vector<CLHEP::HepLorentzVector> goodmuonsJPsi;
322  std::vector<Int_t> goodmuonJPsicharge;
323 
324  //get primary vertex info
325  const xAOD::Vertex* pVtx(0);
327  if (vertices.isValid()) {
328  ATH_MSG_DEBUG("Collection with name " << m_VertexContainerKey << " with size " << vertices->size() << " found in evtStore()");
329  xAOD::VertexContainer::const_iterator vxItr = vertices->begin();
330  xAOD::VertexContainer::const_iterator vxItrE = vertices->end();
331  for (; vxItr != vxItrE; ++vxItr) {
332  //if (! ((*vxItr)->vxTrackAtVertexAvailable())) continue;
333  if ((*vxItr)->vertexType() == xAOD::VxType::PriVtx) {
334  pVtx = *vxItr;
335  }
336  }
337  } else {
338  ATH_MSG_WARNING("No collection with name " << m_VertexContainerKey << " found in evtStore()");
339  //return StatusCode::SUCCESS;
340  }
341 
342 
343 
344  //MET cleaning
345  bool isBad = false;
346 /*
347  const JetContainer* jetTES;
348  SG::ReadHandle<JetContainer> jetTES(m_JetContainerKey);
349  //std::string m_jetCollectionName = "AntiKt4TopoEMJets";
350  if (! jetTES.isValid()) {
351  log << MSG::WARNING << "Didn't find JetCollection" << endmsg;
352  return StatusCode::FAILURE;
353  }
354  ATH_MSG_DEBUG("JetCollection successfully retrieved");
355 */
356 
357 
358  // Electron Cut Flow
359  Int_t El_N = 0;
360  ATH_MSG_DEBUG("Start electron selection");
361 
362  //TLorentzVector* tlv_e = new TLorentzvector();
363  for (xAOD::ElectronContainer::const_iterator itr=elecTES->begin(); itr != elecTES->end(); ++itr) {
364  //Float_t eta = (*itr)->eta();
365  bool passSel = false;
366  if (!((*itr)->passSelection(passSel, "LHLoose"))) ATH_MSG_WARNING("Electron ID WP Not Defined");
367  auto elTrk = (*itr)->trackParticle();
368  if (!elTrk) {
369  ATH_MSG_WARNING("Electron with no track particle " << thisEventInfo->runNumber() << " " << thisEventInfo->eventNumber());
370  continue;
371  }
372  float d0sig;
373  try {
374  d0sig = xAOD::TrackingHelpers::d0significance(elTrk, thisEventInfo->beamPosSigmaX(), thisEventInfo->beamPosSigmaY(), thisEventInfo->beamPosSigmaXY());
375  } catch (...) {
376  ATH_MSG_DEBUG("Invalid beamspot - electron");
377  try {
379  } catch (...) {
380  ATH_MSG_WARNING("Ridiculous exception thrown - electron");
381  continue;
382  }
383  }
384  /*
385  ATH_MSG_INFO("Electron accept: " << passSel);
386  ATH_MSG_INFO("Electron eta: " << (*itr)->caloCluster()->etaBE(2));
387  ATH_MSG_INFO("Electron pt: " << (*itr)->pt() << " " << m_electronEtCut*GeV);
388  ATH_MSG_INFO("Electron iso: " << m_isolationSelectionTool->accept(**itr));
389  ATH_MSG_INFO("Electron d0sig: " << d0sig);
390  ATH_MSG_INFO("Electron Good vtx: " << pVtx);
391  if (pVtx)
392  ATH_MSG_INFO("Electron z0sinth: " << fabs((elTrk->z0()+elTrk->vz()-pVtx->z())*std::sin(elTrk->theta())) << " " << 0.5*mm);
393  ATH_MSG_INFO("Electron isBad: " << isBad);
394  */
395 
396  if ( ((*itr)->pt() > m_electronEtCut*GeV) &&
397  ((*itr)->caloCluster()->etaBE(2) < 2.47) &&
398  passSel &&
399  m_isolationSelectionTool->accept(**itr) &&
400  fabs(d0sig) < 5 &&
401  pVtx &&
402  fabs((elTrk->z0()+elTrk->vz()-pVtx->z())*std::sin(elTrk->theta())) < 0.5*mm &&
403  !isBad
404  ) {
405 
406  ATH_MSG_DEBUG("Good electron");
407  El_N++;
408 
409  m_ele_Et->Fill((*itr)->pt()/GeV, evtWeight);
410  m_ele_Eta->Fill((*itr)->eta(), evtWeight);
411  goodelectrons.push_back(*itr);
412 
413  }
414  }
415 
416  // Muon Cut Flow
417 
418  Int_t MuZ_N = 0;
419  Int_t MuJPsi_N = 0;
420  ATH_MSG_DEBUG("Start muon selection");
421 
422  for (const auto muonItr : *muons) {
423  Float_t minptCutJPsi(1.0*GeV);
424  auto muTrk = (muonItr)->primaryTrackParticle();
425  float d0sig;
426  if (!muTrk) {
427  ATH_MSG_WARNING("No muon track! " << thisEventInfo->runNumber() << " " << thisEventInfo->eventNumber());
428  continue;
429  }
430  try {
431  d0sig = xAOD::TrackingHelpers::d0significance(muTrk, thisEventInfo->beamPosSigmaX(), thisEventInfo->beamPosSigmaY(), thisEventInfo->beamPosSigmaXY());
432  } catch (...) {
433  ATH_MSG_DEBUG("Invalid beamspot - muon");
434  try {
436  } catch (...) {
437  ATH_MSG_WARNING("Ridiculous exception thrown - muon");
438  continue;
439  }
440  }
441 
442 
443  ATH_MSG_DEBUG("Muon accept: " << static_cast<bool>(m_muonSelectionTool->accept(*muonItr)));
444  ATH_MSG_DEBUG("Muon pt: " << muonItr->pt() << " " << m_muonPtCut*GeV);
445  ATH_MSG_DEBUG("Muon iso: " << static_cast<bool> (m_isolationSelectionTool->accept(*muonItr)));
446  ATH_MSG_DEBUG("Muon d0sig: " << d0sig);
447  ATH_MSG_DEBUG("Muon Good vtx: " << pVtx);
448  if (pVtx)
449  ATH_MSG_DEBUG("Muon z0sinth: " << fabs((muTrk->z0()+muTrk->vz()-pVtx->z())*std::sin(muTrk->theta())) << " " << 0.5*mm);
450  ATH_MSG_DEBUG("Muon isBad: " << isBad);
451 
452  if ( m_muonSelectionTool->accept(*muonItr) &&
453  (muonItr->pt() > m_muonPtCut*GeV) &&
454  m_isolationSelectionTool->accept(*muonItr) &&
455  fabs(d0sig) < 3 &&
456  pVtx &&
457  fabs((muTrk->z0()+muTrk->vz()-pVtx->z())*std::sin(muTrk->theta())) < 0.5*mm &&
458  !isBad
459  ) {
460 
461  MuZ_N++;
462 
463  m_muon_Pt->Fill((muonItr)->pt()/GeV, evtWeight);
464  m_muon_Eta->Fill((muonItr)->eta(), evtWeight);
465  goodmuonsZ.push_back(muonItr);
466  }
467  if ( ((muonItr)->pt() > minptCutJPsi) ) {
468  MuJPsi_N++;
469 
470  Float_t px = (muonItr)->p4().Px();
471  Float_t py = (muonItr)->p4().Py();
472  Float_t pz = (muonItr)->p4().Pz();
473  Float_t e = (muonItr)->p4().E();
474  Int_t charge = 0;//(Int_t)((muonItr)->charge()); // TODO update when xAODMuon-00-06-00
475 
476  CLHEP::HepLorentzVector thislepton;
477  thislepton.setPx(px);
478  thislepton.setPy(py);
479  thislepton.setPz(pz);
480  thislepton.setE(e);
481  goodmuonsJPsi.push_back(thislepton);
482  goodmuonJPsicharge.push_back(charge);
483 
484  }
485 
486 
487  }
488 
489 
490  // Check Sum of Candidate Leptons, Return if None
491 
492 
493  ATH_MSG_DEBUG("Candidate e+mu = " << El_N+MuZ_N+MuJPsi_N);
494  if ((El_N + MuZ_N + MuJPsi_N) < 1) return sc;
495 
496  // Sort Candidates by Pt
497 
498 
499  const xAOD::Electron* leadingEle(0);
500  const xAOD::Electron* subleadingEle(0);
501  const xAOD::Muon* leadingMuZ(0);
502  const xAOD::Muon* subleadingMuZ(0);
503  CLHEP::HepLorentzVector leadingMuJPsi;
504  CLHEP::HepLorentzVector subleadingMuJPsi;
505 
506  leadingMuJPsi.setPerp(0);
507  subleadingMuJPsi.setPerp(0);
508 
509  Int_t leadingMuJPsicharge = 0;
510  Int_t subleadingMuJPsicharge = 0;
511 
512 
513  ATH_MSG_DEBUG("Beginning ele loop");
514  for (UInt_t iEle = 0; iEle < goodelectrons.size(); iEle++) {
515  Float_t pt = goodelectrons[iEle]->pt();
516  ATH_MSG_DEBUG("Ele pt " << pt);
517  if (! leadingEle || pt > leadingEle->pt()) {
518  subleadingEle = leadingEle;
519  leadingEle = goodelectrons[iEle];
520  }
521  else if (! subleadingEle || pt > subleadingEle->pt()) {
522  subleadingEle = goodelectrons[iEle];
523  }
524  }
525  ATH_MSG_DEBUG("Done ele loop");
526  ATH_MSG_DEBUG("Start mu Z loop");
527  for (UInt_t iMu = 0; iMu < goodmuonsZ.size(); iMu++) {
528  Float_t pt = goodmuonsZ[iMu]->pt();
529  if (! leadingMuZ || pt > leadingMuZ->pt()) {
530  subleadingMuZ = leadingMuZ;
531  leadingMuZ = goodmuonsZ[iMu];
532  }
533  else if (! subleadingMuZ || pt > subleadingMuZ->pt()) {
534  subleadingMuZ = goodmuonsZ[iMu];
535  }
536  }
537  ATH_MSG_DEBUG("Done mu Z loop");
538  ATH_MSG_DEBUG("Start mu J/psi loop");
539  for (UInt_t iMu = 0; iMu < goodmuonsJPsi.size(); iMu++) {
540  Float_t pt = goodmuonsJPsi[iMu].perp();
541  if (pt > leadingMuJPsi.perp()) {
542  subleadingMuJPsi = leadingMuJPsi;
543  subleadingMuJPsicharge = leadingMuJPsicharge;
544  leadingMuJPsi = goodmuonsJPsi[iMu];
545  leadingMuJPsicharge = goodmuonJPsicharge[iMu];
546  }
547  else if (pt > subleadingMuJPsi.perp()) {
548  subleadingMuJPsi = goodmuonsJPsi[iMu];
549  subleadingMuJPsicharge = goodmuonJPsicharge[iMu];
550  }
551  }
552  ATH_MSG_DEBUG("End mu J/psi loop");
553 
554  ATH_MSG_DEBUG("Fill MET");
555  //MET histograms
556  m_metHist->Fill(metMet, evtWeight);
557  m_metPhiHist->Fill(phiMet, evtWeight);
558  ATH_MSG_DEBUG("End MET");
559 
560  // Z Mass
561 
562  bool isZee = (goodelectrons.size() > 1);
563  bool isZmumu = (goodmuonsZ.size() > 1);
564  bool isJPsimumu = (goodmuonsJPsi.size() > 1);
565  ATH_MSG_DEBUG("Evaluated Event");
566 
567  if (isZee && trigChainsArePassed(m_Z_ee_trigger)) {
568  ATH_MSG_DEBUG("Zee found");
569  TLorentzVector Zee = (leadingEle->p4() + subleadingEle->p4());
570  Float_t mass = Zee.M();
571  Int_t Zeecharge = leadingEle->charge() + subleadingEle->charge();
572 
573  if (mass > m_zCutLow*GeV && mass < m_zCutHigh*GeV ) {
574  m_Z_Q_ele->Fill(Zeecharge, evtWeight);
575  ATH_MSG_DEBUG( "Found a Z to ee candidate! Mass = " << mass << ", and charge = " << Zeecharge );
576  if (Zeecharge == 0) {
577  m_Z_mass_opsele->Fill(mass, evtWeight);
578  m_ZBosonCounter_El->Fill(m_this_lb, evtWeight);
580  } else {
581  m_Z_mass_ssele->Fill(mass, evtWeight);
582  }
583  }
584  }
585 
586  if (isZmumu && trigChainsArePassed(m_Z_mm_trigger)) {
587  ATH_MSG_DEBUG("Zmumu found");
588  TLorentzVector Zmumu = leadingMuZ->p4() + subleadingMuZ->p4();
589  Float_t mass = Zmumu.M();
590  Int_t Zmumucharge = leadingMuZ->charge() + subleadingMuZ->charge();
591 
592  if (mass > m_zCutLow*GeV && mass < m_zCutHigh*GeV) {
593  m_Z_Q_mu->Fill(Zmumucharge, evtWeight);
594  ATH_MSG_DEBUG("Found a Z to mumu candidate! Mass = " << mass << ", and charge = " << Zmumucharge);
595  if (Zmumucharge == 0) {
596  m_Z_mass_opsmu->Fill(mass, evtWeight);
597  m_ZBosonCounter_Mu->Fill(m_this_lb, evtWeight);
599  } else {
600  m_Z_mass_ssmu->Fill(mass, evtWeight);
601  }
602  }
603  }
604 
605 
606  //JPsi and Upsilon counter
607  if (isJPsimumu && trigChainsArePassed(m_Jpsi_mm_trigger)) {
608  ATH_MSG_DEBUG("Jpsi mm found");
609  CLHEP::HepLorentzVector JPsimumu = leadingMuJPsi + subleadingMuJPsi;
610  Float_t mass = JPsimumu.m();
611  Int_t JPsimumucharge = leadingMuJPsicharge + subleadingMuJPsicharge;
612 
613 
614  if (JPsimumucharge == 0) {
615  m_JPsi_mass_opsmu->Fill(mass, evtWeight);
616  m_Upsilon_mass_opsmu->Fill(mass, evtWeight);
617 
618 
619 
620  if (mass > 3038 && mass < 3156) {
621  ++m_JPsiCounterSBG[0];
622  if(m_doTrigger) {
623  ATH_MSG_DEBUG("ABOUT TO DO BAD THINGS");
624  //ATH_MSG_DEBUG("Pointer?" << getTrigDecTool());
626  ++m_JPsiCounterSBG[1];
627  }
628  }
629  }
630  if ((mass > 2802 && mass < 2920) || (mass > 3274 && mass < 3391)) {
631  ++m_JPsiCounter2BG[0];
632  if(m_doTrigger) {
633  //if( m_trigDecTool->isPassed("EF_2mu6_Jpsimumu") ) {
634  // ++JPsiCounter2BG[1];
635  //}
636  }
637  }
638  //assuming JPsi mass of 3 097 MeV and range of 2 sigma (sigma = 59 MeV, based on root best fit of distribution)
639  if (mass > 8242 && mass < 10678) {
640  ++m_UpsilonCounterSBG[0];
641  if(m_doTrigger) {
642  //if( m_trigDecTool->isPassed("EF_2mu6_Upsimumu") ) {
643  // ++UpsilonCounterSBG[1];
644  //}
645  }
646  }
647  if ((mass > 4588 && mass < 5806) || (mass > 13114 && mass < 14332)) {
648  ++m_UpsilonCounterBG[0];
649  if(m_doTrigger) {
650  //if( m_trigDecTool->isPassed("EF_2mu6_Upsimumu") ) {
651  // ++UpsilonCounterBG[1];
652  //}
653  }
654  }
655  //assuming Upsilon mass of 9 460 MeV and range of 2 sigma (sigma = 1218 MeV)
656 
657 
658  }
659  //else {
660  // m_Z_mass_ssmu->Fill(mass);
661  //}
662  ATH_MSG_DEBUG("Found a JPsi/Upsilon to mumu candidate! Mass = " << mass << ", and charge = " << JPsimumucharge);
663  }
664 
665  // W Transverse Mass
666 
667  Float_t metx = metMet*cos(phiMet);
668  Float_t mety = metMet*sin(phiMet);
669  Float_t mtCut = 40*GeV;
670 
671  bool isWenu = ((goodelectrons.size() > 0) && (metMet > m_metCut*GeV) && !isZee);
672  bool isWmunu = ((goodmuonsZ.size() > 0) && (metMet > m_metCut*GeV) && !isZmumu);
673 
674 
675  if (isWenu) {
676  ATH_MSG_DEBUG("Wenu found " << leadingEle);
677  Float_t px = leadingEle->p4().Px();
678  Float_t py = leadingEle->p4().Py();
679  Float_t pz = leadingEle->p4().Pz();
680  Float_t p = sqrt(px*px+py*py+pz*pz);
681  Float_t et = leadingEle->e()*leadingEle->pt()/p;
682  Float_t mt = sqrt(2*(et*metMet-px*metx-py*mety));
683 
684  if (mt > mtCut)
685  {
686  m_W_pt_v_met_ele->Fill(leadingEle->pt(), metMet, evtWeight);
687  m_W_mt_ele->Fill(mt, evtWeight);
688  ATH_MSG_DEBUG("Found a W to enu candidate! M_T = " << mt << ", and MET = " << metMet << ", and ele_pt = " << leadingEle->pt());
689  }
690  }
691 
692  if (isWmunu) {
693  ATH_MSG_DEBUG("Wmunu found");
694  Float_t px = leadingMuZ->p4().Px();
695  Float_t py = leadingMuZ->p4().Py();
696  Float_t pz = leadingMuZ->p4().Pz();
697  Float_t p = sqrt(px*px+py*py+pz*pz);
698  Float_t et = leadingMuZ->e()*leadingMuZ->pt()/p;
699  Float_t mt = sqrt(2*(et*metMet-px*metx-py*mety));
700 
701  if (mt > mtCut)
702  {
703  m_W_pt_v_met_mu->Fill(leadingMuZ->pt(), metMet, evtWeight);
704  m_W_mt_mu->Fill(mt, evtWeight);
705  ATH_MSG_DEBUG("Found a W to munu candidate! M_T = " << mt << ", and MET = " << metMet << ", and mu_pt = " << leadingMuZ->pt());
706  }
707  }
708 
709  return sc;
710 
711  } //end ifBeam
712 
713  return StatusCode::SUCCESS;
714 }
715 
716 //----------------------------------------------------------------------------------
718 //StatusCode DQTGlobalWZFinderTool::procHistograms( bool isEndOfEventsBlock, bool isEndOfLumiBlock, bool isEndOfRun )
719 //----------------------------------------------------------------------------------
720 {
721  //if ( endOfEventsBlock || endOfLumiBlock || endOfRun ) {
722  if ( endOfLumiBlockFlag() || endOfRunFlag() ) {
723  MsgStream log(msgSvc(), name());
724 
725  ATH_MSG_DEBUG("in finalHists()");
726  }
727 
728 
729  //---Filling rate monitoring histograms---//
730  if (endOfLumiBlockFlag()) {
733 
736 
737  if (m_doRunBeam) {
738  //Map lumiBlock to corresponding bin
739  int binNumber = int((m_this_lb-0.50)/((m_maxLumiBlock - m_minLumiBlock)/m_numBins))+1;
740 
741  //JPsi->mu mu
742  if(m_JPsiCounterSignal[0] < 0) {
743  m_JPsiCounterSignal[0] = 0;
744  }
745  if(m_JPsiCounterSignal[1] < 0) {
746  m_JPsiCounterSignal[1] = 0;
747  }
748 
749  for(int i = 0 ; i < m_JPsiCounterSignal[0] ; i++) {
751  }
752  m_JPsiCounter_Mu->SetBinError(binNumber, TMath::Sqrt(m_JPsiCounter_Mu->GetBinContent( binNumber)));
753 
754  //Upsilon->mu mu
755  if(m_UpsilonCounterSignal[0] < 0) {
757  }
758  if(m_UpsilonCounterSignal[1] < 0) {
760  }
761 
762  for(int i = 0 ; i < m_UpsilonCounterSignal[0] ; i++) {
764  }
765  m_UpsilonCounter_Mu->SetBinError(binNumber, TMath::Sqrt(m_UpsilonCounter_Mu->GetBinContent( binNumber)));
766 
767  //Z->e e
768  if(m_ZBosonCounterSBG_El[0] < 0) {
769  m_ZBosonCounterSBG_El[0] = 0;
770  }
771  if(m_ZBosonCounterSBG_El[1] < 0) {
772  m_ZBosonCounterSBG_El[1] = 0;
773  }
774  }
775  for (int index =0 ; index < 2 ; index++) {
780 
784 
787  }
788  }
789 
790 
791 
792 
793 
794  return StatusCode::SUCCESS;
795 }
796 
797 //----------------------------------------------------------------------------------
799 //----------------------------------------------------------------------------------
800 {
801  MsgStream log(msgSvc(), name());
802 
803  ATH_MSG_DEBUG("in checkHists()");
804 
805  return StatusCode::SUCCESS;
806 }
807 
TH2F_LW::Fill
virtual void Fill(const double &x, const double &y) override
Definition: TH2F_LW.cxx:329
DQTGlobalWZFinderTool::m_metPhiHist
TH1F_LW * m_metPhiHist
Definition: DQTGlobalWZFinderTool.h:72
Jet.h
TH1F_LW.h
ManagedMonitorToolBase::m_path
std::string m_path
Definition: ManagedMonitorToolBase.h:915
et
Extra patterns decribing particle interation process.
TH2F_LW.h
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
xAOD::Electron_v1::charge
float charge() const
Obtain the charge of the object.
DataQualityFatherMonTool::m_doRunCosmics
bool m_doRunCosmics
Definition: DataQualityFatherMonTool.h:77
test_pyathena.px
px
Definition: test_pyathena.py:18
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
TH1F_LW::SetBinError
virtual void SetBinError(unsigned bin, const double &) override
Definition: TH1F_LW.cxx:268
TrackParticlexAODHelpers.h
DQTGlobalWZFinderTool::m_ElectronContainerKey
SG::ReadHandleKey< xAOD::ElectronContainer > m_ElectronContainerKey
Definition: DQTGlobalWZFinderTool.h:143
TH1F_LW::Fill
virtual void Fill(const double &x) override
Definition: TH1F_LW.cxx:246
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
DQTGlobalWZFinderTool::m_zCutLow
Float_t m_zCutLow
Definition: DQTGlobalWZFinderTool.h:127
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
ManagedMonitorToolBase::lumiBlock
@ lumiBlock
Definition: ManagedMonitorToolBase.h:114
TH1F_LW::create
static TH1F_LW * create(const char *name, const char *title, unsigned nbinsx, const double &xlow, const double &xup)
Definition: TH1F_LW.cxx:33
xAOD::Muon_v1::p4
virtual FourMom_t p4() const
The full 4-momentum of the particle.
Definition: Muon_v1.cxx:79
DQTGlobalWZFinderTool::procHistograms
virtual StatusCode procHistograms()
An inheriting class should either override this function or finalHists().
Definition: DQTGlobalWZFinderTool.cxx:717
DQTGlobalWZFinderTool::m_lblength_lb
TProfile * m_lblength_lb
Definition: DQTGlobalWZFinderTool.h:86
DQTGlobalWZFinderTool::m_Jpsi_mm_trigger
std::vector< std::string > m_Jpsi_mm_trigger
Definition: DQTGlobalWZFinderTool.h:134
DQTGlobalWZFinderTool::m_ZBosonCounter_Mu
TH1F_LW * m_ZBosonCounter_Mu
Definition: DQTGlobalWZFinderTool.h:104
DataQualityFatherMonTool::registerHist
StatusCode registerHist(const std::string &path, TH1 *h1, Interval_t interval=run, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &merge_algo="")
Definition: DataQualityFatherMonTool.cxx:245
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:79
DQTGlobalWZFinderTool::m_UpsilonCounterBG
int m_UpsilonCounterBG[2]
Definition: DQTGlobalWZFinderTool.h:112
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
index
Definition: index.py:1
xAOD::Egamma_v1::e
virtual double e() const override final
The total energy of the particle.
Definition: Egamma_v1.cxx:90
ManagedMonitorToolBase::endOfLumiBlockFlag
bool endOfLumiBlockFlag() const
Definition: ManagedMonitorToolBase.h:858
DQTGlobalWZFinderTool::m_MissingETContainerKey
SG::ReadHandleKey< xAOD::MissingETContainer > m_MissingETContainerKey
Definition: DQTGlobalWZFinderTool.h:141
xAOD::MissingET_v1::phi
float phi() const
Returns .
xAOD::TrackingHelpers::d0significance
double d0significance(const xAOD::TrackParticle *tp, double d0_uncert_beam_spot_2)
Definition: TrackParticlexAODHelpers.cxx:42
DQTGlobalWZFinderTool.h
ManagedMonitorToolBase::lbDuration
virtual double lbDuration(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Luminosity block time (in seconds)
Definition: ManagedMonitorToolBase.cxx:2047
DQTGlobalWZFinderTool::m_Z_Q_mu
TH1F_LW * m_Z_Q_mu
Definition: DQTGlobalWZFinderTool.h:81
test_pyathena.pt
pt
Definition: test_pyathena.py:11
xAOD::EventInfo_v1::beamPosSigmaX
float beamPosSigmaX() const
The width of the beam spot in the X direction.
DQTGlobalWZFinderTool::m_VertexContainerKey
SG::ReadHandleKey< xAOD::VertexContainer > m_VertexContainerKey
Definition: DQTGlobalWZFinderTool.h:147
xAOD::Egamma_v1::p4
virtual FourMom_t p4() const override final
The full 4-momentum of the particle as a TLoretzVector.
Definition: Egamma_v1.cxx:98
DQTGlobalWZFinderTool::m_EventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_EventInfoKey
Definition: DQTGlobalWZFinderTool.h:139
DQTGlobalWZFinderTool::m_Z_mass_opsmu
TH1F_LW * m_Z_mass_opsmu
Definition: DQTGlobalWZFinderTool.h:75
DQTGlobalWZFinderTool::m_JPsiCounter_Mu
TH1F_LW * m_JPsiCounter_Mu
Definition: DQTGlobalWZFinderTool.h:101
DQTGlobalWZFinderTool::m_ZBosonCounterSBG_El
int m_ZBosonCounterSBG_El[2]
Definition: DQTGlobalWZFinderTool.h:115
drawFromPickle.cos
cos
Definition: drawFromPickle.py:36
DQTGlobalWZFinderTool::m_this_lb
int m_this_lb
Definition: DQTGlobalWZFinderTool.h:121
DQTGlobalWZFinderTool::m_Z_ee_trigger
std::vector< std::string > m_Z_ee_trigger
Definition: DQTGlobalWZFinderTool.h:136
xAOD::EventInfo_v1::IS_SIMULATION
@ IS_SIMULATION
true: simulation, false: data
Definition: EventInfo_v1.h:151
DQTGlobalWZFinderTool::fillHistograms
virtual StatusCode fillHistograms()
An inheriting class should either override this function or fillHists().
Definition: DQTGlobalWZFinderTool.cxx:252
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
dqt_zlumi_pandas.mass
mass
Definition: dqt_zlumi_pandas.py:170
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
DQTGlobalWZFinderTool::bookHistograms
virtual StatusCode bookHistograms()
An inheriting class should either override this function or bookHists().
Definition: DQTGlobalWZFinderTool.cxx:164
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
DQTGlobalWZFinderTool::bookDQTGlobalWZFinderTool
bool bookDQTGlobalWZFinderTool()
Definition: DQTGlobalWZFinderTool.cxx:202
DQTGlobalWZFinderTool::m_JPsiCounter2BG
int m_JPsiCounter2BG[2]
Definition: DQTGlobalWZFinderTool.h:108
xAOD::Muon_v1::charge
float charge() const
IMuonSelectionTool.h
DQTGlobalWZFinderTool::m_doTrigger
bool m_doTrigger
Definition: DQTGlobalWZFinderTool.h:129
DQTGlobalWZFinderTool::m_mu_lb
TProfile * m_mu_lb
Definition: DQTGlobalWZFinderTool.h:87
DQTGlobalWZFinderTool::m_Upsilon_mass_opsmu
TH1F_LW * m_Upsilon_mass_opsmu
Definition: DQTGlobalWZFinderTool.h:77
ManagedMonitorToolBase::trigChainsArePassed
virtual bool trigChainsArePassed(std::vector< std::string > &)
Definition: ManagedMonitorToolBase.cxx:2325
DQTGlobalWZFinderTool::m_metCut
Float_t m_metCut
Definition: DQTGlobalWZFinderTool.h:126
ManagedMonitorToolBase::lbAverageLivefraction
virtual float lbAverageLivefraction(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Average luminosity livefraction.
Definition: ManagedMonitorToolBase.cxx:1993
DQTGlobalWZFinderTool::m_W_pt_v_met_ele
TH2F_LW * m_W_pt_v_met_ele
Definition: DQTGlobalWZFinderTool.h:68
DQTGlobalWZFinderTool::m_MuonContainerKey
SG::ReadHandleKey< xAOD::MuonContainer > m_MuonContainerKey
Definition: DQTGlobalWZFinderTool.h:145
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
StdJOSetup.msgSvc
msgSvc
Provide convenience handles for various services.
Definition: StdJOSetup.py:36
lumiFormat.i
int i
Definition: lumiFormat.py:92
DataQualityFatherMonTool
Definition: DataQualityFatherMonTool.h:38
python.TrigEgammaMonitorHelper.TProfile
def TProfile(*args, **kwargs)
Definition: TrigEgammaMonitorHelper.py:81
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
DQTGlobalWZFinderTool::m_muonPtCut
Float_t m_muonPtCut
Definition: DQTGlobalWZFinderTool.h:125
DQTGlobalWZFinderTool::m_minLumiBlock
float m_minLumiBlock
Definition: DQTGlobalWZFinderTool.h:97
m_path
std::string m_path
the path being used
Definition: OutputStreamData.cxx:88
AthAlgTool.h
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:571
DQTGlobalWZFinderTool::bookHistogramsRecurrent
virtual StatusCode bookHistogramsRecurrent()
An inheriting class should either override this function, bookHists() or bookHistograms().
Definition: DQTGlobalWZFinderTool.cxx:126
ManagedMonitorToolBase::ATTRIB_UNMANAGED
@ ATTRIB_UNMANAGED
Definition: ManagedMonitorToolBase.h:131
Amg::pz
@ pz
Definition: GeoPrimitives.h:40
test_pyathena.parent
parent
Definition: test_pyathena.py:15
xAOD::MissingET_v1
Principal data object for Missing ET.
Definition: MissingET_v1.h:25
xAOD::Muon_v1::pt
virtual double pt() const
The transverse momentum ( ) of the particle.
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
DQTGlobalWZFinderTool::m_W_mt_mu
TH1F_LW * m_W_mt_mu
Definition: DQTGlobalWZFinderTool.h:67
DQTGlobalWZFinderTool::m_ZBosonCounter_El
TH1F_LW * m_ZBosonCounter_El
Definition: DQTGlobalWZFinderTool.h:103
xAOD::Vertex_v1::z
float z() const
Returns the z position.
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DQTGlobalWZFinderTool::m_ele_Et
TH1F_LW * m_ele_Et
Definition: DQTGlobalWZFinderTool.h:93
Vertex.h
xAOD::EventInfo_v1::lumiBlock
uint32_t lumiBlock() const
The current event's luminosity block number.
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
DQTGlobalWZFinderTool::m_muonSelectionTool
ToolHandle< CP::IMuonSelectionTool > m_muonSelectionTool
Definition: DQTGlobalWZFinderTool.h:130
xAOD::EventInfo_v1::beamPosSigmaY
float beamPosSigmaY() const
The width of the beam spot in the Y direction.
DQTGlobalWZFinderTool::m_Z_mass_ssele
TH1F_LW * m_Z_mass_ssele
Definition: DQTGlobalWZFinderTool.h:78
Amg::py
@ py
Definition: GeoPrimitives.h:39
MissingET.h
TH1F_LW::GetBinContent
virtual double GetBinContent(unsigned bin) const override
Definition: TH1F_LW.cxx:265
DQTGlobalWZFinderTool::m_ZBosonCounterSBG_Mu
int m_ZBosonCounterSBG_Mu[2]
Definition: DQTGlobalWZFinderTool.h:116
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
DataQualityFatherMonTool::m_doRunBeam
bool m_doRunBeam
Definition: DataQualityFatherMonTool.h:78
TH2F_LW::create
static TH2F_LW * create(const char *name, const char *title, unsigned nbinsx, const double &xmin, const double &xmax, unsigned nbinsy, const double &ymin, const double &ymax)
Definition: TH2F_LW.cxx:33
IIsolationSelectionTool.h
DataQualityFatherMonTool::initialize
virtual StatusCode initialize()
Definition: DataQualityFatherMonTool.cxx:43
charge
double charge(const T &p)
Definition: AtlasPID.h:494
DQTGlobalWZFinderTool::m_Z_ee_trig_ps
TProfile * m_Z_ee_trig_ps
Definition: DQTGlobalWZFinderTool.h:88
DQTGlobalWZFinderTool::m_zCutHigh
Float_t m_zCutHigh
Definition: DQTGlobalWZFinderTool.h:128
DQTGlobalWZFinderTool::m_JPsi_mass_opsmu
TH1F_LW * m_JPsi_mass_opsmu
Definition: DQTGlobalWZFinderTool.h:76
DQTGlobalWZFinderTool::m_electronEtCut
Float_t m_electronEtCut
Definition: DQTGlobalWZFinderTool.h:124
ManagedMonitorToolBase::updateTriggersForGroups
void updateTriggersForGroups(std::vector< std::string > &)
Definition: ManagedMonitorToolBase.cxx:2363
xAOD::Electron_v1
Definition: Electron_v1.h:34
DQTGlobalWZFinderTool::m_W_mt_ele
TH1F_LW * m_W_mt_ele
Definition: DQTGlobalWZFinderTool.h:66
EventInfo.h
MuonContainer.h
DQTGlobalWZFinderTool::checkHists
virtual StatusCode checkHists(bool fromFinalize)
This implementation does nothing; equivalent functionality may be provided by procHists(....
Definition: DQTGlobalWZFinderTool.cxx:798
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
TrackParticle.h
DeMoScan.index
string index
Definition: DeMoScan.py:362
VertexContainer.h
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
xAOD::EventInfo_v1::beamPosSigmaXY
float beamPosSigmaXY() const
The beam spot shape's X-Y correlation.
TProfile::Fill
int Fill(double, double)
Definition: rootspy.cxx:523
xAOD::Vertex_v1
Class describing a Vertex.
Definition: Vertex_v1.h:42
JetContainer.h
DQTGlobalWZFinderTool::m_UpsilonCounterSignal
int m_UpsilonCounterSignal[2]
Definition: DQTGlobalWZFinderTool.h:113
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
ManagedMonitorToolBase::endOfRunFlag
bool endOfRunFlag() const
Definition: ManagedMonitorToolBase.h:859
DQTGlobalWZFinderTool::m_Z_mass_opsele
TH1F_LW * m_Z_mass_opsele
Definition: DQTGlobalWZFinderTool.h:74
DQTGlobalWZFinderTool::m_UpsilonCounterSBG
int m_UpsilonCounterSBG[2]
Definition: DQTGlobalWZFinderTool.h:111
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DQTGlobalWZFinderTool::m_Z_Q_ele
TH1F_LW * m_Z_Q_ele
Definition: DQTGlobalWZFinderTool.h:80
DQTGlobalWZFinderTool::m_muon_Eta
TH1F_LW * m_muon_Eta
Definition: DQTGlobalWZFinderTool.h:92
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
DQTGlobalWZFinderTool::~DQTGlobalWZFinderTool
~DQTGlobalWZFinderTool()
Definition: DQTGlobalWZFinderTool.cxx:121
xAOD::Egamma_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: Egamma_v1.cxx:65
DQTGlobalWZFinderTool::m_Z_mass_ssmu
TH1F_LW * m_Z_mass_ssmu
Definition: DQTGlobalWZFinderTool.h:79
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
DQTGlobalWZFinderTool::initialize
StatusCode initialize()
Definition: DQTGlobalWZFinderTool.cxx:108
DQTGlobalWZFinderTool::m_JPsiCounterSignal
int m_JPsiCounterSignal[2]
Definition: DQTGlobalWZFinderTool.h:109
DQTGlobalWZFinderTool::m_livetime_lb
TProfile * m_livetime_lb
Definition: DQTGlobalWZFinderTool.h:85
DQTGlobalWZFinderTool::m_Z_mm_trigger
std::vector< std::string > m_Z_mm_trigger
Definition: DQTGlobalWZFinderTool.h:135
xAOD::Muon_v1::e
virtual double e() const
The total energy of the particle.
Definition: Muon_v1.cxx:57
DQTGlobalWZFinderTool::m_Z_mm_trig_ps
TProfile * m_Z_mm_trig_ps
Definition: DQTGlobalWZFinderTool.h:89
xAOD::EventInfo_v1::mcEventWeight
float mcEventWeight(size_t i=0) const
The weight of one specific MC event used in the simulation.
Definition: EventInfo_v1.cxx:203
xAOD::JetContainer
JetContainer_v1 JetContainer
Definition of the current "jet container version".
Definition: JetContainer.h:17
DQTGlobalWZFinderTool::m_isolationSelectionTool
ToolHandle< CP::IIsolationSelectionTool > m_isolationSelectionTool
Definition: DQTGlobalWZFinderTool.h:131
drawFromPickle.sin
sin
Definition: drawFromPickle.py:36
DQTGlobalWZFinderTool::m_muon_Pt
TH1F_LW * m_muon_Pt
Definition: DQTGlobalWZFinderTool.h:91
DQTGlobalWZFinderTool::m_JPsiCounterSBG
int m_JPsiCounterSBG[2]
Definition: DQTGlobalWZFinderTool.h:107
DQTGlobalWZFinderTool::m_UpsilonCounter_Mu
TH1F_LW * m_UpsilonCounter_Mu
Definition: DQTGlobalWZFinderTool.h:102
GeV
#define GeV
Definition: CaloTransverseBalanceVecMon.cxx:30
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
DQTGlobalWZFinderTool::DQTGlobalWZFinderTool
DQTGlobalWZFinderTool(const std::string &type, const std::string &name, const IInterface *parent)
Definition: DQTGlobalWZFinderTool.cxx:50
DQTGlobalWZFinderTool::m_W_pt_v_met_mu
TH2F_LW * m_W_pt_v_met_mu
Definition: DQTGlobalWZFinderTool.h:69
MissingETContainer.h
xAOD::Jet
Jet_v1 Jet
Definition of the current "jet version".
Definition: Event/xAOD/xAODJet/xAODJet/Jet.h:17
xAOD::MissingET_v1::met
float met() const
Returns .
DQTGlobalWZFinderTool::m_metHist
TH1F_LW * m_metHist
Definition: DQTGlobalWZFinderTool.h:71
DQTGlobalWZFinderTool::m_numBins
float m_numBins
Definition: DQTGlobalWZFinderTool.h:99
DQTGlobalWZFinderTool::m_ele_Eta
TH1F_LW * m_ele_Eta
Definition: DQTGlobalWZFinderTool.h:94
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
xAOD::EventInfo_v1::eventType
bool eventType(EventType type) const
Check for one particular bitmask value.
DQTGlobalWZFinderTool::m_maxLumiBlock
float m_maxLumiBlock
Definition: DQTGlobalWZFinderTool.h:98
ManagedMonitorToolBase::lbAverageInteractionsPerCrossing
virtual float lbAverageInteractionsPerCrossing(const EventContext &ctx=Gaudi::Hive::currentContext()) const
Average mu, i.e.
Definition: ManagedMonitorToolBase.cxx:1924
DQTGlobalWZFinderTool::m_eventNumber
int m_eventNumber
Definition: DQTGlobalWZFinderTool.h:122