ATLAS Offline Software
Loading...
Searching...
No Matches
EgammaPhysValMonitoringTool.cxx
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2026 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
14
15// FrameWork includes
16#include "GaudiKernel/IToolSvc.h"
24
26
29
31// STL includes
32#include <vector>
33
34using CLHEP::GeV;
35using namespace std;
36using namespace MCTruthPartClassifier;
37
39
41// Public methods:
43
44// Constructors
46
48 const std::string& name,
49 const IInterface* parent ):
50 ManagedMonitorToolBase( type, name, parent ),
51 m_oElectronValidationPlots(nullptr, "Electron/"),
52 m_oPhotonValidationPlots(nullptr, "Photon/"),
53 m_oLRTElectronValidationPlots(nullptr, "LRTElectron/"),
54 m_acc_electronLLH_VeryLooseNoPix("DFCommonElectronsLHVeryLooseNoPix"),
55 m_acc_electronLLH_LooseNoPix("DFCommonElectronsLHLooseNoPix"),
56 m_acc_electronLLH_MediumNoPix("DFCommonElectronsLHMediumNoPix"),
57 m_acc_electronLLH_TightNoPix("DFCommonElectronsLHTightNoPix")
58{
59}
60
61// Athena algtool's Hooks
83
85{
86 ATH_MSG_INFO ("Booking hists " << name() << "...");
87
88 m_oElectronValidationPlots.initialize();
89 std::vector<HistData> hists = m_oElectronValidationPlots.retrieveBookedHistograms();
90 for (auto &hist : hists){
91 ATH_MSG_DEBUG ("Initializing " << hist.first << " " << hist.first->GetName() << " " << hist.second << "...");
92 ATH_CHECK(regHist(hist.first,hist.second,all));
93 }
94
95 m_oPhotonValidationPlots.initialize();
96 hists = m_oPhotonValidationPlots.retrieveBookedHistograms();
97 for (auto &hist : hists){
98 ATH_MSG_DEBUG ("Initializing " << hist.first << " " << hist.first->GetName() << " " << hist.second << "...");
99 ATH_CHECK(regHist(hist.first,hist.second,all));
100 }
101
103 hists = m_oLRTElectronValidationPlots.retrieveBookedHistograms();
104 for (auto &hist : hists){
105 ATH_MSG_DEBUG ("Initializing " << hist.first << " " << hist.first->GetName() << " " << hist.second << "...");
106 ATH_CHECK(regHist(hist.first,hist.second,all));
107 }
108
109 return StatusCode::SUCCESS;
110}
111
112
113StatusCode EgammaPhysValMonitoringTool::fillHistograms(const EventContext& ctx)
114{
115 ATH_MSG_DEBUG("Filling hists " << name() << "...");
116
118 ATH_CHECK(eventInfo.isValid());
119
120 float weight = eventInfo->beamSpotWeight();
121
122 if (m_isMC) {
125
126 // filling truth iso (prompt) particles from egammaTruthParticles container
127 // (containing only iso particles)
128 // validity check is only really needed for serial running. Remove when MT
129 // is only way.
130 ATH_CHECK(truthParticles.isValid());
131
132 for (const auto* const truthParticle : *truthParticles) {
133
134 //--electrons
135 if (std::abs(truthParticle->pdgId()) == 11 &&
136 MC::isStable(truthParticle) && HepMC::generations(truthParticle) < 1) {
137 m_oElectronValidationPlots.m_oTruthIsoPlots.fill(*truthParticle,
138 *eventInfo);
139 } //-- end electrons
140
141 //--photons
142 if (std::abs(truthParticle->pdgId()) == 22 &&
143 MC::isStable(truthParticle) && HepMC::generations(truthParticle) < 1) {
144 m_oPhotonValidationPlots.m_oTruthIsoPlots.fill(*truthParticle,
145 *eventInfo);
146 //-- filling conversions
147 const xAOD::TruthParticle* tmp =
148 xAOD::TruthHelpers::getTruthParticle(*truthParticle); // 20.7.0.1
149 bool isTrueConv = false;
150 float trueR = -999;
151 float truthEta = -999;
152 if (tmp && tmp->hasDecayVtx()) {
153 float x = tmp->decayVtx()->x();
154 float y = tmp->decayVtx()->y();
155 trueR = std::sqrt(x * x + y * y);
156 }
157
158 if (tmp != nullptr) {
159 truthEta = tmp->eta();
160 isTrueConv = xAOD::EgammaHelpers::isTrueConvertedPhoton(tmp); // rel20
161 }
162
163 m_oPhotonValidationPlots.convTruthR->Fill(trueR, weight);
164 m_oPhotonValidationPlots.convTruthRvsEta->Fill(trueR, truthEta, weight);
165 if (isTrueConv)
166 m_oPhotonValidationPlots.m_oTruthIsoConvPlots.fill(*truthParticle,
167 *eventInfo);
168 if (!isTrueConv)
169 m_oPhotonValidationPlots.m_oTruthIsoUncPlots.fill(*truthParticle,
170 *eventInfo);
171
172 const xAOD::Photon* recoPhoton =
174 if (recoPhoton) {
175 m_oPhotonValidationPlots.convTruthMatchedR->Fill(trueR, weight);
176 m_oPhotonValidationPlots.convTruthMatchedRvsEta->Fill(
177 trueR, truthEta, weight);
178
179 m_oPhotonValidationPlots.m_oTruthRecoPlots.fill(*truthParticle,
180 *eventInfo);
181 const float vtxRad = xAOD::EgammaHelpers::conversionRadius(recoPhoton);
182 m_oPhotonValidationPlots.convTruthRvsRecoR->Fill(trueR,vtxRad,weight);
183
184 if (isTrueConv) {
185 m_oPhotonValidationPlots.m_oTruthRecoConvPlots.fill(*truthParticle,
186 *eventInfo);
187 } else {
188 m_oPhotonValidationPlots.m_oTruthRecoUncPlots.fill(*truthParticle,
189 *eventInfo);
190 }
191 bool val_loose = false;
192 recoPhoton->passSelection(val_loose, "Loose");
193 if (val_loose) {
194 m_oPhotonValidationPlots.m_oTruthRecoLoosePlots.fill(*truthParticle,
195 *eventInfo);
196 if (isTrueConv) {
197 m_oPhotonValidationPlots.m_oTruthRecoLooseConvPlots.fill(
198 *truthParticle, *eventInfo);
199 } else {
200 m_oPhotonValidationPlots.m_oTruthRecoLooseUncPlots.fill(
201 *truthParticle, *eventInfo);
202 }
203 } //-- end truth loose
204 bool val_tight = false;
205 recoPhoton->passSelection(val_tight, "Tight");
206 if (val_tight) {
207 m_oPhotonValidationPlots.m_oTruthRecoTightPlots.fill(*truthParticle,
208 *eventInfo);
209 if (isTrueConv) {
210 m_oPhotonValidationPlots.m_oTruthRecoTightConvPlots.fill(
211 *truthParticle, *eventInfo);
212 } else {
213 m_oPhotonValidationPlots.m_oTruthRecoTightUncPlots.fill(
214 *truthParticle, *eventInfo);
215 }
216 } //-- end truth tight
217 } //-- end recoPhoton
218 } //-- end Photons
219 } // -- end fill histos iso particles
220
221 //---------Electrons----------------------
222 if (!fillRecoElecHistograms(truthParticles.ptr(), eventInfo.ptr())) {
223 ATH_MSG_ERROR("Filling reco elecectron hists failed " << name()
224 << "...");
225 return StatusCode::FAILURE;
226 }
227
228 //---------LRTElectrons----------------------
229 if(!m_lrtelectronContainerKey.empty()){
230 if (!fillLRTElecHistograms(truthParticles.ptr(), eventInfo.ptr())) {
231 ATH_MSG_ERROR("Filling lrt elecectron hists failed " << name() << "...");
232 return StatusCode::FAILURE;
233 }
234 }
235
236 //---------Frwd Electrons----------------------
237 if (!fillRecoFrwdElecHistograms(truthParticles.ptr(), eventInfo.ptr())) {
238 ATH_MSG_ERROR("Filling reco frwd elecectron hists failed " << name()
239 << "...");
240 return StatusCode::FAILURE;
241 }
242 //----------Photons
243 if (!fillRecoPhotHistograms(truthParticles.ptr(), eventInfo.ptr())) {
244 ATH_MSG_ERROR("Filling reco photon hists failed " << name() << "...");
245 return StatusCode::FAILURE;
246 }
247 } else // end is MC / code using truth particles
248 {//---------Electrons----------------------
249 if (!fillRecoElecHistograms(nullptr, eventInfo.ptr())) {
250 ATH_MSG_ERROR("Filling reco elecectron hists failed " << name()
251 << "...");
252 return StatusCode::FAILURE;
253 }
254 //---------Frwd Electrons----------------------
255 if (!fillRecoFrwdElecHistograms(nullptr, eventInfo.ptr())) {
256 ATH_MSG_ERROR("Filling reco frwd elecectron hists failed " << name()
257 << "...");
258 return StatusCode::FAILURE;
259 }
260 //----------Photons
261 if (!fillRecoPhotHistograms(nullptr, eventInfo.ptr())) {
262 ATH_MSG_ERROR("Filling reco photon hists failed " << name() << "...");
263 return StatusCode::FAILURE;
264 }
265
266 }
267
268
269
270 return StatusCode::SUCCESS;
271}
272
274{
275 ATH_MSG_DEBUG ("Filling reco electron hists " << name() << "...");
276
277 const EventContext& ctx = Gaudi::Hive::currentContext();
279 ATH_CHECK(Electrons.isValid());
280
281 int numofele=0;
282
283 float weight = eventInfo->beamSpotWeight();
284
285 for(const auto *const electron : *Electrons){
286 bool isElecPrompt=false;
287
288 if(!(electron->isGoodOQ (xAOD::EgammaParameters::BADCLUSELECTRON))) continue;
289
290 if(electron->author()&xAOD::EgammaParameters::AuthorElectron||
291 electron->author()&xAOD::EgammaParameters::AuthorAmbiguous) numofele++;
292
293 if(!m_isMC) m_oElectronValidationPlots.fill(*electron,*eventInfo,isElecPrompt);
294 else {
295 static const SG::ConstAccessor<int> truthTypeAcc ("truthType");
296 if(truthTypeAcc.isAvailable (*electron)) {
299 isElecPrompt=true;
300 //fill energy scale
301 const xAOD::TruthParticle* thePart = xAOD::TruthHelpers::getTruthParticle(*electron); // 20.7.X.Y.I
302 if(thePart) {
303 float EtLin = (electron->pt()-thePart->pt())/thePart->pt();
304 m_oElectronValidationPlots.res_et->Fill(thePart->pt()/GeV,EtLin,weight);
305 m_oElectronValidationPlots.res_eta->Fill(thePart->eta(),EtLin,weight);
306 if (thePart->pt()/GeV>20.) {
307 m_oElectronValidationPlots.res_et_cut->Fill(thePart->pt()/GeV,EtLin,weight);
308 m_oElectronValidationPlots.res_eta_cut->Fill(thePart->eta(),EtLin,weight);
309 m_oElectronValidationPlots.res_et_cut_pt_20->Fill(thePart->pt()/GeV,EtLin,weight);
310 m_oElectronValidationPlots.res_eta_cut_pt_20->Fill(thePart->eta(),EtLin,weight);
311 }
312 m_oElectronValidationPlots.matrix->Fill(electron->pt()/GeV,thePart->pt()/GeV);
313 } else {
314 ATH_MSG_INFO ("Truth particle associated not in egamma truth collection");
315 }
316 }
317
318 } else if(m_isMC){ if(Match(electron,11, truthParticles)!=nullptr ) isElecPrompt=true;}
319
320 m_oElectronValidationPlots.fill(*electron,*eventInfo,isElecPrompt);
321 }
322 }
323 m_oElectronValidationPlots.m_oCentralElecPlots.nParticles->Fill(numofele);
324 m_oElectronValidationPlots.m_oCentralElecPlots.nParticles_weighted->Fill(numofele,weight);
325
326 return StatusCode::SUCCESS;
327}
328
330{
331 ATH_MSG_DEBUG ("Filling lrt electron hists " << name() << "...");
332
333 const EventContext& ctx = Gaudi::Hive::currentContext();
335 ATH_CHECK(LRTElectrons.isValid());
336
337 int numofele=0;
338
339 float weight = eventInfo->beamSpotWeight();
340 static const SG::ConstAccessor<int> truthTypeAcc ("truthType");
341 for(const auto *const electron : *LRTElectrons){
342 bool isElecPrompt=false;
343
344 if(!(electron->isGoodOQ (xAOD::EgammaParameters::BADCLUSELECTRON))) continue;
345
346 // Retrieve electron ID, compute on-the-fly if decoration is missing (for AODs)
347 bool pass_LHVeryLooseNoPix = false;
348 if (m_acc_electronLLH_VeryLooseNoPix.isAvailable(*electron)) electron->passSelection(pass_LHVeryLooseNoPix, "DFCommonElectronsLHVeryLooseNoPix");
349 else pass_LHVeryLooseNoPix = static_cast<bool>(m_Electron_VeryLooseNoPix_LLHTool->accept(electron));
350
351 bool pass_LHLooseNoPix = false;
352 if (m_acc_electronLLH_LooseNoPix.isAvailable(*electron)) electron->passSelection(pass_LHLooseNoPix, "DFCommonElectronsLHLooseNoPix");
353 else pass_LHLooseNoPix = static_cast<bool>(m_Electron_LooseNoPix_LLHTool->accept(electron));
354
355 bool pass_LHMediumNoPix = false;
356 if (m_acc_electronLLH_MediumNoPix.isAvailable(*electron)) electron->passSelection(pass_LHMediumNoPix, "DFCommonElectronsLHMediumNoPix");
357 else pass_LHMediumNoPix = static_cast<bool>(m_Electron_MediumNoPix_LLHTool->accept(electron));
358
359 bool pass_LHTightNoPix = false;
360 if (m_acc_electronLLH_TightNoPix.isAvailable(*electron)) electron->passSelection(pass_LHTightNoPix, "DFCommonElectronsLHTightNoPix");
361 else pass_LHTightNoPix = static_cast<bool>(m_Electron_TightNoPix_LLHTool->accept(electron));
362
363
364 if(truthTypeAcc.isAvailable(*electron)) {
367 isElecPrompt=true;
368 //fill energy scale
369 const xAOD::TruthParticle* thePart = xAOD::TruthHelpers::getTruthParticle(*electron); // 20.7.X.Y.I
370 if(thePart) {
371 float EtLin = (electron->pt()-thePart->pt())/thePart->pt();
372 m_oLRTElectronValidationPlots.res_et->Fill(thePart->pt()/GeV,EtLin,weight);
373 m_oLRTElectronValidationPlots.res_eta->Fill(thePart->eta(),EtLin,weight);
374 if (thePart->pt()/GeV>20.) {
375 m_oLRTElectronValidationPlots.res_et_cut->Fill(thePart->pt()/GeV,EtLin,weight);
376 m_oLRTElectronValidationPlots.res_eta_cut->Fill(thePart->eta(),EtLin,weight);
377 m_oLRTElectronValidationPlots.res_et_cut_pt_20->Fill(thePart->pt()/GeV,EtLin,weight);
378 m_oLRTElectronValidationPlots.res_eta_cut_pt_20->Fill(thePart->eta(),EtLin,weight);
379 }
380 m_oLRTElectronValidationPlots.matrix->Fill(electron->pt()/GeV,thePart->pt()/GeV);
381 }else {
382 ATH_MSG_INFO ("Truth particle associated not in egamma truth collection");
383 }
384 }
385 } else if(m_isMC){ if(Match(electron,11, truthParticles)!=nullptr ) isElecPrompt=true;}
386
387
388 m_oLRTElectronValidationPlots.fill(*electron,*eventInfo, isElecPrompt, pass_LHVeryLooseNoPix, pass_LHLooseNoPix, pass_LHMediumNoPix, pass_LHTightNoPix);
389 if(electron->author()&xAOD::EgammaParameters::AuthorElectron||
390 electron->author()&xAOD::EgammaParameters::AuthorAmbiguous) numofele++;
391
392 }
393
394 m_oLRTElectronValidationPlots.m_oCentralElecPlots.nParticles->Fill(numofele);
395 m_oLRTElectronValidationPlots.m_oCentralElecPlots.nParticles_weighted->Fill(numofele,weight);
396
397 return StatusCode::SUCCESS;
398}
399
401{
402 ATH_MSG_DEBUG ("Filling reco frwd electron hists " << name() << "...");
403
404 const EventContext& ctx = Gaudi::Hive::currentContext();
406 ATH_CHECK(ElectronsFrwd.isValid());
407
408 int numoffrwdele=0;
409 float weight = eventInfo->beamSpotWeight();
410
411 for(const auto *const frwdelectron : *ElectronsFrwd){
412 if(!(frwdelectron->isGoodOQ (xAOD::EgammaParameters::BADCLUSELECTRON))) continue;
413 bool isElecPrompt=false;
414 if (m_isMC) {
415 if((Match(frwdelectron,11, truthParticles)!=nullptr )) isElecPrompt=true;
416 }
417 m_oElectronValidationPlots.fill(*frwdelectron,*eventInfo,isElecPrompt);
418 numoffrwdele++;
419 isElecPrompt=false;
420 }
421
422 m_oElectronValidationPlots.m_oFrwdElecPlots.nParticles->Fill(numoffrwdele);
423 m_oElectronValidationPlots.m_oFrwdElecPlots.nParticles_weighted->Fill(numoffrwdele,weight);
424
425 return StatusCode::SUCCESS;
426}
427
429{
430 ATH_MSG_DEBUG ("Filling reco photon hists " << name() << "...");
431
432 const EventContext& ctx = Gaudi::Hive::currentContext();
434 ATH_CHECK(Photons.isValid());
435
436 int numofPhot=0;
437 int numofAmb=0;
438 int numPhotAll=0;
439 int numofCnv=0;
440 float weight = eventInfo->beamSpotWeight();
441
442 for(const auto *photon : *Photons){
443 bool isPhotPrompt=false;
444 if (photon->author()&xAOD::EgammaParameters::AuthorCaloTopo35) continue;//21.0.>7
445 if(!(photon->isGoodOQ (xAOD::EgammaParameters::BADCLUSPHOTON))) continue;
446 if (m_useOQQuality) {
447 if (!PhotonHelpers::passOQquality(*photon)) continue;
448 }
449
450 if(photon->author()) numofPhot++;
451 else if(photon->author()&xAOD::EgammaParameters::AuthorAmbiguous) numofAmb++;
452 if(xAOD::EgammaHelpers::isConvertedPhoton(photon)) numofCnv++;
453 if(!m_isMC) m_oPhotonValidationPlots.fill(*photon,*eventInfo, isPhotPrompt);
454 else {
455 static const SG::ConstAccessor<int> truthTypeAcc ("truthType");
456 if(truthTypeAcc.isAvailable(*photon)) {
459 isPhotPrompt=true;
460 //fill energy scale
461 const xAOD::TruthParticle* thePart = xAOD::TruthHelpers::getTruthParticle(*photon);//20.7.X.Y.I
462 // const xAOD::TruthParticle* thePart = xAOD::EgammaHelpers::getTruthParticle(photon);
463 if(thePart&&thePart->pt()/GeV>20.) {
464 float EtLin = (photon->pt()-thePart->pt())/thePart->pt();
465 m_oPhotonValidationPlots.res_et->Fill(thePart->pt()/GeV,EtLin,weight);
466 m_oPhotonValidationPlots.res_eta->Fill(thePart->eta(),EtLin,weight);
467 if (std::abs(EtLin)<0.2){
468 m_oPhotonValidationPlots.res_et_cut->Fill(thePart->pt()/GeV,EtLin,weight);
469 m_oPhotonValidationPlots.res_eta_cut->Fill(thePart->eta(),EtLin,weight);
470 }
471 }else {
472 ATH_MSG_INFO("Truth particle associated not in egamma truth collection");
473 }
474 }
475
476 } else if(m_isMC){if(Match(photon,22, truthParticles)!=nullptr ) isPhotPrompt=true;}
477
478 m_oPhotonValidationPlots.fill(*photon,*eventInfo, isPhotPrompt);
479
480 }
481 }
482 numPhotAll = numofPhot+numofAmb;
483 m_oPhotonValidationPlots.m_oAllPlots.m_nParticles->Fill(numPhotAll);
484 m_oPhotonValidationPlots.m_oPhotPlots.m_nParticles->Fill(numofPhot);
485 m_oPhotonValidationPlots.m_oAmbPhotPlots.m_nParticles->Fill(numofAmb);
486 m_oPhotonValidationPlots.m_oConvPhotPlots.m_nParticles->Fill(numofCnv);
487
488 m_oPhotonValidationPlots.m_oAllPlots.m_nParticles_weighted->Fill(numPhotAll,weight);
489 m_oPhotonValidationPlots.m_oPhotPlots.m_nParticles_weighted->Fill(numofPhot,weight);
490 m_oPhotonValidationPlots.m_oAmbPhotPlots.m_nParticles_weighted->Fill(numofAmb,weight);
491 m_oPhotonValidationPlots.m_oConvPhotPlots.m_nParticles_weighted->Fill(numofCnv,weight);
492
493
494 return StatusCode::SUCCESS;
495}
496
498 {
499 ATH_MSG_INFO ("Finalising hists " << name() << "...");
501 m_oPhotonValidationPlots.finalize();
502 return StatusCode::SUCCESS;
503 }
504
506 int pdg,
507 const xAOD::TruthParticleContainer* truthParticles) {
508 float currentdr = 0.05;
509 const xAOD::TruthParticle* matchedTruthParticle = nullptr;
510 if (truthParticles){
511 for (const auto *truthParticle: *truthParticles){
512 if (std::abs(truthParticle->pdgId()) != pdg || !MC::isStable(truthParticle)) continue;
513 float dr = particle->p4().DeltaR(truthParticle->p4());
514 if (dr < currentdr){
515 currentdr = dr;
516 matchedTruthParticle = truthParticle;
517 }
518 }
519 }
520 return matchedTruthParticle;
521}
522
523
524}
525
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_DEBUG(x,...)
#define ATH_MSG_ERROR(x,...)
#define ATH_MSG_INFO(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)
float conversionRadius(const xAOD::Vertex *vx)
return the conversion radius or 9999.
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.