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

#include <TRTOverlay.h>

Inheritance diagram for TRTOverlay:
Collaboration diagram for TRTOverlay:

Public Member Functions

 TRTOverlay (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual StatusCode initialize () override final
 
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

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

StatusCode overlayContainer (const EventContext &ctx, const TRT_RDO_Container *bkgContainer, const TRT_RDO_Container *signalContainer, TRT_RDO_Container *outputContainer, const InDetSimDataCollection *signalSDOCollection, DataPool< TRT_LoLumRawData > &dataItemsPool) const
 
void mergeCollections (TRT_RDO_Collection *bkgCollection, TRT_RDO_Collection *signalCollection, TRT_RDO_Collection *outputCollection, double occupancy, const InDetSimDataCollection *signalSDOCollection, const TRTCond::StrawStatusData *strawStatusHT, CLHEP::HepRandomEngine *rndmEngine) const
 Here we take 2 view containers with elements owned by the DataPool we modify some of them and push them to a 3rd view container. More...
 
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

const TRT_IDm_trtId {}
 
Gaudi::Property< bool > m_sortBkgInput
 
SG::ReadHandleKey< TRT_RDO_Containerm_bkgInputKey
 
SG::ReadHandleKey< TRT_RDO_Containerm_signalInputKey
 
SG::WriteHandleKey< TRT_RDO_Containerm_outputKey
 
SG::ReadHandleKey< InDetSimDataCollectionm_signalInputSDOKey
 
SG::ReadCondHandleKey< TRTCond::StrawStatusDatam_strawStatusHTKey
 
ServiceHandle< IAthRNGSvcm_rndmSvc
 
Gaudi::Property< double > m_HTOccupancyCorrectionB
 
Gaudi::Property< double > m_HTOccupancyCorrectionEC
 
Gaudi::Property< double > m_HTOccupancyCorrectionB_noE
 
Gaudi::Property< double > m_HTOccupancyCorrectionEC_noE
 
Gaudi::Property< double > m_HTOccupancyCorrectionB_Ar
 
Gaudi::Property< double > m_HTOccupancyCorrectionEC_Ar
 
Gaudi::Property< double > m_HTOccupancyCorrectionB_Ar_noE
 
Gaudi::Property< double > m_HTOccupancyCorrectionEC_Ar_noE
 
ToolHandle< InDet::ITRT_LocalOccupancym_TRT_LocalOccupancyTool
 
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
 

Friends

class OverlayTesting::TRTOverlay_test
 

Detailed Description

Definition at line 32 of file TRTOverlay.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

◆ TRTOverlay()

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

Definition at line 64 of file TRTOverlay.cxx.

65  : AthReentrantAlgorithm(name, pSvcLocator)
66 {
67 }

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 TRTOverlay::execute ( const EventContext &  ctx) const
finaloverridevirtual

Definition at line 101 of file TRTOverlay.cxx.

102 {
103  ATH_MSG_DEBUG("execute() begin");
104 
105  // Reading the input RDOs
106  const TRT_RDO_Container *bkgContainerPtr = nullptr;
107  if (!m_bkgInputKey.empty()) {
109  if (!bkgContainer.isValid()) {
110  ATH_MSG_ERROR("Could not get background TRT RDO container " << bkgContainer.name() << " from store " << bkgContainer.store());
111  return StatusCode::FAILURE;
112  }
113  bkgContainerPtr = bkgContainer.cptr();
114 
115  ATH_MSG_DEBUG("Found background TRT RDO container " << bkgContainer.name() << " in store " << bkgContainer.store());
116  ATH_MSG_DEBUG("TRT Background = " << Overlay::debugPrint(bkgContainer.cptr()));
117  }
118 
120  if (!signalContainer.isValid()) {
121  ATH_MSG_ERROR("Could not get signal TRT RDO container " << signalContainer.name() << " from store " << signalContainer.store());
122  return StatusCode::FAILURE;
123  }
124  ATH_MSG_DEBUG("Found signal TRT RDO container " << signalContainer.name() << " in store " << signalContainer.store());
125  ATH_MSG_DEBUG("TRT Signal = " << Overlay::debugPrint(signalContainer.cptr()));
126 
128  if (!signalSDOContainer.isValid()) {
129  ATH_MSG_ERROR("Could not get signal TRT SDO map container " << signalSDOContainer.name() << " from store " << signalSDOContainer.store());
130  return StatusCode::FAILURE;
131  }
132  ATH_MSG_DEBUG("Found signal TRT SDO map container " << signalSDOContainer.name() << " in store " << signalSDOContainer.store());
133 
134  // The DataPool, this is what will actually own the elements
135  // we create during this algorithm. The containers are
136  // views.
137  DataPool<TRT_LoLumRawData> dataItemsPool(ctx);
138  dataItemsPool.prepareToAdd(200000);
139 
140  // Creating output RDO container
141  SG::WriteHandle<TRT_RDO_Container> outputContainer(m_outputKey, ctx);
142  ATH_CHECK(outputContainer.record(std::make_unique<TRT_RDO_Container>(signalContainer->size())));
143  if (!outputContainer.isValid()) {
144  ATH_MSG_ERROR("Could not record output TRT RDO container " << outputContainer.name() << " to store " << outputContainer.store());
145  return StatusCode::FAILURE;
146  }
147  ATH_MSG_DEBUG("Recorded output TRT RDO container " << outputContainer.name() << " in store " << outputContainer.store());
148 
149  ATH_CHECK(overlayContainer(ctx, bkgContainerPtr, signalContainer.cptr(),
150  outputContainer.ptr(), signalSDOContainer.cptr(),
151  dataItemsPool));
153  "TRT Result = " << Overlay::debugPrint(outputContainer.ptr()));
154 
155  ATH_MSG_DEBUG("execute() end");
156  return StatusCode::SUCCESS;
157 }

