ATLAS Offline Software
Public Member Functions | Public Attributes | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
DumpAllSystematics Class Reference

#include <dumpAllSystematics.h>

Inheritance diagram for DumpAllSystematics:
Collaboration diagram for DumpAllSystematics:

Public Member Functions

 DumpAllSystematics (const std::string &name, ISvcLocator *svcLoc)
 Regular Algorithm constructor. More...
 
virtual StatusCode initialize ()
 
virtual StatusCode execute ()
 
virtual StatusCode finalize ()
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Public Attributes

std::string m_particle_name
 
std::string m_reco_container_name
 
bool m_keep_one
 

Protected Member Functions

void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Private Types

enum  ParticleType { ParticleType::ELECTRON, ParticleType::PHOTON }
 
typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

StatusCode do_truth (const xAOD::Egamma &particle)
 
StatusCode do_egamma (const xAOD::Egamma &particle)
 
StatusCode do_energy (xAOD::Egamma &particle, int itool)
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

ParticleType m_particle_type = ParticleType::ELECTRON
 
TTree * m_tree {}
 
unsigned long long m_EventNumber {}
 
uint32_t m_RunNumber {}
 
int m_instance_index {}
 
float m_actualIntPerXing {}
 
float m_averageIntPerXing {}
 
float m_truth_pt {}
 
float m_truth_phi {}
 
float m_truth_eta {}
 
float m_truth_E {}
 
int m_truth_pdgId {}
 
int m_truth_parent_pdgId {}
 
bool m_truth_matched {}
 
bool m_truth_isConv {}
 
float m_truth_Rconv {}
 
int m_npv {}
 
float m_cl_phi {}
 
float m_cl_eta {}
 
float m_cl_etaCalo {}
 
float m_cl_rawcl_Es0 {}
 
float m_cl_rawcl_Es1 {}
 
float m_cl_rawcl_Es2 {}
 
float m_cl_rawcl_Es3 {}
 
float m_cl_E {}
 
float m_ph_Rconv {}
 
int m_ph_convFlag {}
 
float m_wstot {}
 
std::vector< float > m_nominal_E
 
std::vector< float > m_energy_variations_sum_up
 
std::vector< float > m_energy_variations_sum_down
 
std::vector< std::vector< float > > m_energy_variations
 
ToolHandleArray< CP::IEgammaCalibrationAndSmearingToolm_EgammaCalibrationAndSmearingTools
 
DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Definition at line 22 of file dumpAllSystematics.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Member Enumeration Documentation

◆ ParticleType

Enumerator
ELECTRON 
PHOTON 

Definition at line 37 of file dumpAllSystematics.h.

38  {
39  ELECTRON,
40  PHOTON
41  };

Constructor & Destructor Documentation

◆ DumpAllSystematics()

DumpAllSystematics::DumpAllSystematics ( const std::string &  name,
ISvcLocator *  svcLoc 
)

Regular Algorithm constructor.

Definition at line 35 of file dumpAllSystematics.cxx.

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 }

Member Function Documentation

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ do_egamma()

StatusCode DumpAllSystematics::do_egamma ( const xAOD::Egamma particle)
private

Definition at line 298 of file dumpAllSystematics.cxx.

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 }

◆ do_energy()

StatusCode DumpAllSystematics::do_energy ( xAOD::Egamma particle,
int  itool 
)
private

Definition at line 314 of file dumpAllSystematics.cxx.

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 }

◆ do_truth()

StatusCode DumpAllSystematics::do_truth ( const xAOD::Egamma particle)
private

Definition at line 266 of file dumpAllSystematics.cxx.

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 }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode DumpAllSystematics::execute ( )
virtual

Definition at line 191 of file dumpAllSystematics.cxx.

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 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode DumpAllSystematics::finalize ( )
virtual

Definition at line 183 of file dumpAllSystematics.cxx.

183  {
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 }

◆ initialize()

StatusCode DumpAllSystematics::initialize ( )
virtual

Definition at line 45 of file dumpAllSystematics.cxx.

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 += (boost::format(" [%d] ") % i).str();
158  }
160  }
161  for (auto sysname : all_sys_names) {
162  std::string line = (boost::format("%45s") % sysname).str();
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 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg() [1/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_actualIntPerXing

float DumpAllSystematics::m_actualIntPerXing {}
private

Definition at line 53 of file dumpAllSystematics.h.

◆ m_averageIntPerXing

float DumpAllSystematics::m_averageIntPerXing {}
private

Definition at line 54 of file dumpAllSystematics.h.

◆ m_cl_E

float DumpAllSystematics::m_cl_E {}
private

Definition at line 73 of file dumpAllSystematics.h.

◆ m_cl_eta

float DumpAllSystematics::m_cl_eta {}
private

Definition at line 67 of file dumpAllSystematics.h.

◆ m_cl_etaCalo

float DumpAllSystematics::m_cl_etaCalo {}
private

Definition at line 68 of file dumpAllSystematics.h.

◆ m_cl_phi

float DumpAllSystematics::m_cl_phi {}
private

Definition at line 66 of file dumpAllSystematics.h.

◆ m_cl_rawcl_Es0

float DumpAllSystematics::m_cl_rawcl_Es0 {}
private

Definition at line 69 of file dumpAllSystematics.h.

◆ m_cl_rawcl_Es1

float DumpAllSystematics::m_cl_rawcl_Es1 {}
private

Definition at line 70 of file dumpAllSystematics.h.

◆ m_cl_rawcl_Es2

float DumpAllSystematics::m_cl_rawcl_Es2 {}
private

Definition at line 71 of file dumpAllSystematics.h.

◆ m_cl_rawcl_Es3

float DumpAllSystematics::m_cl_rawcl_Es3 {}
private

Definition at line 72 of file dumpAllSystematics.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_EgammaCalibrationAndSmearingTools

ToolHandleArray<CP::IEgammaCalibrationAndSmearingTool> DumpAllSystematics::m_EgammaCalibrationAndSmearingTools
private

Definition at line 84 of file dumpAllSystematics.h.

◆ m_energy_variations

std::vector<std::vector<float> > DumpAllSystematics::m_energy_variations
private

Definition at line 81 of file dumpAllSystematics.h.

◆ m_energy_variations_sum_down

std::vector<float> DumpAllSystematics::m_energy_variations_sum_down
private

Definition at line 80 of file dumpAllSystematics.h.

◆ m_energy_variations_sum_up

std::vector<float> DumpAllSystematics::m_energy_variations_sum_up
private

Definition at line 79 of file dumpAllSystematics.h.

◆ m_EventNumber

unsigned long long DumpAllSystematics::m_EventNumber {}
private

Definition at line 50 of file dumpAllSystematics.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_instance_index

int DumpAllSystematics::m_instance_index {}
private

Definition at line 52 of file dumpAllSystematics.h.

◆ m_keep_one

bool DumpAllSystematics::m_keep_one

Definition at line 34 of file dumpAllSystematics.h.

◆ m_nominal_E

std::vector<float> DumpAllSystematics::m_nominal_E
private

Definition at line 78 of file dumpAllSystematics.h.

◆ m_npv

int DumpAllSystematics::m_npv {}
private

Definition at line 64 of file dumpAllSystematics.h.

◆ m_particle_name

std::string DumpAllSystematics::m_particle_name

Definition at line 32 of file dumpAllSystematics.h.

◆ m_particle_type

ParticleType DumpAllSystematics::m_particle_type = ParticleType::ELECTRON
private

Definition at line 42 of file dumpAllSystematics.h.

◆ m_ph_convFlag

int DumpAllSystematics::m_ph_convFlag {}
private

Definition at line 75 of file dumpAllSystematics.h.

◆ m_ph_Rconv

float DumpAllSystematics::m_ph_Rconv {}
private

Definition at line 74 of file dumpAllSystematics.h.

◆ m_reco_container_name

std::string DumpAllSystematics::m_reco_container_name

Definition at line 33 of file dumpAllSystematics.h.

◆ m_RunNumber

uint32_t DumpAllSystematics::m_RunNumber {}
private

Definition at line 51 of file dumpAllSystematics.h.

◆ m_tree

TTree* DumpAllSystematics::m_tree {}
private

Definition at line 44 of file dumpAllSystematics.h.

◆ m_truth_E

float DumpAllSystematics::m_truth_E {}
private

Definition at line 58 of file dumpAllSystematics.h.

◆ m_truth_eta

float DumpAllSystematics::m_truth_eta {}
private

Definition at line 57 of file dumpAllSystematics.h.

◆ m_truth_isConv

bool DumpAllSystematics::m_truth_isConv {}
private

Definition at line 62 of file dumpAllSystematics.h.

◆ m_truth_matched

bool DumpAllSystematics::m_truth_matched {}
private

Definition at line 61 of file dumpAllSystematics.h.

◆ m_truth_parent_pdgId

int DumpAllSystematics::m_truth_parent_pdgId {}
private

Definition at line 60 of file dumpAllSystematics.h.

◆ m_truth_pdgId

int DumpAllSystematics::m_truth_pdgId {}
private

Definition at line 59 of file dumpAllSystematics.h.

◆ m_truth_phi

float DumpAllSystematics::m_truth_phi {}
private

Definition at line 56 of file dumpAllSystematics.h.

◆ m_truth_pt

float DumpAllSystematics::m_truth_pt {}
private

Definition at line 55 of file dumpAllSystematics.h.

◆ m_truth_Rconv

float DumpAllSystematics::m_truth_Rconv {}
private

Definition at line 63 of file dumpAllSystematics.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.

◆ m_wstot

float DumpAllSystematics::m_wstot {}
private

Definition at line 76 of file dumpAllSystematics.h.


The documentation for this class was generated from the following files:
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
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
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
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:66
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
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
DumpAllSystematics::m_nominal_E
std::vector< float > m_nominal_E
Definition: dumpAllSystematics.h:78
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
EMAmbiguityType::ELECTRON
@ ELECTRON
Definition: EMAmbiguityToolDefs.h:11
mapkey::sys
@ sys
Definition: TElectronEfficiencyCorrectionTool.cxx:42
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
mergePhysValFiles.end
end
Definition: DataQuality/DataQualityUtils/scripts/mergePhysValFiles.py:93
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
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.
AthCommonDataStore
Definition: AthCommonDataStore.h:52
DumpAllSystematics::m_ph_Rconv
float m_ph_Rconv
Definition: dumpAllSystematics.h:74
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
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.
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
lumiFormat.i
int i
Definition: lumiFormat.py:92
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:41
xAOD::TruthVertex_v1::perp
float perp() const
Vertex transverse distance from the beam line.
Definition: TruthVertex_v1.cxx:165
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
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
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
DumpAllSystematics::m_energy_variations_sum_up
std::vector< float > m_energy_variations_sum_up
Definition: dumpAllSystematics.h:79
DumpAllSystematics::m_EgammaCalibrationAndSmearingTools
ToolHandleArray< CP::IEgammaCalibrationAndSmearingTool > m_EgammaCalibrationAndSmearingTools
Definition: dumpAllSystematics.h:84
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
DumpAllSystematics::ParticleType::PHOTON
@ PHOTON
DumpAllSystematics::m_averageIntPerXing
float m_averageIntPerXing
Definition: dumpAllSystematics.h:54
DumpAllSystematics::m_tree
TTree * m_tree
Definition: dumpAllSystematics.h:44
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
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
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
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
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
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
Trk::vertex
@ vertex
Definition: MeasurementType.h:21
CP::CorrectionCode::Ok
@ Ok
The correction was done successfully.
Definition: CorrectionCode.h:38
a
TList * a
Definition: liststreamerinfos.cxx:10
h
python.CaloScaleNoiseConfig.str
str
Definition: CaloScaleNoiseConfig.py:78
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:111
xAOD::TruthParticle_v1::phi
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
Definition: TruthParticle_v1.cxx:181
std::sort
void sort(typename std::reverse_iterator< DataModel_detail::iterator< DVL > > beg, typename std::reverse_iterator< DataModel_detail::iterator< DVL > > end, const Compare &comp)
Specialization of sort for DataVector/List.
Definition: DVL_algorithms.h:623
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
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:26
xAOD::get_eta_calo
float get_eta_calo(const xAOD::CaloCluster &cluster, int author, bool do_throw=false)
Definition: EgammaCalibrationAndSmearingTool.h:64
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
xAOD::TruthParticle_v1::pt
virtual double pt() const override final
The transverse momentum ( ) of the particle.
Definition: TruthParticle_v1.cxx:166
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
DumpAllSystematics::m_reco_container_name
std::string m_reco_container_name
Definition: dumpAllSystematics.h:33
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
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
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
DumpAllSystematics::m_particle_type
ParticleType m_particle_type
Definition: dumpAllSystematics.h:42
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
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
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
InDetDD::electrons
@ electrons
Definition: InDetDD_Defs.h:17
DumpAllSystematics::m_truth_parent_pdgId
int m_truth_parent_pdgId
Definition: dumpAllSystematics.h:60
DumpAllSystematics::m_cl_eta
float m_cl_eta
Definition: dumpAllSystematics.h:67
fitman.k
k
Definition: fitman.py:528
DumpAllSystematics::ParticleType::ELECTRON
@ ELECTRON
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::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