|
ATLAS Offline Software
|
PseudoJetAlgorithm retrieves and builds the pseudojet inputs used in jet finding.
More...
#include <PseudoJetAlgorithm.h>
|
| PseudoJetAlgorithm (const std::string &n, ISvcLocator *l) |
|
virtual StatusCode | initialize () override final |
| Athena algorithm's Hooks. More...
|
|
virtual StatusCode | execute (const EventContext &ctx) const override final |
|
virtual StatusCode | sysInitialize () override |
| Override sysInitialize. More...
|
|
virtual bool | isClonable () const override |
| Specify if the algorithm is clonable. More...
|
|
virtual unsigned int | cardinality () const override |
| Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant. More...
|
|
virtual StatusCode | sysExecute (const EventContext &ctx) override |
| Execute an algorithm. More...
|
|
virtual const DataObjIDColl & | extraOutputDeps () const override |
| Return the list of extra output dependencies. More...
|
|
virtual bool | filterPassed (const EventContext &ctx) const |
|
virtual void | setFilterPassed (bool state, const EventContext &ctx) const |
|
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 |
|
|
SG::ReadHandleKey< xAOD::IParticleContainer > | m_incoll {this, "InputContainer", "", "The input IParticleContainer name"} |
| Input collection name. More...
|
|
SG::WriteHandleKey< PseudoJetContainer > | m_outcoll {this, "OutputContainer", "", "The output PseudoJetContainer name"} |
| Output collection name. More...
|
|
Gaudi::Property< std::string > | m_label {this, "Label", "", "String label identifying the pseudojet type"} |
| Label for the collection. More...
|
|
Gaudi::Property< bool > | m_skipNegativeEnergy {this, "SkipNegativeEnergy", false, "Whether to skip negative energy inputs"} |
| Flag indicating to skip objects with E<0. More...
|
|
Gaudi::Property< bool > | m_negEnergyAsGhosts {this, "TreatNegativeEnergyAsGhost", false, "Whether to convert negative energy inputs into ghosts"} |
| Flag indicating to treat objects with E<0 as ghosts (useful for HI) More...
|
|
Gaudi::Property< bool > | m_useCharged {this, "UseCharged", true, "Whether to use charged PFOs/FEs"} |
| Flag to define if charged PFOs / FEs should be considered. More...
|
|
Gaudi::Property< bool > | m_useNeutral {this, "UseNeutral", true, "Whether to use neutral PFOs/FEs"} |
| Flag to define if neutral PFOs / FEs should be considered. More...
|
|
Gaudi::Property< bool > | m_useChargedPV {this, "UseChargedPV", true, "Whether to use charged PFOs/FEs matched to the PV"} |
| Flag to define if charged PFOs / FEs should be matched to PV. More...
|
|
Gaudi::Property< bool > | m_useChargedPUsideband {this, "UseChargedPUsideband", false, "Whether to use charged PU sideband only"} |
| Flag for PFlow sideband definition. More...
|
|
Gaudi::Property< bool > | m_byVertex {this, "DoByVertex", false, "True if jets should be reconstructed by vertex"} |
| Flag for by-vertex jet reconstruction. More...
|
|
SG::ReadHandleKey< xAOD::VertexContainer > | m_vertexContainer_key {this, "VertexContainer", "PrimaryVertices", "Vertex container (for by-vertex reconstruction)"} |
|
bool | m_isGhost {false} |
| Internal steering flags Set in initialize() More...
|
|
bool | m_emtopo {false} |
| Determines whether the PJs should be made ghosts. More...
|
|
bool | m_pflow {false} |
| True if inputs are EM-scale topo clusters. More...
|
|
bool | m_ufo {false} |
| True if inputs are PFlow. More...
|
|
DataObjIDColl | m_extendedExtraObjects |
| Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks. More...
|
|
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 |
|
PseudoJetAlgorithm retrieves and builds the pseudojet inputs used in jet finding.
Alg Properties:
- InputCollection: Name of the input collection.
- OutputCollection: Name of the output collection of pseudojets.
- Label: Label for the constituents. See note below.
- SkipNegativeEnergy: Flag indicating that inputs with negative energy should be ignored.
- GhostScale : If nonzero, the pseudojets are labeled as ghosts and their four-momenta are scaled by this factor.
Note: The label is attached to the CUI (constituent user info) associated with created pseudojet and is used to name jet moments that point to the PJs, and in rare cases (EMTopo, PFlow) to toggle special treatments.
Definition at line 37 of file PseudoJetAlgorithm.h.
◆ StoreGateSvc_t
◆ PseudoJetAlgorithm()
PseudoJetAlgorithm::PseudoJetAlgorithm |
( |
const std::string & |
n, |
|
|
ISvcLocator * |
l |
|
) |
| |
|
inline |
◆ cardinality()
unsigned int AthReentrantAlgorithm::cardinality |
( |
| ) |
const |
|
overridevirtualinherited |
Cardinality (Maximum number of clones that can exist) special value 0 means that algorithm is reentrant.
Override this to return 0 for reentrant algorithms.
Override this to return 0 for reentrant algorithms.
Definition at line 55 of file AthReentrantAlgorithm.cxx.
◆ createPJContainer()
Method to construct the PseudoJetContainer and record in StoreGate.
Definition at line 75 of file PseudoJetAlgorithm.cxx.
77 std::vector<fastjet::PseudoJet> vpj;
79 #ifndef GENERATIONBASE
88 [[maybe_unused]]
const EventContext& unused_ctx = ctx;
93 auto extractor = std::make_unique<IParticleExtractor>(&cont,
m_label,
m_isGhost);
94 ATH_MSG_DEBUG(
"Created extractor: " << extractor->toString(0));
98 for(fastjet::PseudoJet& pj : vpj) {pj *=
ghostscale;}
102 auto pjcont = std::make_unique<PseudoJetContainer>(std::move(extractor), vpj);
103 ATH_MSG_DEBUG(
"New PseudoJetContainer size " << pjcont->size());
◆ createPseudoJets() [1/2]
◆ createPseudoJets() [2/2]
◆ 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);
◆ 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.
◆ 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.
◆ 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()
◆ evtStore() [1/2]
◆ evtStore() [2/2]
◆ execute()
StatusCode PseudoJetAlgorithm::execute |
( |
const EventContext & |
ctx | ) |
const |
|
finaloverridevirtual |
Definition at line 50 of file PseudoJetAlgorithm.cxx.
55 if( !incoll.isValid() ) {
58 return StatusCode::SUCCESS;
69 ATH_CHECK( outcoll.record(std::move(pjcont)) );
71 return StatusCode::SUCCESS;
◆ 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 & AthReentrantAlgorithm::extraOutputDeps |
( |
| ) |
const |
|
overridevirtualinherited |
Return the list of extra output dependencies.
This list is extended to include symlinks implied by inheritance relations.
Definition at line 79 of file AthReentrantAlgorithm.cxx.
86 return Algorithm::extraOutputDeps();
◆ filterPassed()
virtual bool AthReentrantAlgorithm::filterPassed |
( |
const EventContext & |
ctx | ) |
const |
|
inlinevirtualinherited |
◆ finalize()
StatusCode EL::AnaReentrantAlgorithm::finalize |
( |
| ) |
|
|
protectedinherited |
finalize this algorithm
This gets called after event processing has finished. The last event may no longer be in memory, and the code should not try to access it.
Definition at line 102 of file AnaReentrantAlgorithm.cxx.
105 return StatusCode::SUCCESS;
◆ initialize()
StatusCode PseudoJetAlgorithm::initialize |
( |
| ) |
|
|
finaloverridevirtual |
◆ 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.
◆ isClonable()
bool AthReentrantAlgorithm::isClonable |
( |
| ) |
const |
|
overridevirtualinherited |
Specify if the algorithm is clonable.
Reentrant algorithms are clonable.
Reimplemented in Simulation::BeamEffectsAlg, InDet::SiTrackerSpacePointFinder, InDet::SCT_Clusterization, InDet::SiSPSeededTrackFinder, SCTRawDataProvider, InDet::GNNSeedingTrackMaker, SCT_PrepDataToxAOD, RoIBResultToxAOD, InDet::SiSPGNNTrackMaker, SCT_CablingCondAlgFromCoraCool, SCT_ReadCalibDataTestAlg, SCT_CablingCondAlgFromText, SCT_ReadCalibChipDataTestAlg, SCT_TestCablingAlg, SCT_ConfigurationConditionsTestAlg, ITkPixelCablingAlg, ITkStripCablingAlg, SCTEventFlagWriter, SCT_ConditionsSummaryTestAlg, SCT_ModuleVetoTestAlg, SCT_MonitorConditionsTestAlg, SCT_LinkMaskingTestAlg, SCT_MajorityConditionsTestAlg, SCT_RODVetoTestAlg, SCT_SensorsTestAlg, SCT_TdaqEnabledTestAlg, SCT_SiliconConditionsTestAlg, SCTSiLorentzAngleTestAlg, SCT_ByteStreamErrorsTestAlg, SCT_ConditionsParameterTestAlg, SCT_FlaggedConditionTestAlg, SCT_StripVetoTestAlg, SCT_RawDataToxAOD, and SCTSiPropertiesTestAlg.
Definition at line 44 of file AthReentrantAlgorithm.cxx.
◆ 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.
◆ print()
void PseudoJetAlgorithm::print |
( |
| ) |
const |
|
privatevirtual |
◆ renounce()
◆ renounceArray()
◆ setFilterPassed()
virtual void AthReentrantAlgorithm::setFilterPassed |
( |
bool |
state, |
|
|
const EventContext & |
ctx |
|
) |
| const |
|
inlinevirtualinherited |
◆ sysExecute()
StatusCode AthReentrantAlgorithm::sysExecute |
( |
const EventContext & |
ctx | ) |
|
|
overridevirtualinherited |
Execute an algorithm.
We override this in order to work around an issue with the Algorithm base class storing the event context in a member variable that can cause crashes in MT jobs.
Definition at line 67 of file AthReentrantAlgorithm.cxx.
69 return Gaudi::Algorithm::sysExecute (ctx);
◆ sysInitialize()
StatusCode AthReentrantAlgorithm::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< Gaudi::Algorithm > >.
Reimplemented in InputMakerBase, and HypoBase.
Definition at line 96 of file AthReentrantAlgorithm.cxx.
107 if ( cs.retrieve().isFailure() ) {
109 return StatusCode::SUCCESS;
111 if (cs->regHandle(
this,*
h).isFailure()) {
112 sc = StatusCode::FAILURE;
113 ATH_MSG_ERROR(
"unable to register WriteCondHandle " <<
h->fullKey()
◆ 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_byVertex
Gaudi::Property<bool> PseudoJetAlgorithm::m_byVertex {this, "DoByVertex", false, "True if jets should be reconstructed by vertex"} |
|
private |
◆ m_detStore
◆ m_emtopo
bool PseudoJetAlgorithm::m_emtopo {false} |
|
private |
◆ m_evtStore
◆ m_extendedExtraObjects
DataObjIDColl AthReentrantAlgorithm::m_extendedExtraObjects |
|
privateinherited |
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Empty if no symlinks were found.
Definition at line 153 of file AthReentrantAlgorithm.h.
◆ m_incoll
◆ m_isGhost
bool PseudoJetAlgorithm::m_isGhost {false} |
|
private |
◆ m_label
Gaudi::Property<std::string> PseudoJetAlgorithm::m_label {this, "Label", "", "String label identifying the pseudojet type"} |
|
private |
◆ m_negEnergyAsGhosts
Gaudi::Property<bool> PseudoJetAlgorithm::m_negEnergyAsGhosts {this, "TreatNegativeEnergyAsGhost", false, "Whether to convert negative energy inputs into ghosts"} |
|
private |
◆ m_outcoll
◆ m_pflow
bool PseudoJetAlgorithm::m_pflow {false} |
|
private |
◆ m_skipNegativeEnergy
Gaudi::Property<bool> PseudoJetAlgorithm::m_skipNegativeEnergy {this, "SkipNegativeEnergy", false, "Whether to skip negative energy inputs"} |
|
private |
◆ m_ufo
bool PseudoJetAlgorithm::m_ufo {false} |
|
private |
◆ m_useCharged
Gaudi::Property<bool> PseudoJetAlgorithm::m_useCharged {this, "UseCharged", true, "Whether to use charged PFOs/FEs"} |
|
private |
Flag to define if charged PFOs / FEs should be considered.
Definition at line 82 of file PseudoJetAlgorithm.h.
◆ m_useChargedPUsideband
Gaudi::Property<bool> PseudoJetAlgorithm::m_useChargedPUsideband {this, "UseChargedPUsideband", false, "Whether to use charged PU sideband only"} |
|
private |
◆ m_useChargedPV
Gaudi::Property<bool> PseudoJetAlgorithm::m_useChargedPV {this, "UseChargedPV", true, "Whether to use charged PFOs/FEs matched to the PV"} |
|
private |
Flag to define if charged PFOs / FEs should be matched to PV.
Definition at line 88 of file PseudoJetAlgorithm.h.
◆ m_useNeutral
Gaudi::Property<bool> PseudoJetAlgorithm::m_useNeutral {this, "UseNeutral", true, "Whether to use neutral PFOs/FEs"} |
|
private |
Flag to define if neutral PFOs / FEs should be considered.
Definition at line 85 of file PseudoJetAlgorithm.h.
◆ m_varHandleArraysDeclared
◆ m_vertexContainer_key
◆ m_vhka
The documentation for this class was generated from the following files:
Gaudi::Property< bool > m_negEnergyAsGhosts
Flag indicating to treat objects with E<0 as ghosts (useful for HI)
bool m_ufo
True if inputs are PFlow.
std::vector< fastjet::PseudoJet > PFlowsToPJs(const xAOD::IParticleContainer &ips, bool skipNegativeEnergy, bool useChargedPFOs, bool useNeutralPFOs, bool useChargedPV, bool useChargedPUsideband, bool isUFO)
Gaudi::Property< bool > m_skipNegativeEnergy
Flag indicating to skip objects with E<0.
std::string find(const std::string &s)
return a remapped string
bool m_isGhost
Internal steering flags Set in initialize()
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainer_key
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)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
Gaudi::Property< bool > m_useChargedPUsideband
Flag for PFlow sideband definition.
virtual void print() const
Dump to properties to the log.
#define ATH_MSG_VERBOSE(x)
const std::string & key() const
Return the StoreGate ID for the referenced object.
virtual std::unique_ptr< PseudoJetContainer > createPJContainer(const xAOD::IParticleContainer &cont, const EventContext &ctx) const
Method to construct the PseudoJetContainer and record in StoreGate.
std::vector< fastjet::PseudoJet > createPseudoJets(const xAOD::IParticleContainer &) const
virtual void setOwner(IDataHandleHolder *o)=0
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Gaudi::Property< bool > m_useCharged
Flag to define if charged PFOs / FEs should be considered.
Gaudi::Property< bool > m_useNeutral
Flag to define if neutral PFOs / FEs should be considered.
std::vector< fastjet::PseudoJet > EMToposToPJs(const xAOD::IParticleContainer &ips, bool skipNegativeEnergy)
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
constexpr float ghostscale
std::vector< fastjet::PseudoJet > ByVertexPFlowsToPJs(const xAOD::IParticleContainer &ips, const xAOD::VertexContainer *pvs, bool skipNegativeEnergy, bool useChargedPFOs, bool useNeutralPFOs, bool isUFO)
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::WriteHandleKey< PseudoJetContainer > m_outcoll
Output collection name.
Gaudi::Property< bool > m_byVertex
Flag for by-vertex jet reconstruction.
bool m_pflow
True if inputs are EM-scale topo clusters.
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Gaudi::Property< std::string > m_label
Label for the collection.
bool m_emtopo
Determines whether the PJs should be made ghosts.
virtual StatusCode sysInitialize() override
Override sysInitialize.
SG::ReadHandleKey< xAOD::IParticleContainer > m_incoll
Input collection name.
the base class for EventLoop reentrant algorithms
std::vector< fastjet::PseudoJet > IParticlesToPJs(const xAOD::IParticleContainer &ips, bool skipNegativeEnergy)
#define ATH_MSG_WARNING(x)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Gaudi::Property< bool > m_useChargedPV
Flag to define if charged PFOs / FEs should be matched to PV.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>