◆ 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 TRTOverlay::initialize ( )
finaloverridevirtual

Definition at line 69 of file TRTOverlay.cxx.

70 {
71  ATH_MSG_DEBUG("Initializing...");
72 
73  // Check and initialize keys
74  ATH_CHECK( m_bkgInputKey.initialize(!m_bkgInputKey.key().empty()) );
75  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_bkgInputKey);
76  ATH_CHECK( m_signalInputKey.initialize() );
77  ATH_MSG_VERBOSE("Initialized ReadHandleKey: " << m_signalInputKey);
78  ATH_CHECK( m_outputKey.initialize() );
79  ATH_MSG_VERBOSE("Initialized WriteHandleKey: " << m_outputKey);
81  ATH_MSG_VERBOSE("Initialized ReadHandleKey for SDO: " << m_signalInputSDOKey);
83  ATH_MSG_VERBOSE("Initialized ReadCondHandleKey: " << m_strawStatusHTKey);
84 
85  // Retrieve TRT ID helper
86  if (!detStore()->retrieve(m_trtId, "TRT_ID").isSuccess() || !m_trtId) {
87  ATH_MSG_FATAL("Cannot retrieve TRT ID helper");
88  return StatusCode::FAILURE;
89  }
90 
91  // Initialize random number generator
92  CHECK(m_rndmSvc.retrieve());
93 
94  // Retrieve TRT local occupancy tool
95  CHECK(m_TRT_LocalOccupancyTool.retrieve());
96 
97  return StatusCode::SUCCESS;
98 }

◆ 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

◆ mergeCollections()

void TRTOverlay::mergeCollections ( TRT_RDO_Collection bkgCollection,
TRT_RDO_Collection signalCollection,
TRT_RDO_Collection outputCollection,
double  occupancy,
const InDetSimDataCollection signalSDOCollection,
const TRTCond::StrawStatusData strawStatusHT,
CLHEP::HepRandomEngine *  rndmEngine 
) const
private

Here we take 2 view containers with elements owned by the DataPool we modify some of them and push them to a 3rd view container.

Definition at line 288 of file TRTOverlay.cxx.

