ATLAS Offline Software
Loading...
Searching...
No Matches
LArFCalSamplingFraction.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 LAR_FCAL_SAMPLING_FRACTION_H
6#define LAR_FCAL_SAMPLING_FRACTION_H
7
8// C++ stdlib
9#include <string>
10
11// ATLAS Software
13#include "CLHEP/Units/SystemOfUnits.h"
14#include "GaudiKernel/ITHistSvc.h"
15#include "GaudiKernel/ObjectVector.h"
16#include "GaudiKernel/ToolHandle.h"
18#include "LArSimEvent/LArHit.h"
25
26class JetCollection;
27class ISvcLocator;
28class StoreGateSvc;
29class LArFCAL_ID;
30class CaloDM_ID;
31class CaloCell_ID;
32class LArHitContainer;
36class TCECollection;
37class TCEnergies;
38
39
41{
42public:
43 LArFCalSamplingFraction(const std::string &name, ISvcLocator *pSvcLocator);
45
46 virtual StatusCode initialize() override;
47 virtual StatusCode finalize() override;
48 virtual StatusCode execute() override;
49 virtual StatusCode initEvent();
50 StatusCode doFCal();
51 void TruthImpactPosition(const HepMC::GenEvent *e);
52
53 void FCalCalibAnalysis(const std::string& name, const CaloCalibrationHit *CalibHit);
56 void FillCellInfo(const CaloDetDescrElement* caloDDE, double energy, std::vector<double> *cell_E,
57 std::vector<double> *hit_x, std::vector<double> *hit_y,
58 std::vector<double> *hit_ieta, std::vector<double> *hit_iphi,
59 int &NCell);
60 StatusCode doCalib();
61
62private:
64
65 // To add event info to new ntuple (used to go by default in CollectionTree)
66 StatusCode addEventInfo();
67
68private:
69 SG::ReadHandleKey<xAOD::EventInfo> m_eventInfoKey{this, "EventInfoKey", "EventInfo"};
70
72 , "CaloDetDescrManager"
73 , "CaloDetDescrManager"
74 , "SG Key for CaloDetDescrManager in the Condition Store" };
75
77 TTree *m_tree_AS{};
78
79 unsigned int m_runNumber{};
80 unsigned int m_eventNumber{};
81 unsigned int m_eventTime{};
82 unsigned int m_lumiBlock{};
83 unsigned int m_bCID{};
84 double m_eventWeight{};
85
86 /* ----- FCal-related variables ----- */
87 double m_vertx{}; // x-position for vertex generated particle (beam)
88 double m_verty{};
89 double m_vertz{};
90
91 double m_vertex_eta{}; // eta value of generated particle
92 double m_vertex_phi{};
93
94 double m_pt{}; // Momentum of generated particle
95 double m_px{};
96 double m_py{};
97 double m_pz{};
98
99 double m_E{}; // Energy of generated particle
100
101 int m_NCell1{}; // Number of cells hit
102 int m_NCell2{};
103 int m_NCell3{};
104
105 double m_x_mc_cc1{}; // Center of cluster in x (FCal1, extrapolated)
106 double m_y_mc_cc1{};
107
108 double m_x_mc_cc2{}; // Center of cluster in x (FCal2, extrapolated)
109 double m_y_mc_cc2{};
110
111 double m_x_mc_cc3{}; // Center of cluster in x (FCal3, extrapolated)
112 double m_y_mc_cc3{};
113
114 double m_x_cc1{}; // Center of cluster in x (FCal1, c of g)
115 double m_y_cc1{};
116
117 double m_x_cc2{}; // Center of cluster in x (FCal2, c of g)
118 double m_y_cc2{};
119
120 double m_x_cc3{}; // Center of cluster in x (FCal3, c of g)
121 double m_y_cc3{};
122
123 std::vector<int> *m_pdg_id{}; // particle id
124
125 std::vector<double> *m_hit_x1{}; // hit positions of cells
126 std::vector<double> *m_hit_y1{};
127
128 std::vector<double> *m_hit_x2{};
129 std::vector<double> *m_hit_y2{};
130
131 std::vector<double> *m_hit_x3{};
132 std::vector<double> *m_hit_y3{};
133
134 std::vector<double> *m_hit_ieta1{}; // hit indices of cells
135 std::vector<double> *m_hit_iphi1{};
136 std::vector<double> *m_hit_ieta2{};
137 std::vector<double> *m_hit_iphi2{};
138 std::vector<double> *m_hit_ieta3{};
139 std::vector<double> *m_hit_iphi3{};
140
141 std::vector<double> *m_cell1_E{}; // Energy in cells
142 std::vector<double> *m_cell2_E{};
143 std::vector<double> *m_cell3_E{};
144
145 double m_FCal1_SumE{}; // Energy in individual FCal modules
146 double m_FCal2_SumE{};
147 double m_FCal3_SumE{};
148 double m_TCScint_E{};
149 double m_TCIron_E{};
150
153
154 /* ----- Calibration Hits Variables ----- */
155 double m_totalCalibrationEnergy{}; // Total energy
156
157 // Physic processes
162
163 // Energy deposited in different material categories
167
168 // Number of hits in different material categories
172
173 // Total energy deposited in the different FCal Modules
174 double m_totalFCalCalibrationEnergy{}; // Energy in all FCal
178
179 double m_FCalActive{};
181 double m_FCalDead{};
186 double m_FCalEm{};
187 double m_FCal1Em{};
188 double m_FCal2Em{};
189 double m_FCal3Em{};
190 double m_FCalNonEm{};
191 double m_FCal1NonEm{};
192 double m_FCal2NonEm{};
193 double m_FCal3NonEm{};
202 double m_PhysTotE{};
209
213
214 // For LAr analysis: Do we have any calibration hits at all?
216
217 // In order to write some clever loops, store all the hit containers
218 // of a given type in a map.
219 typedef std::map<std::string, const CaloCalibrationHitContainer *> m_calibHitMap_t;
220 typedef m_calibHitMap_t::iterator m_calibHitMap_ptr_t;
222
223 // Variables needed for cluster centers
224 double m_cx1, m_cx2, m_cx3;
225 double m_cy1, m_cy2, m_cy3;
226};
227
228#endif // LAR_FCAL_SAMPLING_FRACTION_H
Definition of CaloDetDescrManager.
Property holding a SG store/key/clid from which a ReadHandle is made.
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Class to store calorimeter calibration hit.
Helper class for offline cell identifiers.
Definition CaloCell_ID.h:34
Helper class for Calo Dead Material offline identifiers.
Definition CaloDM_ID.h:102
This class groups all DetDescr information related to a CaloCell.
This class provides the client interface for accessing the detector description information common to...
Helper class for LArFCAL offline identifiers.
Definition LArFCAL_ID.h:49
m_calibHitMap_t::iterator m_calibHitMap_ptr_t
virtual StatusCode initEvent()
Init event.
LArFCalSamplingFraction(const std::string &name, ISvcLocator *pSvcLocator)
Constructor.
std::vector< double > * m_hit_x1
StatusCode doFCal()
The main FCal analysis method.
StatusCode addEventInfo()
methods called by execute()
virtual StatusCode execute() override
Execute (event by event)
std::vector< double > * m_hit_iphi2
SG::ReadCondHandleKey< CaloDetDescrManager > m_caloMgrKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
TTree * m_tree_AS
Athena-Aware Ntuple (AAN) variables - branches of the AAN TTree.
std::vector< double > * m_cell2_E
std::vector< double > * m_hit_y2
std::vector< double > * m_hit_ieta1
void FCalCalibAnalysis(const std::string &name, const CaloCalibrationHit *CalibHit)
FCal Analysis with Calibration Hits on Added by JPA, June 2005.
void FCalHitCenter(const LArHitContainer *container, const CaloDetDescrManager *caloMgr)
Calculate FCal hit center.
std::vector< double > * m_hit_ieta2
StatusCode doCalib()
Calibration hit analysis.
std::vector< double > * m_cell3_E
std::vector< double > * m_hit_iphi3
std::vector< double > * m_hit_ieta3
std::vector< double > * m_cell1_E
std::map< std::string, const CaloCalibrationHitContainer * > m_calibHitMap_t
virtual StatusCode finalize() override
Finalize.
void FillCellInfo(const CaloDetDescrElement *caloDDE, double energy, std::vector< double > *cell_E, std::vector< double > *hit_x, std::vector< double > *hit_y, std::vector< double > *hit_ieta, std::vector< double > *hit_iphi, int &NCell)
Fill FCal cell information.
void FCalClusterCenter(const LArHitContainer *container, const CaloDetDescrManager *caloMgr)
Calculate FCal cluster center.
void TruthImpactPosition(const HepMC::GenEvent *e)
Calculate truth impact position.
std::vector< double > * m_hit_iphi1
virtual StatusCode initialize() override
Initialize.
std::vector< double > * m_hit_y1
std::vector< double > * m_hit_x3
std::vector< double > * m_hit_x2
std::vector< double > * m_hit_y3
Hit collection.
Property holding a SG store/key/clid from which a ReadHandle is made.
The Athena Transient Store API.