ATLAS Offline Software
StripRDOAnalysis.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 
6 #ifndef STRIP_RDO_ANALYSIS_H
7 #define STRIP_RDO_ANALYSIS_H
8 
10 #include "GaudiKernel/ServiceHandle.h"
11 #include "GaudiKernel/ITHistSvc.h"
13 
19 #include "InDetIdentifier/SCT_ID.h"
20 
21 #include <string>
22 #include <vector>
23 #include "TH1.h"
24 #include "TH2.h"
25 
26 class TTree;
27 class SCT_ID;
28 class SCT_RDORawData;
29 
30 namespace InDetDD {
31  class SCT_DetectorManager;
32 }
33 
34 namespace ITk
35 {
36 
38 {
39 
40 public:
41  StripRDOAnalysis(const std::string& name, ISvcLocator* pSvcLocator);
42 
43  virtual StatusCode initialize() override final;
44  virtual StatusCode execute() override final;
45 
46 private:
47  SG::ReadHandleKey<SCT_RDO_Container> m_inputKey {this, "CollectionName", "ITkStripRDOs", "Input ITk Strip RDO collection name"};
48  SG::ReadHandleKey<InDetSimDataCollection> m_inputTruthKey {this, "SDOCollectionName", "ITkStripSDO_Map", "Input ITk Strip SDO collection name"};
49  SG::ReadHandleKey<McEventCollection> m_inputMcEventCollectionKey {this, "McEventCollectionName", "TruthEvent", "Input McEventCollection name"};
50  const SCT_ID *m_sctID{};
52 
53  Gaudi::Property<std::string> m_histPath {this, "HistPath", "/RDOAnalysis/ITkStrip/", ""};
54  Gaudi::Property<std::string> m_sharedHistPath {this, "SharedHistPath", "/RDOAnalysis/histos/", ""};
55  Gaudi::Property<std::string> m_ntuplePath {this, "NtuplePath", "/RDOAnalysis/ntuples/", ""};
56  Gaudi::Property<std::string> m_ntupleName {this, "NtupleName", "ITkStrip", ""};
57  Gaudi::Property<bool> m_doPosition {this, "DoPosition", true, ""};
58 
59  ServiceHandle<ITHistSvc> m_thistSvc {this, "HistSvc", "THistSvc", ""};
60 
61  // RDO
62  std::vector<unsigned long long>* m_rdoID{};
63  std::vector<unsigned int>* m_rdoWord{};
64  // SCT_ID
65  std::vector<int>* m_barrelEndcap{};
66  std::vector<int>* m_layerDisk{};
67  std::vector<int>* m_phiModule{};
68  std::vector<int>* m_etaModule{};
69  std::vector<int>* m_side{};
70  std::vector<int>* m_strip{};
71  std::vector<int>* m_row{};
72  // SCT_RDORawData
73  std::vector<int>* m_groupSize{};
74  // Global and Local positions
75  std::vector<double>* m_globalX0{};
76  std::vector<double>* m_globalY0{};
77  std::vector<double>* m_globalZ0{};
78  std::vector<double>* m_globalX1{};
79  std::vector<double>* m_globalY1{};
80  std::vector<double>* m_globalZ1{};
81  std::vector<double>* m_localX{};
82  std::vector<double>* m_localY{};
83  std::vector<double>* m_localZ{};
84 
85 
86  // SDO
87  std::vector<unsigned long long>* m_sdoID{};
88  std::vector<int>* m_sdoWord{};
89  // SCT_ID
90  std::vector<int>* m_barrelEndcap_sdo{};
91  std::vector<int>* m_layerDisk_sdo{};
92  std::vector<int>* m_phiModule_sdo{};
93  std::vector<int>* m_etaModule_sdo{};
94  std::vector<int>* m_side_sdo{};
95  std::vector<int>* m_strip_sdo{};
96  std::vector<int>* m_row_sdo{};
97  // SCT_SimHelper
98  std::vector<bool>* m_noise{};
99  std::vector<bool>* m_belowThresh{};
100  std::vector<bool>* m_disabled{};
101  // Deposit - particle link + energy (charge)
102  std::vector<int>* m_barcode{};
103  std::vector<int>* m_eventIndex{};
104  std::vector<float>* m_charge{};
105  std::vector< std::vector<int> >* m_barcode_vec{};
106  std::vector< std::vector<int> >* m_eventIndex_vec{};
107  std::vector< std::vector<float> >* m_charge_vec{};
108 
109  // HISTOGRAMS
110  TH1* m_h_rdoID{};
111  TH1* m_h_rdoWord{};
116  TH1* m_h_side{};
117  TH1* m_h_strip{};
118  TH1* m_h_row{};
121  // barrel SCT
122  TH1* m_h_brlLayer{};
125  TH1* m_h_brlSide{};
126  TH1* m_h_brlStrip{};
129  // endcap SCT
130  TH1* m_h_ecDisk{};
131  TH1* m_h_ecPhiMod{};
132  TH1* m_h_ecEtaMod{};
133  TH1* m_h_ecSide{};
134  TH1* m_h_ecStrip{};
137 
138  TH1* m_h_sdoID{};
139  TH1* m_h_sdoWord{};
144  TH1* m_h_side_sdo{};
146  TH1* m_h_row_sdo{};
147  TH1* m_h_barcode{};
149  TH1* m_h_charge{};
151 
154 
157 
158  std::vector<TH1*> m_h_brl_strip_perLayer;
159  std::vector<TH1*> m_h_ec_strip_perLayer;
160 
161  TH2* m_h_globalXY{};
162  TH2* m_h_globalZR{};
163  LockedHandle<TH2> m_h_globalXY_shared{};
164  LockedHandle<TH2> m_h_globalZR_shared{};
165  TH1* m_h_globalX{};
166  TH1* m_h_globalY{};
167  TH1* m_h_globalZ{};
168 
170 
171  TTree* m_tree{};
172 
173 };
174 
175 } // namespace ITk
176 
177 #endif // STRIP_RDO_ANALYSIS_H
ITk::StripRDOAnalysis::m_strip_sdo
std::vector< int > * m_strip_sdo
Definition: StripRDOAnalysis.h:95
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
ITk::StripRDOAnalysis::m_h_phiModule_sdo
TH1 * m_h_phiModule_sdo
Definition: StripRDOAnalysis.h:142
ITk::StripRDOAnalysis::m_h_brlGroupSize
TH1 * m_h_brlGroupSize
Definition: StripRDOAnalysis.h:127
ITk::StripRDOAnalysis::m_h_brlSide
TH1 * m_h_brlSide
Definition: StripRDOAnalysis.h:125
ITk::StripRDOAnalysis::m_groupSize
std::vector< int > * m_groupSize
Definition: StripRDOAnalysis.h:73
ITk::StripRDOAnalysis::m_h_globalZR
TH2 * m_h_globalZR
Definition: StripRDOAnalysis.h:162
SCT_ID.h
This is an Identifier helper class for the SCT subdetector. This class is a factory for creating comp...
ITk::StripRDOAnalysis::m_phiModule_sdo
std::vector< int > * m_phiModule_sdo
Definition: StripRDOAnalysis.h:92
ITk::StripRDOAnalysis::m_globalY1
std::vector< double > * m_globalY1
Definition: StripRDOAnalysis.h:79
InDetDD::SCT_DetectorManager
Definition: SCT_DetectorManager.h:49
ITk::StripRDOAnalysis::m_belowThresh
std::vector< bool > * m_belowThresh
Definition: StripRDOAnalysis.h:99
ITk::StripRDOAnalysis::m_sharedHistPath
Gaudi::Property< std::string > m_sharedHistPath
Definition: StripRDOAnalysis.h:54
ITk::StripRDOAnalysis::m_layerDisk
std::vector< int > * m_layerDisk
Definition: StripRDOAnalysis.h:66
ITk::StripRDOAnalysis::execute
virtual StatusCode execute() override final
Definition: StripRDOAnalysis.cxx:306
ITk::StripRDOAnalysis::m_h_truthMatchedRDOs
TH1 * m_h_truthMatchedRDOs
Definition: StripRDOAnalysis.h:169
ITk::StripRDOAnalysis::m_disabled
std::vector< bool > * m_disabled
Definition: StripRDOAnalysis.h:100
ITk::StripRDOAnalysis::m_eventIndex_vec
std::vector< std::vector< int > > * m_eventIndex_vec
Definition: StripRDOAnalysis.h:106
ITk::StripRDOAnalysis
Definition: StripRDOAnalysis.h:38
ITk::StripRDOAnalysis::m_h_sdoID
TH1 * m_h_sdoID
Definition: StripRDOAnalysis.h:138
ITk::StripRDOAnalysis::m_h_globalZR_shared
LockedHandle< TH2 > m_h_globalZR_shared
Definition: StripRDOAnalysis.h:164
ITk::StripRDOAnalysis::m_barrelEndcap
std::vector< int > * m_barrelEndcap
Definition: StripRDOAnalysis.h:65
ITk::StripRDOAnalysis::m_sctID
const SCT_ID * m_sctID
Definition: StripRDOAnalysis.h:50
SCT_RDORawData
Definition: SCT_RDORawData.h:24
ITk::StripRDOAnalysis::m_h_ecEtaMod
TH1 * m_h_ecEtaMod
Definition: StripRDOAnalysis.h:132
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
ITk::StripRDOAnalysis::m_h_globalXY
TH2 * m_h_globalXY
Definition: StripRDOAnalysis.h:161
InDetRawDataContainer.h
ITk::StripRDOAnalysis::m_doPosition
Gaudi::Property< bool > m_doPosition
Definition: StripRDOAnalysis.h:57
ITk::StripRDOAnalysis::m_eventIndex
std::vector< int > * m_eventIndex
Definition: StripRDOAnalysis.h:103
ITk::StripRDOAnalysis::m_globalZ1
std::vector< double > * m_globalZ1
Definition: StripRDOAnalysis.h:80
ITk::StripRDOAnalysis::m_localY
std::vector< double > * m_localY
Definition: StripRDOAnalysis.h:82
ITk::StripRDOAnalysis::m_h_brl_phi_v_eta
TH2 * m_h_brl_phi_v_eta
Definition: StripRDOAnalysis.h:128
ITk::StripRDOAnalysis::m_h_disabled_ec
TH1 * m_h_disabled_ec
Definition: StripRDOAnalysis.h:156
ITk::StripRDOAnalysis::m_h_globalXY_shared
LockedHandle< TH2 > m_h_globalXY_shared
Definition: StripRDOAnalysis.h:163
ITk::StripRDOAnalysis::m_h_side_sdo
TH1 * m_h_side_sdo
Definition: StripRDOAnalysis.h:144
ITk::StripRDOAnalysis::m_inputKey
SG::ReadHandleKey< SCT_RDO_Container > m_inputKey
Definition: StripRDOAnalysis.h:47
ITk::StripRDOAnalysis::m_h_ecSide
TH1 * m_h_ecSide
Definition: StripRDOAnalysis.h:133
ITk::StripRDOAnalysis::m_h_phiModule
TH1 * m_h_phiModule
Definition: StripRDOAnalysis.h:114
ITk::StripRDOAnalysis::m_h_side
TH1 * m_h_side
Definition: StripRDOAnalysis.h:116
AthAlgorithm.h
ITk::StripRDOAnalysis::m_inputMcEventCollectionKey
SG::ReadHandleKey< McEventCollection > m_inputMcEventCollectionKey
Definition: StripRDOAnalysis.h:49
ITk::StripRDOAnalysis::m_h_rdoWord
TH1 * m_h_rdoWord
Definition: StripRDOAnalysis.h:111
ITk::StripRDOAnalysis::m_SCT_Manager
const InDetDD::SCT_DetectorManager * m_SCT_Manager
Definition: StripRDOAnalysis.h:51
ITk::StripRDOAnalysis::m_h_belowThresh_ec
TH1 * m_h_belowThresh_ec
Definition: StripRDOAnalysis.h:153
ITk::StripRDOAnalysis::m_sdoID
std::vector< unsigned long long > * m_sdoID
Definition: StripRDOAnalysis.h:87
ITk::StripRDOAnalysis::m_h_disabled_brl
TH1 * m_h_disabled_brl
Definition: StripRDOAnalysis.h:155
ITk::StripRDOAnalysis::m_etaModule_sdo
std::vector< int > * m_etaModule_sdo
Definition: StripRDOAnalysis.h:93
McEventCollection.h
ITk::StripRDOAnalysis::m_rdoWord
std::vector< unsigned int > * m_rdoWord
Definition: StripRDOAnalysis.h:63
ITk::StripRDOAnalysis::m_ntupleName
Gaudi::Property< std::string > m_ntupleName
Definition: StripRDOAnalysis.h:56
ITk::StripRDOAnalysis::m_barrelEndcap_sdo
std::vector< int > * m_barrelEndcap_sdo
Definition: StripRDOAnalysis.h:90
ITk::StripRDOAnalysis::m_h_brlLayer
TH1 * m_h_brlLayer
Definition: StripRDOAnalysis.h:122
ITk::StripRDOAnalysis::m_phiModule
std::vector< int > * m_phiModule
Definition: StripRDOAnalysis.h:67
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ITk::StripRDOAnalysis::m_sdoWord
std::vector< int > * m_sdoWord
Definition: StripRDOAnalysis.h:88
ITk::StripRDOAnalysis::m_tree
TTree * m_tree
Definition: StripRDOAnalysis.h:171
ITk::StripRDOAnalysis::m_etaModule
std::vector< int > * m_etaModule
Definition: StripRDOAnalysis.h:68
ITk::StripRDOAnalysis::m_h_layerDisk
TH1 * m_h_layerDisk
Definition: StripRDOAnalysis.h:113
ITk::StripRDOAnalysis::m_h_etaModule_sdo
TH1 * m_h_etaModule_sdo
Definition: StripRDOAnalysis.h:143
ITk::StripRDOAnalysis::m_h_sdoWord
TH1 * m_h_sdoWord
Definition: StripRDOAnalysis.h:139
ITk::StripRDOAnalysis::m_h_charge
TH1 * m_h_charge
Definition: StripRDOAnalysis.h:149
ITk::StripRDOAnalysis::m_localX
std::vector< double > * m_localX
Definition: StripRDOAnalysis.h:81
ITk::StripRDOAnalysis::initialize
virtual StatusCode initialize() override final
Definition: StripRDOAnalysis.cxx:26
ITk::StripRDOAnalysis::m_h_ec_strip_perLayer
std::vector< TH1 * > m_h_ec_strip_perLayer
Definition: StripRDOAnalysis.h:159
ITk::StripRDOAnalysis::m_thistSvc
ServiceHandle< ITHistSvc > m_thistSvc
Definition: StripRDOAnalysis.h:59
ITk::StripRDOAnalysis::m_strip
std::vector< int > * m_strip
Definition: StripRDOAnalysis.h:70
SCT_SimHelper.h
ITk::StripRDOAnalysis::m_h_globalX
TH1 * m_h_globalX
Definition: StripRDOAnalysis.h:165
AthAlgorithm
Definition: AthAlgorithm.h:47
ITk::StripRDOAnalysis::m_localZ
std::vector< double > * m_localZ
Definition: StripRDOAnalysis.h:83
ITk::StripRDOAnalysis::m_h_ecPhiMod
TH1 * m_h_ecPhiMod
Definition: StripRDOAnalysis.h:131
ITk::StripRDOAnalysis::m_globalX1
std::vector< double > * m_globalX1
Definition: StripRDOAnalysis.h:78
ITk::StripRDOAnalysis::m_h_row_sdo
TH1 * m_h_row_sdo
Definition: StripRDOAnalysis.h:146
ITk::StripRDOAnalysis::m_h_strip
TH1 * m_h_strip
Definition: StripRDOAnalysis.h:117
ITk::StripRDOAnalysis::m_h_etaModule
TH1 * m_h_etaModule
Definition: StripRDOAnalysis.h:115
ITk::StripRDOAnalysis::m_h_barcode
TH1 * m_h_barcode
Definition: StripRDOAnalysis.h:147
ITk::StripRDOAnalysis::m_h_strip_sdo
TH1 * m_h_strip_sdo
Definition: StripRDOAnalysis.h:145
ITk::StripRDOAnalysis::m_h_ecStrip
TH1 * m_h_ecStrip
Definition: StripRDOAnalysis.h:134
ITk::StripRDOAnalysis::m_h_groupSize
TH1 * m_h_groupSize
Definition: StripRDOAnalysis.h:119
ITk
Definition: ITkPixelOfflineCalibCondAlg.cxx:14
ITk::StripRDOAnalysis::m_rdoID
std::vector< unsigned long long > * m_rdoID
Definition: StripRDOAnalysis.h:62
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
ITk::StripRDOAnalysis::m_h_brlEtaMod
TH1 * m_h_brlEtaMod
Definition: StripRDOAnalysis.h:124
ITk::StripRDOAnalysis::m_h_phi_v_eta
TH2 * m_h_phi_v_eta
Definition: StripRDOAnalysis.h:120
ITk::StripRDOAnalysis::m_layerDisk_sdo
std::vector< int > * m_layerDisk_sdo
Definition: StripRDOAnalysis.h:91
ITk::StripRDOAnalysis::m_row
std::vector< int > * m_row
Definition: StripRDOAnalysis.h:71
ITk::StripRDOAnalysis::m_side
std::vector< int > * m_side
Definition: StripRDOAnalysis.h:69
ITk::StripRDOAnalysis::StripRDOAnalysis
StripRDOAnalysis(const std::string &name, ISvcLocator *pSvcLocator)
Definition: StripRDOAnalysis.cxx:21
ITk::StripRDOAnalysis::m_h_brlPhiMod
TH1 * m_h_brlPhiMod
Definition: StripRDOAnalysis.h:123
ITk::StripRDOAnalysis::m_globalZ0
std::vector< double > * m_globalZ0
Definition: StripRDOAnalysis.h:77
ITk::StripRDOAnalysis::m_h_brlStrip
TH1 * m_h_brlStrip
Definition: StripRDOAnalysis.h:126
SCT_ID
Definition: SCT_ID.h:68
InDetDD
Message Stream Member.
Definition: FakeTrackBuilder.h:8
ITk::StripRDOAnalysis::m_ntuplePath
Gaudi::Property< std::string > m_ntuplePath
Definition: StripRDOAnalysis.h:55
ITk::StripRDOAnalysis::m_h_globalY
TH1 * m_h_globalY
Definition: StripRDOAnalysis.h:166
ITk::StripRDOAnalysis::m_h_eventIndex
TH1 * m_h_eventIndex
Definition: StripRDOAnalysis.h:148
InDetSimDataCollection.h
ITk::StripRDOAnalysis::m_noise
std::vector< bool > * m_noise
Definition: StripRDOAnalysis.h:98
ITk::StripRDOAnalysis::m_h_row
TH1 * m_h_row
Definition: StripRDOAnalysis.h:118
ITk::StripRDOAnalysis::m_h_rdoID
TH1 * m_h_rdoID
Definition: StripRDOAnalysis.h:110
ITk::StripRDOAnalysis::m_h_ecDisk
TH1 * m_h_ecDisk
Definition: StripRDOAnalysis.h:130
ITk::StripRDOAnalysis::m_globalX0
std::vector< double > * m_globalX0
Definition: StripRDOAnalysis.h:75
ITk::StripRDOAnalysis::m_barcode_vec
std::vector< std::vector< int > > * m_barcode_vec
Definition: StripRDOAnalysis.h:105
ITk::StripRDOAnalysis::m_h_layerDisk_sdo
TH1 * m_h_layerDisk_sdo
Definition: StripRDOAnalysis.h:141
ITk::StripRDOAnalysis::m_charge_vec
std::vector< std::vector< float > > * m_charge_vec
Definition: StripRDOAnalysis.h:107
InDetRawDataCLASS_DEF.h
ITk::StripRDOAnalysis::m_inputTruthKey
SG::ReadHandleKey< InDetSimDataCollection > m_inputTruthKey
Definition: StripRDOAnalysis.h:48
ITk::StripRDOAnalysis::m_h_globalZ
TH1 * m_h_globalZ
Definition: StripRDOAnalysis.h:167
ITk::StripRDOAnalysis::m_h_barrelEndcap_sdo
TH1 * m_h_barrelEndcap_sdo
Definition: StripRDOAnalysis.h:140
ITk::StripRDOAnalysis::m_h_belowThresh_brl
TH1 * m_h_belowThresh_brl
Definition: StripRDOAnalysis.h:152
ITk::StripRDOAnalysis::m_histPath
Gaudi::Property< std::string > m_histPath
Definition: StripRDOAnalysis.h:53
ITk::StripRDOAnalysis::m_barcode
std::vector< int > * m_barcode
Definition: StripRDOAnalysis.h:102
ITk::StripRDOAnalysis::m_h_ecGroupSize
TH1 * m_h_ecGroupSize
Definition: StripRDOAnalysis.h:135
ITk::StripRDOAnalysis::m_globalY0
std::vector< double > * m_globalY0
Definition: StripRDOAnalysis.h:76
ITk::StripRDOAnalysis::m_h_barrelEndcap
TH1 * m_h_barrelEndcap
Definition: StripRDOAnalysis.h:112
ITk::StripRDOAnalysis::m_charge
std::vector< float > * m_charge
Definition: StripRDOAnalysis.h:104
ITk::StripRDOAnalysis::m_h_phi_v_eta_sdo
TH2 * m_h_phi_v_eta_sdo
Definition: StripRDOAnalysis.h:150
ITk::StripRDOAnalysis::m_h_ec_phi_v_eta
TH2 * m_h_ec_phi_v_eta
Definition: StripRDOAnalysis.h:136
ITk::StripRDOAnalysis::m_side_sdo
std::vector< int > * m_side_sdo
Definition: StripRDOAnalysis.h:94
ServiceHandle< ITHistSvc >
ITk::StripRDOAnalysis::m_h_brl_strip_perLayer
std::vector< TH1 * > m_h_brl_strip_perLayer
Definition: StripRDOAnalysis.h:158
ITk::StripRDOAnalysis::m_row_sdo
std::vector< int > * m_row_sdo
Definition: StripRDOAnalysis.h:96