295 {
296  if (bkgCollection->identify() != signalCollection->identify()) {
297  throw std::runtime_error("mergeCollections(): collection Id mismatch");
298  }
299 
300  // Merge by copying ptrs from background and signal to output collection
301  TRT_RDO_Collection::size_type ibkg = 0, isig = 0;
302 
303  outputCollection->reserve(
304  std::max(bkgCollection->size(), signalCollection->size()));
305  // Below we have swapElements.
306  // Remember the elements of the signalCollection and bkgCollection
307  // containers are owned by the DataPool.
308  // tmpBkg and tmp are whaterver elements we take out of the containers.
309  //
310  // So
311  // A) We can not delete them. dataPool will do that at the end of the event.
312  // B) We can push them back only to a View so outputCollection is a view
313  // collection
314  // C) We pass nullptr so no need to get another item from the pool
315 
316  while ((ibkg < bkgCollection->size()) || (isig < signalCollection->size())) {
317  // The RDO that goes to the output at the end of this step.
318  TRT_RDORawData *tmp{};
319 
320  if (isig == signalCollection->size()) {
321  // just copy the remaining background digits
322  bkgCollection->swapElement(ibkg++, nullptr, tmp);
323  } else if (ibkg == bkgCollection->size()) {
324  // just copy the remaining signal digits
325  signalCollection->swapElement(isig++, nullptr, tmp);
326  } else {
327  // Need to decide which one goes first.
328  // See comments in TRTDigitization.cxx about the assumption that id1<id2 <=> hash1<hash2
329  if (signalCollection->at(isig)->identify() < bkgCollection->at(ibkg)->identify()) {
330  signalCollection->swapElement(isig++, nullptr, tmp);
331  } else if (bkgCollection->at(ibkg)->identify() < signalCollection->at(isig)->identify()) {
332  bkgCollection->swapElement(ibkg++, nullptr, tmp);
333  } else {
334  // The hits are on the same channel.
335  TRT_RDORawData *tmpBkg{};
336 
337  bkgCollection->swapElement(ibkg++, nullptr, tmpBkg);
338  signalCollection->swapElement(isig++, nullptr, tmp);
339 
340  TRT_LoLumRawData *sigRdo = dynamic_cast<TRT_LoLumRawData *>(tmp);
341  const TRT_LoLumRawData *bkgRdo = dynamic_cast<const TRT_LoLumRawData *>(tmpBkg);
342 
343  if (sigRdo && bkgRdo) {
344  // the actual merging
345  sigRdo->merge(*bkgRdo);
346 
347  // If the hit is not already a high level hit
348  if (!(sigRdo->getWord() & 0x04020100)) {
349  // Determine if the hit is from an electron or not
350  bool isElectron = false;
351  Identifier rdoId = sigRdo->identify();
352  InDetSimDataCollection::const_iterator sdoIter = signalSDOCollection->find(rdoId);
353  if (sdoIter != signalSDOCollection->end()) {
354  const std::vector<InDetSimData::Deposit> &deposits = sdoIter->second.getdeposits();
355  for (const InDetSimData::Deposit &deposit : deposits) {
356  const HepMcParticleLink &particleLink = deposit.first;
357  if (particleLink.isValid()) {
358  if (std::abs(particleLink->pdg_id()) == 11) {
359  isElectron = true;
360  break;
361  }
362  }
363  }
364  }
365 
366  // Determine what type of straw was hit
367  bool isXenonStraw = false;
368  if (strawStatusHT != nullptr) {
369  if (strawStatusHT->findStatus(m_trtId->straw_hash(rdoId)) == TRTCond::StrawStatus::Good) {
370  isXenonStraw = true;
371  }
372  }
373 
374  // Get random number
375  int det = m_trtId->barrel_ec(rdoId);
376  float HTOccupancyCorrection = 0.;
377  if (isXenonStraw) {
378  if (isElectron) {
379  HTOccupancyCorrection = std::abs(det) > 1 ? m_HTOccupancyCorrectionEC : m_HTOccupancyCorrectionB;
380  } else {
381  HTOccupancyCorrection = std::abs(det) > 1 ? m_HTOccupancyCorrectionEC_noE : m_HTOccupancyCorrectionB_noE;
382  }
383  } else {
384  if (isElectron) {
385  HTOccupancyCorrection = std::abs(det) > 1 ? m_HTOccupancyCorrectionEC_Ar : m_HTOccupancyCorrectionB_Ar;
386  } else {
387  HTOccupancyCorrection = std::abs(det) > 1 ? m_HTOccupancyCorrectionEC_Ar_noE : m_HTOccupancyCorrectionB_Ar_noE;
388  }
389  }
390 
391  unsigned int newWord = 0;
392  if (HTOccupancyCorrection != 0. && occupancy * HTOccupancyCorrection > CLHEP::RandFlat::shoot(rndmEngine, 0, 1)) {
393  newWord += 1 << (26-9);
394  }
395 
396  TRT_LoLumRawData newRdo(rdoId, newWord);
397  sigRdo->merge(newRdo);
398  }
399  } else {
400  ATH_MSG_WARNING("TRT RDO is the wrong format");
401  }
402  }
403  }
404 
405  outputCollection->push_back(tmp);
406  } // <= while
407 }

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

