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

#include <TauProcessorAlg.h>

Inheritance diagram for TauProcessorAlg:
Collaboration diagram for TauProcessorAlg:

Public Member Functions

 TauProcessorAlg (const std::string &name, ISvcLocator *pSvcLocator)
 
 ~TauProcessorAlg ()
 
virtual StatusCode initialize ()
 
virtual StatusCode execute (const EventContext &ctx) const
 
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

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

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

Gaudi::Property< double > m_maxEta {this, "MaxEta", 2.5, "maximum eta for jet seed"}
 
Gaudi::Property< double > m_minPt {this, "MinPt", 10 * Gaudi::Units::GeV, "minimum pT for jet seed"}
 
Gaudi::Property< int > m_maxNTracks {this, "MaxNTracks", -1, "maximum number of classifiedCharged tracks"}
 
const ToolHandleArray< ITauToolBasem_tools {this, "Tools", {}, "Tools processing taus"}
 
const ToolHandle< ICaloConstCellMakerToolm_cellMakerTool {this, "CellMakerTool", "", "Tool to sort the CaloCellContainer"}
 
SG::ReadHandleKey< xAOD::JetContainerm_jetInputContainer {this,"Key_jetInputContainer","AntiKt4LCTopoJets","input jet key"}
 
SG::WriteHandleKey< xAOD::TauJetContainerm_tauOutputContainer {this,"Key_tauOutputContainer","tmp_TauJets","output tau data key"}
 
SG::WriteHandleKey< xAOD::TauTrackContainerm_tauTrackOutputContainer {this,"Key_tauTrackOutputContainer","TauTracks","output tau tracks data key"}
 
SG::WriteHandleKey< xAOD::CaloClusterContainerm_tauShotClusOutputContainer {this,"Key_tauShotClusOutputContainer", "TauShotClusters", "tau shot clusters out key"}
 
SG::WriteHandleKey< CaloClusterCellLinkContainerm_tauShotClusLinkContainer {this,"Key_tauShotClusLinkContainer", "TauShotClusters_links", "tau shot clusters out key"}
 
SG::WriteHandleKey< xAOD::PFOContainerm_tauShotPFOOutputContainer {this,"Key_tauShotPFOOutputContainer", "TauShotParticleFlowObjects", "tau pfo out key"}
 
SG::WriteHandleKey< CaloConstCellContainerm_tauPi0CellOutputContainer {this,"Key_tauPi0CellOutputContainer","TauCommonPi0Cells","output calo cell key"}
 
const CaloCell_IDm_cellID = nullptr
 
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollectionm_pixelDetEleCollKey {this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"}
 
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollectionm_SCTDetEleCollKey {this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}
 
SG::ReadCondHandleKey< InDetDD::TRT_DetElementContainerm_trtDetEleContKey {this, "TRTDetEleContKey", "TRT_DetElementContainer", "Key of TRT_DetElementContainer"}
 
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

Definition at line 36 of file TauProcessorAlg.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

◆ TauProcessorAlg()

TauProcessorAlg::TauProcessorAlg ( const std::string &  name,
ISvcLocator *  pSvcLocator 
)

Definition at line 19 of file TauProcessorAlg.cxx.

20  :
21  AthReentrantAlgorithm(name, pSvcLocator) {
22 }

◆ ~TauProcessorAlg()

TauProcessorAlg::~TauProcessorAlg ( )
default

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 }

◆ 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 TauProcessorAlg::execute ( const EventContext &  ctx) const
virtual

record output containers

Definition at line 79 of file TauProcessorAlg.cxx.

