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

#include <SCT_PrepDataToxAOD.h>

Inheritance diagram for SCT_PrepDataToxAOD:
Collaboration diagram for SCT_PrepDataToxAOD:

Public Member Functions

 SCT_PrepDataToxAOD (const std::string &name, ISvcLocator *pSvcLocator)
 
virtual StatusCode initialize () override
 
virtual StatusCode execute (const EventContext &ctx) const override
 
virtual StatusCode finalize () override
 
virtual bool isClonable () const override
 Make this algorithm clonable. More...
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. 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

void addSDOInformation (xAOD::TrackMeasurementValidation *xprd, const InDet::SCT_Cluster *prd, const InDetSimDataCollection *sdoCollection) const
 
void addSiHitInformation (xAOD::TrackMeasurementValidation *xprd, const InDet::SCT_Cluster *prd, const std::vector< const SiHit * > *siHits) const
 
void findAllHitsCompatibleWithCluster (const InDet::SCT_Cluster *prd, const std::vector< const SiHit * > *siHits, std::vector< SiHit > &matchingHits) const
 
void addRDOInformation (xAOD::TrackMeasurementValidation *, const InDet::SCT_Cluster *, const std::map< Identifier, const SCT_RDORawData * > &idToRAWDataMap) const
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

const SCT_IDm_SCTHelper {nullptr}
 
SG::ReadHandleKey< InDet::SCT_ClusterContainerm_clustercontainer {this, "SiClusterContainer", "SCT_Clusters"}
 
SG::ReadHandleKey< InDetSimDataCollectionm_SDOcontainer {this, "MC_SDOs", "SCT_SDO_Map"}
 
SG::ReadHandleKey< SiHitCollectionm_sihitContainer {this, "MC_Hits", "SCT_Hits"}
 
SG::ReadHandleKey< PRD_MultiTruthCollectionm_multiTruth {this, "PRD_MultiTruth", "PRD_MultiTruthSCT"}
 
SG::ReadHandleKey< xAODTruthParticleLinkVectorm_truthParticleLinks {this,"InputTruthParticleLinks","","The key for the truth particle link collection."}
 
SG::ReadHandleKey< SCT_RDO_Containerm_rdoContainer {this, "SctRdoContainer", "SCT_RDOs"}
 
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainerm_xAodContainer {this, "SctxAodContainer", "SCT_Clusters"}
 