◆ overlayContainer()

StatusCode TRTOverlay::overlayContainer ( const EventContext &  ctx,
const TRT_RDO_Container bkgContainer,
const TRT_RDO_Container signalContainer,
TRT_RDO_Container outputContainer,
const InDetSimDataCollection signalSDOCollection,
DataPool< TRT_LoLumRawData > &  dataItemsPool 
) const
private

Definition at line 160 of file TRTOverlay.cxx.

166 {
167 
168  // There are some use cases where background is empty
169  if (!bkgContainer) {
170  // Only loop through the signal collections and copy them over
171  for (const auto &[hashId, ptr] : signalContainer->GetAllHashPtrPair()) {
172  // Copy the signal collection
173  // pools own the individual elements
174  std::unique_ptr<TRT_RDO_Collection> signalCollection = copyCollection(hashId, ptr, dataItemsPool);
175 
176  if (outputContainer->addCollection(signalCollection.get(), hashId).isFailure()) {
177  ATH_MSG_ERROR("Adding signal Collection with hashId " << hashId << " failed");
178  return StatusCode::FAILURE;
179  } else {
180  (void)signalCollection.release();
181  }
182  }
183 
184  return StatusCode::SUCCESS;
185  }
186 
187  // Setup the random engine
188  ATHRNG::RNGWrapper* rngWrapper = m_rndmSvc->getEngine(this);
189  rngWrapper->setSeed( name(), ctx );
190  CLHEP::HepRandomEngine *rndmEngine = rngWrapper->getEngine(ctx);
191 
192  // Load TRT conditions
194  const TRTCond::StrawStatusData *strawStatusHT{*strawStatusHTHandle};
195 
196  // Retrieve the occupancy map
197  std::map<int, double> occupancyMap = m_TRT_LocalOccupancyTool->getDetectorOccupancy(ctx, bkgContainer);
198 
199  // The MC signal container should typically be smaller than bkgContainer,
200  // because the latter contains all the noise, minimum bias and pile up.
201  // Thus we firstly iterate over signal hashes and store them in a map.
202  std::vector < std::pair<IdentifierHash, bool> > overlapMap;
203  overlapMap.reserve(signalContainer->numberOfCollections());
204  for (const auto &[hashId, ptr] : signalContainer->GetAllHashPtrPair()) {
205  overlapMap.emplace_back(hashId, false);
206  }
207 
208  // Now loop through the background hashes and copy unique ones over
209  for (const auto &[hashId, ptr] : bkgContainer->GetAllHashPtrPair()) {
210  auto search = std::lower_bound( overlapMap.begin(), overlapMap.end(), hashId,
211  [](const std::pair<IdentifierHash, bool> &lhs, IdentifierHash rhs) -> bool { return lhs.first < rhs; } );
212  if (search == overlapMap.end() || search->first != hashId) {
213  // Copy the background collection
214  std::unique_ptr<TRT_RDO_Collection> bkgCollection{};
215  if (m_sortBkgInput) {
216  // copy the bkg again Pool owns the individual elements
217  bkgCollection = copyCollectionAndSort(hashId, bkgContainer->indexFindPtr(hashId),dataItemsPool);
218  } else {
219  bkgCollection = copyCollection(hashId, bkgContainer->indexFindPtr(hashId),dataItemsPool);
220  }
221 
222  if (outputContainer->addCollection(bkgCollection.get(), hashId).isFailure()) {
223  ATH_MSG_ERROR("Adding background Collection with hashId " << hashId << " failed");
224  return StatusCode::FAILURE;
225  } else {
226  (void)bkgCollection.release();
227  }
228  } else {
229  // Flip the overlap flag
230  search->second = true;
231  }
232  }
233 
234  // Finally loop through the map and process the signal and overlay if
235  // necessary
236  for (const auto &[hashId, overlap] : overlapMap) {
237  // Copy the signal collection the pool owns the individual elements
238  std::unique_ptr<TRT_RDO_Collection> signalCollection =
239  copyCollection(hashId, signalContainer->indexFindPtr(hashId),dataItemsPool);
240 
241  if (overlap) { // Do overlay
242  // Create the output collection, only works for Inner Detector
243  auto outputCollection = std::make_unique<TRT_RDO_Collection>(hashId);
244  outputCollection->setIdentifier(signalCollection->identify());
245  // This will receive merged elements from the other containers.
246  // There elements are owned actually by the DataPool
248 
249  // Copy the background collection the pool owns the individual elements
250  std::unique_ptr<TRT_RDO_Collection> bkgCollection{};
251  if (m_sortBkgInput) {
252  bkgCollection = copyCollectionAndSort(hashId, bkgContainer->indexFindPtr(hashId),dataItemsPool);
253  } else {
254  bkgCollection = copyCollection(hashId, bkgContainer->indexFindPtr(hashId),dataItemsPool);
255  }
256 
257  // Merge collections
258  int det = m_trtId->barrel_ec(signalCollection->identify());
259  mergeCollections(bkgCollection.get(),
260  signalCollection.get(),
261  outputCollection.get(),
262  occupancyMap[det],
263  signalSDOCollection,
264  strawStatusHT,
265  rndmEngine);
266 
267  if (outputContainer->addCollection(outputCollection.get(), hashId).isFailure()) {
268  ATH_MSG_ERROR("Adding overlaid Collection with hashId " << hashId << " failed");
269  return StatusCode::FAILURE;
270  } else {
271  outputCollection.release();
272  }
273  } else { // Only write signal out
274  if (outputContainer->addCollection(signalCollection.get(), hashId).isFailure()) {
275  ATH_MSG_ERROR("Adding signal Collection with hashId " << hashId << " failed");
276  return StatusCode::FAILURE;
277  } else {
278  (void)signalCollection.release();
279  }
280  }
281  }
282 
283  return StatusCode::SUCCESS;
284 }

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

