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

PseudoJetAlgorithm retrieves and builds the pseudojet inputs used in jet finding. More...

#include <PseudoJetAlgorithm.h>

Inheritance diagram for PseudoJetAlgorithm:
Collaboration diagram for PseudoJetAlgorithm:

Public Member Functions

 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
 

Protected Member Functions

virtual ::StatusCode finalize ()
 finalize this algorithm More...
 
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

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

virtual std::unique_ptr< PseudoJetContainercreatePJContainer (const xAOD::IParticleContainer &cont, const EventContext &ctx) const
 Method to construct the PseudoJetContainer and record in StoreGate. More...
 
virtual void print () const
 Dump to properties to the log. More...
 
std::vector< fastjet::PseudoJet > createPseudoJets (const xAOD::IParticleContainer &) const
 
std::vector< fastjet::PseudoJet > createPseudoJets (const xAOD::IParticleContainer &, const xAOD::VertexContainer *vertices) const
 
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

SG::ReadHandleKey< xAOD::IParticleContainerm_incoll {this, "InputContainer", "", "The input IParticleContainer name"}
 Input collection name. More...
 
SG::WriteHandleKey< PseudoJetContainerm_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::VertexContainerm_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
 

Detailed Description

PseudoJetAlgorithm retrieves and builds the pseudojet inputs used in jet finding.

Alg Properties:

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.

Member Typedef Documentation

◆ StoreGateSvc_t

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

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ PseudoJetAlgorithm()

PseudoJetAlgorithm::PseudoJetAlgorithm ( const std::string &  n,
ISvcLocator *  l 
)
inline

Definition at line 42 of file PseudoJetAlgorithm.h.

Member Function Documentation

◆ 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.

56 {
57  return 0;
58 }

◆ createPJContainer()

std::unique_ptr< PseudoJetContainer > PseudoJetAlgorithm::createPJContainer ( const xAOD::IParticleContainer cont,
const EventContext &  ctx 
) const
privatevirtual

Method to construct the PseudoJetContainer and record in StoreGate.

Definition at line 75 of file PseudoJetAlgorithm.cxx.

75  {
76  // create PseudoJets
77  std::vector<fastjet::PseudoJet> vpj;
78 
79  #ifndef GENERATIONBASE
80  if (m_byVertex){
81  auto pvs = SG::makeHandle(m_vertexContainer_key, ctx);
82  vpj = createPseudoJets(cont, pvs.cptr());
83  }
84  else{
85  vpj = createPseudoJets(cont);
86  }
87  #else
88  [[maybe_unused]] const EventContext& unused_ctx = ctx;
89  vpj = createPseudoJets(cont);
90  #endif
91 
92  // create an extractor to attach to the PJContainer -- this will be used by clients
93  auto extractor = std::make_unique<IParticleExtractor>(&cont, m_label, m_isGhost);
94  ATH_MSG_DEBUG("Created extractor: " << extractor->toString(0));
95 
96  // ghostify the pseudojets if necessary
97  if(m_isGhost){
98  for(fastjet::PseudoJet& pj : vpj) {pj *= ghostscale;}
99  }
100 
101  // Put the PseudoJetContainer together
102  auto pjcont = std::make_unique<PseudoJetContainer>(std::move(extractor), vpj);
103  ATH_MSG_DEBUG("New PseudoJetContainer size " << pjcont->size());
104 
105  return pjcont;
106 }

◆ createPseudoJets() [1/2]

std::vector< fastjet::PseudoJet > PseudoJetAlgorithm::createPseudoJets ( const xAOD::IParticleContainer ips) const
private

Definition at line 110 of file PseudoJetAlgorithm.cxx.

110  {
111 #ifndef GENERATIONBASE
114 #endif
116 }

◆ createPseudoJets() [2/2]

std::vector< fastjet::PseudoJet > PseudoJetAlgorithm::createPseudoJets ( const xAOD::IParticleContainer ips,
const xAOD::VertexContainer vertices 
) const
private