SG::WriteHandleKey< std::vector< unsigned int > > m_xAodOffset {this, "SctxAodOffset", "SCT_ClustersOffsets"}
 
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollectionm_SCTDetEleCollKey {this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"}
 
BooleanProperty m_useTruthInfo {this, "UseTruthInfo", false}
 
BooleanProperty m_writeRDOinformation {this, "WriteRDOinformation", true}
 
BooleanProperty m_writeSDOs {this, "WriteSDOs", false}
 
BooleanProperty m_writeSiHits {this, "WriteSiHits", false}
 
std::atomic< unsigned int > m_haveTruthLink {}
 
std::atomic< unsigned int > m_missingTruthParticle {}
 
std::atomic< unsigned int > m_missingParentParticle {}
 
std::atomic_bool m_firstEventWarnings {false}
 
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 44 of file SCT_PrepDataToxAOD.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

◆ SCT_PrepDataToxAOD()

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

Definition at line 34 of file SCT_PrepDataToxAOD.cxx.

34  :
35  AthReentrantAlgorithm(name, pSvcLocator)
36 {
37 }

Member Function Documentation

◆ addRDOInformation()

void SCT_PrepDataToxAOD::addRDOInformation ( xAOD::TrackMeasurementValidation xprd,
const InDet::SCT_Cluster prd,
const std::map< Identifier, const SCT_RDORawData * > &  idToRAWDataMap 
) const
private

Definition at line 499 of file SCT_PrepDataToxAOD.cxx.

501  {
502  std::vector<int> strip(prd->rdoList().size(), -1);
503  std::vector<int> timebin(prd->rdoList().size(), -1);
504  std::vector<int> groupsize(prd->rdoList().size(), -1);
505 
506  unsigned int nRDOs{0};
507  for (const auto& hitIdentifier: prd->rdoList()) {
508  auto result{idToRAWDataMap.find(hitIdentifier)};
509  if (result != idToRAWDataMap.end()) {
510  const SCT_RDORawData* sctRdo{result->second};
511  strip[nRDOs] = m_SCTHelper->strip(sctRdo->identify());
512  const SCT3_RawData* rdo3{dynamic_cast<const SCT3_RawData*>(sctRdo)};
513  if (rdo3) {
514  timebin[nRDOs] = rdo3->getTimeBin();
515  groupsize[nRDOs] = rdo3->getGroupSize();
516  }
517  }
518  nRDOs++;
519  }
520 
521  AUXDATA(xprd, std::vector<int>, rdo_strip) = strip;
522  AUXDATA(xprd, std::vector<int>, rdo_timebin) = timebin;
523  AUXDATA(xprd, std::vector<int>, rdo_groupsize) = groupsize;
524 }

◆ addSDOInformation()

void SCT_PrepDataToxAOD::addSDOInformation ( xAOD::TrackMeasurementValidation xprd,
const InDet::SCT_Cluster prd,
const InDetSimDataCollection sdoCollection 
) const
private

Definition at line 304 of file SCT_PrepDataToxAOD.cxx.

307 {
308  std::vector<int> sdo_word;
309  std::vector<std::vector<int>> sdo_depositsBarcode;
310  std::vector<std::vector<float>> sdo_depositsEnergy;
311  // find hit
312  for (const auto& hitIdentifier: prd->rdoList()) {
313  auto pos{sdoCollection->find(hitIdentifier)};
314  if (pos == sdoCollection->end()) continue;
315  sdo_word.push_back(pos->second.word());
316  std::vector<int> sdoDepBC(pos->second.getdeposits().size(), -1);
317  std::vector<float> sdoDepEnergy(pos->second.getdeposits().size());
318  unsigned int nDepos{0};
319  for (auto& deposit: pos->second.getdeposits()) {
320  if (deposit.first) sdoDepBC[nDepos] = HepMC::barcode(deposit.first);
321  ATH_MSG_DEBUG(" SDO Energy Deposit " << deposit.second);
322  sdoDepEnergy[nDepos] = deposit.second;
323  nDepos++;
324  }
325  sdo_depositsBarcode.push_back(sdoDepBC);
326  sdo_depositsEnergy.push_back(sdoDepEnergy);
327  }
328  AUXDATA(xprd, std::vector<int>, sdo_words) = sdo_word;
329  AUXDATA(xprd, std::vector<std::vector<int>>, sdo_depositsBarcode) = sdo_depositsBarcode;
330  AUXDATA(xprd, std::vector<std::vector<float>>, sdo_depositsEnergy) = sdo_depositsEnergy;
331 }

◆ addSiHitInformation()

void SCT_PrepDataToxAOD::addSiHitInformation ( xAOD::TrackMeasurementValidation xprd,
const InDet::SCT_Cluster prd,
const std::vector< const SiHit * > *  siHits 
) const
private

Definition at line 334 of file SCT_PrepDataToxAOD.cxx.

337 {
338  std::vector<SiHit> matchingHits;
339  findAllHitsCompatibleWithCluster(prd, siHits, matchingHits);
340 
341  long unsigned int numHits{matchingHits.size()};
342 
343  std::vector<float> sihit_energyDeposit(numHits, 0.);
344  std::vector<float> sihit_meanTime(numHits, 0.);
345  std::vector<int> sihit_barcode(numHits, 0);
346 
347  std::vector<float> sihit_startPosX(numHits, 0.);
348  std::vector<float> sihit_startPosY(numHits, 0.);
349  std::vector<float> sihit_startPosZ(numHits, 0.);
350 
351  std::vector<float> sihit_endPosX(numHits, 0);
352  std::vector<float> sihit_endPosY(numHits, 0);
353  std::vector<float> sihit_endPosZ(numHits, 0);
354 
355  int hitNumber{0};
357  if (de) {
358  for (const SiHit& sihit : matchingHits) {
359  sihit_energyDeposit[hitNumber] = sihit.energyLoss();
360  sihit_meanTime[hitNumber] = sihit.meanTime();
361  sihit_barcode[hitNumber] = HepMC::barcode(sihit.particleLink());
362 
363  // Convert Simulation frame into reco frame
364  const HepGeom::Point3D<double>& startPos{sihit.localStartPosition()};
365 
366  Amg::Vector2D pos{de->hitLocalToLocal(startPos.z(), startPos.y())};
367  sihit_startPosX[hitNumber] = pos[0];
368  sihit_startPosY[hitNumber] = pos[1];
369  sihit_startPosZ[hitNumber] = startPos.x();
370 
371  const HepGeom::Point3D<double>& endPos{sihit.localEndPosition()};
372  pos= de->hitLocalToLocal(endPos.z(), endPos.y());
373  sihit_endPosX[hitNumber] = pos[0];
374  sihit_endPosY[hitNumber] = pos[1];
375  sihit_endPosZ[hitNumber] = endPos.x();
376  ++hitNumber;
377  }
378  }
379 
380  AUXDATA(xprd, std::vector<float>, sihit_energyDeposit) = sihit_energyDeposit;
381  AUXDATA(xprd, std::vector<float>, sihit_meanTime) = sihit_meanTime;
382  AUXDATA(xprd, std::vector<int>, sihit_barcode) = sihit_barcode;
383 
384  AUXDATA(xprd, std::vector<float>, sihit_startPosX) = sihit_startPosX;
385  AUXDATA(xprd, std::vector<float>, sihit_startPosY) = sihit_startPosY;
386  AUXDATA(xprd, std::vector<float>, sihit_startPosZ) = sihit_startPosZ;
387 
388  AUXDATA(xprd, std::vector<float>, sihit_endPosX) = sihit_endPosX;
389  AUXDATA(xprd, std::vector<float>, sihit_endPosY) = sihit_endPosY;
390  AUXDATA(xprd, std::vector<float>, sihit_endPosZ) = sihit_endPosZ;
391 }

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

Definition at line 73 of file SCT_PrepDataToxAOD.cxx.

74 {
75  // the cluster ambiguity map
76  std::map<Identifier, const SCT_RDORawData*> idToRAWDataMap;
79  if (rdoContainer.isValid()) {
80  // get all the RIO_Collections in the container
81  for (const auto collection: *rdoContainer) {
82  //get all the RDOs in the collection
83  for (const auto rdo : *collection) {
84  if (rdo==nullptr) {
85  ATH_MSG_WARNING("Null SCT RDO. Skipping it");
86  continue;
87  }
88  Identifier rdoId{rdo->identify()};
89  idToRAWDataMap.insert(std::pair<Identifier, const SCT_RDORawData*>{rdoId, rdo});
90  } // collection
91  } // Have container;
92  } else if (m_firstEventWarnings) {
93  ATH_MSG_WARNING("Failed to retrieve SCT RDO container");
94  }
95  }
96  ATH_MSG_DEBUG("Size of RDO map is " << idToRAWDataMap.size());
97 
98  const PRD_MultiTruthCollection* prdmtColl{nullptr};
99  const xAODTruthParticleLinkVector *truth_particle_links{nullptr};
100  if (m_useTruthInfo) {
102  if (prdmtCollHandle.isValid()) {
103  prdmtColl = &*prdmtCollHandle;
104  }
105  if (!m_truthParticleLinks.empty()) {
107  if (truthParticleLinksHandle.isValid()) {
108  truth_particle_links = truthParticleLinksHandle.cptr();
109  }
110  }
111  }
112 
113  const InDetSimDataCollection* sdoCollection{nullptr};
114  if (m_writeSDOs) {
115  SG::ReadHandle<InDetSimDataCollection> sdoCollectionHandle{m_SDOcontainer, ctx};
116  if (sdoCollectionHandle.isValid()) {
117  sdoCollection = &*sdoCollectionHandle;
118  }
119  }
120 
121  std::vector<std::vector<const SiHit*>> siHits(m_SCTHelper->wafer_hash_max());
122  if (m_writeSiHits) {
124  if (sihitCollection.isValid()) {
125  for (const SiHit& siHit: *sihitCollection) {
126  // Check if it is an SCT hit
127  if (not siHit.isSCT()) continue;
128 
129  Identifier wafer_id{m_SCTHelper->wafer_id(siHit.getBarrelEndcap(),
130  siHit.getLayerDisk(),
131  siHit.getPhiModule(),
132  siHit.getEtaModule(),
133  siHit.getSide())};
134  IdentifierHash wafer_hash{m_SCTHelper->wafer_hash(wafer_id)};
135  siHits[wafer_hash].push_back(&siHit);
136  }
137  }
138  }
139 
140  // Mandatory. This is needed and required if this algorithm is scheduled.
142  if (not sctClusterContainer.isValid()) {
143  ATH_MSG_FATAL("Cannot retrieve SCT PrepDataContainer " << m_clustercontainer.key());
144  return StatusCode::FAILURE;
145  }
146 
147  // Create the xAOD container and its auxiliary store:
149  ATH_CHECK(xaod.record(std::make_unique<xAOD::TrackMeasurementValidationContainer>(),
150  std::make_unique<xAOD::TrackMeasurementValidationAuxContainer>()));
151 
153  ATH_CHECK(offsets.record(std::make_unique<std::vector<unsigned int>>(m_SCTHelper->wafer_hash_max(), 0)));
154 
155  unsigned int have_truth_link=0u;
156  unsigned int missing_truth_particle=0u;
157  unsigned int missing_parent_particle=0u;
158  // Loop over the container
159  unsigned int counter{0};
160  for (const auto clusterCollection: *sctClusterContainer) {
161  //Fill Offset container
162  (*offsets)[clusterCollection->identifyHash()] = counter;
163 
164  // skip empty collections
165  if (clusterCollection->empty()) continue;
166 
167  xaod->resize(counter + clusterCollection->size());
168  // loop over collection and convert to xAOD
169  for (const InDet::SCT_Cluster* prd: *clusterCollection) {
170  Identifier clusterId{prd->identify()};
171  if (not clusterId.is_valid()) {
172  ATH_MSG_WARNING("SCT cluster identifier is not valid!");
173  }
174 
175  // create and add xAOD object
177  xaod->at(counter) = xprd;
178  ++counter;
179 
180  //Set Identifier
181  xprd->setIdentifier(clusterId.get_compact());
182 
183  //Set Global Position
184  Amg::Vector3D gpos{prd->globalPosition()};
185  xprd->setGlobalPosition(gpos.x(), gpos.y(), gpos.z());
186 
187  //Set Local Position
188  const Amg::Vector2D& locpos{prd->localPosition()};
189  float locY{0.};
190  float locX{static_cast<float>(locpos.x())};
191  if ((not std::isinf(locpos.y()) or std::isnan(locpos.y()))) {
192  if (locpos.y()>=1e-07) locY = locpos.y();
193  } else {
194  locY = -9999.;
195  }
196 
197  // Set local error matrix
198  xprd->setLocalPosition(locX, locY);
199 
200  const Amg::MatrixX& localCov{prd->localCovariance()};
201  if (localCov.size() == 1) {
202  xprd->setLocalPositionError(localCov(0, 0), 0., 0.);
203  } else if (localCov.size() == 4) {
204  xprd->setLocalPositionError(localCov(0, 0), localCov(1, 1), localCov(0, 1));
205  } else {
206  xprd->setLocalPositionError(0., 0., 0.);
207  }
208 
209  // Set vector of hit identifiers
210  std::vector<uint64_t> rdoIdentifierList;
211  rdoIdentifierList.reserve(prd->rdoList().size());
212  for (const auto& hitIdentifier: prd->rdoList()) {
213  rdoIdentifierList.push_back(hitIdentifier.get_compact());
214  }
215  xprd->setRdoIdentifierList(rdoIdentifierList);
216 
217  //Add SCT specific information
218  const InDet::SiWidth cw{prd->width()};
219  AUXDATA(xprd, int, SiWidth) = static_cast<int>(cw.colRow()[0]);
220  AUXDATA(xprd, int, hitsInThirdTimeBin) = static_cast<int>(prd->hitsInThirdTimeBin());
221 
222  AUXDATA(xprd, int, bec) = m_SCTHelper->barrel_ec(clusterId);
223  AUXDATA(xprd, int, layer) = m_SCTHelper->layer_disk(clusterId);
224  AUXDATA(xprd, int, phi_module) = m_SCTHelper->phi_module(clusterId);
225  AUXDATA(xprd, int, eta_module) = m_SCTHelper->eta_module(clusterId);
226  AUXDATA(xprd, int, side) = m_SCTHelper->side(clusterId);
227 
228  // Add the Detector element ID -- not sure if needed as we have the informations above
229  const InDetDD::SiDetectorElement* de{prd->detectorElement()};
230  uint64_t detElementId{0};
231  if (de) {
232  Identifier detId{de->identify()};
233  if (detId.is_valid()) {
234  detElementId = detId.get_compact();
235  }
236  }
237  AUXDATA(xprd, uint64_t, detectorElementID) = detElementId;
238 
239  //Add details about the individual hits
240  if (m_writeRDOinformation) {
241  addRDOInformation(xprd, prd, idToRAWDataMap);
242  }
243 
244  // Use the MultiTruth Collection to get a list of all true particle contributing to the cluster
245  if (m_useTruthInfo) {
246  if (prdmtColl) {
247  auto range{prdmtColl->equal_range(clusterId)};
248  if (truth_particle_links) {
249  std::vector<unsigned int> tp_indices;
250  for (auto& i{range.first}; i!=range.second; ++i) {
251  ElementLink<xAOD::TruthParticleContainer> a_truth_particle_link = truth_particle_links->find(i->second);
252  if (a_truth_particle_link) {
253  const xAOD::TruthParticle *truth_particle = *a_truth_particle_link;
254  if (truth_particle) {
255  ++have_truth_link;
256  tp_indices.push_back(static_cast<int>(truth_particle->index()));
257  }
258  else {
259  ++missing_parent_particle;
260  }
261  }
262  else {
263  tp_indices.push_back(std::numeric_limits<unsigned int>::max());
264  ++missing_truth_particle;
265  }
266  }
267  // @TODO provide possibility to move tp_indices to its final destination
268  AUXDATA(xprd, std::vector<unsigned int>, truth_index) = tp_indices;
269  }
270  std::vector<int> barcodes; // FIXME barcode-based - requires xAOD::TrackMeasurementValidation to be migrated away from barcodes
271  for (auto& i{range.first}; i!=range.second; ++i) {
272  barcodes.push_back(HepMC::barcode(i->second));
273  }
274  // @TODO move vector
275  AUXDATA(xprd, std::vector<int>, truth_barcode) = barcodes;
276  }
277  }
278 
279  // Use the SDO Collection to get a list of all true particle contributing to the cluster per readout element
280  // Also get the energy deposited by each true particle per readout element
281  if (m_writeSDOs) {
282  if (sdoCollection) {
283  addSDOInformation(xprd, prd, sdoCollection);
284  }
285  }
286 
287  // Now Get the most detailed truth from the SiHits
288  // Note that this could get really slow if there are a lot of hits and clusters
289  if (m_writeSiHits) {
290  addSiHitInformation(xprd, prd, &siHits[prd->detectorElement()->identifyHash()]);
291  }
292  }
293  }
294  ATH_MSG_DEBUG(" recorded SCT_PrepData objects: size " << xaod->size());
295 
296  m_haveTruthLink += have_truth_link;
297  m_missingTruthParticle += missing_truth_particle;
298  m_missingParentParticle += missing_parent_particle;
299  m_firstEventWarnings = false; //disable one-time warnings
300 
301  return StatusCode::SUCCESS;
302 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthReentrantAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 79 of file AthReentrantAlgorithm.cxx.

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

◆ filterPassed()

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

Definition at line 135 of file AthReentrantAlgorithm.h.

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

◆ finalize()

StatusCode SCT_PrepDataToxAOD::finalize ( )
overridevirtual

Definition at line 531 of file SCT_PrepDataToxAOD.cxx.

532 {
534  ATH_MSG_INFO("Missing truth particles " << m_missingTruthParticle << " missing parent: " << m_missingParentParticle
535  << " have " << m_haveTruthLink);
536  }
537  return StatusCode::SUCCESS;
538 }

◆ findAllHitsCompatibleWithCluster()

void SCT_PrepDataToxAOD::findAllHitsCompatibleWithCluster ( const InDet::SCT_Cluster prd,
const std::vector< const SiHit * > *  siHits,
std::vector< SiHit > &  matchingHits 
) const
private

Definition at line 393 of file SCT_PrepDataToxAOD.cxx.

396 {
397  ATH_MSG_VERBOSE("Got " << siHits->size() << " SiHits to look through");
398 
399  // Check if we have detector element -- needed to find the local position of the SiHits
401  if (de==nullptr) return;
402 
403  std::vector<const SiHit*> multiMatchingHits;
404 
405  for (const SiHit* siHit: *siHits) {
406  // Now we have all hits in the module that match lets check to see if they match the cluster
407  // Must be within +/- 1 hits of any hit in the cluster to be included
408 
409  HepGeom::Point3D<double> averagePosition{siHit->localStartPosition() + siHit->localEndPosition()};
410  averagePosition *= 0.5;
411  Amg::Vector2D pos{de->hitLocalToLocal(averagePosition.z(), averagePosition.y())};
412  InDetDD::SiCellId diode{de->cellIdOfPosition(pos)};
413 
414  for (const auto& hitIdentifier: prd->rdoList()) {
415  ATH_MSG_DEBUG("Truth Strip " << diode.phiIndex() << " Cluster Strip " << m_SCTHelper->strip(hitIdentifier));
416 
417  if (std::abs(static_cast<int>(diode.phiIndex()) - m_SCTHelper->strip(hitIdentifier))<=1) {
418  multiMatchingHits.push_back(siHit);
419  break;
420  }
421  }
422  }
423 
424  matchingHits.reserve(multiMatchingHits.size());
425  //Now we will now make 1 SiHit for each true particle if the SiHits "touch" other
426  std::vector<const SiHit*>::iterator siHitIter{multiMatchingHits.begin()};
427  std::vector<const SiHit*>::iterator siHitIter2{multiMatchingHits.begin()};
428  ATH_MSG_DEBUG("Found " << multiMatchingHits.size() << " SiHit ");
429  for (; siHitIter != multiMatchingHits.end(); ++siHitIter) {
430  const SiHit* lowestXPos{*siHitIter};
431  const SiHit* highestXPos{*siHitIter};
432 
433  // We will merge these hits
434  std::vector<const SiHit*> ajoiningHits;
435  ajoiningHits.push_back(*siHitIter);
436 
437  siHitIter2 = siHitIter+1;
438  auto bc = HepMC::barcode((*siHitIter)->particleLink());
439  while (siHitIter2 != multiMatchingHits.end()) {
440  // Need to come from the same truth particle
441  if ( bc != HepMC::barcode((*siHitIter2)->particleLink())) {
442  ++siHitIter2;
443  continue;
444  }
445 
446  constexpr double maxDiff = 0.00005;
447  // Check to see if the SiHits are compatible with each other.
448  if (std::abs((highestXPos->localEndPosition().x()-(*siHitIter2)->localStartPosition().x()))<maxDiff and
449  std::abs((highestXPos->localEndPosition().y()-(*siHitIter2)->localStartPosition().y()))<maxDiff and
450  std::abs((highestXPos->localEndPosition().z()-(*siHitIter2)->localStartPosition().z()))<maxDiff) {
451  highestXPos = *siHitIter2;
452  ajoiningHits.push_back(*siHitIter2);
453  // Dont use hit more than once
454  siHitIter2 = multiMatchingHits.erase(siHitIter2);
455  } else if (std::abs((lowestXPos->localStartPosition().x()-(*siHitIter2)->localEndPosition().x()))<maxDiff and
456  std::abs((lowestXPos->localStartPosition().y()-(*siHitIter2)->localEndPosition().y()))<maxDiff and
457  std::abs((lowestXPos->localStartPosition().z()-(*siHitIter2)->localEndPosition().z()))<maxDiff) {
458  lowestXPos = *siHitIter2;
459  ajoiningHits.push_back(*siHitIter2);
460  // Dont use hit more than once
461  siHitIter2 = multiMatchingHits.erase(siHitIter2);
462  } else {
463  ++siHitIter2;
464  }
465  }
466 
467  if (ajoiningHits.size()==0) {
468  ATH_MSG_ERROR("This should really never happen");
469  continue;
470  } else if (ajoiningHits.size()==1) {
471  // Copy Si Hit ready to return
472  matchingHits.emplace_back(*ajoiningHits[0]);
473  continue;
474  } else {
475  // Build new SiHit and merge information together.
476  ATH_MSG_DEBUG("Merging " << ajoiningHits.size() << " SiHits together.");
477  float energyDep{0.};
478  float time{0.};
479  for (auto& siHit: ajoiningHits) {
480  energyDep += siHit->energyLoss();
481  time += siHit->meanTime();
482  }
483  time /= static_cast<float>(ajoiningHits.size());
484  matchingHits.emplace_back(lowestXPos->localStartPosition(),
485  highestXPos->localEndPosition(),
486  energyDep,
487  time,
488  HepMC::barcode((*siHitIter)->particleLink()),
489  1, // 0 for pixel 1 for SCT
490  (*siHitIter)->getBarrelEndcap(),
491  (*siHitIter)->getLayerDisk(),
492  (*siHitIter)->getEtaModule(),
493  (*siHitIter)->getPhiModule(),
494  (*siHitIter)->getSide());
495  }
496  }
497 }

◆ initialize()

StatusCode SCT_PrepDataToxAOD::initialize ( )
overridevirtual

Definition at line 44 of file SCT_PrepDataToxAOD.cxx.

45 {
46  ATH_CHECK(detStore()->retrieve(m_SCTHelper, "SCT_ID"));
47 
48  //make sure we don't write what we don't have
49  if (not m_useTruthInfo) {
50  m_writeSDOs.set(false);
51  m_writeSiHits.set(false);
52  }
53 
59  ATH_CHECK(m_xAodContainer.initialize());
62 
64 
65  return StatusCode::SUCCESS;
66 }

◆ 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()

virtual bool SCT_PrepDataToxAOD::isClonable ( ) const
inlineoverridevirtual

Make this algorithm clonable.

Reimplemented from AthReentrantAlgorithm.

Definition at line 55 of file SCT_PrepDataToxAOD.h.

55 { return true; };

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

SG::ReadHandleKey<InDet::SCT_ClusterContainer> SCT_PrepDataToxAOD::m_clustercontainer {this, "SiClusterContainer", "SCT_Clusters"}
private

Definition at line 78 of file SCT_PrepDataToxAOD.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_firstEventWarnings

std::atomic_bool SCT_PrepDataToxAOD::m_firstEventWarnings {false}
mutableprivate

