ATLAS Offline Software
SiHitAnalysis.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef SI_HIT_ANALYSIS_H
6 #define SI_HIT_ANALYSIS_H
7 
9 
10 #include "GaudiKernel/LockedHandle.h"
11 #include "GaudiKernel/ServiceHandle.h"
12 #include "GaudiKernel/ITHistSvc.h"
13 
15 
16 #include <string>
17 #include <vector>
18 
19 class TH1;
20 class TH2;
21 class TTree;
22 
23 
25 {
26 public:
27 
28  SiHitAnalysis(const std::string& name, ISvcLocator* pSvcLocator);
30 
31  virtual StatusCode initialize() override;
32  virtual StatusCode execute() override;
33 
34 private:
35 
37  TH1* m_h_hits_x{};
38  TH1* m_h_hits_y{};
39  TH1* m_h_hits_z{};
40  TH1* m_h_hits_r{};
41  TH2* m_h_xy{};
42  TH2* m_h_zr{};
43  LockedHandle<TH2> m_h_xy_shared{};
44  LockedHandle<TH2> m_h_zr_shared{};
45  TH1* m_h_hits_time{};
47  TH1* m_h_hits_step{};
50  TH2* m_h_z_eloss{};
51  TH2* m_h_r_eloss{};
56 
57  TTree* m_tree{};
58  std::vector<float>* m_hits_x{};
59  std::vector<float>* m_hits_y{};
60  std::vector<float>* m_hits_z{};
61  std::vector<float>* m_hits_r{};
62  std::vector<float>* m_hits_time{};
63  std::vector<float>* m_hits_eloss{};
64  std::vector<float>* m_hits_step{};
65  std::vector<float>* m_hits_barcode{};
66  std::vector<float>* m_hits_pdgId{};
67  std::vector<float>* m_hits_pT{};
68  std::vector<float>* m_hits_eta{};
69  std::vector<float>* m_hits_phi{};
70  std::vector<float>* m_hits_prodVtx_x{};
71  std::vector<float>* m_hits_prodVtx_y{};
72  std::vector<float>* m_hits_prodVtx_z{};
73  std::vector<int>* m_barrel_endcap{};
74  std::vector<int>* m_layer_disk{};
75  std::vector<int>* m_module_phi{};
76  std::vector<int>* m_module_eta{};
77 
78  SG::ReadHandleKey<SiHitCollection> m_hitsContainerKey {this, "CollectionName", "", "Input HITS collection name"};
79 
80  Gaudi::Property<std::string> m_histPath {this, "HistPath", "/SiHitAnalysis/histos/", ""};
81  Gaudi::Property<std::string> m_ntuplePath {this, "NtuplePath", "/SiHitAnalysis/ntuples/", ""};
82  Gaudi::Property<bool> m_expert {this, "ExpertMode", false, ""};
83  Gaudi::Property<bool> m_extraTruthBranches {this, "ExtraTruthBranches", false, ""};
84 
85  ServiceHandle<ITHistSvc> m_thistSvc {this, "HistSvc", "THistSvc", ""};
86 
87 };
88 
89 #endif // SI_HIT_ANALYSIS_H
SiHitAnalysis::m_expert
Gaudi::Property< bool > m_expert
Definition: SiHitAnalysis.h:82
SiHitAnalysis::m_h_hits_y
TH1 * m_h_hits_y
Definition: SiHitAnalysis.h:38
SiHitAnalysis::m_hits_x
std::vector< float > * m_hits_x
Definition: SiHitAnalysis.h:58
SiHitAnalysis::m_module_phi
std::vector< int > * m_module_phi
Definition: SiHitAnalysis.h:75
SiHitAnalysis::m_hits_y
std::vector< float > * m_hits_y
Definition: SiHitAnalysis.h:59
SiHitAnalysis::m_hits_eta
std::vector< float > * m_hits_eta
Definition: SiHitAnalysis.h:68
SiHitAnalysis::m_hits_pT
std::vector< float > * m_hits_pT
Definition: SiHitAnalysis.h:67
SiHitAnalysis
Definition: SiHitAnalysis.h:25
SiHitAnalysis::m_barrel_endcap
std::vector< int > * m_barrel_endcap
Definition: SiHitAnalysis.h:73
SiHitAnalysis::m_hits_prodVtx_y
std::vector< float > * m_hits_prodVtx_y
Definition: SiHitAnalysis.h:71
SiHitAnalysis::m_thistSvc
ServiceHandle< ITHistSvc > m_thistSvc
Definition: SiHitAnalysis.h:85
SiHitAnalysis::m_h_hits_eloss
TH1 * m_h_hits_eloss
Definition: SiHitAnalysis.h:46
SiHitAnalysis::m_module_eta
std::vector< int > * m_module_eta
Definition: SiHitAnalysis.h:76
SiHitAnalysis::m_hits_z
std::vector< float > * m_hits_z
Definition: SiHitAnalysis.h:60
SiHitAnalysis::m_extraTruthBranches
Gaudi::Property< bool > m_extraTruthBranches
Definition: SiHitAnalysis.h:83
SiHitAnalysis::m_hits_barcode
std::vector< float > * m_hits_barcode
Definition: SiHitAnalysis.h:65
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
SiHitAnalysis::m_hits_pdgId
std::vector< float > * m_hits_pdgId
Definition: SiHitAnalysis.h:66
SiHitAnalysis::m_h_barrel_endcap
TH1 * m_h_barrel_endcap
Definition: SiHitAnalysis.h:52
AthAlgorithm.h
SiHitAnalysis::m_hitsContainerKey
SG::ReadHandleKey< SiHitCollection > m_hitsContainerKey
Definition: SiHitAnalysis.h:78
SiHitAnalysis::SiHitAnalysis
SiHitAnalysis(const std::string &name, ISvcLocator *pSvcLocator)
Definition: SiHitAnalysis.cxx:16
SiHitAnalysis::m_h_r_eloss
TH2 * m_h_r_eloss
Definition: SiHitAnalysis.h:51
SiHitAnalysis::m_hits_phi
std::vector< float > * m_hits_phi
Definition: SiHitAnalysis.h:69
SiHitAnalysis::m_h_hits_x
TH1 * m_h_hits_x
Some variables.
Definition: SiHitAnalysis.h:37
SiHitAnalysis::m_hits_r
std::vector< float > * m_hits_r
Definition: SiHitAnalysis.h:61
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
SiHitAnalysis::execute
virtual StatusCode execute() override
Definition: SiHitAnalysis.cxx:233
SiHitAnalysis::m_h_hits_time
TH1 * m_h_hits_time
Definition: SiHitAnalysis.h:45
AthAlgorithm
Definition: AthAlgorithm.h:47
SiHitAnalysis::m_h_module_phi
TH1 * m_h_module_phi
Definition: SiHitAnalysis.h:54
SiHitAnalysis::m_h_hits_z
TH1 * m_h_hits_z
Definition: SiHitAnalysis.h:39
SiHitAnalysis::initialize
virtual StatusCode initialize() override
Definition: SiHitAnalysis.cxx:21
SiHitAnalysis::m_hits_prodVtx_z
std::vector< float > * m_hits_prodVtx_z
Definition: SiHitAnalysis.h:72
SiHitAnalysis::m_hits_eloss
std::vector< float > * m_hits_eloss
Definition: SiHitAnalysis.h:63
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
SiHitAnalysis::m_tree
TTree * m_tree
Definition: SiHitAnalysis.h:57
SiHitAnalysis::m_h_hits_barcode
TH1 * m_h_hits_barcode
Definition: SiHitAnalysis.h:48
SiHitAnalysis::m_h_hits_r
TH1 * m_h_hits_r
Definition: SiHitAnalysis.h:40
SiHitAnalysis::m_hits_time
std::vector< float > * m_hits_time
Definition: SiHitAnalysis.h:62
SiHitAnalysis::m_layer_disk
std::vector< int > * m_layer_disk
Definition: SiHitAnalysis.h:74
SiHitAnalysis::m_h_zr_shared
LockedHandle< TH2 > m_h_zr_shared
Definition: SiHitAnalysis.h:44
SiHitAnalysis::m_h_xy_shared
LockedHandle< TH2 > m_h_xy_shared
Definition: SiHitAnalysis.h:43
SiHitAnalysis::m_h_zr
TH2 * m_h_zr
Definition: SiHitAnalysis.h:42
SiHitAnalysis::m_hits_prodVtx_x
std::vector< float > * m_hits_prodVtx_x
Definition: SiHitAnalysis.h:70
SiHitAnalysis::m_h_xy
TH2 * m_h_xy
Definition: SiHitAnalysis.h:41
SiHitAnalysis::~SiHitAnalysis
~SiHitAnalysis()
Definition: SiHitAnalysis.h:29
SiHitAnalysis::m_histPath
Gaudi::Property< std::string > m_histPath
Definition: SiHitAnalysis.h:80
SiHitAnalysis::m_hits_step
std::vector< float > * m_hits_step
Definition: SiHitAnalysis.h:64
SiHitAnalysis::m_h_time_eloss
TH2 * m_h_time_eloss
Definition: SiHitAnalysis.h:49
SiHitAnalysis::m_h_layer_disk
TH1 * m_h_layer_disk
Definition: SiHitAnalysis.h:53
SiHitAnalysis::m_ntuplePath
Gaudi::Property< std::string > m_ntuplePath
Definition: SiHitAnalysis.h:81
SiHitAnalysis::m_h_z_eloss
TH2 * m_h_z_eloss
Definition: SiHitAnalysis.h:50
SiHitAnalysis::m_h_hits_step
TH1 * m_h_hits_step
Definition: SiHitAnalysis.h:47
SiHitAnalysis::m_h_module_eta
TH1 * m_h_module_eta
Definition: SiHitAnalysis.h:55
ServiceHandle< ITHistSvc >
SiHitCollection.h