Friends And Related Function Documentation

◆ OverlayTesting::TRTOverlay_test

friend class OverlayTesting::TRTOverlay_test
friend

Definition at line 34 of file TRTOverlay.h.

Member Data Documentation

◆ m_bkgInputKey

SG::ReadHandleKey<TRT_RDO_Container> TRTOverlay::m_bkgInputKey
private
Initial value:
{
this, "BkgInputKey", "Bkg_TRT_RDOs",
" ReadHandleKey for Background Input TRT_RDO_Container"}

Definition at line 62 of file TRTOverlay.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_HTOccupancyCorrectionB

Gaudi::Property<double> TRTOverlay::m_HTOccupancyCorrectionB
private
Initial value:
{
this, "TRT_HT_OccupancyCorrectionBarrel", 0.110, ""}

Definition at line 82 of file TRTOverlay.h.

◆ m_HTOccupancyCorrectionB_Ar

Gaudi::Property<double> TRTOverlay::m_HTOccupancyCorrectionB_Ar
private
Initial value:
{
this, "TRT_HT_OccupancyCorrectionBarrelAr", 0.100, ""}

Definition at line 90 of file TRTOverlay.h.

◆ m_HTOccupancyCorrectionB_Ar_noE

Gaudi::Property<double> TRTOverlay::m_HTOccupancyCorrectionB_Ar_noE
private
Initial value:
{
this, "TRT_HT_OccupancyCorrectionBarrelArNoE", 0.088, ""}

Definition at line 94 of file TRTOverlay.h.

◆ m_HTOccupancyCorrectionB_noE

Gaudi::Property<double> TRTOverlay::m_HTOccupancyCorrectionB_noE
private
Initial value:
{
this, "TRT_HT_OccupancyCorrectionBarrelNoE", 0.060, ""}