79  {
80 
83  ATH_CHECK(tauHandle.record(std::make_unique<xAOD::TauJetContainer>(), std::make_unique<xAOD::TauJetAuxContainer>()));
84  xAOD::TauJetContainer* pContainer = tauHandle.ptr();
85 
87  ATH_CHECK(tauTrackHandle.record(std::make_unique<xAOD::TauTrackContainer>(), std::make_unique<xAOD::TauTrackAuxContainer>()));
88  xAOD::TauTrackContainer* pTauTrackCont = tauTrackHandle.ptr();
89 
91  ATH_CHECK(tauShotClusHandle.record(std::make_unique<xAOD::CaloClusterContainer>(), std::make_unique<xAOD::CaloClusterAuxContainer>()));
92  xAOD::CaloClusterContainer* tauShotClusContainer = tauShotClusHandle.ptr();
93 
95  ATH_CHECK(tauShotPFOHandle.record(std::make_unique<xAOD::PFOContainer>(), std::make_unique<xAOD::PFOAuxContainer>()));
96  xAOD::PFOContainer* tauShotPFOContainer = tauShotPFOHandle.ptr();
97 
98  CaloConstCellContainer* Pi0CellContainer = nullptr;
99  boost::dynamic_bitset<> addedCellsMap;
100 
103  ATH_CHECK(tauPi0CellHandle.record(std::make_unique<CaloConstCellContainer>(SG::VIEW_ELEMENTS )));
104  Pi0CellContainer = tauPi0CellHandle.ptr();
105 
106  // Initialize the cell map per event, used to avoid dumplicate cell in TauPi0CreateROI
108  ATH_MSG_DEBUG("CaloCell Hash Max: " << hashMax);
109  addedCellsMap.resize(hashMax,false);
110  }
111 
112  // retrieve the input jet seed container
114  if (!jetHandle.isValid()) {
115  ATH_MSG_ERROR ("Could not retrieve HiveDataObj with key " << jetHandle.key());
116  return StatusCode::FAILURE;
117  }
118  const xAOD::JetContainer *pSeedContainer = jetHandle.cptr();
119 
120  //---------------------------------------------------------------------
121  // Loop over seeds
122  //---------------------------------------------------------------------
123  ATH_MSG_VERBOSE("Number of seeds in the container: " << pSeedContainer->size());
124 
125  for (const xAOD::Jet* pSeed : *pSeedContainer) {
126  ATH_MSG_VERBOSE("Seeds eta:" << pSeed->eta() << ", pt:" << pSeed->pt());
127 
128  if (std::abs(pSeed->eta()) > m_maxEta) {
129  ATH_MSG_VERBOSE("--> Seed rejected, eta out of range!");
130  continue;
131  }
132 
133  if (pSeed->pt() < m_minPt) {
134  ATH_MSG_VERBOSE("--> Seed rejected, pt out of range!");
135  continue;
136  }
137 
138  //-----------------------------------------------------------------
139  // Seed passed cuts --> create tau candidate
140  //-----------------------------------------------------------------
141  xAOD::TauJet* pTau = new xAOD::TauJet();
142  pContainer->push_back( pTau );
143  pTau->setJet(pSeedContainer, pSeed);
144 
145  //-----------------------------------------------------------------
146  // Loop stops when Failure indicated by one of the tools
147  //-----------------------------------------------------------------
148  StatusCode sc;
149  for (const ToolHandle<ITauToolBase>& tool : m_tools) {
150  ATH_MSG_DEBUG("ProcessorAlg Invoking tool " << tool->name());
151 
152  if (tool->type() == "TauVertexFinder") {
153  sc = tool->executeVertexFinder(*pTau);
154  } else if (tool->type() == "TauTrackFinder") {
155  sc = tool->executeTrackFinder(*pTau, *pTauTrackCont);
156  } else if (tool->type() == "tauRecTools::TauTrackRNNClassifier") {
157  sc = tool->executeTrackClassifier(*pTau, *pTauTrackCont);
158 
159  // skip candidate if it has too many classifiedCharged tracks, if
160  // skimming is required
161  if (m_maxNTracks > 0 &&
162  static_cast<int>(pTau->nTracks()) > m_maxNTracks) {
163  sc = StatusCode::FAILURE;
164  break;
165  }
166  } else if (tool->type() == "TauShotFinder") {
167  sc = tool->executeShotFinder(*pTau, *tauShotClusContainer,
168  *tauShotPFOContainer);
169  } else if (tool->type() == "TauPi0CreateROI") {
170  sc = tool->executePi0CreateROI(*pTau, *Pi0CellContainer, addedCellsMap);
171  } else {
172  sc = tool->execute(*pTau);
173  }
174  if (sc.isFailure())
175  break;
176  }
177 
178  if (sc.isSuccess()) {
179  ATH_MSG_VERBOSE("The tau candidate has been registered");
180  }
181  else {
182  //remove orphaned tracks before tau is deleted via pop_back
183  xAOD::TauJet* bad_tau = pContainer->back();
184  ATH_MSG_DEBUG("Deleting " << bad_tau->nAllTracks() << "Tracks associated with tau: ");
185  pTauTrackCont->erase(pTauTrackCont->end()-bad_tau->nAllTracks(), pTauTrackCont->end());
186 
187  pContainer->pop_back();
188  }
189  }// loop through seeds
190 
191  // build cell link container for shot clusters
193  ATH_CHECK(CaloClusterStoreHelper::finalizeClusters (tauShotClusLinkHandle, tauShotClusContainer));
194 
195  if(Pi0CellContainer) {
196  // sort the cell container by hash
197  // basically call the finalizer
198  ATH_CHECK( m_cellMakerTool->process(Pi0CellContainer, ctx) );
199  //Since this is recorded we can retrieve it later as const DV
200  //do it here due to symlink below
201  const CaloCellContainer* cellPtrs = Pi0CellContainer->asDataVector();
202  // Check this is needed for the cell container?
203  // symlink as INavigable4MomentumCollection (as in CaloRec/CaloCellMaker)
204  ATH_CHECK(evtStore()->symLink(cellPtrs, static_cast<INavigable4MomentumCollection*> (nullptr)));
205  }
206 
207  ATH_MSG_VERBOSE("The tau candidate container has been modified");
208 
209  return StatusCode::SUCCESS;
210 }

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