Definition at line 120 of file PseudoJetAlgorithm.cxx.

120  {
122 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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< Gaudi::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; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::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 PseudoJetAlgorithm::execute ( const EventContext &  ctx) const
finaloverridevirtual

Definition at line 50 of file PseudoJetAlgorithm.cxx.

50  {
51  ATH_MSG_VERBOSE("Executing " << name() << "...");
52 
53  // build and record the container
54  auto incoll = SG::makeHandle(m_incoll, ctx);
55  if( !incoll.isValid() ) {
56  // Return SUCCESS to avoid crashing T0 jobs
57  ATH_MSG_WARNING("Failed to retrieve " << m_incoll.key() << " for PseudoJet creation!" );
58  return StatusCode::SUCCESS;
59  }
60  ATH_MSG_DEBUG("Retrieved xAOD container " << m_incoll.key() << " of size " << incoll->size()
61  << ", isGhost=" << m_isGhost);
62 
63  ATH_MSG_DEBUG("Creating PseudoJetContainer...");
64  std::unique_ptr<PseudoJetContainer> pjcont( createPJContainer(*incoll, ctx) );
65 
66  auto outcoll = SG::makeHandle(m_outcoll, ctx);
67  ATH_MSG_DEBUG("Created new PseudoJetContainer \"" << m_outcoll.key() << "\" with size " << pjcont->size());
68 
69  ATH_CHECK( outcoll.record(std::move(pjcont)) );
70 
71  return StatusCode::SUCCESS;
72 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::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 & 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.

80 {
81  // If we didn't find any symlinks to add, just return the collection
82  // from the base class. Otherwise, return the extended collection.
83  if (!m_extendedExtraObjects.empty()) {
85  }
86  return Algorithm::extraOutputDeps();
87 }

◆ filterPassed()

virtual bool AthReentrantAlgorithm::filterPassed ( const EventContext &  ctx) const
inlinevirtualinherited

Definition at line 135 of file AthReentrantAlgorithm.h.

135  {
136  return execState( ctx ).filterPassed();
137  }

◆ 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.

104  {
105  return StatusCode::SUCCESS;
106  }

◆ initialize()

StatusCode PseudoJetAlgorithm::initialize ( )
finaloverridevirtual

Athena algorithm's Hooks.

Definition at line 18 of file PseudoJetAlgorithm.cxx.

18  {
19  ATH_MSG_INFO("Initializing " << name() << "...");
20 
21  // This is horrible, but still necessary for the time being
22  // PJG needs to know if this is the basic EMTopo cluster collection
23  // in order to change the cluster signal state.
24  if ( m_label == "EMTopo") m_emtopo = true;
25  // PFlow containers need to have PV matching applied
26  if ( std::string(m_label).find("PFlow") != std::string::npos) m_pflow = true;
27  if ( std::string(m_label).find("UFO") != std::string::npos) m_ufo = true;
28 
29  // "Ghost" in output collection name? If so is a ghost collection.
30  m_isGhost = (m_outcoll.key()).find("Ghost") != std::string::npos;
31 
32  print();
33 
34  if(m_incoll.key().empty() || m_outcoll.key().empty()) {
35  ATH_MSG_ERROR("Either input or output collection is empty!");
36  return StatusCode::FAILURE;
37  }
38 
39  ATH_CHECK( m_incoll.initialize() );
41 
43 
44  return StatusCode::SUCCESS;
45 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Gaudi::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.

◆ isClonable()

bool AthReentrantAlgorithm::isClonable ( ) const
overridevirtualinherited

◆ msg() [1/2]

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

Definition at line 24 of file AthCommonMsg.h.

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

◆ msg() [2/2]

MsgStream& AthCommonMsg< Gaudi::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< Gaudi::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< Gaudi::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.

◆ print()

void PseudoJetAlgorithm::print ( ) const
privatevirtual

Dump to properties to the log.

Definition at line 127 of file PseudoJetAlgorithm.cxx.

127  {
128  std::string sskip = m_skipNegativeEnergy ? "true" : "false";
129  // May want to change to DEBUG
130  ATH_MSG_INFO("Properties for PseudoJetGetter " << name());
131  ATH_MSG_INFO(" Label: " << m_label);
132  ATH_MSG_INFO(" Input container: " << m_incoll.key());
133  ATH_MSG_INFO(" Output container: " << m_outcoll.key());
134  ATH_MSG_INFO(" Skip negative E: " << sskip);
135  ATH_MSG_INFO(" Is EMTopo: " << m_emtopo);
136  ATH_MSG_INFO(" Is PFlow: " << m_pflow);
137  ATH_MSG_INFO(" Is UFO: " << m_ufo);
138  ATH_MSG_INFO(" Is ghost: " << m_isGhost);
139  ATH_MSG_INFO(" Treat negative E as ghost: " << m_negEnergyAsGhosts.value());
140  ATH_MSG_INFO(" Running by-vertex reco: " << m_byVertex.value());
141  ATH_MSG_INFO(" Vertex input container: " << m_vertexContainer_key.key());
142 
143  if(m_pflow){
144  ATH_MSG_INFO(" Use charged FEs: " << m_useCharged.value());
145  ATH_MSG_INFO(" Use neutral FEs: " << m_useNeutral.value());
146  ATH_MSG_INFO("Use charged PV FEs: " << m_useChargedPV.value());
147  ATH_MSG_INFO(" PU sideband def: " << m_useChargedPUsideband.value());
148  }
149  if(m_ufo){
150  ATH_MSG_INFO(" Use charged UFOs: " << m_useCharged.value());
151  ATH_MSG_INFO(" Use neutral UFOs: " << m_useNeutral.value());
152  }
153 }

◆ 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< Gaudi::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< Gaudi::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  }

◆ setFilterPassed()

virtual void AthReentrantAlgorithm::setFilterPassed ( bool  state,
const EventContext &  ctx 
) const
inlinevirtualinherited

Definition at line 139 of file AthReentrantAlgorithm.h.

139  {
140  execState( ctx ).setFilterPassed( state );
141  }

◆ 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.

68 {
69  return Gaudi::Algorithm::sysExecute (ctx);
70 }

◆ 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.

96  {
98 
99  if (sc.isFailure()) {
100  return sc;
101  }
102 
103  ServiceHandle<ICondSvc> cs("CondSvc",name());
104  for (auto h : outputHandles()) {
105  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
106  // do this inside the loop so we don't create the CondSvc until needed
107  if ( cs.retrieve().isFailure() ) {
108  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
109  return StatusCode::SUCCESS;
110  }
111  if (cs->regHandle(this,*h).isFailure()) {
112  sc = StatusCode::FAILURE;
113  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
114  << " with CondSvc");
115  }
116  }
117  }
118  return sc;
119 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Gaudi::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< Gaudi::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_byVertex

Gaudi::Property<bool> PseudoJetAlgorithm::m_byVertex {this, "DoByVertex", false, "True if jets should be reconstructed by vertex"}
private

Flag for by-vertex jet reconstruction.

Definition at line 94 of file PseudoJetAlgorithm.h.

◆ m_detStore

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

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_emtopo

bool PseudoJetAlgorithm::m_emtopo {false}
private

Determines whether the PJs should be made ghosts.

Definition at line 101 of file PseudoJetAlgorithm.h.

◆ m_evtStore

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

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ 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

SG::ReadHandleKey<xAOD::IParticleContainer> PseudoJetAlgorithm::m_incoll {this, "InputContainer", "", "The input IParticleContainer name"}
private

Input collection name.

Definition at line 67 of file PseudoJetAlgorithm.h.

◆ m_isGhost

bool PseudoJetAlgorithm::m_isGhost {false}
private

Internal steering flags Set in initialize()

Definition at line 100 of file PseudoJetAlgorithm.h.

◆ m_label

Gaudi::Property<std::string> PseudoJetAlgorithm::m_label {this, "Label", "", "String label identifying the pseudojet type"}
private

Label for the collection.

Definition at line 73 of file PseudoJetAlgorithm.h.

◆ m_negEnergyAsGhosts

Gaudi::Property<bool> PseudoJetAlgorithm::m_negEnergyAsGhosts {this, "TreatNegativeEnergyAsGhost", false, "Whether to convert negative energy inputs into ghosts"}
private

Flag indicating to treat objects with E<0 as ghosts (useful for HI)

Definition at line 79 of file PseudoJetAlgorithm.h.

◆ m_outcoll

SG::WriteHandleKey<PseudoJetContainer> PseudoJetAlgorithm::m_outcoll {this, "OutputContainer", "", "The output PseudoJetContainer name"}
private

Output collection name.

Definition at line 70 of file PseudoJetAlgorithm.h.

◆ m_pflow

bool PseudoJetAlgorithm::m_pflow {false}
private

True if inputs are EM-scale topo clusters.

Definition at line 102 of file PseudoJetAlgorithm.h.

◆ m_skipNegativeEnergy

Gaudi::Property<bool> PseudoJetAlgorithm::m_skipNegativeEnergy {this, "SkipNegativeEnergy", false, "Whether to skip negative energy inputs"}
private

Flag indicating to skip objects with E<0.

Definition at line 76 of file PseudoJetAlgorithm.h.

◆ m_ufo

bool PseudoJetAlgorithm::m_ufo {false}
private

True if inputs are PFlow.

Definition at line 103 of file PseudoJetAlgorithm.h.

◆ 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

Flag for PFlow sideband definition.

Definition at line 91 of file PseudoJetAlgorithm.h.

◆ 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

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

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vertexContainer_key

SG::ReadHandleKey<xAOD::VertexContainer> PseudoJetAlgorithm::m_vertexContainer_key {this, "VertexContainer", "PrimaryVertices", "Vertex container (for by-vertex reconstruction)"}
private

Definition at line 96 of file PseudoJetAlgorithm.h.

◆ m_vhka

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

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
PseudoJetAlgorithm::m_negEnergyAsGhosts
Gaudi::Property< bool > m_negEnergyAsGhosts
Flag indicating to treat objects with E<0 as ghosts (useful for HI)
Definition: PseudoJetAlgorithm.h:79
PseudoJetAlgorithm::m_ufo
bool m_ufo
True if inputs are PFlow.
Definition: PseudoJetAlgorithm.h:103
PseudoJetGetter::PFlowsToPJs
std::vector< fastjet::PseudoJet > PFlowsToPJs(const xAOD::IParticleContainer &ips, bool skipNegativeEnergy, bool useChargedPFOs, bool useNeutralPFOs, bool useChargedPV, bool useChargedPUsideband, bool isUFO)
Definition: PseudoJetGetter.h:193
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
PseudoJetAlgorithm::m_skipNegativeEnergy
Gaudi::Property< bool > m_skipNegativeEnergy
Flag indicating to skip objects with E<0.
Definition: PseudoJetAlgorithm.h:76
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
PseudoJetAlgorithm::m_isGhost
bool m_isGhost
Internal steering flags Set in initialize()
Definition: PseudoJetAlgorithm.h:100
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
PseudoJetAlgorithm::m_vertexContainer_key
SG::ReadHandleKey< xAOD::VertexContainer > m_vertexContainer_key
Definition: PseudoJetAlgorithm.h:96
AthCommonDataStore::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 > renounce(T &h)
Definition: AthCommonDataStore.h:380
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
PseudoJetAlgorithm::m_useChargedPUsideband
Gaudi::Property< bool > m_useChargedPUsideband
Flag for PFlow sideband definition.
Definition: PseudoJetAlgorithm.h:91
PseudoJetAlgorithm::print
virtual void print() const
Dump to properties to the log.
Definition: PseudoJetAlgorithm.cxx:127
UploadAMITag.l
list l
Definition: UploadAMITag.larcaf.py:158
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
PseudoJetAlgorithm::createPJContainer
virtual std::unique_ptr< PseudoJetContainer > createPJContainer(const xAOD::IParticleContainer &cont, const EventContext &ctx) const
Method to construct the PseudoJetContainer and record in StoreGate.
Definition: PseudoJetAlgorithm.cxx:75
PseudoJetAlgorithm::createPseudoJets
std::vector< fastjet::PseudoJet > createPseudoJets(const xAOD::IParticleContainer &) const
Definition: PseudoJetAlgorithm.cxx:110
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
SG::makeHandle
SG::ReadCondHandle< T > makeHandle(const SG::ReadCondHandleKey< T > &key, const EventContext &ctx=Gaudi::Hive::currentContext())
Definition: ReadCondHandle.h:270
PseudoJetAlgorithm::m_useCharged
Gaudi::Property< bool > m_useCharged
Flag to define if charged PFOs / FEs should be considered.
Definition: PseudoJetAlgorithm.h:82
PseudoJetAlgorithm::m_useNeutral
Gaudi::Property< bool > m_useNeutral
Flag to define if neutral PFOs / FEs should be considered.
Definition: PseudoJetAlgorithm.h:85
AthCommonDataStore
Definition: AthCommonDataStore.h:52
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
PseudoJetGetter::EMToposToPJs
std::vector< fastjet::PseudoJet > EMToposToPJs(const xAOD::IParticleContainer &ips, bool skipNegativeEnergy)
Definition: PseudoJetGetter.h:88
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
ghostscale
constexpr float ghostscale
Definition: PseudoJetAlgorithm.cxx:14
beamspotman.n
n
Definition: beamspotman.py:731
PseudoJetGetter::ByVertexPFlowsToPJs
std::vector< fastjet::PseudoJet > ByVertexPFlowsToPJs(const xAOD::IParticleContainer &ips, const xAOD::VertexContainer *pvs, bool skipNegativeEnergy, bool useChargedPFOs, bool useNeutralPFOs, bool isUFO)
Definition: PseudoJetGetter.h:217
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
PseudoJetAlgorithm::m_outcoll
SG::WriteHandleKey< PseudoJetContainer > m_outcoll
Output collection name.
Definition: PseudoJetAlgorithm.h:70
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
PseudoJetAlgorithm::m_byVertex
Gaudi::Property< bool > m_byVertex
Flag for by-vertex jet reconstruction.
Definition: PseudoJetAlgorithm.h:94
PseudoJetAlgorithm::m_pflow
bool m_pflow
True if inputs are EM-scale topo clusters.
Definition: PseudoJetAlgorithm.h:102
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
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
PseudoJetAlgorithm::m_label
Gaudi::Property< std::string > m_label
Label for the collection.
Definition: PseudoJetAlgorithm.h:73
PseudoJetAlgorithm::m_emtopo
bool m_emtopo
Determines whether the PJs should be made ghosts.
Definition: PseudoJetAlgorithm.h:101
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
PseudoJetAlgorithm::m_incoll
SG::ReadHandleKey< xAOD::IParticleContainer > m_incoll
Input collection name.
Definition: PseudoJetAlgorithm.h:67
EL::AnaReentrantAlgorithm
the base class for EventLoop reentrant algorithms
Definition: AnaReentrantAlgorithm.h:51
PseudoJetGetter::IParticlesToPJs
std::vector< fastjet::PseudoJet > IParticlesToPJs(const xAOD::IParticleContainer &ips, bool skipNegativeEnergy)
Definition: PseudoJetGetter.h:51
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:616
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
PseudoJetAlgorithm::m_useChargedPV
Gaudi::Property< bool > m_useChargedPV
Flag to define if charged PFOs / FEs should be matched to PV.
Definition: PseudoJetAlgorithm.h:88
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >