|
ATLAS Offline Software
|
#include <dumpAllSystematics.h>
|
| 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 |
|
Definition at line 22 of file dumpAllSystematics.h.
◆ StoreGateSvc_t
◆ ParticleType
◆ DumpAllSystematics()
DumpAllSystematics::DumpAllSystematics |
( |
const std::string & |
name, |
|
|
ISvcLocator * |
svcLoc |
|
) |
| |
◆ declareGaudiProperty() [1/4]
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
Definition at line 170 of file AthCommonDataStore.h.
175 hndl.documentation());
◆ declareGaudiProperty() [2/4]
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition at line 156 of file AthCommonDataStore.h.
161 hndl.documentation());
◆ declareGaudiProperty() [3/4]
specialization for handling Gaudi::Property<SG::VarHandleBase>
Definition at line 184 of file AthCommonDataStore.h.
189 hndl.documentation());
◆ declareGaudiProperty() [4/4]
◆ declareProperty() [1/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
250 this->declare(hndl.
vhKey());
251 hndl.
vhKey().setOwner(
this);
253 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [2/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
hndl | Object holding the property value. |
doc | Documentation 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.
229 return PBASE::declareProperty(
name,hndl,
doc);
◆ declareProperty() [3/6]
◆ declareProperty() [4/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
338 return PBASE::declareProperty(
name, property,
doc);
◆ declareProperty() [5/6]
Declare a new Gaudi property.
- Parameters
-
name | Name of the property. |
property | Object holding the property value. |
doc | Documentation 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.
◆ declareProperty() [6/6]
◆ detStore()
◆ do_egamma()
◆ do_energy()
StatusCode DumpAllSystematics::do_energy |
( |
xAOD::Egamma & |
particle, |
|
|
int |
itool |
|
) |
| |
|
private |
Definition at line 314 of file dumpAllSystematics.cxx.
321 return StatusCode::FAILURE;
329 return StatusCode::FAILURE;
338 for (
const auto&
sys : sys_set) {
344 ATH_MSG_ERROR(
"Cannot configure calibration tool for systematic");
351 if (
sys.basename().find(
"SCALE") != std::string::npos) {
365 return StatusCode::SUCCESS;
◆ do_truth()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode DumpAllSystematics::execute |
( |
| ) |
|
|
virtual |
◆ extraDeps_update_handler()
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.
57 return Algorithm::extraOutputDeps();
◆ finalize()
StatusCode DumpAllSystematics::finalize |
( |
| ) |
|
|
virtual |
◆ initialize()
StatusCode DumpAllSystematics::initialize |
( |
| ) |
|
|
virtual |
Definition at line 45 of file dumpAllSystematics.cxx.
51 ATH_MSG_WARNING(
"particle property is empty, choose between \"photon\" or \"electron\". Assuming electron.");
56 ATH_MSG_FATAL(
"cannot understand particle property: must be \"electron\" or \"photon\"");
69 return StatusCode::FAILURE;
77 ATH_MSG_INFO(
"================================================================================");
81 ATH_MSG_INFO(
"================================================================================");
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");
107 m_tree->Branch((
prefix +
"cl_E").c_str(), &
m_cl_E, (
prefix +
"cl_E/F").c_str())->SetTitle(
"original xAOD caloCluster energy");
122 std::vector<std::vector<std::string> > all_sys_names_per_tool;
123 std::set<std::string> all_sys_names;
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());
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);
143 for (
const auto&
sys : sys_set) {
144 const std::string branch_name =
prefix + tool_name +
"_ratio_" +
sys.name();
146 (branch_name +
"/F").c_str());
155 std::string
header = std::string(45,
' ');
161 for (
auto sysname : all_sys_names) {
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 ";
176 const std::string tree_stream =
"/DATASTREAM";
179 return StatusCode::SUCCESS;
◆ inputHandles()
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]
◆ msg() [2/2]
◆ msgLvl()
◆ outputHandles()
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()
◆ renounceArray()
◆ sysInitialize()
StatusCode AthAlgorithm::sysInitialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ sysStart()
Handle START transition.
We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.
◆ updateVHKA()
◆ m_actualIntPerXing
float DumpAllSystematics::m_actualIntPerXing {} |
|
private |
◆ m_averageIntPerXing
float DumpAllSystematics::m_averageIntPerXing {} |
|
private |
◆ m_cl_E
float DumpAllSystematics::m_cl_E {} |
|
private |
◆ m_cl_eta
float DumpAllSystematics::m_cl_eta {} |
|
private |
◆ m_cl_etaCalo
float DumpAllSystematics::m_cl_etaCalo {} |
|
private |
◆ m_cl_phi
float DumpAllSystematics::m_cl_phi {} |
|
private |
◆ m_cl_rawcl_Es0
float DumpAllSystematics::m_cl_rawcl_Es0 {} |
|
private |
◆ m_cl_rawcl_Es1
float DumpAllSystematics::m_cl_rawcl_Es1 {} |
|
private |
◆ m_cl_rawcl_Es2
float DumpAllSystematics::m_cl_rawcl_Es2 {} |
|
private |
◆ m_cl_rawcl_Es3
float DumpAllSystematics::m_cl_rawcl_Es3 {} |
|
private |
◆ m_detStore
◆ m_EgammaCalibrationAndSmearingTools
◆ m_energy_variations
std::vector<std::vector<float> > DumpAllSystematics::m_energy_variations |
|
private |
◆ m_energy_variations_sum_down
std::vector<float> DumpAllSystematics::m_energy_variations_sum_down |
|
private |
◆ m_energy_variations_sum_up
std::vector<float> DumpAllSystematics::m_energy_variations_sum_up |
|
private |
◆ m_EventNumber
unsigned long long DumpAllSystematics::m_EventNumber {} |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthAlgorithm::m_extendedExtraObjects |
|
privateinherited |
◆ m_instance_index
int DumpAllSystematics::m_instance_index {} |
|
private |
◆ m_keep_one
bool DumpAllSystematics::m_keep_one |
◆ m_nominal_E
std::vector<float> DumpAllSystematics::m_nominal_E |
|
private |
◆ m_npv
int DumpAllSystematics::m_npv {} |
|
private |
◆ m_particle_name
std::string DumpAllSystematics::m_particle_name |
◆ m_particle_type
◆ m_ph_convFlag
int DumpAllSystematics::m_ph_convFlag {} |
|
private |
◆ m_ph_Rconv
float DumpAllSystematics::m_ph_Rconv {} |
|
private |
◆ m_reco_container_name
std::string DumpAllSystematics::m_reco_container_name |
◆ m_RunNumber
uint32_t DumpAllSystematics::m_RunNumber {} |
|
private |
◆ m_tree
TTree* DumpAllSystematics::m_tree {} |
|
private |
◆ m_truth_E
float DumpAllSystematics::m_truth_E {} |
|
private |
◆ m_truth_eta
float DumpAllSystematics::m_truth_eta {} |
|
private |
◆ m_truth_isConv
bool DumpAllSystematics::m_truth_isConv {} |
|
private |
◆ m_truth_matched
bool DumpAllSystematics::m_truth_matched {} |
|
private |
◆ m_truth_parent_pdgId
int DumpAllSystematics::m_truth_parent_pdgId {} |
|
private |
◆ m_truth_pdgId
int DumpAllSystematics::m_truth_pdgId {} |
|
private |
◆ m_truth_phi
float DumpAllSystematics::m_truth_phi {} |
|
private |
◆ m_truth_pt
float DumpAllSystematics::m_truth_pt {} |
|
private |
◆ m_truth_Rconv
float DumpAllSystematics::m_truth_Rconv {} |
|
private |
◆ m_varHandleArraysDeclared
◆ m_vhka
◆ m_wstot
float DumpAllSystematics::m_wstot {} |
|
private |
The documentation for this class was generated from the following files:
def retrieve(aClass, aKey=None)
std::vector< std::vector< float > > m_energy_variations
const TruthParticle_v1 * parent(size_t i=0) const
Retrieve the i-th mother (TruthParticle) of this TruthParticle.
StatusCode do_energy(xAOD::Egamma &particle, int itool)
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
std::string find(const std::string &s)
return a remapped string
uint64_t eventNumber() const
The current event's event number.
Helper class to provide type-safe access to aux data.
size_t size() const
returns: size of the set
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
StatusCode do_truth(const xAOD::Egamma &particle)
Class to wrap a set of SystematicVariations.
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
std::vector< float > m_nominal_E
uint32_t runNumber() const
The current event's run number.
virtual void setOwner(IDataHandleHolder *o)=0
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
bool hasDecayVtx() const
Check for a decay vertex on this particle.
virtual StatusCode sysInitialize() override
Override sysInitialize.
virtual double e() const override final
The total energy of the particle.
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
Class describing a truth particle in the MC record.
float perp() const
Vertex transverse distance from the beam line.
#define CHECK(...)
Evaluate an expression and check for errors.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
std::vector< float > m_energy_variations_sum_up
ToolHandleArray< CP::IEgammaCalibrationAndSmearingTool > m_EgammaCalibrationAndSmearingTools
float m_averageIntPerXing
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
void fill(H5::Group &out_file, size_t iterations)
const TruthVertex_v1 * decayVtx() const
The decay vertex of this particle.
float averageInteractionsPerCrossing() const
Average interactions per crossing for all BCIDs - for out-of-time pile-up.
bool isTrueConvertedPhoton(const xAOD::Photon *ph, float maxRadius=800.)
is the object matched to a true converted photon with R < maxRadius
const xAOD::TruthParticle * getTruthParticle(const xAOD::IParticle &p)
Return the truthParticle associated to the given IParticle (if any)
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
std::vector< float > m_energy_variations_sum_down
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.
Class describing the basic event information.
DataObjIDColl m_extendedExtraObjects
@ Ok
The correction was done successfully.
virtual double phi() const override final
The azimuthal angle ( ) of the particle.
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.
#define ATH_MSG_WARNING(x)
xAOD::EgammaParameters::ConversionType conversionType(const xAOD::Photon *ph)
return the photon conversion type (see EgammaEnums)
float get_eta_calo(const xAOD::CaloCluster &cluster, int author, bool do_throw=false)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
virtual double pt() const override final
The transverse momentum ( ) of the particle.
std::string m_reco_container_name
AthAlgorithm()
Default constructor:
virtual double eta() const override final
The pseudorapidity ( ) of the particle.
StatusCode do_egamma(const xAOD::Egamma &particle)
ParticleType m_particle_type
int pdgId() const
PDG ID code.
std::string m_particle_name
const xAOD::Vertex * vertex(size_t index=0) const
Pointer to the xAOD::Vertex/es that match the photon candidate.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
float actualInteractionsPerCrossing() const
Average interactions per crossing for the current BCID - for in-time pile-up.
unsigned long long m_EventNumber