ATLAS Offline Software
Loading...
Searching...
No Matches
EgammaPhysValMonitoringTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5// EgammaPhysValMonitoringTool.cxx
6// Implementation file for class EgammaPhysValMonitoringTool
7// Author:
9
10// PhysVal includes
12
13// STL includes
14#include <vector>
15
16// FrameWork includes
17#include "GaudiKernel/IToolSvc.h"
25
29
32
34
35using CLHEP::GeV;
36using namespace std;
37using namespace MCTruthPartClassifier;
38
40
42// Public methods:
44
45// Constructors
47
49 const std::string& name,
50 const IInterface* parent ):
51 ManagedMonitorToolBase( type, name, parent ),
52 m_oElectronValidationPlots(nullptr, "Electron/"),
53 m_oPhotonValidationPlots(nullptr, "Photon/"),
54 m_oLRTElectronValidationPlots(nullptr, "LRTElectron/"),
55 m_acc_electronLLH_VeryLooseNoPix("DFCommonElectronsLHVeryLooseNoPix"),
56 m_acc_electronLLH_LooseNoPix("DFCommonElectronsLHLooseNoPix"),
57 m_acc_electronLLH_MediumNoPix("DFCommonElectronsLHMediumNoPix"),
58 m_acc_electronLLH_TightNoPix("DFCommonElectronsLHTightNoPix")
59{
60}
61
62// Athena algtool's Hooks
84
86{
87 ATH_MSG_INFO ("Booking hists " << name() << "...");
88
89 m_oElectronValidationPlots.initialize();
90 std::vector<HistData> hists = m_oElectronValidationPlots.retrieveBookedHistograms();
91 for (auto &hist : hists){
92 ATH_MSG_DEBUG ("Initializing " << hist.first << " " << hist.first->GetName() << " " << hist.second << "...");
93 ATH_CHECK(regHist(hist.first,hist.second,all));
94 }
95
96 m_oPhotonValidationPlots.initialize();
97 hists = m_oPhotonValidationPlots.retrieveBookedHistograms();
98 for (auto &hist : hists){
99 ATH_MSG_DEBUG ("Initializing " << hist.first << " " << hist.first->GetName() << " " << hist.second << "...");
100 ATH_CHECK(regHist(hist.first,hist.second,all));
101 }
102
104 hists = m_oLRTElectronValidationPlots.retrieveBookedHistograms();
105 for (auto &hist : hists){
106 ATH_MSG_DEBUG ("Initializing " << hist.first << " " << hist.first->GetName() << " " << hist.second << "...");
107 ATH_CHECK(regHist(hist.first,hist.second,all));
108 }
109
110 return StatusCode::SUCCESS;
111}
112
113
115{
116 ATH_MSG_DEBUG("Filling hists " << name() << "...");
117
118 const EventContext& ctx = Gaudi::Hive::currentContext();
120 ATH_CHECK(eventInfo.isValid());
121
122 float weight = eventInfo->beamSpotWeight();
123
124 if (m_isMC) {
127
128 // filling truth iso (prompt) particles from egammaTruthParticles container
129 // (containing only iso particles)
130 // validity check is only really needed for serial running. Remove when MT
131 // is only way.
132 ATH_CHECK(truthParticles.isValid());
133
134 for (const auto* const truthParticle : *truthParticles) {
135
136 //--electrons
137 if (std::abs(truthParticle->pdgId()) == 11 &&
138 MC::isStable(truthParticle) && HepMC::generations(truthParticle) < 1) {
139 m_oElectronValidationPlots.m_oTruthIsoPlots.fill(*truthParticle,
140 *eventInfo);
141 } //-- end electrons
142
143 //--photons
144 if (std::abs(truthParticle->pdgId()) == 22 &&
145 MC::isStable(truthParticle) && HepMC::generations(truthParticle) < 1) {
146 m_oPhotonValidationPlots.m_oTruthIsoPlots.fill(*truthParticle,
147 *eventInfo);
148 //-- filling conversions
149 const xAOD::TruthParticle* tmp =
150 xAOD::TruthHelpers::getTruthParticle(*truthParticle); // 20.7.0.1
151 bool isTrueConv = false;
152 float trueR = -999;
153 float truthEta = -999;
154 if (tmp && tmp->hasDecayVtx()) {
155 float x = tmp->decayVtx()->x();
156 float y = tmp->decayVtx()->y();
157 trueR = std::sqrt(x * x + y * y);
158 }
159
160 if (tmp != nullptr) {
161 truthEta = tmp->eta();
162 isTrueConv = xAOD::EgammaHelpers::isTrueConvertedPhoton(tmp); // rel20
163 }
164
165 m_oPhotonValidationPlots.convTruthR->Fill(trueR, weight);
166 m_oPhotonValidationPlots.convTruthRvsEta->Fill(trueR, truthEta, weight);
167 if (isTrueConv)
168 m_oPhotonValidationPlots.m_oTruthIsoConvPlots.fill(*truthParticle,
169 *eventInfo);
170 if (!isTrueConv)
171 m_oPhotonValidationPlots.m_oTruthIsoUncPlots.fill(*truthParticle,
172 *eventInfo);
173
174 const xAOD::Photon* recoPhoton =
176 if (recoPhoton) {
177 m_oPhotonValidationPlots.convTruthMatchedR->Fill(trueR, weight);
178 m_oPhotonValidationPlots.convTruthMatchedRvsEta->Fill(
179 trueR, truthEta, weight);
180
181 m_oPhotonValidationPlots.m_oTruthRecoPlots.fill(*truthParticle,
182 *eventInfo);
183 if (isTrueConv) {
184 m_oPhotonValidationPlots.m_oTruthRecoConvPlots.fill(*truthParticle,
185 *eventInfo);
186 } else {
187 m_oPhotonValidationPlots.m_oTruthRecoUncPlots.fill(*truthParticle,
188 *eventInfo);
189 }
190 bool val_loose = false;
191 recoPhoton->passSelection(val_loose, "Loose");
192 if (val_loose) {
193 m_oPhotonValidationPlots.m_oTruthRecoLoosePlots.fill(*truthParticle,
194 *eventInfo);
195 if (isTrueConv) {
196 m_oPhotonValidationPlots.m_oTruthRecoLooseConvPlots.fill(
197 *truthParticle, *eventInfo);
198 } else {
199 m_oPhotonValidationPlots.m_oTruthRecoLooseUncPlots.fill(
200 *truthParticle, *eventInfo);
201 }
202 } //-- end truth loose
203 bool val_tight = false;
204 recoPhoton->passSelection(val_tight, "Tight");
205 if (val_tight) {
206 m_oPhotonValidationPlots.m_oTruthRecoTightPlots.fill(*truthParticle,
207 *eventInfo);
208 if (isTrueConv) {
209 m_oPhotonValidationPlots.m_oTruthRecoTightConvPlots.fill(
210 *truthParticle, *eventInfo);
211 } else {
212 m_oPhotonValidationPlots.m_oTruthRecoTightUncPlots.fill(
213 *truthParticle, *eventInfo);
214 }
215 } //-- end truth tight
216 } //-- end recoPhoton
217 } //-- end Photons
218 } // -- end fill histos iso particles
219
220 //---------Electrons----------------------
221 if (!fillRecoElecHistograms(truthParticles.ptr(), eventInfo.ptr())) {
222 ATH_MSG_ERROR("Filling reco elecectron hists failed " << name()
223 << "...");
224 return StatusCode::FAILURE;
225 }
226
227 //---------LRTElectrons----------------------
228 if(!m_lrtelectronContainerKey.empty()){
229 if (!fillLRTElecHistograms(truthParticles.ptr(), eventInfo.ptr())) {
230 ATH_MSG_ERROR("Filling lrt elecectron hists failed " << name() << "...");
231 return StatusCode::FAILURE;
232 }
233 }
234
235 //---------Frwd Electrons----------------------
236 if (!fillRecoFrwdElecHistograms(truthParticles.ptr(), eventInfo.ptr())) {
237 ATH_MSG_ERROR("Filling reco frwd elecectron hists failed " << name()
238 << "...");
239 return StatusCode::FAILURE;
240 }
241 //----------Photons
242 if (!fillRecoPhotHistograms(truthParticles.ptr(), eventInfo.ptr())) {
243 ATH_MSG_ERROR("Filling reco photon hists failed " << name() << "...");
244 return StatusCode::FAILURE;
245 }
246 } else // end is MC / code using truth particles
247 {//---------Electrons----------------------
248 if (!fillRecoElecHistograms(nullptr, eventInfo.ptr())) {
249 ATH_MSG_ERROR("Filling reco elecectron hists failed " << name()
250 << "...");
251 return StatusCode::FAILURE;
252 }
253 //---------Frwd Electrons----------------------
254 if (!fillRecoFrwdElecHistograms(nullptr, eventInfo.ptr())) {
255 ATH_MSG_ERROR("Filling reco frwd elecectron hists failed " << name()
256 << "...");
257 return StatusCode::FAILURE;
258 }
259 //----------Photons
260 if (!fillRecoPhotHistograms(nullptr, eventInfo.ptr())) {
261 ATH_MSG_ERROR("Filling reco photon hists failed " << name() << "...");
262 return StatusCode::FAILURE;
263 }
264
265 }
266
267
268
269 return StatusCode::SUCCESS;
270}
271
273{
274 ATH_MSG_DEBUG ("Filling reco electron hists " << name() << "...");
275
276 const EventContext& ctx = Gaudi::Hive::currentContext();
278 ATH_CHECK(Electrons.isValid());
279
280 int numofele=0;
281
282 float weight = eventInfo->beamSpotWeight();
283
284 for(const auto *const electron : *Electrons){
285 bool isElecPrompt=false;
286
287 if(!(electron->isGoodOQ (xAOD::EgammaParameters::BADCLUSELECTRON))) continue;
288
289 if(electron->author()&xAOD::EgammaParameters::AuthorElectron||
290 electron->author()&xAOD::EgammaParameters::AuthorAmbiguous) numofele++;
291
292 if(!m_isMC) m_oElectronValidationPlots.fill(*electron,*eventInfo,isElecPrompt);
293 else {
294 static const SG::ConstAccessor<int> truthTypeAcc ("truthType");
295 if(truthTypeAcc.isAvailable (*electron)) {
298 isElecPrompt=true;
299 //fill energy scale
300 const xAOD::TruthParticle* thePart = xAOD::TruthHelpers::getTruthParticle(*electron); // 20.7.X.Y.I
301 if(thePart) {
302 float EtLin = (electron->pt()-thePart->pt())/thePart->pt();
303 m_oElectronValidationPlots.res_et->Fill(thePart->pt()/GeV,EtLin,weight);
304 m_oElectronValidationPlots.res_eta->Fill(thePart->eta(),EtLin,weight);
305 if (thePart->pt()/GeV>20.) {
306 m_oElectronValidationPlots.res_et_cut->Fill(thePart->pt()/GeV,EtLin,weight);
307 m_oElectronValidationPlots.res_eta_cut->Fill(thePart->eta(),EtLin,weight);
308 m_oElectronValidationPlots.res_et_cut_pt_20->Fill(thePart->pt()/GeV,EtLin,weight);
309 m_oElectronValidationPlots.res_eta_cut_pt_20->Fill(thePart->eta(),EtLin,weight);
310 }
311 m_oElectronValidationPlots.matrix->Fill(electron->pt()/GeV,thePart->pt()/GeV);
312 } else {
313 ATH_MSG_INFO ("Truth particle associated not in egamma truth collection");
314 }
315 }
316
317 } else if(m_isMC){ if(Match(electron,11, truthParticles)!=nullptr ) isElecPrompt=true;}
318
319 m_oElectronValidationPlots.fill(*electron,*eventInfo,isElecPrompt);
320 }
321 }
322 m_oElectronValidationPlots.m_oCentralElecPlots.nParticles->Fill(numofele);
323 m_oElectronValidationPlots.m_oCentralElecPlots.nParticles_weighted->Fill(numofele,weight);
324
325 return StatusCode::SUCCESS;
326}
327
329{
330 ATH_MSG_DEBUG ("Filling lrt electron hists " << name() << "...");
331
332 const EventContext& ctx = Gaudi::Hive::currentContext();
334 ATH_CHECK(LRTElectrons.isValid());
335
336 int numofele=0;
337
338 float weight = eventInfo->beamSpotWeight();
339
340 for(const auto *const electron : *LRTElectrons){
341 bool isElecPrompt=false;
342
343 if(!(electron->isGoodOQ (xAOD::EgammaParameters::BADCLUSELECTRON))) continue;
344
345 // Retrieve electron ID, compute on-the-fly if decoration is missing (for AODs)
346 bool pass_LHVeryLooseNoPix = false;
347 if (m_acc_electronLLH_VeryLooseNoPix.isAvailable(*electron)) electron->passSelection(pass_LHVeryLooseNoPix, "DFCommonElectronsLHVeryLooseNoPix");
348 else pass_LHVeryLooseNoPix = static_cast<bool>(m_Electron_VeryLooseNoPix_LLHTool->accept(electron));
349
350 bool pass_LHLooseNoPix = false;
351 if (m_acc_electronLLH_LooseNoPix.isAvailable(*electron)) electron->passSelection(pass_LHLooseNoPix, "DFCommonElectronsLHLooseNoPix");
352 else pass_LHLooseNoPix = static_cast<bool>(m_Electron_LooseNoPix_LLHTool->accept(electron));
353
354 bool pass_LHMediumNoPix = false;
355 if (m_acc_electronLLH_MediumNoPix.isAvailable(*electron)) electron->passSelection(pass_LHMediumNoPix, "DFCommonElectronsLHMediumNoPix");
356 else pass_LHMediumNoPix = static_cast<bool>(m_Electron_MediumNoPix_LLHTool->accept(electron));
357
358 bool pass_LHTightNoPix = false;
359 if (m_acc_electronLLH_TightNoPix.isAvailable(*electron)) electron->passSelection(pass_LHTightNoPix, "DFCommonElectronsLHTightNoPix");
360 else pass_LHTightNoPix = static_cast<bool>(m_Electron_TightNoPix_LLHTool->accept(electron));
361
362 static const SG::ConstAccessor<int> truthTypeAcc ("truthType");
363 if(truthTypeAcc.isAvailable(*electron)) {
366 isElecPrompt=true;
367 //fill energy scale
368 const xAOD::TruthParticle* thePart = xAOD::TruthHelpers::getTruthParticle(*electron); // 20.7.X.Y.I
369 if(thePart) {
370 float EtLin = (electron->pt()-thePart->pt())/thePart->pt();
371 m_oLRTElectronValidationPlots.res_et->Fill(thePart->pt()/GeV,EtLin,weight);
372 m_oLRTElectronValidationPlots.res_eta->Fill(thePart->eta(),EtLin,weight);
373 if (thePart->pt()/GeV>20.) {
374 m_oLRTElectronValidationPlots.res_et_cut->Fill(thePart->pt()/GeV,EtLin,weight);
375 m_oLRTElectronValidationPlots.res_eta_cut->Fill(thePart->eta(),EtLin,weight);
376 m_oLRTElectronValidationPlots.res_et_cut_pt_20->Fill(thePart->pt()/GeV,EtLin,weight);
377 m_oLRTElectronValidationPlots.res_eta_cut_pt_20->Fill(thePart->eta(),EtLin,weight);
378 }
379 m_oLRTElectronValidationPlots.matrix->Fill(electron->pt()/GeV,thePart->pt()/GeV);
380 }else {
381 ATH_MSG_INFO ("Truth particle associated not in egamma truth collection");
382 }
383 }
384 } else if(m_isMC){ if(Match(electron,11, truthParticles)!=nullptr ) isElecPrompt=true;}
385
386
387 m_oLRTElectronValidationPlots.fill(*electron,*eventInfo, isElecPrompt, pass_LHVeryLooseNoPix, pass_LHLooseNoPix, pass_LHMediumNoPix, pass_LHTightNoPix);
388 if(electron->author()&xAOD::EgammaParameters::AuthorElectron||
389 electron->author()&xAOD::EgammaParameters::AuthorAmbiguous) numofele++;
390
391 }
392
393 m_oLRTElectronValidationPlots.m_oCentralElecPlots.nParticles->Fill(numofele);
394 m_oLRTElectronValidationPlots.m_oCentralElecPlots.nParticles_weighted->Fill(numofele,weight);
395
396 return StatusCode::SUCCESS;
397}
398
400{
401 ATH_MSG_DEBUG ("Filling reco frwd electron hists " << name() << "...");
402
403 const EventContext& ctx = Gaudi::Hive::currentContext();
405 ATH_CHECK(ElectronsFrwd.isValid());
406
407 int numoffrwdele=0;
408 float weight = eventInfo->beamSpotWeight();
409
410 for(const auto *const frwdelectron : *ElectronsFrwd){
411 if(!(frwdelectron->isGoodOQ (xAOD::EgammaParameters::BADCLUSELECTRON))) continue;
412 bool isElecPrompt=false;
413 if (m_isMC) {
414 if((Match(frwdelectron,11, truthParticles)!=nullptr )) isElecPrompt=true;
415 }
416 m_oElectronValidationPlots.fill(*frwdelectron,*eventInfo,isElecPrompt);
417 numoffrwdele++;
418 isElecPrompt=false;
419 }
420
421 m_oElectronValidationPlots.m_oFrwdElecPlots.nParticles->Fill(numoffrwdele);
422 m_oElectronValidationPlots.m_oFrwdElecPlots.nParticles_weighted->Fill(numoffrwdele,weight);
423
424 return StatusCode::SUCCESS;
425}
426
428{
429 ATH_MSG_DEBUG ("Filling reco photon hists " << name() << "...");
430
431 const EventContext& ctx = Gaudi::Hive::currentContext();
433 ATH_CHECK(Photons.isValid());
434
435 int numofPhot=0;
436 int numofAmb=0;
437 int numPhotAll=0;
438 int numofCnv=0;
439 float weight = eventInfo->beamSpotWeight();
440
441 for(const auto *photon : *Photons){
442 bool isPhotPrompt=false;
443 if (photon->author()&xAOD::EgammaParameters::AuthorCaloTopo35) continue;//21.0.>7
444 if(!(photon->isGoodOQ (xAOD::EgammaParameters::BADCLUSPHOTON))) continue;
445 if (m_useOQQuality) {
446 if (!PhotonHelpers::passOQquality(*photon)) continue;
447 }
448
449 if(photon->author()) numofPhot++;
450 else if(photon->author()&xAOD::EgammaParameters::AuthorAmbiguous) numofAmb++;
451 if(xAOD::EgammaHelpers::isConvertedPhoton(photon)) numofCnv++;
452 if(!m_isMC) m_oPhotonValidationPlots.fill(*photon,*eventInfo, isPhotPrompt);
453 else {
454 static const SG::ConstAccessor<int> truthTypeAcc ("truthType");
455 if(truthTypeAcc.isAvailable(*photon)) {
458 isPhotPrompt=true;
459 //fill energy scale
460 const xAOD::TruthParticle* thePart = xAOD::TruthHelpers::getTruthParticle(*photon);//20.7.X.Y.I
461 // const xAOD::TruthParticle* thePart = xAOD::EgammaHelpers::getTruthParticle(photon);
462 if(thePart&&thePart->pt()/GeV>20.) {
463 float EtLin = (photon->pt()-thePart->pt())/thePart->pt();
464 m_oPhotonValidationPlots.res_et->Fill(thePart->pt()/GeV,EtLin,weight);
465 m_oPhotonValidationPlots.res_eta->Fill(thePart->eta(),EtLin,weight);
466 if (std::abs(EtLin)<0.2){
467 m_oPhotonValidationPlots.res_et_cut->Fill(thePart->pt()/GeV,EtLin,weight);
468 m_oPhotonValidationPlots.res_eta_cut->Fill(thePart->eta(),EtLin,weight);
469 }
470 }else {
471 ATH_MSG_INFO("Truth particle associated not in egamma truth collection");
472 }
473 }
474
475 } else if(m_isMC){if(Match(photon,22, truthParticles)!=nullptr ) isPhotPrompt=true;}
476
477 m_oPhotonValidationPlots.fill(*photon,*eventInfo, isPhotPrompt);
478
479 }
480 }
481 numPhotAll = numofPhot+numofAmb;
482 m_oPhotonValidationPlots.m_oAllPlots.m_nParticles->Fill(numPhotAll);
483 m_oPhotonValidationPlots.m_oPhotPlots.m_nParticles->Fill(numofPhot);
484 m_oPhotonValidationPlots.m_oAmbPhotPlots.m_nParticles->Fill(numofAmb);
485 m_oPhotonValidationPlots.m_oConvPhotPlots.m_nParticles->Fill(numofCnv);
486
487 m_oPhotonValidationPlots.m_oAllPlots.m_nParticles_weighted->Fill(numPhotAll,weight);
488 m_oPhotonValidationPlots.m_oPhotPlots.m_nParticles_weighted->Fill(numofPhot,weight);
489 m_oPhotonValidationPlots.m_oAmbPhotPlots.m_nParticles_weighted->Fill(numofAmb,weight);
490 m_oPhotonValidationPlots.m_oConvPhotPlots.m_nParticles_weighted->Fill(numofCnv,weight);
491
492
493 return StatusCode::SUCCESS;
494}
495
497 {
498 ATH_MSG_INFO ("Finalising hists " << name() << "...");
500 m_oPhotonValidationPlots.finalize();
501 return StatusCode::SUCCESS;
502 }
503
505 int pdg,
506 const xAOD::TruthParticleContainer* truthParticles) {
507 float currentdr = 0.05;
508 const xAOD::TruthParticle* matchedTruthParticle = nullptr;
509 if (truthParticles){
510 for (const auto *truthParticle: *truthParticles){
511 if (std::abs(truthParticle->pdgId()) != pdg || !MC::isStable(truthParticle)) continue;
512 float dr = particle->p4().DeltaR(truthParticle->p4());
513 if (dr < currentdr){
514 currentdr = dr;
515 matchedTruthParticle = truthParticle;
516 }
517 }
518 }
519 return matchedTruthParticle;
520}
521
522
523}
524
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_ERROR(x)
#define ATH_MSG_INFO(x)
#define ATH_MSG_DEBUG(x)
Helper class to provide constant type-safe access to aux data.
ATLAS-specific HepMC functions.
Handle class for reading from StoreGate.
#define y
#define x
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_truthParticleContainerKey
SG::AuxElement::ConstAccessor< char > m_acc_electronLLH_VeryLooseNoPix
StatusCode fillRecoPhotHistograms(const xAOD::TruthParticleContainer *truthParticles, const xAOD::EventInfo *eventInfo)
StatusCode fillRecoElecHistograms(const xAOD::TruthParticleContainer *truthParticles, const xAOD::EventInfo *eventInfo)
static const xAOD::TruthParticle * Match(const xAOD::Egamma *particle, int pdg, const xAOD::TruthParticleContainer *truthParticles)
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronContainerKey
ToolHandle< IAsgElectronLikelihoodTool > m_Electron_LooseNoPix_LLHTool
SG::ReadHandleKey< xAOD::PhotonContainer > m_photonContainerKey
EgammaPhysValMonitoringTool()=delete
Default constructor:
SG::AuxElement::ConstAccessor< char > m_acc_electronLLH_MediumNoPix
ToolHandle< IAsgElectronLikelihoodTool > m_Electron_TightNoPix_LLHTool
ToolHandle< IAsgElectronLikelihoodTool > m_Electron_MediumNoPix_LLHTool
StatusCode fillRecoFrwdElecHistograms(const xAOD::TruthParticleContainer *truthParticles, const xAOD::EventInfo *eventInfo)
SG::ReadHandleKey< xAOD::ElectronContainer > m_electronContainerFrwdKey
virtual StatusCode fillHistograms()
An inheriting class should either override this function or fillHists().
StatusCode fillLRTElecHistograms(const xAOD::TruthParticleContainer *truthParticles, const xAOD::EventInfo *eventInfo)
virtual StatusCode procHistograms()
An inheriting class should either override this function or finalHists().
SG::AuxElement::ConstAccessor< char > m_acc_electronLLH_TightNoPix
virtual StatusCode bookHistograms()
An inheriting class should either override this function or bookHists().
ToolHandle< IAsgElectronLikelihoodTool > m_Electron_VeryLooseNoPix_LLHTool
SG::ReadHandleKey< xAOD::ElectronContainer > m_lrtelectronContainerKey
SG::ReadHandleKey< xAOD::TruthParticleContainer > m_egammaTruthContainerKey
SG::AuxElement::ConstAccessor< char > m_acc_electronLLH_LooseNoPix
virtual StatusCode regHist(TH1 *h, const std::string &system, Interval_t interval, MgmtAttr_t histo_mgmt=ATTRIB_MANAGED, const std::string &chain="", const std::string &merge="")
Registers a TH1 (including TH2, TH3, and TProfile) to be included in the output stream using logical ...
ManagedMonitorToolBase(const std::string &type, const std::string &name, const IInterface *parent)
Helper class to provide constant type-safe access to aux data.
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
const_pointer_type ptr()
Dereference the pointer.
virtual bool isValid() override final
Can the handle be successfully dereferenced?
bool passSelection(bool &value, const std::string &menu) const
Check if the egamma object pass a selection menu (using the name) If the menu decision is stored in t...
float beamSpotWeight() const
Weight for beam spot size reweighting.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
int generations(const T &p)
Method to return how many interactions a particle has undergone during simulation (TODO migrate to be...
bool isStable(const T &p)
Identify if the particle is stable, i.e. has not decayed.
bool passOQquality(const xAOD::Photon &ph)
Helper to ease the implemmantation of the pass Quality requirements.
STL namespace.
bool isConvertedPhoton(const xAOD::Egamma *eg, bool excludeTRT=false)
is the object a converted photon
bool isTrueConvertedPhoton(const xAOD::Photon *ph, float maxRadius=800.)
is the object matched to a true converted photon with R < maxRadius
const xAOD::Photon * getRecoPhoton(const xAOD::TruthParticle *particle)
return the reco photon associated to the given TruthParticle (if any)
const uint32_t BADCLUSELECTRON
Definition EgammaDefs.h:116
const uint16_t AuthorCaloTopo35
Photon reconstructed by SW CaloTopo35 seeded clusters.
Definition EgammaDefs.h:38
const uint16_t AuthorElectron
Object Reconstructed by standard cluster-based algorithm.
Definition EgammaDefs.h:24
const uint32_t BADCLUSPHOTON
Definition EgammaDefs.h:124
const uint16_t AuthorAmbiguous
Object Reconstructed by standard cluster-based algorithm.
Definition EgammaDefs.h:32
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any)
EventInfo_v1 EventInfo
Definition of the latest event info version.
Egamma_v1 Egamma
Definition of the current "egamma version".
Definition Egamma.h:17
TruthParticle_v1 TruthParticle
Typedef to implementation.
Photon_v1 Photon
Definition of the current "egamma version".
TruthParticleContainer_v1 TruthParticleContainer
Declare the latest version of the truth particle container.