Definition at line 101 of file SCT_PrepDataToxAOD.h.

◆ m_haveTruthLink

std::atomic<unsigned int> SCT_PrepDataToxAOD::m_haveTruthLink {}
mutableprivate

Definition at line 98 of file SCT_PrepDataToxAOD.h.

◆ m_missingParentParticle

std::atomic<unsigned int> SCT_PrepDataToxAOD::m_missingParentParticle {}
mutableprivate

Definition at line 100 of file SCT_PrepDataToxAOD.h.

◆ m_missingTruthParticle

std::atomic<unsigned int> SCT_PrepDataToxAOD::m_missingTruthParticle {}
mutableprivate

Definition at line 99 of file SCT_PrepDataToxAOD.h.

◆ m_multiTruth

SG::ReadHandleKey<PRD_MultiTruthCollection> SCT_PrepDataToxAOD::m_multiTruth {this, "PRD_MultiTruth", "PRD_MultiTruthSCT"}
private

Definition at line 81 of file SCT_PrepDataToxAOD.h.

◆ m_rdoContainer

SG::ReadHandleKey<SCT_RDO_Container> SCT_PrepDataToxAOD::m_rdoContainer {this, "SctRdoContainer", "SCT_RDOs"}
private

Definition at line 85 of file SCT_PrepDataToxAOD.h.

