ATLAS Offline Software
SCT_RDOAnalysis.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 #ifndef SCT_RDO_ANALYSIS_H
6 #define SCT_RDO_ANALYSIS_H
7 
9 
16 
17 #include "GaudiKernel/ServiceHandle.h"
18 #include "GaudiKernel/ITHistSvc.h"
19 
20 #include "TH1.h"
21 #include "TH2.h"
22 
23 #include <string>
24 #include <vector>
25 
26 class TTree;
27 class SCT_ID;
28 
29 class SCT_RDOAnalysis : public AthAlgorithm {
30 
31  public:
32  SCT_RDOAnalysis(const std::string& name, ISvcLocator* pSvcLocator);
33  ~SCT_RDOAnalysis() = default;
34 
35  virtual StatusCode initialize() override final;
36  virtual StatusCode execute() override final;
37  virtual StatusCode finalize() override final;
38 
39  private:
40  SG::ReadHandleKey<SCT_RDO_Container> m_inputKey{this, "InputKey", "SCT_RDOs"};
41  SG::ReadHandleKey<InDetSimDataCollection> m_inputTruthKey{this, "InputTruthKey", "SCT_SDO_Map"};
42  SG::ReadHandleKey<McEventCollection> m_inputMcEventCollectionKey{this, "InputMcEventCollectionKey", "TruthEvent"};
43  const SCT_ID* m_sctID;
44  // RDO
45  std::vector<unsigned long long>* m_rdoID;
46  std::vector<unsigned int>* m_rdoWord;
47  // SCT_ID
48  std::vector<int>* m_barrelEndcap;
49  std::vector<int>* m_layerDisk;
50  std::vector<int>* m_phiModule;
51  std::vector<int>* m_etaModule;
52  std::vector<int>* m_side;
53  std::vector<int>* m_strip;
54  // SCT_RDORawData
55  std::vector<int>* m_groupSize;
56  // SDO
57  std::vector<unsigned long long>* m_sdoID;
58  std::vector<int>* m_sdoWord;
59  // SCT_ID
60  std::vector<int>* m_barrelEndcap_sdo;
61  std::vector<int>* m_layerDisk_sdo;
62  std::vector<int>* m_phiModule_sdo;
63  std::vector<int>* m_etaModule_sdo;
64  std::vector<int>* m_side_sdo;
65  std::vector<int>* m_strip_sdo;
66  // SCT_SimHelper
67  std::vector<bool>* m_noise;
68  std::vector<bool>* m_belowThresh;
69  std::vector<bool>* m_disabled;
70  // Deposit - particle link + energy (charge)
71  std::vector<int>* m_barcode;
72  std::vector<int>* m_eventIndex;
73  std::vector<float>* m_charge;
74  std::vector<std::vector<int>>* m_barcode_vec;
75  std::vector<std::vector<int>>* m_eventIndex_vec;
76  std::vector<std::vector<float>>* m_charge_vec;
77 
78  // HISTOGRAMS
79  TH1* m_h_rdoID;
85  TH1* m_h_side;
86  TH1* m_h_strip;
89  // barrel SCT
97  // endcap SCT
98  TH1* m_h_ecDisk;
105 
106  TH1* m_h_sdoID;
119 
120 
121  TTree* m_tree;
122  StringProperty m_ntupleFileName{this, "NtupleFileName", "/ntuples/file1"};
123  StringProperty m_ntupleDirName{this, "NtupleDirectoryName", "/SCT_RDOAnalysis/"};
124  StringProperty m_ntupleTreeName{this, "NtupleTreeName", "SCT_RDOAna"};
125  StringProperty m_path{this, "HistPath", "/SCT_RDOAnalysis/"};
127 
128 };
129 
130 #endif // SCT_RDO_ANALYSIS_H
SCT_RDOAnalysis::m_groupSize
std::vector< int > * m_groupSize
Definition: SCT_RDOAnalysis.h:55
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
SCT_RDOAnalysis::SCT_RDOAnalysis
SCT_RDOAnalysis(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SCT_RDOAnalysis.cxx:18
SCT_RDOAnalysis::m_rdoWord
std::vector< unsigned int > * m_rdoWord
Definition: SCT_RDOAnalysis.h:46
SCT_RDOAnalysis::m_disabled
std::vector< bool > * m_disabled
Definition: SCT_RDOAnalysis.h:69
SCT_RDOAnalysis::m_phiModule
std::vector< int > * m_phiModule
Definition: SCT_RDOAnalysis.h:50
SCT_RDOAnalysis::m_h_strip
TH1 * m_h_strip
Definition: SCT_RDOAnalysis.h:86
SCT_RDOAnalysis::m_h_ecPhiMod
TH1 * m_h_ecPhiMod
Definition: SCT_RDOAnalysis.h:99
SCT_RDOAnalysis::m_h_brlSide
TH1 * m_h_brlSide
Definition: SCT_RDOAnalysis.h:93
SCT_RDOAnalysis::m_h_barcode
TH1 * m_h_barcode
Definition: SCT_RDOAnalysis.h:114
SCT_RDOAnalysis::m_noise
std::vector< bool > * m_noise
Definition: SCT_RDOAnalysis.h:67
SCT_RDOAnalysis::m_h_brl_phi_v_eta
TH2 * m_h_brl_phi_v_eta
Definition: SCT_RDOAnalysis.h:96
SG
Forward declaration.
Definition: CaloCellPacker_400_500.h:32
SCT_RDOAnalysis::m_barcode_vec
std::vector< std::vector< int > > * m_barcode_vec
Definition: SCT_RDOAnalysis.h:74
SCT_RDOAnalysis::m_barrelEndcap_sdo
std::vector< int > * m_barrelEndcap_sdo
Definition: SCT_RDOAnalysis.h:60
SCT_RDOAnalysis::m_rdoID
std::vector< unsigned long long > * m_rdoID
Definition: SCT_RDOAnalysis.h:45
SCT_RDOAnalysis::~SCT_RDOAnalysis
~SCT_RDOAnalysis()=default
SCT_RDOAnalysis::m_h_etaModule
TH1 * m_h_etaModule
Definition: SCT_RDOAnalysis.h:84
SCT_RDOAnalysis::m_h_side
TH1 * m_h_side
Definition: SCT_RDOAnalysis.h:85
SCT_RDOAnalysis::m_strip_sdo
std::vector< int > * m_strip_sdo
Definition: SCT_RDOAnalysis.h:65
SCT_RDOAnalysis::m_h_barrelEndcap_sdo
TH1 * m_h_barrelEndcap_sdo
Definition: SCT_RDOAnalysis.h:108
SCT_RDOAnalysis::m_h_sdoID
TH1 * m_h_sdoID
Definition: SCT_RDOAnalysis.h:106
SCT_RDOAnalysis::m_h_phi_v_eta
TH2 * m_h_phi_v_eta
Definition: SCT_RDOAnalysis.h:88
SCT_RDOAnalysis::m_sctID
const SCT_ID * m_sctID
Definition: SCT_RDOAnalysis.h:43
SCT_RDOAnalysis::m_h_phiModule
TH1 * m_h_phiModule
Definition: SCT_RDOAnalysis.h:83
SCT_RDOAnalysis::m_thistSvc
ServiceHandle< ITHistSvc > m_thistSvc
Definition: SCT_RDOAnalysis.h:126
InDetRawDataContainer
Definition: InDetRawDataContainer.h:27
SG::ReadHandleKey< InDetSimDataCollection >
InDetRawDataContainer.h
SCT_RDOAnalysis::m_ntupleDirName
StringProperty m_ntupleDirName
Definition: SCT_RDOAnalysis.h:123
SCT_RDOAnalysis::m_h_brlGroupSize
TH1 * m_h_brlGroupSize
Definition: SCT_RDOAnalysis.h:95
AthAlgorithm.h
SCT_RDOAnalysis::m_h_ecDisk
TH1 * m_h_ecDisk
Definition: SCT_RDOAnalysis.h:98
SCT_RDOAnalysis::m_path
StringProperty m_path
Definition: SCT_RDOAnalysis.h:125
SCT_RDOAnalysis::m_h_ec_phi_v_eta
TH2 * m_h_ec_phi_v_eta
Definition: SCT_RDOAnalysis.h:104
SCT_RDOAnalysis::finalize
virtual StatusCode finalize() override final
Definition: SCT_RDOAnalysis.cxx:518
SCT_RDOAnalysis::m_h_TruthMatchedRDOs
TH1 * m_h_TruthMatchedRDOs
Definition: SCT_RDOAnalysis.h:118
SCT_RDOAnalysis::m_sdoID
std::vector< unsigned long long > * m_sdoID
Definition: SCT_RDOAnalysis.h:57
SCT_RDOAnalysis::m_ntupleTreeName
StringProperty m_ntupleTreeName
Definition: SCT_RDOAnalysis.h:124
SCT_RDOAnalysis::m_h_rdoWord
TH1 * m_h_rdoWord
Definition: SCT_RDOAnalysis.h:80
McEventCollection.h
SCT_RDOAnalysis::m_eventIndex
std::vector< int > * m_eventIndex
Definition: SCT_RDOAnalysis.h:72
SCT_RDOAnalysis::m_h_brlLayer
TH1 * m_h_brlLayer
Definition: SCT_RDOAnalysis.h:90
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SCT_RDOAnalysis::m_h_brlStrip
TH1 * m_h_brlStrip
Definition: SCT_RDOAnalysis.h:94
SCT_RDOAnalysis::initialize
virtual StatusCode initialize() override final
Definition: SCT_RDOAnalysis.cxx:91
SCT_RDOAnalysis::m_inputMcEventCollectionKey
SG::ReadHandleKey< McEventCollection > m_inputMcEventCollectionKey
Definition: SCT_RDOAnalysis.h:42
SCT_RDOAnalysis::execute
virtual StatusCode execute() override final
Definition: SCT_RDOAnalysis.cxx:299
SCT_RDOAnalysis::m_h_ecGroupSize
TH1 * m_h_ecGroupSize
Definition: SCT_RDOAnalysis.h:103
SCT_RDOAnalysis::m_side
std::vector< int > * m_side
Definition: SCT_RDOAnalysis.h:52
SCT_RDOAnalysis::m_h_groupSize
TH1 * m_h_groupSize
Definition: SCT_RDOAnalysis.h:87
SCT_RDOAnalysis::m_layerDisk_sdo
std::vector< int > * m_layerDisk_sdo
Definition: SCT_RDOAnalysis.h:61
SCT_RDOAnalysis::m_h_barrelEndcap
TH1 * m_h_barrelEndcap
Definition: SCT_RDOAnalysis.h:81
SCT_RDOAnalysis::m_etaModule
std::vector< int > * m_etaModule
Definition: SCT_RDOAnalysis.h:51
SCT_RDOAnalysis::m_h_eventIndex
TH1 * m_h_eventIndex
Definition: SCT_RDOAnalysis.h:115
SCT_SimHelper.h
SCT_RDOAnalysis::m_h_etaModule_sdo
TH1 * m_h_etaModule_sdo
Definition: SCT_RDOAnalysis.h:111
SCT_RDOAnalysis::m_h_layerDisk_sdo
TH1 * m_h_layerDisk_sdo
Definition: SCT_RDOAnalysis.h:109
AthAlgorithm
Definition: AthAlgorithm.h:47
SCT_RDOAnalysis::m_phiModule_sdo
std::vector< int > * m_phiModule_sdo
Definition: SCT_RDOAnalysis.h:62
SCT_RDOAnalysis::m_h_sdoWord
TH1 * m_h_sdoWord
Definition: SCT_RDOAnalysis.h:107
SCT_RDOAnalysis::m_inputKey
SG::ReadHandleKey< SCT_RDO_Container > m_inputKey
Definition: SCT_RDOAnalysis.h:40
SCT_RDOAnalysis::m_side_sdo
std::vector< int > * m_side_sdo
Definition: SCT_RDOAnalysis.h:64
SCT_RDOAnalysis::m_h_side_sdo
TH1 * m_h_side_sdo
Definition: SCT_RDOAnalysis.h:112
SCT_RDOAnalysis::m_h_ecEtaMod
TH1 * m_h_ecEtaMod
Definition: SCT_RDOAnalysis.h:100
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SCT_RDOAnalysis::m_h_strip_sdo
TH1 * m_h_strip_sdo
Definition: SCT_RDOAnalysis.h:113
SCT_RDOAnalysis::m_barrelEndcap
std::vector< int > * m_barrelEndcap
Definition: SCT_RDOAnalysis.h:48
SCT_RDOAnalysis::m_h_phi_v_eta_sdo
TH2 * m_h_phi_v_eta_sdo
Definition: SCT_RDOAnalysis.h:117
SCT_RDOAnalysis::m_inputTruthKey
SG::ReadHandleKey< InDetSimDataCollection > m_inputTruthKey
Definition: SCT_RDOAnalysis.h:41
SCT_RDOAnalysis::m_layerDisk
std::vector< int > * m_layerDisk
Definition: SCT_RDOAnalysis.h:49
SCT_RDOAnalysis::m_h_ecStrip
TH1 * m_h_ecStrip
Definition: SCT_RDOAnalysis.h:102
SCT_RDOAnalysis
Definition: SCT_RDOAnalysis.h:29
SCT_RDOAnalysis::m_h_ecSide
TH1 * m_h_ecSide
Definition: SCT_RDOAnalysis.h:101
SCT_RDOAnalysis::m_etaModule_sdo
std::vector< int > * m_etaModule_sdo
Definition: SCT_RDOAnalysis.h:63
SCT_RDOAnalysis::m_charge
std::vector< float > * m_charge
Definition: SCT_RDOAnalysis.h:73
SCT_RDOAnalysis::m_h_phiModule_sdo
TH1 * m_h_phiModule_sdo
Definition: SCT_RDOAnalysis.h:110
SCT_ID
Definition: SCT_ID.h:68
InDetSimDataCollection.h
SCT_RDOAnalysis::m_h_brlEtaMod
TH1 * m_h_brlEtaMod
Definition: SCT_RDOAnalysis.h:92
SCT_RDOAnalysis::m_h_brlPhiMod
TH1 * m_h_brlPhiMod
Definition: SCT_RDOAnalysis.h:91
SCT_RDOAnalysis::m_strip
std::vector< int > * m_strip
Definition: SCT_RDOAnalysis.h:53
SCT_RDOAnalysis::m_h_layerDisk
TH1 * m_h_layerDisk
Definition: SCT_RDOAnalysis.h:82
SCT_RDOAnalysis::m_barcode
std::vector< int > * m_barcode
Definition: SCT_RDOAnalysis.h:71
InDetRawDataCLASS_DEF.h
SCT_RDOAnalysis::m_ntupleFileName
StringProperty m_ntupleFileName
Definition: SCT_RDOAnalysis.h:122
SCT_RDOAnalysis::m_belowThresh
std::vector< bool > * m_belowThresh
Definition: SCT_RDOAnalysis.h:68
SCT_RDOAnalysis::m_h_charge
TH1 * m_h_charge
Definition: SCT_RDOAnalysis.h:116
SCT_RDOAnalysis::m_tree
TTree * m_tree
Definition: SCT_RDOAnalysis.h:121
SCT_RDOAnalysis::m_h_rdoID
TH1 * m_h_rdoID
Definition: SCT_RDOAnalysis.h:79
SCT_RDOAnalysis::m_sdoWord
std::vector< int > * m_sdoWord
Definition: SCT_RDOAnalysis.h:58
SCT_RDOAnalysis::m_charge_vec
std::vector< std::vector< float > > * m_charge_vec
Definition: SCT_RDOAnalysis.h:76
ServiceHandle< ITHistSvc >
SCT_RDOAnalysis::m_eventIndex_vec
std::vector< std::vector< int > > * m_eventIndex_vec
Definition: SCT_RDOAnalysis.h:75