ATLAS Offline Software
Loading...
Searching...
No Matches
TauTruthDecorationsAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
6
7
8#ifndef TAU_ANALYSIS_ALGORITHMS__TAU_TRUTH_DECORATIONS_ALG_H
9#define TAU_ANALYSIS_ALGORITHMS__TAU_TRUTH_DECORATIONS_ALG_H
10
16
17
18namespace CP
19{
21
23 {
25 public:
27 StatusCode initialize () override;
28 StatusCode execute (const EventContext &ctx) const override;
29
31 private:
32 SG::ReadHandleKey<xAOD::TauJetContainer> m_tausKey { this, "taus", "", "the input tau jet container" };
33
35 private:
36 Gaudi::Property<std::vector<std::string>> m_doubleDecorations {this, "doubleDecorations", {}, "the list decorations with type double to copy"};
37 Gaudi::Property<std::vector<std::string>> m_floatDecorations {this, "floatDecorations", {}, "the list decorations with type float to copy"};
38 Gaudi::Property<std::vector<std::string>> m_intDecorations {this, "intDecorations", {}, "the list decorations with type int to copy"};
39 Gaudi::Property<std::vector<std::string>> m_unsignedIntDecorations {this, "unsignedIntDecorations", {}, "the list decorations with type unsigned int to copy"};
40 Gaudi::Property<std::vector<std::string>> m_charDecorations {this, "charDecorations", {}, "the list decorations with type char to copy"};
41 Gaudi::Property<std::string> m_prefix {this, "prefix", "truth_", "the prefix to be added to all output decorations"};
42
43 // the mapping of double to float is intentional to save disk space
44 std::unordered_map<std::unique_ptr<SG::ConstAccessor<double>>, SG::WriteDecorHandleKey<xAOD::TauJetContainer>> m_doubleWriteHandleKeys;
45 std::unordered_map<std::unique_ptr<SG::ConstAccessor<float>>, SG::WriteDecorHandleKey<xAOD::TauJetContainer>> m_floatWriteHandleKeys;
46 std::unordered_map<std::unique_ptr<SG::ConstAccessor<int>>, SG::WriteDecorHandleKey<xAOD::TauJetContainer>> m_intWriteHandleKeys;
47 std::unordered_map<std::unique_ptr<SG::ConstAccessor<unsigned int>>, SG::WriteDecorHandleKey<xAOD::TauJetContainer>> m_unsignedIntWriteHandleKeys;
48 std::unordered_map<std::unique_ptr<SG::ConstAccessor<char>>, SG::WriteDecorHandleKey<xAOD::TauJetContainer>> m_charWriteHandleKeys;
49
51 this, "decayModeDecoration", "truth_DecayMode", "the decoration for the tau decay mode"};
53 this, "particleTypeDecoration", "truth_ParticleType", "the decoration for the tau particle type"};
54
56 this, "partonTruthLabelIDDecoration", "truth_PartonTruthLabelID", "the decoration for the tau parton truth label ID from the linked jet"};
57 };
58}
59
60#endif
Property holding a SG store/key/clid from which a ReadHandle is made.
an algorithm to decorate truth matched information
std::unordered_map< std::unique_ptr< SG::ConstAccessor< double > >, SG::WriteDecorHandleKey< xAOD::TauJetContainer > > m_doubleWriteHandleKeys
SG::ReadHandleKey< xAOD::TauJetContainer > m_tausKey
the tau collection we run on
std::unordered_map< std::unique_ptr< SG::ConstAccessor< float > >, SG::WriteDecorHandleKey< xAOD::TauJetContainer > > m_floatWriteHandleKeys
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_partonTruthLabelIDKey
Gaudi::Property< std::vector< std::string > > m_unsignedIntDecorations
Gaudi::Property< std::vector< std::string > > m_doubleDecorations
the decoration for the tau scale factor
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_truthParticleTypeKey
std::unordered_map< std::unique_ptr< SG::ConstAccessor< int > >, SG::WriteDecorHandleKey< xAOD::TauJetContainer > > m_intWriteHandleKeys
std::unordered_map< std::unique_ptr< SG::ConstAccessor< char > >, SG::WriteDecorHandleKey< xAOD::TauJetContainer > > m_charWriteHandleKeys
std::unordered_map< std::unique_ptr< SG::ConstAccessor< unsigned int > >, SG::WriteDecorHandleKey< xAOD::TauJetContainer > > m_unsignedIntWriteHandleKeys
Gaudi::Property< std::vector< std::string > > m_intDecorations
SG::WriteDecorHandleKey< xAOD::TauJetContainer > m_truthDecayModeKey
StatusCode execute(const EventContext &ctx) const override
Gaudi::Property< std::vector< std::string > > m_charDecorations
Gaudi::Property< std::vector< std::string > > m_floatDecorations
Gaudi::Property< std::string > m_prefix
the base class for EventLoop reentrant algorithms
AnaReentrantAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
constructor with parameters
Property holding a SG store/key/clid from which a ReadHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
Select isolated Photons, Electrons and Muons.