ATLAS Offline Software
SCT_PrepDataToxAOD.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 
3 /*
4  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
5 */
6 
8 // SCT_PrepDataToxAOD.h
9 // Header file for class SCT_PrepDataToxAOD
11 
12 #ifndef SCT_PREPDATATOXAOD_H
13 #define SCT_PREPDATATOXAOD_H
14 
16 
28 
30 
31 #include <atomic>
32 #include <string>
33 
34 class Identifier;
35 class SCT_ID;
36 class SCT_RDORawData;
37 class SiHit;
38 
39 namespace InDet
40 {
41  class SCT_Cluster;
42 }
43 
45 
46  public:
47  // Constructor with parameters:
48  SCT_PrepDataToxAOD(const std::string& name, ISvcLocator* pSvcLocator);
49 
50  // Basic algorithm methods:
51  virtual StatusCode initialize() override;
52  virtual StatusCode execute(const EventContext& ctx) const override;
53  virtual StatusCode finalize() override;
55  virtual bool isClonable() const override { return true; };
56 
57  private:
58 
60  const InDet::SCT_Cluster* prd,
61  const InDetSimDataCollection* sdoCollection) const;
62 
63 
65  const InDet::SCT_Cluster* prd,
66  const std::vector<const SiHit*>* siHits) const;
67 
69  const std::vector<const SiHit*>* siHits,
70  std::vector<SiHit>& matchingHits) const;
71 
73  const InDet::SCT_Cluster*,
74  const std::map<Identifier,
75  const SCT_RDORawData*>& idToRAWDataMap) const;
76 
77  const SCT_ID* m_SCTHelper{nullptr};
78  SG::ReadHandleKey<InDet::SCT_ClusterContainer> m_clustercontainer{this, "SiClusterContainer", "SCT_Clusters"};
81  SG::ReadHandleKey<PRD_MultiTruthCollection> m_multiTruth{this, "PRD_MultiTruth", "PRD_MultiTruthSCT"};
83  {this,"InputTruthParticleLinks","","The key for the truth particle link collection."};
84 
85  SG::ReadHandleKey<SCT_RDO_Container> m_rdoContainer{this, "SctRdoContainer", "SCT_RDOs"};
87  SG::WriteHandleKey<std::vector<unsigned int>> m_xAodOffset{this, "SctxAodOffset", "SCT_ClustersOffsets"};
88 
89  // For P->T converter of SCT_Clusters
90  SG::ReadCondHandleKey<InDetDD::SiDetectorElementCollection> m_SCTDetEleCollKey{this, "SCTDetEleCollKey", "SCT_DetectorElementCollection", "Key of SiDetectorElementCollection for SCT"};
91 
92  BooleanProperty m_useTruthInfo{this, "UseTruthInfo", false};
93  BooleanProperty m_writeRDOinformation{this, "WriteRDOinformation", true};
94  BooleanProperty m_writeSDOs{this, "WriteSDOs", false};
95  BooleanProperty m_writeSiHits{this, "WriteSiHits", false};
96 
97  // --- private members
98  mutable std::atomic<unsigned int> m_haveTruthLink {};
99  mutable std::atomic<unsigned int> m_missingTruthParticle {};
100  mutable std::atomic<unsigned int> m_missingParentParticle {};
101  mutable std::atomic_bool m_firstEventWarnings{false};
102 };
103 
104 #endif // SCT_PREPDATATOXAOD_H
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
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
SCT_PrepDataToxAOD::m_haveTruthLink
std::atomic< unsigned int > m_haveTruthLink
Definition: SCT_PrepDataToxAOD.h:98
SCT_PrepDataToxAOD::m_xAodContainer
SG::WriteHandleKey< xAOD::TrackMeasurementValidationContainer > m_xAodContainer
Definition: SCT_PrepDataToxAOD.h:86
SCT_PrepDataToxAOD::m_multiTruth
SG::ReadHandleKey< PRD_MultiTruthCollection > m_multiTruth
Definition: SCT_PrepDataToxAOD.h:81
InDet
Primary Vertex Finder.
Definition: VP1ErrorUtils.h:36
SCT_PrepDataToxAOD::m_SDOcontainer
SG::ReadHandleKey< InDetSimDataCollection > m_SDOcontainer
Definition: SCT_PrepDataToxAOD.h:79
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::SCT_PrepDataToxAOD
SCT_PrepDataToxAOD(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SCT_PrepDataToxAOD.cxx:34
SCT_PrepDataToxAOD::m_missingTruthParticle
std::atomic< unsigned int > m_missingTruthParticle
Definition: SCT_PrepDataToxAOD.h:99
InDetSimDataCollection
Definition: InDetSimDataCollection.h:25
SCT_PrepDataToxAOD::initialize
virtual StatusCode initialize() override
Definition: SCT_PrepDataToxAOD.cxx:44
SCT_RDORawData
Definition: SCT_RDORawData.h:24
SG::ReadHandleKey< InDet::SCT_ClusterContainer >
SCT_PrepDataToxAOD::m_SCTDetEleCollKey
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection > m_SCTDetEleCollKey
Definition: SCT_PrepDataToxAOD.h:90
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
SCT_Cluster
Definition: Trigger/TrigAccel/TrigCudaFitter/src/SCT_Cluster.h:8
SiHit
Definition: SiHit.h:19
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition: AthReentrantAlgorithm.h:83
xAOD::TrackMeasurementValidation_v1
Class describing a TrackMeasurementValidation.
Definition: TrackMeasurementValidation_v1.h:27
SCT_PrepDataToxAOD::finalize
virtual StatusCode finalize() override
Definition: SCT_PrepDataToxAOD.cxx:531
SCT_RDO_Container.h
SG::WriteHandleKey
Property holding a SG store/key/clid from which a WriteHandle is made.
Definition: StoreGate/StoreGate/WriteHandleKey.h:40
SCT_PrepDataToxAOD::m_SCTHelper
const SCT_ID * m_SCTHelper
Definition: SCT_PrepDataToxAOD.h:77
SCT_PrepDataToxAOD::m_writeSiHits
BooleanProperty m_writeSiHits
Definition: SCT_PrepDataToxAOD.h:95
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
SCT_PrepDataToxAOD::addSDOInformation
void addSDOInformation(xAOD::TrackMeasurementValidation *xprd, const InDet::SCT_Cluster *prd, const InDetSimDataCollection *sdoCollection) const
Definition: SCT_PrepDataToxAOD.cxx:304
SCT_PrepDataToxAOD::m_useTruthInfo
BooleanProperty m_useTruthInfo
Definition: SCT_PrepDataToxAOD.h:92
InDet::SCT_Cluster
Definition: InnerDetector/InDetRecEvent/InDetPrepRawData/InDetPrepRawData/SCT_Cluster.h:34
ReadCondHandleKey.h
AthReentrantAlgorithm.h
WriteHandleKey.h
Property holding a SG store/key/clid from which a WriteHandle is made.
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
SCT_PrepDataToxAOD::m_writeSDOs
BooleanProperty m_writeSDOs
Definition: SCT_PrepDataToxAOD.h:94
SiDetectorElementCollection.h
SCT_PrepDataToxAOD::m_writeRDOinformation
BooleanProperty m_writeRDOinformation
Definition: SCT_PrepDataToxAOD.h:93
SG::ReadCondHandleKey< InDetDD::SiDetectorElementCollection >
SCT_PrepDataToxAOD
Definition: SCT_PrepDataToxAOD.h:44
SCT_PrepDataToxAOD::isClonable
virtual bool isClonable() const override
Make this algorithm clonable.
Definition: SCT_PrepDataToxAOD.h:55
SCT_ID
Definition: SCT_ID.h:68
SCT_PrepDataToxAOD::m_clustercontainer
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_clustercontainer
Definition: SCT_PrepDataToxAOD.h:78
InDetSimDataCollection.h
SCT_ClusterContainer.h
TrackMeasurementValidation.h
SCT_PrepDataToxAOD::m_firstEventWarnings
std::atomic_bool m_firstEventWarnings
Definition: SCT_PrepDataToxAOD.h:101
PRD_MultiTruthCollection.h
TrackMeasurementValidationContainer.h
SCT_PrepDataToxAOD::m_sihitContainer
SG::ReadHandleKey< SiHitCollection > m_sihitContainer
Definition: SCT_PrepDataToxAOD.h:80
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_PrepDataToxAOD::m_truthParticleLinks
SG::ReadHandleKey< xAODTruthParticleLinkVector > m_truthParticleLinks
Definition: SCT_PrepDataToxAOD.h:83
SCT_PrepDataToxAOD::execute
virtual StatusCode execute(const EventContext &ctx) const override
Definition: SCT_PrepDataToxAOD.cxx:73
Identifier
Definition: IdentifierFieldParser.cxx:14
SiHitCollection.h