ATLAS Offline Software
dumpAllSystematics.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include <boost/algorithm/string/join.hpp>
6 #include <format>
7 
8 #include <set>
9 // EDM include(s):
10 
13 #include "xAODEgamma/Egamma.h"
16 #include "xAODCore/ShallowCopy.h"
17 
18 #include <xAODTruth/TruthParticle.h> // TODO: this introduces an additional dependecy which is not needed by the tool...
20 #include <xAODTruth/TruthVertex.h>
23 
28 
29 #include "GaudiKernel/ITHistSvc.h"
30 
31 
32 // local include
33 #include "dumpAllSystematics.h"
34 
35 DumpAllSystematics::DumpAllSystematics(const std::string& name, ISvcLocator* svcLoc)
36  : AthAlgorithm(name, svcLoc)
37 {
38  declareProperty("EgammaCalibrationAndSmearingTools", m_EgammaCalibrationAndSmearingTools);
39  declareProperty("particle", m_particle_name="", "electron/photon");
40  declareProperty("recoContainer", m_reco_container_name="", "reco container name");
41  declareProperty("keepOnlyOne", m_keep_one=false, "keep only the most energetic particle");
42 }
43 
44 
46 {
47  // Greet the user:
48  ATH_MSG_INFO ("Initializing " << name() << "...");
49 
50  if (m_particle_name.empty()) {
51  ATH_MSG_WARNING("particle property is empty, choose between \"photon\" or \"electron\". Assuming electron.");
52  m_particle_name = "electron";
53  }
54  if (m_particle_name != "electron" and m_particle_name != "photon")
55  {
56  ATH_MSG_FATAL("cannot understand particle property: must be \"electron\" or \"photon\"");
57  }
58 
60 
61  // Retrieve the tools:
62  ATH_MSG_INFO("retrieving tools");
63  if (!m_EgammaCalibrationAndSmearingTools.retrieve().isSuccess())
64  { ATH_MSG_ERROR("Cannot retrieve calibration tools"); }
65  ATH_MSG_INFO("retrieving tools, done");
66 
68  ATH_MSG_FATAL("no tool specified in the job options");
69  return StatusCode::FAILURE;
70  }
71  ATH_MSG_INFO("number of tools: " << m_EgammaCalibrationAndSmearingTools.size());
72  if (m_reco_container_name.empty()) {
74  else m_reco_container_name = "Photons";
75  }
76 
77  ATH_MSG_INFO("================================================================================");
78  ATH_MSG_INFO("particle: " << m_particle_name);
79  ATH_MSG_INFO("keep only one: " << m_keep_one);
80  ATH_MSG_INFO("reco container: " << m_reco_container_name);
81  ATH_MSG_INFO("================================================================================");
82 
83 
84 
85  ATH_MSG_DEBUG("creating tree");
86 
87  const std::string prefix = m_particle_type == ParticleType::ELECTRON ? "el_" : "ph_";
88  m_tree = new TTree("all_sys", "all_sys");
89  m_tree->Branch("index", &m_instance_index, "index/I")->SetTitle("index of the particle as in the original dataset");
90  m_tree->Branch("actualIntPerXing", &m_actualIntPerXing, "actualIntPerXing/F");
91  m_tree->Branch("eventNumber", &m_EventNumber, "eventNumber/I");
92  m_tree->Branch("runNumber", &m_RunNumber, "runNumber/I");
93  m_tree->Branch((prefix + "truth_E").c_str(), &m_truth_E, (prefix + "truth_E/F").c_str());
94  m_tree->Branch((prefix + "truth_eta").c_str(), &m_truth_eta, (prefix + "truth_eta/F").c_str());
95  m_tree->Branch((prefix + "truth_pt").c_str(), &m_truth_pt, (prefix + "truth_pt/F").c_str());
96  m_tree->Branch((prefix + "truth_phi").c_str(), &m_truth_phi, (prefix + "truth_phi/F").c_str());
97  m_tree->Branch((prefix + "truth_pdgId").c_str(), &m_truth_pdgId, (prefix + "truth_pdgId/I").c_str());
98  m_tree->Branch((prefix + "truth_parent_pdgId").c_str(), &m_truth_parent_pdgId, (prefix + "truth_parent_pdgId/I").c_str());
99  m_tree->Branch((prefix + "truth_matched").c_str(), &m_truth_matched, (prefix + "truth_matched/O").c_str());
100  m_tree->Branch((prefix + "cl_eta").c_str(), &m_cl_eta, (prefix + "cl_eta/F").c_str());
101  m_tree->Branch((prefix + "cl_etaCalo").c_str(), &m_cl_etaCalo, (prefix + "cl_etaCalo/F").c_str());
102  m_tree->Branch((prefix + "cl_phi").c_str(), &m_cl_phi, (prefix + "cl_phi/F").c_str());
103  m_tree->Branch((prefix + "cl_rawcl_Es0").c_str(), &m_cl_rawcl_Es0, (prefix + "cl_rawcl_Es0/F").c_str());
104  m_tree->Branch((prefix + "cl_rawcl_Es1").c_str(), &m_cl_rawcl_Es1, (prefix + "cl_rawcl_Es1/F").c_str());
105  m_tree->Branch((prefix + "cl_rawcl_Es2").c_str(), &m_cl_rawcl_Es2, (prefix + "cl_rawcl_Es2/F").c_str());
106  m_tree->Branch((prefix + "cl_rawcl_Es3").c_str(), &m_cl_rawcl_Es3, (prefix + "cl_rawcl_Es3/F").c_str());
107  m_tree->Branch((prefix + "cl_E").c_str(), &m_cl_E, (prefix + "cl_E/F").c_str())->SetTitle("original xAOD caloCluster energy");
108  m_tree->Branch((prefix + "wstot").c_str(), &m_wstot, (prefix + "wstot/F").c_str());
110  m_tree->Branch("ph_truth_isConv", &m_truth_isConv, "ph_truth_isConv/O");
111  m_tree->Branch("ph_truth_Rconv", &m_truth_Rconv, "ph_truth_Rconv/F");
112  m_tree->Branch("ph_Rconv", &m_ph_Rconv, "ph_Rconv/F");
113  m_tree->Branch("ph_convFlag", &m_ph_convFlag, "ph_convFlag/I");
114  }
115  m_tree->Branch("npv", &m_npv, "npv/I");
116 
121 
122  std::vector<std::vector<std::string> > all_sys_names_per_tool;
123  std::set<std::string> all_sys_names;
124 
125  for (unsigned int itool = 0; itool != m_EgammaCalibrationAndSmearingTools.size(); ++itool) {
126  const std::string tool_name = m_EgammaCalibrationAndSmearingTools[itool].name();
127  {
128  const std::string branch_name = prefix + tool_name + "_nominal_E";
129  m_tree->Branch(branch_name.c_str(), &m_nominal_E[itool], (branch_name + "/F").c_str());
130  }
131 
132  const CP::SystematicSet& sys_set = m_EgammaCalibrationAndSmearingTools[itool]->recommendedSystematics();
133  ATH_MSG_INFO("size of the systematics set for tool [" << itool << "] " + m_EgammaCalibrationAndSmearingTools[itool].name() << ": " << sys_set.size());
134  std::vector<std::string> sys_names; sys_names.reserve(sys_set.size());
135  for (const auto& sys : sys_set) { if (sys.parameter() == 1) { sys_names.push_back(sys.name()); all_sys_names.insert(sys.name()); } }
136  std::sort(sys_names.begin(), sys_names.end());
137  all_sys_names_per_tool.push_back(sys_names);
138 
139 
140  m_energy_variations[itool].resize(sys_set.size());
141 
142  int isys = 0;
143  for (const auto& sys : sys_set) {
144  const std::string branch_name = prefix + tool_name + "_ratio_" + sys.name();
145  m_tree->Branch(branch_name.c_str(), &m_energy_variations[itool][isys],
146  (branch_name + "/F").c_str());
147  ++isys;
148  }
149 
150  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());
151  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());
152  }
153 
154  {
155  std::string header = std::string(45, ' ');
156  for (unsigned int i = 0; i != m_EgammaCalibrationAndSmearingTools.size(); ++i) {
157  header += std::format(" [{}] ", i);
158  }
160  }
161  for (auto sysname : all_sys_names) {
162  std::string line = std::format("{:>45}", sysname);
163  for (const auto& sys_per_tool : all_sys_names_per_tool) {
164  if (std::find(sys_per_tool.begin(), sys_per_tool.end(), sysname) != sys_per_tool.end()) line += " X ";
165  else line += " ";
166  }
168  }
169 
170  if (m_particle_type == ParticleType::ELECTRON) ATH_MSG_INFO("dumping electrons");
171  else if (m_particle_type == ParticleType::PHOTON) ATH_MSG_INFO("dumping photons");
172 
173  // output configuration
174  ServiceHandle<ITHistSvc> histSvc("THistSvc", name());
175  CHECK(histSvc.retrieve());
176  const std::string tree_stream = "/DATASTREAM";
177  CHECK(histSvc->regTree(tree_stream + "/myTree", m_tree));
178 
179  return StatusCode::SUCCESS;
180 }
181 
182 
184  ATH_MSG_INFO("Particle saved: " << m_tree->GetEntries());
185  if (m_tree->GetEntries() == 0) ATH_MSG_WARNING("no particle saved");
186  ATH_MSG_INFO("Finalizing " << name() << "...");
187 
188  return StatusCode::SUCCESS;
189 }
190 
192 {
193  const xAOD::EventInfo* eventInfo = nullptr;
194  ATH_CHECK(evtStore()->retrieve(eventInfo));
195 
198  m_EventNumber = eventInfo->eventNumber();
199  m_RunNumber = eventInfo->runNumber();
200 
201  // vertex information
202  const xAOD::VertexContainer* vtx_container = nullptr;
203  if (!evtStore()->retrieve(vtx_container, "PrimaryVertices")) { m_npv = -999; }
204  else {
205  m_npv = 0;
206  for (const auto* vtx : *vtx_container) { if (vtx->vertexType() == xAOD::VxType::PriVtx or vtx->vertexType() == xAOD::VxType::PileUp) ++m_npv; }
207  }
208 
209 
210  if (m_particle_type == ParticleType::ELECTRON) { // TODO: find a better way to generalize to electron / photons
211 
212  const xAOD::ElectronContainer* electrons = nullptr;
214 
215  std::pair<xAOD::ElectronContainer*, xAOD::ShallowAuxContainer*> electrons_shallowCopy = xAOD::shallowCopyContainer(*electrons);
216  for (xAOD::Electron* el : *electrons_shallowCopy.first) {
217  ATH_MSG_DEBUG("new electron eta: " << el->eta());
218 
219 
220  CHECK(do_truth(*el));
221  CHECK(do_egamma(*el));
222  for (unsigned int itool = 0; itool != m_EgammaCalibrationAndSmearingTools.size(); ++itool) {
223  CHECK(do_energy(*el, itool));
224  }
225 
226  m_tree->Fill();
227 
228  if (m_keep_one) break;
229  }
230  }
232 
233  const xAOD::PhotonContainer* photons = nullptr;
235 
236  std::pair<xAOD::PhotonContainer*, xAOD::ShallowAuxContainer*> photons_shallowCopy = xAOD::shallowCopyContainer(*photons);
237  for (xAOD::Photon* ph : *photons_shallowCopy.first) {
238  ATH_MSG_DEBUG("new photon eta: " << ph->eta());
239 
240  CHECK(do_truth(*ph));
241  CHECK(do_egamma(*ph));
242 
243  if (const auto* vertex = ph->vertex()) {
244  m_ph_Rconv = hypot(vertex->position().x(), vertex->position().y());
245  }
246  else { m_ph_Rconv = 0; }
247 
248  const auto original = xAOD::EgammaHelpers::conversionType(ph);
249  if (original == 3) m_ph_convFlag = 2;
250  else if (original != 0) m_ph_convFlag = 1;
251  else m_ph_convFlag = original;
252 
253  for (unsigned int itool = 0; itool != m_EgammaCalibrationAndSmearingTools.size(); ++itool) {
254  CHECK(do_energy(*ph, itool));
255  }
256 
257  m_tree->Fill();
258 
259  if (m_keep_one) break;
260  }
261  }
262 
263  return StatusCode::SUCCESS;
264 }
265 
267 {
268  // truth
269  const xAOD::TruthParticle* true_particle = nullptr;
271 
272  if (true_particle) {
273  m_truth_matched = true;
274  m_truth_pt = true_particle->pt();
275  m_truth_phi = true_particle->phi();
276  m_truth_eta = true_particle->eta();
277  m_truth_E = true_particle->e();
278  m_truth_pdgId = true_particle->pdgId();
279 
280  const xAOD::TruthParticle* true_parent = true_particle->parent();
281  if (true_parent) { m_truth_parent_pdgId= true_parent->pdgId(); }
282  else { m_truth_parent_pdgId = -999; }
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
xAOD::TruthParticle_v1::parent
const TruthParticle_v1 * parent(size_t i=0) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
Definition: TruthParticle_v1.cxx:131
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
checkFileSG.line
line
Definition: checkFileSG.py:75
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
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
AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
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:266
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
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:191
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
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.
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
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:163
xAOD::VxType::PriVtx
@ PriVtx
Primary vertex.
Definition: TrackingPrimitives.h:571
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:35
PhotonxAODHelpers.h
MuonSegmentReaderConfig.histSvc
histSvc
Definition: MuonSegmentReaderConfig.py:96
plotIsoValidation.el
el
Definition: plotIsoValidation.py:197
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
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
fill
void fill(H5::Group &out_file, size_t iterations)
Definition: test-hdf5-writer.cxx:95
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:573
DumpAllSystematics::m_actualIntPerXing
float m_actualIntPerXing
Definition: dumpAllSystematics.h:53
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
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:174
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
xAOD::TruthParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Definition: TruthParticle_v1.cxx:181
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DumpAllSystematics::initialize
virtual StatusCode initialize()
Definition: dumpAllSystematics.cxx:45
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:27
xAOD::get_eta_calo
float get_eta_calo(const xAOD::CaloCluster &cluster, int author, bool do_throw=false)
Definition: EgammaCalibrationAndSmearingTool.h:64
xAOD::TruthParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TruthParticle_v1.cxx:166
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:183
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