◆ m_SCTDetEleCollKey

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

Definition at line 90 of file SCT_PrepDataToxAOD.h.

◆ m_SCTHelper

const SCT_ID* SCT_PrepDataToxAOD::m_SCTHelper {nullptr}
private

Definition at line 77 of file SCT_PrepDataToxAOD.h.

◆ m_SDOcontainer

SG::ReadHandleKey<InDetSimDataCollection> SCT_PrepDataToxAOD::m_SDOcontainer {this, "MC_SDOs", "SCT_SDO_Map"}
private

Definition at line 79 of file SCT_PrepDataToxAOD.h.

◆ m_sihitContainer

SG::ReadHandleKey<SiHitCollection> SCT_PrepDataToxAOD::m_sihitContainer {this, "MC_Hits", "SCT_Hits"}
private

Definition at line 80 of file SCT_PrepDataToxAOD.h.

◆ m_truthParticleLinks

SG::ReadHandleKey<xAODTruthParticleLinkVector> SCT_PrepDataToxAOD::m_truthParticleLinks {this,"InputTruthParticleLinks","","The key for the truth particle link collection."}
private

Definition at line 82 of file SCT_PrepDataToxAOD.h.

◆ m_useTruthInfo

BooleanProperty SCT_PrepDataToxAOD::m_useTruthInfo {this, "UseTruthInfo", false}
private

Definition at line 92 of file SCT_PrepDataToxAOD.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.

◆ m_writeRDOinformation

BooleanProperty SCT_PrepDataToxAOD::m_writeRDOinformation {this, "WriteRDOinformation", true}
private

Definition at line 93 of file SCT_PrepDataToxAOD.h.

◆ m_writeSDOs

