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
114StatusCode EgammaPhysValMonitoringTool::fillHistograms(const EventContext& ctx)
115{
116 ATH_MSG_DEBUG("Filling hists " << name() << "...");
117
119 ATH_CHECK(eventInfo.isValid());
120
121 float weight = eventInfo->beamSpotWeight();
122
123 if (m_isMC) {
126
127 // filling truth iso (prompt) particles from egammaTruthParticles container
128 // (containing only iso particles)
129 // validity check is only really needed for serial running. Remove when MT
130 // is only way.
131 ATH_CHECK(truthParticles.isValid());
132
133 for (const auto* const truthParticle : *truthParticles) {
134
135 //--electrons
136 if (std::abs(truthParticle->pdgId()) == 11 &&
137 MC::isStable(truthParticle) && HepMC::generations(truthParticle) < 1) {
138 m_oElectronValidationPlots.m_oTruthIsoPlots.fill(*truthParticle,
139 *eventInfo);
140 } //-- end electrons
141
142 //--photons
143 if (std::abs(truthParticle->pdgId()) == 22 &&
144 MC::isStable(truthParticle) && HepMC::generations(truthParticle) < 1) {
145 m_oPhotonValidationPlots.m_oTruthIsoPlots.fill(*truthParticle,
146 *eventInfo);
147 //-- filling conversions
148 const xAOD::TruthParticle* tmp =
149 xAOD::TruthHelpers::getTruthParticle(*truthParticle); // 20.7.0.1
150 bool isTrueConv = false;
151 float trueR = -999;
152 float truthEta = -999;
153 if (tmp && tmp->hasDecayVtx()) {
154 float x = tmp->decayVtx()->x();
155 float y = tmp->decayVtx()->y();
156 trueR = std::sqrt(x * x + y * y);
157 }
158
159 if (tmp != nullptr) {
160 truthEta = tmp->eta();
161 isTrueConv = xAOD::EgammaHelpers::isTrueConvertedPhoton(tmp); // rel20
162 }
163
164 m_oPhotonValidationPlots.convTruthR->Fill(trueR, weight);
165 m_oPhotonValidationPlots.convTruthRvsEta->Fill(trueR, truthEta, weight);
166 if (isTrueConv)
167 m_oPhotonValidationPlots.m_oTruthIsoConvPlots.fill(*truthParticle,
168 *eventInfo);
169 if (!isTrueConv)
170 m_oPhotonValidationPlots.m_oTruthIsoUncPlots.fill(*truthParticle,
171 *eventInfo);
172
173 const xAOD::Photon* recoPhoton =
175 if (recoPhoton) {
176 m_oPhotonValidationPlots.convTruthMatchedR->Fill(trueR, weight);
177 m_oPhotonValidationPlots.convTruthMatchedRvsEta->Fill(
178 trueR, truthEta, weight);
179
180 m_oPhotonValidationPlots.m_oTruthRecoPlots.fill(*truthParticle,
181 *eventInfo);
182 if (isTrueConv) {
183 m_oPhotonValidationPlots.m_oTruthRecoConvPlots.fill(*truthParticle,
184 *eventInfo);
185 } else {
186 m_oPhotonValidationPlots.m_oTruthRecoUncPlots.fill(*truthParticle,
187 *eventInfo);
188 }
189 bool val_loose = false;
190 recoPhoton->passSelection(val_loose, "Loose");
191 if (val_loose) {
192 m_oPhotonValidationPlots.m_oTruthRecoLoosePlots.fill(*truthParticle,
193 *eventInfo);
194 if (isTrueConv) {
195 m_oPhotonValidationPlots.m_oTruthRecoLooseConvPlots.fill(
196 *truthParticle, *eventInfo);
197 } else {
198 m_oPhotonValidationPlots.m_oTruthRecoLooseUncPlots.fill(
199 *truthParticle, *eventInfo);
200 }
201 } //-- end truth loose
202 bool val_tight = false;
203 recoPhoton->passSelection(val_tight, "Tight");
204 if (val_tight) {
205 m_oPhotonValidationPlots.m_oTruthRecoTightPlots.fill(*truthParticle,
206 *eventInfo);
207 if (isTrueConv) {
208 m_oPhotonValidationPlots.m_oTruthRecoTightConvPlots.fill(
209 *truthParticle, *eventInfo);
210 } else {
211 m_oPhotonValidationPlots.m_oTruthRecoTightUncPlots.fill(
212 *truthParticle, *eventInfo);
213 }
214 } //-- end truth tight
215 } //-- end recoPhoton
216 } //-- end Photons
217 } // -- end fill histos iso particles
218
219 //---------Electrons----------------------
220 if (!fillRecoElecHistograms(truthParticles.ptr(), eventInfo.ptr())) {
221 ATH_MSG_ERROR("Filling reco elecectron hists failed " << name()
222 << "...");
223 return StatusCode::FAILURE;
224 }
225
226 //---------LRTElectrons----------------------
227 if(!m_lrtelectronContainerKey.empty()){
228 if (!fillLRTElecHistograms(truthParticles.ptr(), eventInfo.ptr())) {
229 ATH_MSG_ERROR("Filling lrt elecectron hists failed " << name() << "...");
230 return StatusCode::FAILURE;
231 }
232 }
233
234 //---------Frwd Electrons----------------------
235 if (!fillRecoFrwdElecHistograms(truthParticles.ptr(), eventInfo.ptr())) {
236 ATH_MSG_ERROR("Filling reco frwd elecectron hists failed " << name()
237 << "...");
238 return StatusCode::FAILURE;
239 }
240 //----------Photons
241 if (!fillRecoPhotHistograms(truthParticles.ptr(), eventInfo.ptr())) {
242 ATH_MSG_ERROR("Filling reco photon hists failed " << name() << "...");
243 return StatusCode::FAILURE;
244 }
245 } else // end is MC / code using truth particles
246 {//---------Electrons----------------------
247 if (!fillRecoElecHistograms(nullptr, eventInfo.ptr())) {
248 ATH_MSG_ERROR("Filling reco elecectron hists failed " << name()
249 << "...");
250 return StatusCode::FAILURE;
251 }
252 //---------Frwd Electrons----------------------
253 if (!fillRecoFrwdElecHistograms(nullptr, eventInfo.ptr())) {
254 ATH_MSG_ERROR("Filling reco frwd elecectron hists failed " << name()
255 << "...");
256 return StatusCode::FAILURE;
257 }
258 //----------Photons
259 if (!fillRecoPhotHistograms(nullptr, eventInfo.ptr())) {
260 ATH_MSG_ERROR("Filling reco photon hists failed " << name() << "...");
261 return StatusCode::FAILURE;
262 }
263
264 }
265
266
267
268 return StatusCode::SUCCESS;
269}
270
272{
273 ATH_MSG_DEBUG ("Filling reco electron hists " << name() << "...");
274
275 const EventContext& ctx = Gaudi::Hive::currentContext();
277 ATH_CHECK(Electrons.isValid());
278
279 int numofele=0;
280
281 float weight = eventInfo->beamSpotWeight();
282
283 for(const auto *const electron : *Electrons){
284 bool isElecPrompt=false;
285
286 if(!(electron->isGoodOQ (xAOD::EgammaParameters::BADCLUSELECTRON))) continue;
287
288 if(electron->author()&xAOD::EgammaParameters::AuthorElectron||
289 electron->author()&xAOD::EgammaParameters::AuthorAmbiguous) numofele++;
290
291 if(!m_isMC) m_oElectronValidationPlots.fill(*electron,*eventInfo,isElecPrompt);
292 else {
293 static const SG::ConstAccessor<int> truthTypeAcc ("truthType");
294 if(truthTypeAcc.isAvailable (*electron)) {
297 isElecPrompt=true;
298 //fill energy scale
299 const xAOD::TruthParticle* thePart = xAOD::TruthHelpers::getTruthParticle(*electron); // 20.7.X.Y.I
300 if(thePart) {
301 float EtLin = (electron->pt()-thePart->pt())/thePart->pt();
302 m_oElectronValidationPlots.res_et->Fill(thePart->pt()/GeV,EtLin,weight);
303 m_oElectronValidationPlots.res_eta->Fill(thePart->eta(),EtLin,weight);
304 if (thePart->pt()/GeV>20.) {
305 m_oElectronValidationPlots.res_et_cut->Fill(thePart->pt()/GeV,EtLin,weight);
306 m_oElectronValidationPlots.res_eta_cut->Fill(thePart->eta(),EtLin,weight);
307 m_oElectronValidationPlots.res_et_cut_pt_20->Fill(thePart->pt()/GeV,EtLin,weight);
308 m_oElectronValidationPlots.res_eta_cut_pt_20->Fill(thePart->eta(),EtLin,weight);
309 }
310 m_oElectronValidationPlots.matrix->Fill(electron->pt()/GeV,thePart->pt()/GeV);
311 } else {
312 ATH_MSG_INFO ("Truth particle associated not in egamma truth collection");
313 }
314 }
315
316 } else if(m_isMC){ if(Match(electron,11, truthParticles)!=nullptr ) isElecPrompt=true;}
317
318 m_oElectronValidationPlots.fill(*electron,*eventInfo,isElecPrompt);
319 }
320 }
321 m_oElectronValidationPlots.m_oCentralElecPlots.nParticles->Fill(numofele);
322 m_oElectronValidationPlots.m_oCentralElecPlots.nParticles_weighted->Fill(numofele,weight);
323
324 return StatusCode::SUCCESS;
325}
326
328{
329 ATH_MSG_DEBUG ("Filling lrt electron hists " << name() << "...");
330
331 const EventContext& ctx = Gaudi::Hive::currentContext();
333 ATH_CHECK(LRTElectrons.isValid());
334
335 int numofele=0;
336
337 float weight = eventInfo->beamSpotWeight();
338
339 for(const auto *const electron : *LRTElectrons){
340 bool isElecPrompt=false;
341
342 if(!(electron->isGoodOQ (xAOD::EgammaParameters::BADCLUSELECTRON))) continue;
343
344 // Retrieve electron ID, compute on-the-fly if decoration is missing (for AODs)
345 bool pass_LHVeryLooseNoPix = false;
346 if (m_acc_electronLLH_VeryLooseNoPix.isAvailable(*electron)) electron->passSelection(pass_LHVeryLooseNoPix, "DFCommonElectronsLHVeryLooseNoPix");
347 else pass_LHVeryLooseNoPix = static_cast<bool>(m_Electron_VeryLooseNoPix_LLHTool->accept(electron));
348
349 bool pass_LHLooseNoPix = false;
350 if (m_acc_electronLLH_LooseNoPix.isAvailable(*electron)) electron->passSelection(pass_LHLooseNoPix, "DFCommonElectronsLHLooseNoPix");
351 else pass_LHLooseNoPix = static_cast<bool>(m_Electron_LooseNoPix_LLHTool->accept(electron));
352
353 bool pass_LHMediumNoPix = false;
354 if (m_acc_electronLLH_MediumNoPix.isAvailable(*electron)) electron->passSelection(pass_LHMediumNoPix, "DFCommonElectronsLHMediumNoPix");
355 else pass_LHMediumNoPix = static_cast<bool>(m_Electron_MediumNoPix_LLHTool->accept(electron));
356
357 bool pass_LHTightNoPix = false;
358 if (m_acc_electronLLH_TightNoPix.isAvailable(*electron)) electron->passSelection(pass_LHTightNoPix, "DFCommonElectronsLHTightNoPix");
359 else pass_LHTightNoPix = static_cast<bool>(m_Electron_TightNoPix_LLHTool->accept(electron));
360
361 static const SG::ConstAccessor<int> truthTypeAcc ("truthType");
362 if(truthTypeAcc.isAvailable(*electron)) {
365 isElecPrompt=true;
366 //fill energy scale
367 const xAOD::TruthParticle* thePart = xAOD::TruthHelpers::getTruthParticle(*electron); // 20.7.X.Y.I
368 if(thePart) {
369 float EtLin = (electron->pt()-thePart->pt())/thePart->pt();
370 m_oLRTElectronValidationPlots.res_et->Fill(thePart->pt()/GeV,EtLin,weight);
371 m_oLRTElectronValidationPlots.res_eta->Fill(thePart->eta(),EtLin,weight);
372 if (thePart->pt()/GeV>20.) {
373 m_oLRTElectronValidationPlots.res_et_cut->Fill(thePart->pt()/GeV,EtLin,weight);
374 m_oLRTElectronValidationPlots.res_eta_cut->Fill(thePart->eta(),EtLin,weight);
375 m_oLRTElectronValidationPlots.res_et_cut_pt_20->Fill(thePart->pt()/GeV,EtLin,weight);
376 m_oLRTElectronValidationPlots.res_eta_cut_pt_20->Fill(thePart->eta(),EtLin,weight);
377 }
378 m_oLRTElectronValidationPlots.matrix->Fill(electron->pt()/GeV,thePart->pt()/GeV);
379 }else {
380 ATH_MSG_INFO ("Truth particle associated not in egamma truth collection");
381 }
382 }
383 } else if(m_isMC){ if(Match(electron,11, truthParticles)!=nullptr ) isElecPrompt=true;}
384
385
386 m_oLRTElectronValidationPlots.fill(*electron,*eventInfo, isElecPrompt, pass_LHVeryLooseNoPix, pass_LHLooseNoPix, pass_LHMediumNoPix, pass_LHTightNoPix);
387 if(electron->author()&xAOD::EgammaParameters::AuthorElectron||
388 electron->author()&xAOD::EgammaParameters::AuthorAmbiguous) numofele++;
389
390 }
391
392 m_oLRTElectronValidationPlots.m_oCentralElecPlots.nParticles->Fill(numofele);
393 m_oLRTElectronValidationPlots.m_oCentralElecPlots.nParticles_weighted->Fill(numofele,weight);
394
395 return StatusCode::SUCCESS;
396}
397
399{
400 ATH_MSG_DEBUG ("Filling reco frwd electron hists " << name() << "...");
401
402 const EventContext& ctx = Gaudi::Hive::currentContext();
404 ATH_CHECK(ElectronsFrwd.isValid());
405
406 int numoffrwdele=0;
407 float weight = eventInfo->beamSpotWeight();
408
409 for(const auto *const frwdelectron : *ElectronsFrwd){
410 if(!(frwdelectron->isGoodOQ (xAOD::EgammaParameters::BADCLUSELECTRON))) continue;
411 bool isElecPrompt=false;
412 if (m_isMC) {
413 if((Match(frwdelectron,11, truthParticles)!=nullptr )) isElecPrompt=true;
414 }
415 m_oElectronValidationPlots.fill(*frwdelectron,*eventInfo,isElecPrompt);
416 numoffrwdele++;
417 isElecPrompt=false;
418 }
419
420 m_oElectronValidationPlots.m_oFrwdElecPlots.nParticles->Fill(numoffrwdele);
421 m_oElectronValidationPlots.m_oFrwdElecPlots.nParticles_weighted->Fill(numoffrwdele,weight);
422
423 return StatusCode::SUCCESS;
424}
425
427{
428 ATH_MSG_DEBUG ("Filling reco photon hists " << name() << "...");
429
430 const EventContext& ctx = Gaudi::Hive::currentContext();
432 ATH_CHECK(Photons.isValid());
433
434 int numofPhot=0;
435 int numofAmb=0;
436 int numPhotAll=0;
437 int numofCnv=0;
438 float weight = eventInfo->beamSpotWeight();
439
440 for(const auto *photon : *Photons){
441 bool isPhotPrompt=false;
442 if (photon->author()&xAOD::EgammaParameters::AuthorCaloTopo35) continue;//21.0.>7
443 if(!(photon->isGoodOQ (xAOD::EgammaParameters::BADCLUSPHOTON))) continue;
444 if (m_useOQQuality) {
445 if (!PhotonHelpers::passOQquality(*photon)) continue;
446 }
447
448 if(photon->author()) numofPhot++;
449 else if(photon->author()&xAOD::EgammaParameters::AuthorAmbiguous) numofAmb++;
450 if(xAOD::EgammaHelpers::isConvertedPhoton(photon)) numofCnv++;
451 if(!m_isMC) m_oPhotonValidationPlots.fill(*photon,*eventInfo, isPhotPrompt);
452 else {
453 static const SG::ConstAccessor<int> truthTypeAcc ("truthType");
454 if(truthTypeAcc.isAvailable(*photon)) {
457 isPhotPrompt=true;
458 //fill energy scale
459 const xAOD::TruthParticle* thePart = xAOD::TruthHelpers::getTruthParticle(*photon);//20.7.X.Y.I
460 // const xAOD::TruthParticle* thePart = xAOD::EgammaHelpers::getTruthParticle(photon);
461 if(thePart&&thePart->pt()/GeV>20.) {
462 float EtLin = (photon->pt()-thePart->pt())/thePart->pt();
463 m_oPhotonValidationPlots.res_et->Fill(thePart->pt()/GeV,EtLin,weight);
464 m_oPhotonValidationPlots.res_eta->Fill(thePart->eta(),EtLin,weight);
465 if (std::abs(EtLin)<0.2){
466 m_oPhotonValidationPlots.res_et_cut->Fill(thePart->pt()/GeV,EtLin,weight);
467 m_oPhotonValidationPlots.res_eta_cut->Fill(thePart->eta(),EtLin,weight);
468 }
469 }else {
470 ATH_MSG_INFO("Truth particle associated not in egamma truth collection");
471 }
472 }
473
474 } else if(m_isMC){if(Match(photon,22, truthParticles)!=nullptr ) isPhotPrompt=true;}
475
476 m_oPhotonValidationPlots.fill(*photon,*eventInfo, isPhotPrompt);
477
478 }
479 }
480 numPhotAll = numofPhot+numofAmb;
481 m_oPhotonValidationPlots.m_oAllPlots.m_nParticles->Fill(numPhotAll);
482 m_oPhotonValidationPlots.m_oPhotPlots.m_nParticles->Fill(numofPhot);
483 m_oPhotonValidationPlots.m_oAmbPhotPlots.m_nParticles->Fill(numofAmb);
484 m_oPhotonValidationPlots.m_oConvPhotPlots.m_nParticles->Fill(numofCnv);
485
486 m_oPhotonValidationPlots.m_oAllPlots.m_nParticles_weighted->Fill(numPhotAll,weight);
487 m_oPhotonValidationPlots.m_oPhotPlots.m_nParticles_weighted->Fill(numofPhot,weight);
488 m_oPhotonValidationPlots.m_oAmbPhotPlots.m_nParticles_weighted->Fill(numofAmb,weight);
489 m_oPhotonValidationPlots.m_oConvPhotPlots.m_nParticles_weighted->Fill(numofCnv,weight);
490
491
492 return StatusCode::SUCCESS;
493}
494
496 {
497 ATH_MSG_INFO ("Finalising hists " << name() << "...");
499 m_oPhotonValidationPlots.finalize();
500 return StatusCode::SUCCESS;
501 }
502
504 int pdg,
505 const xAOD::TruthParticleContainer* truthParticles) {
506 float currentdr = 0.05;
507 const xAOD::TruthParticle* matchedTruthParticle = nullptr;
508 if (truthParticles){
509 for (const auto *truthParticle: *truthParticles){
510 if (std::abs(truthParticle->pdgId()) != pdg || !MC::isStable(truthParticle)) continue;
511 float dr = particle->p4().DeltaR(truthParticle->p4());
512 if (dr < currentdr){
513 currentdr = dr;
514 matchedTruthParticle = truthParticle;
515 }
516 }
517 }
518 return matchedTruthParticle;
519}
520
521
522}
523
#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)
virtual StatusCode fillHistograms(const EventContext &ctx)
An inheriting class should either override this function or fillHists().
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
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.