ATLAS Offline Software
dumpAllSystematics.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include <format>
6 
7 #include <set>
8 // EDM include(s):
9 
12 #include "xAODEgamma/Egamma.h"
15 #include "xAODCore/ShallowCopy.h"
16 
17 #include <xAODTruth/TruthParticle.h> // TODO: this introduces an additional dependecy which is not needed by the tool...
19 #include <xAODTruth/TruthVertex.h>
22 
27 
28 #include "GaudiKernel/ITHistSvc.h"
29 
30 
31 // local include
32 #include "dumpAllSystematics.h"
33 
34 DumpAllSystematics::DumpAllSystematics(const std::string& name, ISvcLocator* svcLoc)
35  : AthAlgorithm(name, svcLoc)
36 {
37  declareProperty("EgammaCalibrationAndSmearingTools", m_EgammaCalibrationAndSmearingTools);
38  declareProperty("particle", m_particle_name="", "electron/photon");
39  declareProperty("recoContainer", m_reco_container_name="", "reco container name");
40  declareProperty("keepOnlyOne", m_keep_one=false, "keep only the most energetic particle");
41 }
42 
43 
45 {
46  // Greet the user:
47  ATH_MSG_INFO ("Initializing " << name() << "...");
48 
49  if (m_particle_name.empty()) {
50  ATH_MSG_WARNING("particle property is empty, choose between \"photon\" or \"electron\". Assuming electron.");
51  m_particle_name = "electron";
52  }
53  if (m_particle_name != "electron" and m_particle_name != "photon")
54  {
55  ATH_MSG_FATAL("cannot understand particle property: must be \"electron\" or \"photon\"");
56  }
57 
59 
60  // Retrieve the tools:
61  ATH_MSG_INFO("retrieving tools");
62  if (!m_EgammaCalibrationAndSmearingTools.retrieve().isSuccess())
63  { ATH_MSG_ERROR("Cannot retrieve calibration tools"); }
64  ATH_MSG_INFO("retrieving tools, done");
65 
67  ATH_MSG_FATAL("no tool specified in the job options");
68  return StatusCode::FAILURE;
69  }
70  ATH_MSG_INFO("number of tools: " << m_EgammaCalibrationAndSmearingTools.size());
71  if (m_reco_container_name.empty()) {
73  else m_reco_container_name = "Photons";
74  }
75 
76  ATH_MSG_INFO("================================================================================");
77  ATH_MSG_INFO("particle: " << m_particle_name);
78  ATH_MSG_INFO("keep only one: " << m_keep_one);
79  ATH_MSG_INFO("reco container: " << m_reco_container_name);
80  ATH_MSG_INFO("================================================================================");
81 
82 
83 
84  ATH_MSG_DEBUG("creating tree");
85 
86  const std::string prefix = m_particle_type == ParticleType::ELECTRON ? "el_" : "ph_";
87  m_tree = new TTree("all_sys", "all_sys");
88  m_tree->Branch("index", &m_instance_index, "index/I")->SetTitle("index of the particle as in the original dataset");
89  m_tree->Branch("actualIntPerXing", &m_actualIntPerXing, "actualIntPerXing/F");
90  m_tree->Branch("eventNumber", &m_EventNumber, "eventNumber/I");
91  m_tree->Branch("runNumber", &m_RunNumber, "runNumber/I");
92  m_tree->Branch((prefix + "truth_E").c_str(), &m_truth_E, (prefix + "truth_E/F").c_str());
93  m_tree->Branch((prefix + "truth_eta").c_str(), &m_truth_eta, (prefix + "truth_eta/F").c_str());
94  m_tree->Branch((prefix + "truth_pt").c_str(), &m_truth_pt, (prefix + "truth_pt/F").c_str());
95  m_tree->Branch((prefix + "truth_phi").c_str(), &m_truth_phi, (prefix + "truth_phi/F").c_str());
96  m_tree->Branch((prefix + "truth_pdgId").c_str(), &m_truth_pdgId, (prefix + "truth_pdgId/I").c_str());
97  m_tree->Branch((prefix + "truth_parent_pdgId").c_str(), &m_truth_parent_pdgId, (prefix + "truth_parent_pdgId/I").c_str());
98  m_tree->Branch((prefix + "truth_matched").c_str(), &m_truth_matched, (prefix + "truth_matched/O").c_str());
99  m_tree->Branch((prefix + "cl_eta").c_str(), &m_cl_eta, (prefix + "cl_eta/F").c_str());
100  m_tree->Branch((prefix + "cl_etaCalo").c_str(), &m_cl_etaCalo, (prefix + "cl_etaCalo/F").c_str());
101  m_tree->Branch((prefix + "cl_phi").c_str(), &m_cl_phi, (prefix + "cl_phi/F").c_str());
102  m_tree->Branch((prefix + "cl_rawcl_Es0").c_str(), &m_cl_rawcl_Es0, (prefix + "cl_rawcl_Es0/F").c_str());
103  m_tree->Branch((prefix + "cl_rawcl_Es1").c_str(), &m_cl_rawcl_Es1, (prefix + "cl_rawcl_Es1/F").c_str());
104  m_tree->Branch((prefix + "cl_rawcl_Es2").c_str(), &m_cl_rawcl_Es2, (prefix + "cl_rawcl_Es2/F").c_str());
105  m_tree->Branch((prefix + "cl_rawcl_Es3").c_str(), &m_cl_rawcl_Es3, (prefix + "cl_rawcl_Es3/F").c_str());
106  m_tree->Branch((prefix + "cl_E").c_str(), &m_cl_E, (prefix + "cl_E/F").c_str())->SetTitle("original xAOD caloCluster energy");
107  m_tree->Branch((prefix + "wstot").c_str(), &m_wstot, (prefix + "wstot/F").c_str());
109  m_tree->Branch("ph_truth_isConv", &m_truth_isConv, "ph_truth_isConv/O");
110  m_tree->Branch("ph_truth_Rconv", &m_truth_Rconv, "ph_truth_Rconv/F");
111  m_tree->Branch("ph_Rconv", &m_ph_Rconv, "ph_Rconv/F");
112  m_tree->Branch("ph_convFlag", &m_ph_convFlag, "ph_convFlag/I");
113  }
114  m_tree->Branch("npv", &m_npv, "npv/I");
115 
120 
121  std::vector<std::vector<std::string> > all_sys_names_per_tool;
122  std::set<std::string> all_sys_names;
123 
124  for (unsigned int itool = 0; itool != m_EgammaCalibrationAndSmearingTools.size(); ++itool) {
125  const std::string tool_name = m_EgammaCalibrationAndSmearingTools[itool].name();
126  {
127  const std::string branch_name = prefix + tool_name + "_nominal_E";
128  m_tree->Branch(branch_name.c_str(), &m_nominal_E[itool], (branch_name + "/F").c_str());
129  }
130 
131  const CP::SystematicSet& sys_set = m_EgammaCalibrationAndSmearingTools[itool]->recommendedSystematics();
132  ATH_MSG_INFO("size of the systematics set for tool [" << itool << "] " + m_EgammaCalibrationAndSmearingTools[itool].name() << ": " << sys_set.size());
133  std::vector<std::string> sys_names; sys_names.reserve(sys_set.size());
134  for (const auto& sys : sys_set) { if (sys.parameter() == 1) { sys_names.push_back(sys.name()); all_sys_names.insert(sys.name()); } }
135  std::sort(sys_names.begin(), sys_names.end());
136  all_sys_names_per_tool.push_back(sys_names);
137 
138 
139  m_energy_variations[itool].resize(sys_set.size());
140 
141  int isys = 0;
142  for (const auto& sys : sys_set) {
143  const std::string branch_name = prefix + tool_name + "_ratio_" + sys.name();
144  m_tree->Branch(branch_name.c_str(), &m_energy_variations[itool][isys],
145  (branch_name + "/F").c_str());
146  ++isys;
147  }
148 
149  m_tree->Branch((prefix + tool_name + "_ratio_SCALE_sum__1up").c_str(), &m_energy_variations_sum_up[itool], (prefix + tool_name + "_ratio_SCALE_sum__1up/F").c_str());
150  m_tree->Branch((prefix + tool_name + "_ratio_SCALE_sum__1down").c_str(), &m_energy_variations_sum_down[itool], (prefix + tool_name + "_ratio_SCALE_sum__1down/F").c_str());
151  }
152 
153  {
154  std::string header = std::string(45, ' ');
155  for (unsigned int i = 0; i != m_EgammaCalibrationAndSmearingTools.size(); ++i) {
156  header += std::format(" [{}] ", i);
157  }
159  }
160  for (auto sysname : all_sys_names) {
161  std::string line = std::format("{:>45}", sysname);
162  for (const auto& sys_per_tool : all_sys_names_per_tool) {
163  if (std::find(sys_per_tool.begin(), sys_per_tool.end(), sysname) != sys_per_tool.end()) line += " X ";
164  else line += " ";
165  }
167  }
168 
169  if (m_particle_type == ParticleType::ELECTRON) ATH_MSG_INFO("dumping electrons");
170  else if (m_particle_type == ParticleType::PHOTON) ATH_MSG_INFO("dumping photons");
171 
172  // output configuration
173  ServiceHandle<ITHistSvc> histSvc("THistSvc", name());
174  CHECK(histSvc.retrieve());
175  const std::string tree_stream = "/DATASTREAM";
176  CHECK(histSvc->regTree(tree_stream + "/myTree", m_tree));
177 
178  return StatusCode::SUCCESS;
179 }
180 
181 
183  ATH_MSG_INFO("Particle saved: " << m_tree->GetEntries());
184  if (m_tree->GetEntries() == 0) ATH_MSG_WARNING("no particle saved");
185  ATH_MSG_INFO("Finalizing " << name() << "...");
186 
187  return StatusCode::SUCCESS;
188 }
189 
191 {
192  const xAOD::EventInfo* eventInfo = nullptr;
193  ATH_CHECK(evtStore()->retrieve(eventInfo));
194 
197  m_EventNumber = eventInfo->eventNumber();
198  m_RunNumber = eventInfo->runNumber();
199 
200  // vertex information
201  const xAOD::VertexContainer* vtx_container = nullptr;
202  if (!evtStore()->retrieve(vtx_container, "PrimaryVertices")) { m_npv = -999; }
203  else {
204  m_npv = 0;
205  for (const auto* vtx : *vtx_container) { if (vtx->vertexType() == xAOD::VxType::PriVtx or vtx->vertexType() == xAOD::VxType::PileUp) ++m_npv; }
206  }
207 
208 
209  if (m_particle_type == ParticleType::ELECTRON) { // TODO: find a better way to generalize to electron / photons
210 
211  const xAOD::ElectronContainer* electrons = nullptr;
213 
214  std::pair<xAOD::ElectronContainer*, xAOD::ShallowAuxContainer*> electrons_shallowCopy = xAOD::shallowCopyContainer(*electrons);
215  for (xAOD::Electron* el : *electrons_shallowCopy.first) {
216  ATH_MSG_DEBUG("new electron eta: " << el->eta());
217 
218 
219  CHECK(do_truth(*el));
220  CHECK(do_egamma(*el));
221  for (unsigned int itool = 0; itool != m_EgammaCalibrationAndSmearingTools.size(); ++itool) {
222  CHECK(do_energy(*el, itool));
223  }
224 
225  m_tree->Fill();
226 
227  if (m_keep_one) break;
228  }
229  }
231 
232  const xAOD::PhotonContainer* photons = nullptr;
234 
235  std::pair<xAOD::PhotonContainer*, xAOD::ShallowAuxContainer*> photons_shallowCopy = xAOD::shallowCopyContainer(*photons);
236  for (xAOD::Photon* ph : *photons_shallowCopy.first) {
237  ATH_MSG_DEBUG("new photon eta: " << ph->eta());
238 
239  CHECK(do_truth(*ph));
240  CHECK(do_egamma(*ph));
241 
242  if (const auto* vertex = ph->vertex()) {
243  m_ph_Rconv = hypot(vertex->position().x(), vertex->position().y());
244  }
245  else { m_ph_Rconv = 0; }
246 
247  const auto original = xAOD::EgammaHelpers::conversionType(ph);
248  if (original == 3) m_ph_convFlag = 2;
249  else if (original != 0) m_ph_convFlag = 1;
250  else m_ph_convFlag = original;
251 
252  for (unsigned int itool = 0; itool != m_EgammaCalibrationAndSmearingTools.size(); ++itool) {
253  CHECK(do_energy(*ph, itool));
254  }
255 
256  m_tree->Fill();
257 
258  if (m_keep_one) break;
259  }
260  }
261 
262  return StatusCode::SUCCESS;
263 }
264 
266 {
267  // truth
268  const xAOD::TruthParticle* true_particle = nullptr;
270 
271  if (true_particle) {
272  m_truth_matched = true;
273  m_truth_pt = true_particle->pt();
274  m_truth_phi = true_particle->phi();
275  m_truth_eta = true_particle->eta();
276  m_truth_E = true_particle->e();
277  m_truth_pdgId = true_particle->pdgId();
278 
279  m_truth_parent_pdgId = -999;
280  for (size_t p = 0; p < true_particle->nParents(); ++p) {
281  if (true_particle->parent(p)) { m_truth_parent_pdgId = true_particle->parent(p)->pdgId(); break; }
282  }
283 
286  m_truth_Rconv = (true_particle->pdgId() == 22) ? (true_particle->hasDecayVtx() ? true_particle->decayVtx()->perp() : 0) : -999;
287  }
288 
289  }
290  else {
292  m_truth_matched = false;
293  m_truth_isConv = false; // careful here (always check truth_matched before)
294  }
295  return StatusCode::SUCCESS;
296 }
297 
299 {
300  m_cl_phi = particle.phi();
301  m_cl_eta = particle.caloCluster()->eta();
302  m_cl_etaCalo = xAOD::get_eta_calo(*particle.caloCluster(),particle.author());
303  m_cl_rawcl_Es0 = particle.caloCluster()->energyBE(0);
304  m_cl_rawcl_Es1 = particle.caloCluster()->energyBE(1);
305  m_cl_rawcl_Es2 = particle.caloCluster()->energyBE(2);
306  m_cl_rawcl_Es3 = particle.caloCluster()->energyBE(3);
307  static const SG::AuxElement::Accessor<float> wstot_accessor("wtots1");
308  m_wstot = wstot_accessor.isAvailable(particle) ? wstot_accessor(particle) : -999;
309  m_cl_E = particle.caloCluster()->e();
310 
311  return StatusCode::SUCCESS;
312 }
313 
315 {
317  std::fill(m_energy_variations[itool].begin(), m_energy_variations[itool].end(), -999.);
318 
319  if (m_EgammaCalibrationAndSmearingTools[itool]->applySystematicVariation(CP::SystematicSet()) != StatusCode::SUCCESS) {
320  ATH_MSG_ERROR("cannot apply nominal energy");
321  return StatusCode::FAILURE;
322  }
323  if (m_EgammaCalibrationAndSmearingTools[itool]->applyCorrection(particle) == CP::CorrectionCode::Ok) {
324  m_nominal_E[itool] = particle.e();
325  ATH_MSG_DEBUG("nominal energy: " << particle.e());
326  }
327  else {
328  ATH_MSG_WARNING("Cannot calibrate electron, eta: " << particle.eta() << " phi: " << particle.phi());
329  return StatusCode::FAILURE;
330  }
331 
332  // systematics
333  m_energy_variations_sum_up[itool] = 0.;
334  m_energy_variations_sum_down[itool] = 0.;
335 
336  const CP::SystematicSet& sys_set = m_EgammaCalibrationAndSmearingTools[itool]->recommendedSystematics();
337  int isys = -1; // ugly
338  for (const auto& sys : sys_set) {
339  ++isys;
341  ss.insert(sys);
342 
343  if (m_EgammaCalibrationAndSmearingTools[itool]->applySystematicVariation(ss) != StatusCode::SUCCESS) {
344  ATH_MSG_ERROR("Cannot configure calibration tool for systematic");
345  continue;
346  }
347 
348  if (m_EgammaCalibrationAndSmearingTools[itool]->applyCorrection(particle) == CP::CorrectionCode::Ok) {
349  m_energy_variations[itool][isys] = particle.e() / m_nominal_E[itool] - 1;
350 
351  if (sys.basename().find("SCALE") != std::string::npos) { // sum only the scale variations
352  if (sys.parameter() == 1) m_energy_variations_sum_up[itool] += m_energy_variations[itool][isys] * m_energy_variations[itool][isys];
353  else if (sys.parameter() == -1) m_energy_variations_sum_down[itool] += m_energy_variations[itool][isys] * m_energy_variations[itool][isys];
354  }
355  ATH_MSG_DEBUG("calibrated with systematic " << sys.name() << ": " << particle.e());
356  }
357  else {
358  ATH_MSG_WARNING("Cannot calibrate electron with systematic");
359  }
360  }
361 
364 
365  return StatusCode::SUCCESS;
366 }
367 
DumpAllSystematics::m_cl_rawcl_Es2
float m_cl_rawcl_Es2
Definition: dumpAllSystematics.h:71
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
ShallowCopy.h
DumpAllSystematics::m_RunNumber
uint32_t m_RunNumber
Definition: dumpAllSystematics.h:51
DumpAllSystematics::m_truth_isConv
bool m_truth_isConv
Definition: dumpAllSystematics.h:62
DumpAllSystematics::m_energy_variations
std::vector< std::vector< float > > m_energy_variations
Definition: dumpAllSystematics.h:81
DumpAllSystematics::m_cl_rawcl_Es3
float m_cl_rawcl_Es3
Definition: dumpAllSystematics.h:72
DumpAllSystematics::do_energy
StatusCode do_energy(xAOD::Egamma &particle, int itool)
Definition: dumpAllSystematics.cxx:314
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:79
header
Definition: hcg.cxx:526
DumpAllSystematics::m_truth_Rconv
float m_truth_Rconv
Definition: dumpAllSystematics.h:63
DumpAllSystematics::m_truth_matched
bool m_truth_matched
Definition: dumpAllSystematics.h:61
PowhegControl_ttHplus_NLO.ss
ss
Definition: PowhegControl_ttHplus_NLO.py:83
vtune_athena.format
format
Definition: vtune_athena.py:14
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
xAOD::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
SG::Accessor
Helper class to provide type-safe access to aux data.
Definition: Control/AthContainers/AthContainers/Accessor.h:68
CP::SystematicSet::size
size_t size() const
returns: size of the set
Definition: SystematicSet.h:71
DumpAllSystematics::m_npv
int m_npv
Definition: dumpAllSystematics.h:64
DumpAllSystematics::m_ph_convFlag
int m_ph_convFlag
Definition: dumpAllSystematics.h:75
DumpAllSystematics::do_truth
StatusCode do_truth(const xAOD::Egamma &particle)
Definition: dumpAllSystematics.cxx:265
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
CP::SystematicSet
Class to wrap a set of SystematicVariations.
Definition: SystematicSet.h:31
DumpAllSystematics::m_nominal_E
std::vector< float > m_nominal_E
Definition: dumpAllSystematics.h:78
xAOD::Egamma_v1
Definition: Egamma_v1.h:56
xAODTruthHelpers.h
dq_defect_bulk_create_defects.line
line
Definition: dq_defect_bulk_create_defects.py:27
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
DumpAllSystematics::execute
virtual StatusCode execute()
Definition: dumpAllSystematics.cxx:190
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:92
Egamma.h
AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
xAOD::TruthParticle_v1::hasDecayVtx
bool hasDecayVtx() const
Check for a decay vertex on this particle.
xAOD::TruthParticle_v1::nParents
size_t nParents() const
Number of parents of this particle.
Definition: TruthParticle_v1.cxx:117
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:209
DumpAllSystematics::m_ph_Rconv
float m_ph_Rconv
Definition: dumpAllSystematics.h:74
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
xAOD::TruthParticle_v1::e
virtual double e() const override final
The total energy of the particle.
ElectronContainer.h
lumiFormat.i
int i
Definition: lumiFormat.py:85
CaloCluster.h
SystematicRegistry.h
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
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
Definition: AthCommonDataStore.h:145
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
xAOD::TruthVertex_v1::perp
float perp() const
Vertex transverse distance from the beam line.
Definition: TruthVertex_v1.cxx:164
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:572
checkCorrelInHIST.prefix
dictionary prefix
Definition: checkCorrelInHIST.py:391
DumpAllSystematics::m_truth_E
float m_truth_E
Definition: dumpAllSystematics.h:58
DumpAllSystematics::DumpAllSystematics
DumpAllSystematics(const std::string &name, ISvcLocator *svcLoc)
Regular Algorithm constructor.
Definition: dumpAllSystematics.cxx:34
PhotonxAODHelpers.h
MuonSegmentReaderConfig.histSvc
histSvc
Definition: MuonSegmentReaderConfig.py:96
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
python.getProblemFolderFromLogs.el
dictionary el
Definition: getProblemFolderFromLogs.py:48
DumpAllSystematics::m_cl_E
float m_cl_E
Definition: dumpAllSystematics.h:73
DumpAllSystematics::m_energy_variations_sum_up
std::vector< float > m_energy_variations_sum_up
Definition: dumpAllSystematics.h:79
dumpAllSystematics.h
DumpAllSystematics::m_EgammaCalibrationAndSmearingTools
ToolHandleArray< CP::IEgammaCalibrationAndSmearingTool > m_EgammaCalibrationAndSmearingTools
Definition: dumpAllSystematics.h:84
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
AthAlgorithm
Definition: AthAlgorithm.h:47
DumpAllSystematics::ParticleType::PHOTON
@ PHOTON
DumpAllSystematics::m_averageIntPerXing
float m_averageIntPerXing
Definition: dumpAllSystematics.h:54
StatusCode.h
DumpAllSystematics::m_tree
TTree * m_tree
Definition: dumpAllSystematics.h:44
TruthVertex.h
xAOD::TruthParticle_v1::decayVtx
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
DumpAllSystematics::m_cl_rawcl_Es1
float m_cl_rawcl_Es1
Definition: dumpAllSystematics.h:70
xAOD::EventInfo_v1::averageInteractionsPerCrossing
float averageInteractionsPerCrossing() const
Average interactions per crossing for all BCIDs - for out-of-time pile-up.
Definition: EventInfo_v1.cxx:397
xAOD::EgammaHelpers::isTrueConvertedPhoton
bool isTrueConvertedPhoton(const xAOD::Photon *ph, float maxRadius=800.)
is the object matched to a true converted photon with R < maxRadius
Definition: EgammaTruthxAODHelpers.cxx:69
xAOD::VxType::PileUp
@ PileUp
Pile-up vertex.
Definition: TrackingPrimitives.h:574
DumpAllSystematics::m_actualIntPerXing
float m_actualIntPerXing
Definition: dumpAllSystematics.h:53
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
xAOD::TruthHelpers::getTruthParticle
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any)
Definition: xAODTruthHelpers.cxx:25
xAOD::TruthParticle_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: TruthParticle_v1.cxx:169
DumpAllSystematics::m_cl_rawcl_Es0
float m_cl_rawcl_Es0
Definition: dumpAllSystematics.h:69
xAOD::Electron_v1
Definition: Electron_v1.h:34
DumpAllSystematics::m_energy_variations_sum_down
std::vector< float > m_energy_variations_sum_down
Definition: dumpAllSystematics.h:80
xAOD::shallowCopyContainer
std::pair< std::unique_ptr< T >, std::unique_ptr< ShallowAuxContainer > > shallowCopyContainer(const T &cont, [[maybe_unused]] const EventContext &ctx)
Function making a shallow copy of a constant container.
Definition: ShallowCopy.h:110
DumpAllSystematics::m_truth_pdgId
int m_truth_pdgId
Definition: dumpAllSystematics.h:59
EventInfo.h
xAOD::EventInfo_v1
Class describing the basic event information.
Definition: EventInfo_v1.h:43
DumpAllSystematics::m_instance_index
int m_instance_index
Definition: dumpAllSystematics.h:52
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
CP::CorrectionCode::Ok
@ Ok
The correction was done successfully.
Definition: CorrectionCode.h:38
xAOD::Photon_v1
Definition: Photon_v1.h:37
DumpAllSystematics::m_truth_pt
float m_truth_pt
Definition: dumpAllSystematics.h:55
lumiFormat.fill
fill
Definition: lumiFormat.py:104
xAOD::TruthParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Definition: TruthParticle_v1.cxx:176
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DumpAllSystematics::initialize
virtual StatusCode initialize()
Definition: dumpAllSystematics.cxx:44
DumpAllSystematics::m_cl_etaCalo
float m_cl_etaCalo
Definition: dumpAllSystematics.h:68
DumpAllSystematics::m_truth_phi
float m_truth_phi
Definition: dumpAllSystematics.h:56
xAOD::EgammaHelpers::conversionType
xAOD::EgammaParameters::ConversionType conversionType(const xAOD::Photon *ph)
return the photon conversion type (see EgammaEnums)
Definition: PhotonxAODHelpers.cxx:21
xAOD::get_eta_calo
float get_eta_calo(const xAOD::CaloCluster &cluster, int author, bool do_throw=false)
Definition: EgammaCalibrationAndSmearingTool.h:73
xAOD::TruthParticle_v1::parent
const TruthParticle_v1 * parent(size_t i) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
Definition: TruthParticle_v1.cxx:126
xAOD::TruthParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TruthParticle_v1.cxx:161
DumpAllSystematics::m_reco_container_name
std::string m_reco_container_name
Definition: dumpAllSystematics.h:33
SG::ConstAccessor< T, AuxAllocator_t< T > >::isAvailable
bool isAvailable(const ELT &e) const
Test to see if this variable exists in the store.
xAOD::Egamma_v1::eta
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
Definition: Egamma_v1.cxx:70
DumpAllSystematics::do_egamma
StatusCode do_egamma(const xAOD::Egamma &particle)
Definition: dumpAllSystematics.cxx:298
DumpAllSystematics::m_wstot
float m_wstot
Definition: dumpAllSystematics.h:76
DumpAllSystematics::m_particle_type
ParticleType m_particle_type
Definition: dumpAllSystematics.h:42
TruthParticle.h
xAOD::TruthParticle_v1::pdgId
int pdgId() const
PDG ID code.
DumpAllSystematics::m_keep_one
bool m_keep_one
Definition: dumpAllSystematics.h:34
DumpAllSystematics::m_particle_name
std::string m_particle_name
Definition: dumpAllSystematics.h:32
DumpAllSystematics::m_cl_phi
float m_cl_phi
Definition: dumpAllSystematics.h:66
EgammaCalibrationAndSmearingTool.h
xAOD::Photon_v1::vertex
const xAOD::Vertex * vertex(size_t index=0) const
Pointer to the xAOD::Vertex/es that match the photon candidate.
Definition: Photon_v1.cxx:46
PhotonContainer.h
SystematicVariation.h
InDetDD::electrons
@ electrons
Definition: InDetDD_Defs.h:17
DumpAllSystematics::m_truth_parent_pdgId
int m_truth_parent_pdgId
Definition: dumpAllSystematics.h:60
EgammaTruthxAODHelpers.h
DumpAllSystematics::m_cl_eta
float m_cl_eta
Definition: dumpAllSystematics.h:67
DumpAllSystematics::finalize
virtual StatusCode finalize()
Definition: dumpAllSystematics.cxx:182
xAOD::EventInfo_v1::actualInteractionsPerCrossing
float actualInteractionsPerCrossing() const
Average interactions per crossing for the current BCID - for in-time pile-up.
Definition: EventInfo_v1.cxx:380
DumpAllSystematics::ParticleType::ELECTRON
@ ELECTRON
DumpAllSystematics::m_truth_eta
float m_truth_eta
Definition: dumpAllSystematics.h:57
ServiceHandle< ITHistSvc >
DumpAllSystematics::m_EventNumber
unsigned long long m_EventNumber
Definition: dumpAllSystematics.h:50