BooleanProperty SCT_PrepDataToxAOD::m_writeSDOs {this, "WriteSDOs", false}
private

Definition at line 94 of file SCT_PrepDataToxAOD.h.

◆ m_writeSiHits

BooleanProperty SCT_PrepDataToxAOD::m_writeSiHits {this, "WriteSiHits", false}
private

Definition at line 95 of file SCT_PrepDataToxAOD.h.

◆ m_xAodContainer

SG::WriteHandleKey<xAOD::TrackMeasurementValidationContainer> SCT_PrepDataToxAOD::m_xAodContainer {this, "SctxAodContainer", "SCT_Clusters"}
private

Definition at line 86 of file SCT_PrepDataToxAOD.h.

◆ m_xAodOffset

SG::WriteHandleKey<std::vector<unsigned int> > SCT_PrepDataToxAOD::m_xAodOffset {this, "SctxAodOffset", "SCT_ClustersOffsets"}
private

Definition at line 87 of file SCT_PrepDataToxAOD.h.


The documentation for this class was generated from the following files:
python.PyKernel.retrieve
def retrieve(aClass, aKey=None)
Definition: PyKernel.py:110
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
SCT_PrepDataToxAOD::addRDOInformation
void addRDOInformation(xAOD::TrackMeasurementValidation *, const InDet::SCT_Cluster *, const std::map< Identifier, const SCT_RDORawData * > &idToRAWDataMap) const
Definition: SCT_PrepDataToxAOD.cxx:499
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
SCT_PrepDataToxAOD::m_haveTruthLink
std::atomic< unsigned int > m_haveTruthLink
Definition: SCT_PrepDataToxAOD.h:98
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
get_generator_info.result
result
Definition: get_generator_info.py:21
SiliconTech::strip
@ strip
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
Trk::locX
@ locX
Definition: ParamDefs.h:37
SCT_PrepDataToxAOD::m_xAodContainer
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > m_xAodContainer
Definition: SCT_PrepDataToxAOD.h:86
Trk::locY
@ locY
local cartesian
Definition: ParamDefs.h:38
SCT_PrepDataToxAOD::m_multiTruth
SG::ReadHandleKey< PRD_MultiTruthCollection > m_multiTruth
Definition: SCT_PrepDataToxAOD.h:81
ParticleGun_SamplingFraction.bec
int bec
Definition: ParticleGun_SamplingFraction.py:89
make_unique
std::unique_ptr< T > make_unique(Args &&... args)
Definition: SkimmingToolEXOT5.cxx:23
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
xAOD::TrackMeasurementValidation
TrackMeasurementValidation_v1 TrackMeasurementValidation
Reference the current persistent version:
Definition: TrackMeasurementValidation.h:13
max
constexpr double max()
Definition: ap_fixedTest.cxx:33
PRD_MultiTruthCollection
A PRD is mapped onto all contributing particles.
Definition: PRD_MultiTruthCollection.h:24
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
SCT_PrepDataToxAOD::m_SDOcontainer
SG::ReadHandleKey< InDetSimDataCollection > m_SDOcontainer
Definition: SCT_PrepDataToxAOD.h:79
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
Trk::PrepRawData::rdoList
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
SCT_PrepDataToxAOD::findAllHitsCompatibleWithCluster
void findAllHitsCompatibleWithCluster(const InDet::SCT_Cluster *prd, const std::vector< const SiHit * > *siHits, std::vector< SiHit > &matchingHits) const
Definition: SCT_PrepDataToxAOD.cxx:393
SCT_PrepDataToxAOD::m_missingTruthParticle
std::atomic< unsigned int > m_missingTruthParticle
Definition: SCT_PrepDataToxAOD.h:99
InDetSimDataCollection
Definition: InDetSimDataCollection.h:25
SCT_RDORawData
Definition: SCT_RDORawData.h:24
SCT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: SCT_ID.h:728
SCT_ID::phi_module
int phi_module(const Identifier &id) const
Definition: SCT_ID.h:740
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
SCT_PrepDataToxAOD::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Definition: SCT_PrepDataToxAOD.h:90
Trk::u
@ u
Enums for curvilinear frames.
Definition: ParamDefs.h:77
SCT_PrepDataToxAOD::m_xAodOffset
SG::WriteHandleKey< std::vector< unsigned int > > m_xAodOffset
Definition: SCT_PrepDataToxAOD.h:87
SCT_PrepDataToxAOD::m_rdoContainer
SG::ReadHandleKey< SCT_RDO_Container > m_rdoContainer
Definition: SCT_PrepDataToxAOD.h:85
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
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
SiHit
Definition: SiHit.h:19
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
TRT::Hit::side
@ side
Definition: HitInfo.h:83
xAOD::TrackMeasurementValidation_v1
Class describing a TrackMeasurementValidation.
Definition: TrackMeasurementValidation_v1.h:27
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
SCT_PrepDataToxAOD::m_SCTHelper
const SCT_ID * m_SCTHelper
Definition: SCT_PrepDataToxAOD.h:77
AthCommonDataStore< AthCommonMsg< Gaudi::Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
SCT_PrepDataToxAOD::m_writeSiHits
BooleanProperty m_writeSiHits
Definition: SCT_PrepDataToxAOD.h:95
python.Dumpers.barcodes
def barcodes(beg, end, sz)
Definition: Dumpers.py:2800
lumiFormat.i
int i
Definition: lumiFormat.py:85
SCT3_RawData
Definition: SCT3_RawData.h:24
SCT_PrepDataToxAOD::m_missingParentParticle
std::atomic< unsigned int > m_missingParentParticle
Definition: SCT_PrepDataToxAOD.h:100
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
HepMC::barcode
int barcode(const T *p)
Definition: Barcode.h:16
TRT::Hit::layer
@ layer
Definition: HitInfo.h:79
xAOD::TruthParticle_v1
Class describing a truth particle in the MC record.
Definition: TruthParticle_v1.h:37
SCT_PrepDataToxAOD::addSDOInformation
void addSDOInformation(xAOD::TrackMeasurementValidation *xprd, const InDet::SCT_Cluster *prd, const InDetSimDataCollection *sdoCollection) const
Definition: SCT_PrepDataToxAOD.cxx:304
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
xAOD::uint64_t
uint64_t
Definition: EventInfo_v1.cxx:123
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
SCT3_RawData::getTimeBin
int getTimeBin() const
Definition: SCT3_RawData.h:92
SCT_PrepDataToxAOD::m_useTruthInfo
BooleanProperty m_useTruthInfo
Definition: SCT_PrepDataToxAOD.h:92
SCT_ID::wafer_hash
IdentifierHash wafer_hash(const Identifier &wafer_id) const
wafer hash from id - optimized
Definition: SCT_ID.h:492
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
InDet::SCT_Cluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SCT_Cluster.h:34
SG::AuxElement::index
size_t index() const
Return the index of this element within its container.
InDet::SiCluster::detectorElement
virtual const InDetDD::SiDetectorElement * detectorElement() const override final
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
AthReentrantAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Extra output dependency collection, extended by AthAlgorithmDHUpdate to add symlinks.
Definition: AthReentrantAlgorithm.h:153
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SCT_ID::wafer_hash_max
size_type wafer_hash_max(void) const
Definition: SCT_ID.cxx:645
AthReentrantAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthReentrantAlgorithm.cxx:96
SCT_PrepDataToxAOD::m_writeSDOs
BooleanProperty m_writeSDOs
Definition: SCT_PrepDataToxAOD.h:94
SCT_ID::layer_disk
int layer_disk(const Identifier &id) const
Definition: SCT_ID.h:734
InDetDD::SiDetectorElement
Definition: SiDetectorElement.h:109
SG::CondHandleKey::initialize
StatusCode initialize(bool used=true)
SCT_PrepDataToxAOD::m_writeRDOinformation
BooleanProperty m_writeRDOinformation
Definition: SCT_PrepDataToxAOD.h:93
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
InDetDD::SiCellId
Definition: SiCellId.h:29
SG::WriteHandle
Definition: StoreGate/StoreGate/WriteHandle.h:76
a
TList * a
Definition: liststreamerinfos.cxx:10
h
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
SCT_ID::strip
int strip(const Identifier &id) const
Definition: SCT_ID.h:764
SCT_PrepDataToxAOD::m_clustercontainer
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_clustercontainer
Definition: SCT_PrepDataToxAOD.h:78
xAODTruthParticleLinkVector
Definition: xAODTruthParticleLink.h:26
SCT_ID::eta_module
int eta_module(const Identifier &id) const
Definition: SCT_ID.h:746
InDet::SiWidth
Definition: SiWidth.h:25
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
SCT_PrepDataToxAOD::m_firstEventWarnings
std::atomic_bool m_firstEventWarnings
Definition: SCT_PrepDataToxAOD.h:101
SCT_ID::side
int side(const Identifier &id) const
Definition: SCT_ID.h:752
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
SCT_PrepDataToxAOD::m_sihitContainer
SG::ReadHandleKey< SiHitCollection > m_sihitContainer
Definition: SCT_PrepDataToxAOD.h:80
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
SCT_PrepDataToxAOD::addSiHitInformation
void addSiHitInformation(xAOD::TrackMeasurementValidation *xprd, const InDet::SCT_Cluster *prd, const std::vector< const SiHit * > *siHits) const
Definition: SCT_PrepDataToxAOD.cxx:334
SCT_ID::wafer_id
Identifier wafer_id(int barrel_ec, int layer_disk, int phi_module, int eta_module, int side) const
For a single side of module.
Definition: SCT_ID.h:464
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
AUXDATA
#define AUXDATA(OBJ, TYP, NAME)
Definition: SCT_PrepDataToxAOD.cxx:26
SCT_PrepDataToxAOD::m_truthParticleLinks
SG::ReadHandleKey< xAODTruthParticleLinkVector > m_truthParticleLinks
Definition: SCT_PrepDataToxAOD.h:83
test_pyathena.counter
counter
Definition: test_pyathena.py:15
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >
Identifier
Definition: IdentifierFieldParser.cxx:14