◆ initialize()

StatusCode TauProcessorAlg::initialize ( )
virtual

Definition at line 32 of file TauProcessorAlg.cxx.

32  {
33 
34  ATH_CHECK( m_jetInputContainer.initialize() );
35  ATH_CHECK( m_tauOutputContainer.initialize() );
36  ATH_CHECK( m_tauTrackOutputContainer.initialize() );
39  ATH_CHECK( m_tauShotPFOOutputContainer.initialize() );
41 
45 
48  ATH_CHECK( m_cellMakerTool.retrieve() );
49  }
50 
51  //-------------------------------------------------------------------------
52  // No tools allocated!
53  //-------------------------------------------------------------------------
54  if (m_tools.empty()) {
55  ATH_MSG_ERROR("no tools given!");
56  return StatusCode::FAILURE;
57  }
58 
59  //-------------------------------------------------------------------------
60  // Allocate tools
61  //-------------------------------------------------------------------------
62  ATH_MSG_INFO("List of tools in execution sequence:");
63  ATH_MSG_INFO("------------------------------------");
64 
65  for (const ToolHandle<ITauToolBase>& tool : m_tools) {
66  ATH_CHECK( tool.retrieve() );
67  ATH_MSG_INFO(tool->type() << " - " << tool->name());
68  }
69 
70  ATH_MSG_INFO(" ");
71  ATH_MSG_INFO("------------------------------------");
72 
73  return StatusCode::SUCCESS;
74 }

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

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

const CaloCell_ID* TauProcessorAlg::m_cellID = nullptr
private

Definition at line 69 of file TauProcessorAlg.h.

◆ m_cellMakerTool

const ToolHandle<ICaloConstCellMakerTool> TauProcessorAlg::m_cellMakerTool {this, "CellMakerTool", "", "Tool to sort the CaloCellContainer"}
private

Definition at line 58 of file TauProcessorAlg.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_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_jetInputContainer

SG::ReadHandleKey<xAOD::JetContainer> TauProcessorAlg::m_jetInputContainer {this,"Key_jetInputContainer","AntiKt4LCTopoJets","input jet key"}
private

Definition at line 60 of file TauProcessorAlg.h.

◆ m_maxEta

Gaudi::Property<double> TauProcessorAlg::m_maxEta {this, "MaxEta", 2.5, "maximum eta for jet seed"}
private

Definition at line 53 of file TauProcessorAlg.h.

◆ m_maxNTracks

Gaudi::Property<int> TauProcessorAlg::m_maxNTracks {this, "MaxNTracks", -1, "maximum number of classifiedCharged tracks"}
private

Definition at line 55 of file TauProcessorAlg.h.

◆ m_minPt

