ATLAS Offline Software
Loading...
Searching...
No Matches
FoldDecoratorAlg.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef FOLD_DECORATOR_ALG_H
6#define FOLD_DECORATOR_ALG_H
7
9
13
16
17namespace FlavorTagInference {
18
20 {
21 public:
22 FoldDecoratorAlg(const std::string& name, ISvcLocator* svcloc);
23 virtual StatusCode initialize() override;
24 virtual StatusCode execute(const EventContext& cxt) const override;
25 // virtual StatusCode finalize() override;
26 protected:
27 using IPLV = std::vector<ElementLink<xAOD::IParticleContainer>>;
30 this, "eventID", "EventInfo.mcEventNumber", "event number key"
31 };
32 Gaudi::Property<uint32_t> m_salt {
33 this, "salt", 0, "hash salt, bitwise or-ed with the eventID"
34 };
35 Gaudi::Property<std::string> m_jetCollection {
36 this, "jetCollection", "", "name of jet collection"
37 };
39 this, "associations", {}, "jet accociation counts to use in hash"
40 };
42 this, "ints", {}, "jet ints to use in hash"
43 };
45 this, "jetFoldHash", "unofficialJetFoldHash", "name for jet fold hash"
46 };
47 Gaudi::Property<std::map<std::string, uint32_t>> m_jetVarSeeds {
48 this, "jetVariableSaltSeeds", {}, "salt jet variables using the these"
49 };
50 Gaudi::Property<std::string> m_constituentChars {
51 this, "constituentChars", "{}", "char variables to use off constituents"
52 };
53 Gaudi::Property<std::map<std::string, uint32_t>> m_constituentSeeds {
54 this, "constituentSaltSeeds", {}, "salts for constituent varaibles"
55 };
56
57 // todo, use something more efficient than a string-keyed map here
58 std::unordered_map<std::string, uint32_t> m_hashedKeys;
59
61 using SaltedCReader = std::pair<uint32_t, CharReader>;
62 std::unordered_map<std::string, std::vector<SaltedCReader>> m_chars;
63 };
64
65}
66#endif
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
An algorithm that can be simultaneously executed in multiple threads.
Gaudi::Property< std::map< std::string, uint32_t > > m_jetVarSeeds
FoldDecoratorAlg(const std::string &name, ISvcLocator *svcloc)
Gaudi::Property< std::string > m_jetCollection
SG::ReadDecorHandleKey< xAOD::EventInfo > m_mcEventNumberKey
SG::ReadDecorHandleKeyArray< JC, int > m_jetInts
std::pair< uint32_t, CharReader > SaltedCReader
Gaudi::Property< uint32_t > m_salt
std::unordered_map< std::string, std::vector< SaltedCReader > > m_chars
SG::ReadDecorHandleKeyArray< JC, IPLV > m_jetAssociations
Gaudi::Property< std::map< std::string, uint32_t > > m_constituentSeeds
std::vector< ElementLink< xAOD::IParticleContainer > > IPLV
Gaudi::Property< std::string > m_constituentChars
std::unordered_map< std::string, uint32_t > m_hashedKeys
SG::WriteDecorHandleKey< JC > m_hashKey
virtual StatusCode initialize() override
virtual StatusCode execute(const EventContext &cxt) const override
SG::AuxElement::ConstAccessor< unsigned char > CharReader
SG::ConstAccessor< T, ALLOC > ConstAccessor
Definition AuxElement.h:569
Property holding a SG store/key/clid/attr name from which a ReadDecorHandle is made.
Property holding a SG store/key/clid/attr name from which a WriteDecorHandle is made.
This file contains "getter" functions used for accessing tagger inputs from the EDM.
DecorHandleKeyArray< ReadDecorHandle< T, S >, ReadDecorHandleKey< T >, Gaudi::DataHandle::Reader > ReadDecorHandleKeyArray
JetContainer_v1 JetContainer
Definition of the current "jet container version".