Definition at line 86 of file TRTOverlay.h.

◆ m_HTOccupancyCorrectionEC

Gaudi::Property<double> TRTOverlay::m_HTOccupancyCorrectionEC
private
Initial value:
{
this, "TRT_HT_OccupancyCorrectionEndcap", 0.090, ""}

Definition at line 84 of file TRTOverlay.h.

◆ m_HTOccupancyCorrectionEC_Ar

Gaudi::Property<double> TRTOverlay::m_HTOccupancyCorrectionEC_Ar
private
Initial value:
{
this, "TRT_HT_OccupancyCorrectionEndcapAr", 0.101, ""}

Definition at line 92 of file TRTOverlay.h.

◆ m_HTOccupancyCorrectionEC_Ar_noE

Gaudi::Property<double> TRTOverlay::m_HTOccupancyCorrectionEC_Ar_noE
private
Initial value:
{
this, "TRT_HT_OccupancyCorrectionEndcapArNoE", 0.102, ""}

Definition at line 96 of file TRTOverlay.h.

◆ m_HTOccupancyCorrectionEC_noE

Gaudi::Property<double> TRTOverlay::m_HTOccupancyCorrectionEC_noE
private
Initial value:
{
this, "TRT_HT_OccupancyCorrectionEndcapNoE", 0.050, ""}

Definition at line 88 of file TRTOverlay.h.

◆ m_outputKey

SG::WriteHandleKey<TRT_RDO_Container> TRTOverlay::m_outputKey
private
Initial value:
{
this, "OutputKey", "TRT_RDOs",
"WriteHandleKey for Output TRT_RDO_Container"}

Definition at line 68 of file TRTOverlay.h.

◆ m_rndmSvc

ServiceHandle<IAthRNGSvc> TRTOverlay::m_rndmSvc
private
Initial value:
{this, "RndmSvc", "AthRNGSvc",
"Random Number Service"}

Definition at line 79 of file TRTOverlay.h.

◆ m_signalInputKey

SG::ReadHandleKey<TRT_RDO_Container> TRTOverlay::m_signalInputKey
private
Initial value:
{
this, "SignalInputKey", "Sig_TRT_RDOs",
"ReadHandleKey for Signal Input TRT_RDO_Container"}

Definition at line 65 of file TRTOverlay.h.

◆ m_signalInputSDOKey

SG::ReadHandleKey<InDetSimDataCollection> TRTOverlay::m_signalInputSDOKey
private
Initial value:
{
this, "SignalInputSDOKey", "Sig_TRT_SDO_Map",
"ReadHandleKey for Signal Input InDetSimDataCollection for TRT"}

Definition at line 71 of file TRTOverlay.h.

◆ m_sortBkgInput

Gaudi::Property<bool> TRTOverlay::m_sortBkgInput
private
Initial value:
{this, "SortBkgInput", false,
"Sort background input RDOs"}

Definition at line 59 of file TRTOverlay.h.

◆ m_strawStatusHTKey

SG::ReadCondHandleKey<TRTCond::StrawStatusData> TRTOverlay::m_strawStatusHTKey
private
Initial value:
{
this, "StrawStatusHT", "StrawStatusHTData", "StrawStatusHT key"}

Definition at line 74 of file TRTOverlay.h.

◆ m_TRT_LocalOccupancyTool

ToolHandle<InDet::ITRT_LocalOccupancy> TRTOverlay::m_TRT_LocalOccupancyTool
private
Initial value:
{
this, "TRT_LocalOccupancyTool", "TRT_LocalOccupancy", ""}

Definition at line 98 of file TRTOverlay.h.

◆ m_trtId

const TRT_ID* TRTOverlay::m_trtId {}
private