Gaudi::Property<double> TauProcessorAlg::m_minPt {this, "MinPt", 10 * Gaudi::Units::GeV, "minimum pT for jet seed"}
private

Definition at line 54 of file TauProcessorAlg.h.

◆ m_pixelDetEleCollKey

SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> TauProcessorAlg::m_pixelDetEleCollKey {this, "PixelDetEleCollKey", "PixelDetectorElementCollection", "Key of SiDetectorElementCollection for Pixel"}
private

Definition at line 72 of file TauProcessorAlg.h.

◆ m_SCTDetEleCollKey

SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> TauProcessorAlg::m_SCTDetEleCollKey {this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}
private

Definition at line 73 of file TauProcessorAlg.h.

◆ m_tauOutputContainer

SG::WriteHandleKey<xAOD::TauJetContainer> TauProcessorAlg::m_tauOutputContainer {this,"Key_tauOutputContainer","tmp_TauJets","output tau data key"}
private

Definition at line 62 of file TauProcessorAlg.h.

◆ m_tauPi0CellOutputContainer

SG::WriteHandleKey<CaloConstCellContainer> TauProcessorAlg::m_tauPi0CellOutputContainer {this,"Key_tauPi0CellOutputContainer","TauCommonPi0Cells","output calo cell key"}
private

Definition at line 67 of file TauProcessorAlg.h.

◆ m_tauShotClusLinkContainer

SG::WriteHandleKey<CaloClusterCellLinkContainer> TauProcessorAlg::m_tauShotClusLinkContainer {this,"Key_tauShotClusLinkContainer", "TauShotClusters_links", "tau shot clusters out key"}
private

Definition at line 65 of file TauProcessorAlg.h.

◆ m_tauShotClusOutputContainer

SG::WriteHandleKey<xAOD::CaloClusterContainer> TauProcessorAlg::m_tauShotClusOutputContainer {this,"Key_tauShotClusOutputContainer", "TauShotClusters", "tau shot clusters out key"}
private

Definition at line 64 of file TauProcessorAlg.h.

◆ m_tauShotPFOOutputContainer

SG::WriteHandleKey<xAOD::PFOContainer> TauProcessorAlg::m_tauShotPFOOutputContainer {this,"Key_tauShotPFOOutputContainer", "TauShotParticleFlowObjects", "tau pfo out key"}
private

Definition at line 66 of file TauProcessorAlg.h.

◆ m_tauTrackOutputContainer

SG::WriteHandleKey<xAOD::TauTrackContainer> TauProcessorAlg::m_tauTrackOutputContainer {this,"Key_tauTrackOutputContainer","TauTracks","output tau tracks data key"}
private

Definition at line 63 of file TauProcessorAlg.h.

◆ m_tools

const ToolHandleArray<ITauToolBase> TauProcessorAlg::m_tools {this, "Tools", {}, "Tools processing taus"}
private

Definition at line 57 of file TauProcessorAlg.h.

◆ m_trtDetEleContKey

SG::ReadCondHandleKey<InDetDD::TRT_DetElementContainer> TauProcessorAlg::m_trtDetEleContKey {this, "TRTDetEleContKey", "TRT_DetElementContainer", "Key of TRT_DetElementContainer"}
private

Definition at line 74 of file TauProcessorAlg.h.

◆ m_varHandleArraysDeclared

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