Definition at line 57 of file TRTOverlay.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
ATHRNG::RNGWrapper::setSeed
void setSeed(const std::string &algName, const EventContext &ctx)
Set the random seed using a string (e.g.
Definition: RNGWrapper.h:169
TRTOverlay::m_trtId
const TRT_ID * m_trtId
Definition: TRTOverlay.h:57
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
TRTOverlay::m_HTOccupancyCorrectionEC_Ar
Gaudi::Property< double > m_HTOccupancyCorrectionEC_Ar
Definition: TRTOverlay.h:92
SG::ReadCondHandle
Definition: ReadCondHandle.h:44
TRT_ID::straw_hash
IdentifierHash straw_hash(Identifier straw_id) const
straw hash from id - optimized
Definition: TRT_ID.h:768
IdentifiableContainerMT::addCollection
virtual StatusCode addCollection(const T *coll, IdentifierHash hashId) override final
insert collection into container with id hash if IDC should not take ownership of collection,...
Definition: IdentifiableContainerMT.h:297
SG::VIEW_ELEMENTS
@ VIEW_ELEMENTS
this data object is a view, it does not own its elmts
Definition: OwnershipPolicy.h:18
TRTCalib_Extractor.det
det
Definition: TRTCalib_Extractor.py:36
TRTOverlay::m_HTOccupancyCorrectionB_Ar
Gaudi::Property< double > m_HTOccupancyCorrectionB_Ar
Definition: TRTOverlay.h:90
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
TRT_LoLumRawData
Definition: TRT_LoLumRawData.h:25
TRTCond::StrawStatusData
Definition: StrawStatusData.h:17
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
InDetRawDataCollection::identify
virtual Identifier identify() const override final
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
TRTOverlay::m_outputKey
SG::WriteHandleKey< TRT_RDO_Container > m_outputKey
Definition: TRTOverlay.h:68
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
TRTOverlay::m_strawStatusHTKey
SG::ReadCondHandleKey< TRTCond::StrawStatusData > m_strawStatusHTKey
Definition: TRTOverlay.h:74
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
InDetRawDataContainer
Definition: InDetRawDataContainer.h:27
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
dbg::ptr
void * ptr(T *p)
Definition: SGImplSvc.cxx:74
TRTOverlay::m_signalInputKey
SG::ReadHandleKey< TRT_RDO_Container > m_signalInputKey
Definition: TRTOverlay.h:65
DataVector::swapElement
void swapElement(size_type index, value_type newElem, reference oldElem)
Swap one element out of the container.
search
void search(TDirectory *td, const std::string &s, std::string cwd, node *n)
recursive directory search for TH1 and TH2 and TProfiles
Definition: hcg.cxx:738
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
TRT_RDORawData
Definition: TRT_RDORawData.h:24
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:29
TRTOverlay::m_signalInputSDOKey
SG::ReadHandleKey< InDetSimDataCollection > m_signalInputSDOKey
Definition: TRTOverlay.h:71
python.setupRTTAlg.size
int size
Definition: setupRTTAlg.py:39
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
IdentifiableContainerMT::numberOfCollections
virtual size_t numberOfCollections() const override final
return number of collections
Definition: IdentifiableContainerMT.h:213
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthReentrantAlgorithm::AthReentrantAlgorithm
AthReentrantAlgorithm()
Default constructor:
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
Overlay::copyCollection
std::unique_ptr< HGTD_RDO_Collection > copyCollection(const IdentifierHash &hashId, const HGTD_RDO_Collection *collection)
Definition: HGTD_Overlay.cxx:24
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
xAOD::EgammaHelpers::isElectron
bool isElectron(const xAOD::Egamma *eg)
is the object an electron (not Fwd)
Definition: EgammaxAODHelpers.cxx:12
TRTOverlay::mergeCollections
void mergeCollections(TRT_RDO_Collection *bkgCollection, TRT_RDO_Collection *signalCollection, TRT_RDO_Collection *outputCollection, double occupancy, const InDetSimDataCollection *signalSDOCollection, const TRTCond::StrawStatusData *strawStatusHT, CLHEP::HepRandomEngine *rndmEngine) const
Here we take 2 view containers with elements owned by the DataPool we modify some of them and push th...
Definition: TRTOverlay.cxx:288
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
CHECK
#define CHECK(...)
Evaluate an expression and check for errors.
Definition: Control/AthenaKernel/AthenaKernel/errorcheck.h:422
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
TRT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: TRT_ID.h:866
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
TRTOverlay::m_TRT_LocalOccupancyTool
ToolHandle< InDet::ITRT_LocalOccupancy > m_TRT_LocalOccupancyTool
Definition: TRTOverlay.h:98
TRTOverlay::m_HTOccupancyCorrectionB_noE
Gaudi::Property< double > m_HTOccupancyCorrectionB_noE
Definition: TRTOverlay.h:86
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
TRTCond::StrawStatus::Good
@ Good
Definition: StrawStatus.h:18
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
TRTOverlay::m_HTOccupancyCorrectionEC_noE
Gaudi::Property< double > m_HTOccupancyCorrectionEC_noE
Definition: TRTOverlay.h:88
postInclude.outputCollection
outputCollection
Definition: postInclude.SortInput.py:27
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
ATHRNG::RNGWrapper
A wrapper class for event-slot-local random engines.
Definition: RNGWrapper.h:56
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
TRTOverlay::m_sortBkgInput
Gaudi::Property< bool > m_sortBkgInput
Definition: TRTOverlay.h:59
ATHRNG::RNGWrapper::getEngine
CLHEP::HepRandomEngine * getEngine(const EventContext &ctx) const
Retrieve the random engine corresponding to the provided EventContext.
Definition: RNGWrapper.h:134
IdentifiableContainerMT::indexFindPtr
virtual const T * indexFindPtr(IdentifierHash hashId) const override final
return pointer on the found entry or null if out of range using hashed index - fast version,...
Definition: IdentifiableContainerMT.h:289
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
TRTOverlay::m_HTOccupancyCorrectionB
Gaudi::Property< double > m_HTOccupancyCorrectionB
Definition: TRTOverlay.h:82
InDetRawData::getWord
unsigned int getWord() const
Definition: InDetRawData.h:47
a
TList * a
Definition: liststreamerinfos.cxx:10
h
TRTCond::StrawStatusData::findStatus
unsigned int findStatus(const IdentifierHash &hashID) const
Definition: StrawStatusData.cxx:20
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
TRTOverlay::overlayContainer
StatusCode overlayContainer(const EventContext &ctx, const TRT_RDO_Container *bkgContainer, const TRT_RDO_Container *signalContainer, TRT_RDO_Container *outputContainer, const InDetSimDataCollection *signalSDOCollection, DataPool< TRT_LoLumRawData > &dataItemsPool) const
Definition: TRTOverlay.cxx:160
IdentifiableContainerMT::GetAllHashPtrPair
const std::vector< EventContainers::hashPair< T > > & GetAllHashPtrPair() const
Definition: IdentifiableContainerMT.h:217
TRTOverlay::m_HTOccupancyCorrectionEC
Gaudi::Property< double > m_HTOccupancyCorrectionEC
Definition: TRTOverlay.h:84
DataPool
a typed memory pool that saves time spent allocation small object. This is typically used by containe...
Definition: DataPool.h:63
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
InDetRawData::identify
virtual Identifier identify() const override final
Definition: InDetRawData.h:41
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
DataVector::at
const T * at(size_type n) const
Access an element, as an rvalue.
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< RawDataT >::size_type
BASE::size_type size_type
Definition: DataVector.h:813
InDetSimData::Deposit
std::pair< HepMcParticleLink, float > Deposit
Definition: InDetSimData.h:48
TRTOverlay::m_rndmSvc
ServiceHandle< IAthRNGSvc > m_rndmSvc
Definition: TRTOverlay.h:79
InDetRawData::merge
void merge(const InDetRawData &other)
Definition: InDetRawData.h:60
TRTOverlay::m_bkgInputKey
SG::ReadHandleKey< TRT_RDO_Container > m_bkgInputKey
Definition: TRTOverlay.h:62
Overlay::debugPrint
std::string debugPrint(const IDC_Container *container, unsigned numprint=25)
Diagnostic output of Identifiable Containers.
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
TRTOverlay::m_HTOccupancyCorrectionB_Ar_noE
Gaudi::Property< double > m_HTOccupancyCorrectionB_Ar_noE
Definition: TRTOverlay.h:94
TRTOverlay::m_HTOccupancyCorrectionEC_Ar_noE
Gaudi::Property< double > m_HTOccupancyCorrectionEC_Ar_noE
Definition: TRTOverlay.h:96
ServiceHandle< ICondSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14