Definition at line 399 of file AthCommonDataStore.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:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
CaloClusterStoreHelper::finalizeClusters
static StatusCode finalizeClusters(SG::WriteHandle< CaloClusterCellLinkContainer > &h, xAOD::CaloClusterContainer *pClusterColl)
Finalize clusters (move CaloClusterCellLink to a separate container).
Definition: CaloClusterStoreHelper.cxx:64
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::TauJet_v3::nAllTracks
size_t nAllTracks() const
Definition: TauJet_v3.cxx:554
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
TauProcessorAlg::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Definition: TauProcessorAlg.h:73
xAOD::TauJet_v3::nTracks
size_t nTracks(TauJetParameters::TauTrackFlag flag=TauJetParameters::TauTrackFlag::classifiedCharged) const
Definition: TauJet_v3.cxx:526
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
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::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
ConstDataVector::asDataVector
const DV * asDataVector() const
Return a pointer to this object, as a const DataVector.
TauProcessorAlg::m_tauOutputContainer
SG::WriteHandleKey< xAOD::TauJetContainer > m_tauOutputContainer
Definition: TauProcessorAlg.h:62
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::detStore
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:95
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:27
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
TauProcessorAlg::m_maxNTracks
Gaudi::Property< int > m_maxNTracks
Definition: TauProcessorAlg.h:55
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
TauProcessorAlg::m_pixelDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_pixelDetEleCollKey
Definition: TauProcessorAlg.h:72
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
TauProcessorAlg::m_cellID
const CaloCell_ID * m_cellID
Definition: TauProcessorAlg.h:69
TauProcessorAlg::m_tauShotPFOOutputContainer
SG::WriteHandleKey< xAOD::PFOContainer > m_tauShotPFOOutputContainer
Definition: TauProcessorAlg.h:66
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
TauProcessorAlg::m_trtDetEleContKey
SG::ReadCondHandleKey< InDetDD::TRT_DetElementContainer > m_trtDetEleContKey
Definition: TauProcessorAlg.h:74
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
TauProcessorAlg::m_tauTrackOutputContainer
SG::WriteHandleKey< xAOD::TauTrackContainer > m_tauTrackOutputContainer
Definition: TauProcessorAlg.h:63
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
xAOD::TauJet
TauJet_v3 TauJet
Definition of the current "tau version".
Definition: Event/xAOD/xAODTau/xAODTau/TauJet.h:17
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
TauProcessorAlg::m_tauShotClusLinkContainer
SG::WriteHandleKey< CaloClusterCellLinkContainer > m_tauShotClusLinkContainer
Definition: TauProcessorAlg.h:65
DataVector::back
const T * back() const
Access the last element in the collection as an rvalue.
DataVector
Derived DataVector<T>.
Definition: DataVector.h:581
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
xAOD::TauJet_v3::setJet
void setJet(const xAOD::JetContainer *cont, const xAOD::Jet *jet)
Definition: TauJet_v3.cxx:683
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
TauProcessorAlg::m_jetInputContainer
SG::ReadHandleKey< xAOD::JetContainer > m_jetInputContainer
Definition: TauProcessorAlg.h:60
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
AtlCoolConsole.tool
tool
Definition: AtlCoolConsole.py:453
DataVector::push_back
value_type push_back(value_type pElem)
Add an element to the end of the collection.
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
CaloCellContainer
Container class for CaloCell.
Definition: CaloCellContainer.h:55
TauProcessorAlg::m_tools
const ToolHandleArray< ITauToolBase > m_tools
Definition: TauProcessorAlg.h:57
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
TauProcessorAlg::m_cellMakerTool
const ToolHandle< ICaloConstCellMakerTool > m_cellMakerTool
Definition: TauProcessorAlg.h:58
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
TauProcessorAlg::m_tauPi0CellOutputContainer
SG::WriteHandleKey< CaloConstCellContainer > m_tauPi0CellOutputContainer
Definition: TauProcessorAlg.h:67
TauProcessorAlg::m_tauShotClusOutputContainer
SG::WriteHandleKey< xAOD::CaloClusterContainer > m_tauShotClusOutputContainer
Definition: TauProcessorAlg.h:64
a
TList * a
Definition: liststreamerinfos.cxx:10
h
TauProcessorAlg::m_minPt
Gaudi::Property< double > m_minPt
Definition: TauProcessorAlg.h:54
CaloConstCellContainer
CaloCellContainer that can accept const cell pointers.
Definition: CaloConstCellContainer.h:45
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
DataVector::pop_back
void pop_back()
Remove the last element from the collection.
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
DataVector::erase
iterator erase(iterator position)
Remove element at a given position.
SG::AllowEmpty
@ AllowEmpty
Definition: StoreGate/StoreGate/VarHandleKey.h:30
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
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
TauProcessorAlg::m_maxEta
Gaudi::Property< double > m_maxEta
Definition: TauProcessorAlg.h:53
CaloCell_Base_ID::calo_cell_hash_max
size_type calo_cell_hash_max(void) const
cell 'global' hash table max size
ServiceHandle< ICondSvc >