ATLAS Offline Software
TBTree_CaloClusterH6.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef TBREC_TBTREE_CALOCLUSTERH6_H
6 #define TBREC_TBTREE_CALOCLUSTERH6_H
7 
8 //
9 // TBTree_CaloClusterH6:
10 // Make ROOT TTree for CaloClusters for H6 CBT
11 //
15 
16 #include <TRandom.h>
17 
18 class TFile;
19 class TTree;
20 class CaloCell_ID;
21 class CaloCluster;
22 class IToolSvc;
23 class LArDigitContainer;
24 class ILArPedestal;
25 
27  public:
28 
29  TBTree_CaloClusterH6(const std::string& name, ISvcLocator* pSvcLocator);
30  virtual ~TBTree_CaloClusterH6();
31  virtual StatusCode initialize() override;
32  virtual StatusCode execute() override;
33  virtual StatusCode finalize() override;
34 
35  private:
36  void clear();
38  StatusCode getXcryoYtable(float &x, float &y, float &eBeam);
39 
40  std::string m_suffix;
41  int m_nEvent; // counter
42  int m_nEventRejected; // counter
43  int m_nEventAccepted; // counter
44  int m_nEventRandomTrigger; // counter
46  bool m_addGain;
47  bool m_addTime;
50  bool m_addWTC;
52  bool m_first; // First event flag
53 
54  // Run header
55  int m_nRun;
56  float m_beamMom;
57  float m_xCryo;
58  float m_yTable;
59  float m_zCalo;
62  // Variables to be in the TTree
63  //--------------------------
64  // Event type
65  unsigned short m_evType;
66  // Parameters of the sum of clusters (TB particle)
67  float m_eTotal;
68  float m_etaTotal;
69  float m_phiTotal;
70  float m_eEME2;
71  float m_eEME3;
72  float m_eHEC0;
73  float m_eHEC1;
74  float m_eHEC2;
75  float m_eFCAL0;
76  float m_eFCAL1;
77  float m_eFCAL2;
78  // Claster parameters
80  std::vector<int>* m_nCellCluster;
81  std::vector<float>* m_eCluster;
82  std::vector<float>* m_etaCluster;
83  std::vector<float>* m_phiCluster;
84  // Cluster moments
85  std::vector<float>* m_m1_eta;
86  std::vector<float>* m_m1_phi;
87  std::vector<float>* m_m2_r;
88  std::vector<float>* m_m2_lambda;
89  std::vector<float>* m_delta_phi;
90  std::vector<float>* m_delta_theta;
91  std::vector<float>* m_delta_alpha;
92  std::vector<float>* m_center_x;
93  std::vector<float>* m_center_y;
94  std::vector<float>* m_center_z;
95  std::vector<float>* m_center_lambda;
96  std::vector<float>* m_lateral;
97  std::vector<float>* m_longitudinal;
98  std::vector<float>* m_eng_frac_em;
99  std::vector<float>* m_eng_frac_max;
100  std::vector<float>* m_eng_frac_core;
101  std::vector<float>* m_m1_dens;
102  std::vector<float>* m_m2_dens;
103  // Cell parameters
104  int m_nCells;
105  std::vector<int>* m_cell_id;
106  std::vector<int>* m_cell_ind_cluster;
107  std::vector<float>* m_cell_energy;
108  std::vector<int>* m_cell_gain;
109  std::vector<float>* m_cell_time;
110  std::vector<float>* m_cell_quality;
111 
112  // Beam track parameters
121 
122  // Warm TailCatcher data: one word per layer (6 layers at all)
123  std::vector<short>* m_wtcNOverflow;
124  std::vector<float>* m_wtcSignal;
125 
126  // Names and pointers
127  std::string m_caloCellContainerName; // Cell container name
128  std::string m_clusterContainerName; // Cluster container
129  std::string m_WTCContainerName; // Warm TailCatcher
130  std::string m_TBTreeName; // TBTree name
131  std::string m_rootfile_name; // name of the ROOT file with TBTree
132  TFile* m_rootfile; // and its pointer
133  TTree* m_tree; // TBTree pointer
134 
135  const CaloCell_ID* m_calo_id{nullptr};
136 
138  { this, "ElecNoiseKey", "electronicNoise", "SG key for electronic noise" };
139 
141  std::string m_txtFileWithXY;
142 };
143 
144 #endif
TBTree_CaloClusterH6::m_evType
unsigned short m_evType
z-coordinate of the calorimeter surface at which beam coordinates calculated
Definition: TBTree_CaloClusterH6.h:65
TBTree_CaloClusterH6::m_center_x
std::vector< float > * m_center_x
Definition: TBTree_CaloClusterH6.h:92
TBTree_CaloClusterH6::m_first
bool m_first
Definition: TBTree_CaloClusterH6.h:52
TBTree_CaloClusterH6::m_m1_eta
std::vector< float > * m_m1_eta
Definition: TBTree_CaloClusterH6.h:85
TBTree_CaloClusterH6::TBTree_CaloClusterH6
TBTree_CaloClusterH6(const std::string &name, ISvcLocator *pSvcLocator)
Definition: TBTree_CaloClusterH6.cxx:37
TBTree_CaloClusterH6::m_beam_intercept_y
float m_beam_intercept_y
Definition: TBTree_CaloClusterH6.h:118
TBTree_CaloClusterH6::m_yTable
float m_yTable
CryoX.
Definition: TBTree_CaloClusterH6.h:58
TBTree_CaloClusterH6::m_addTime
bool m_addTime
Definition: TBTree_CaloClusterH6.h:47
TBTree_CaloClusterH6::m_addGain
bool m_addGain
Definition: TBTree_CaloClusterH6.h:46
TBTree_CaloClusterH6::m_etaTotal
float m_etaTotal
Definition: TBTree_CaloClusterH6.h:68
TBTree_CaloClusterH6::m_delta_alpha
std::vector< float > * m_delta_alpha
Definition: TBTree_CaloClusterH6.h:91
ILArPedestal
Definition: ILArPedestal.h:12
TBTree_CaloClusterH6::m_cell_ind_cluster
std::vector< int > * m_cell_ind_cluster
Definition: TBTree_CaloClusterH6.h:106
TBTree_CaloClusterH6::m_center_z
std::vector< float > * m_center_z
Definition: TBTree_CaloClusterH6.h:94
TBTree_CaloClusterH6::m_eEME3
float m_eEME3
Definition: TBTree_CaloClusterH6.h:71
TBTree_CaloClusterH6::m_beam_slope_x
float m_beam_slope_x
Definition: TBTree_CaloClusterH6.h:119
TBTree_CaloClusterH6::m_beam_intercept_x
float m_beam_intercept_x
Definition: TBTree_CaloClusterH6.h:117
TBTree_CaloClusterH6::m_center_y
std::vector< float > * m_center_y
Definition: TBTree_CaloClusterH6.h:93
TBTree_CaloClusterH6::m_calo_id
const CaloCell_ID * m_calo_id
Definition: TBTree_CaloClusterH6.h:135
TBTree_CaloClusterH6::m_tree
TTree * m_tree
Definition: TBTree_CaloClusterH6.h:133
TBTree_CaloClusterH6::m_rootfile
TFile * m_rootfile
Definition: TBTree_CaloClusterH6.h:132
TBTree_CaloClusterH6::m_eng_frac_max
std::vector< float > * m_eng_frac_max
Definition: TBTree_CaloClusterH6.h:99
TBTree_CaloClusterH6::m_m1_phi
std::vector< float > * m_m1_phi
Definition: TBTree_CaloClusterH6.h:86
x
#define x
TBTree_CaloClusterH6::m_addQuality
bool m_addQuality
Definition: TBTree_CaloClusterH6.h:48
TBTree_CaloClusterH6::m_delta_phi
std::vector< float > * m_delta_phi
Definition: TBTree_CaloClusterH6.h:89
TBTree_CaloClusterH6::m_suffix
std::string m_suffix
Definition: TBTree_CaloClusterH6.h:40
TBTree_CaloClusterH6::m_m2_r
std::vector< float > * m_m2_r
Definition: TBTree_CaloClusterH6.h:87
TBTree_CaloClusterH6::getXcryoYtable
StatusCode getXcryoYtable(float &x, float &y, float &eBeam)
Get Xcryo and Ytable from a text file.
Definition: TBTree_CaloClusterH6.cxx:792
TBTree_CaloClusterH6::m_nCellCluster
std::vector< int > * m_nCellCluster
Definition: TBTree_CaloClusterH6.h:80
TBTree_CaloClusterH6::initialize
virtual StatusCode initialize() override
Definition: TBTree_CaloClusterH6.cxx:134
TBTree_CaloClusterH6::m_phiTotal
float m_phiTotal
Definition: TBTree_CaloClusterH6.h:69
AthAlgorithm.h
TBTree_CaloClusterH6::m_delta_theta
std::vector< float > * m_delta_theta
Definition: TBTree_CaloClusterH6.h:90
TBTree_CaloClusterH6::m_nEventRejected
int m_nEventRejected
Definition: TBTree_CaloClusterH6.h:42
TBTree_CaloClusterH6::m_wtcNOverflow
std::vector< short > * m_wtcNOverflow
Definition: TBTree_CaloClusterH6.h:123
TBTree_CaloClusterH6::clear
void clear()
Definition: TBTree_CaloClusterH6.cxx:299
TBTree_CaloClusterH6::m_elecNoiseKey
SG::ReadCondHandleKey< CaloNoise > m_elecNoiseKey
Definition: TBTree_CaloClusterH6.h:138
TBTree_CaloClusterH6::m_nEvent
int m_nEvent
Definition: TBTree_CaloClusterH6.h:41
TBTree_CaloClusterH6::m_m2_lambda
std::vector< float > * m_m2_lambda
Definition: TBTree_CaloClusterH6.h:88
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
TBTree_CaloClusterH6::execute
virtual StatusCode execute() override
Definition: TBTree_CaloClusterH6.cxx:350
TBTree_CaloClusterH6::m_addBeamTrack
bool m_addBeamTrack
Definition: TBTree_CaloClusterH6.h:49
TBTree_CaloClusterH6::m_m1_dens
std::vector< float > * m_m1_dens
Definition: TBTree_CaloClusterH6.h:101
TBTree_CaloClusterH6::m_longitudinal
std::vector< float > * m_longitudinal
Definition: TBTree_CaloClusterH6.h:97
CaloCluster
Principal data class for CaloCell clusters.
Definition: Calorimeter/CaloEvent/CaloEvent/CaloCluster.h:79
TBTree_CaloClusterH6::m_txtFileWithXY
std::string m_txtFileWithXY
Text file containing xCryo and yTable.
Definition: TBTree_CaloClusterH6.h:141
TBTree_CaloClusterH6::m_WTCContainerName
std::string m_WTCContainerName
Definition: TBTree_CaloClusterH6.h:129
TBTree_CaloClusterH6::m_addMoments
bool m_addMoments
Definition: TBTree_CaloClusterH6.h:45
TBTree_CaloClusterH6::m_cell_id
std::vector< int > * m_cell_id
Definition: TBTree_CaloClusterH6.h:105
TBTree_CaloClusterH6::m_useEMTBCluster
bool m_useEMTBCluster
Definition: TBTree_CaloClusterH6.h:51
TBTree_CaloClusterH6::m_caloCellContainerName
std::string m_caloCellContainerName
Definition: TBTree_CaloClusterH6.h:127
CaloCell_ID
Helper class for offline cell identifiers.
Definition: CaloCell_ID.h:34
TBTree_CaloClusterH6::m_rootfile_name
std::string m_rootfile_name
Definition: TBTree_CaloClusterH6.h:131
TBTree_CaloClusterH6::m_zCalo
float m_zCalo
TableY.
Definition: TBTree_CaloClusterH6.h:59
TBTree_CaloClusterH6::m_cell_gain
std::vector< int > * m_cell_gain
Definition: TBTree_CaloClusterH6.h:108
TBTree_CaloClusterH6::m_eCluster
std::vector< float > * m_eCluster
Definition: TBTree_CaloClusterH6.h:81
TBTree_CaloClusterH6::m_beam_slope_y
float m_beam_slope_y
Definition: TBTree_CaloClusterH6.h:120
AthAlgorithm
Definition: AthAlgorithm.h:47
TBTree_CaloClusterH6::~TBTree_CaloClusterH6
virtual ~TBTree_CaloClusterH6()
Definition: TBTree_CaloClusterH6.cxx:131
ReadCondHandleKey.h
TBTree_CaloClusterH6::m_nEventAccepted
int m_nEventAccepted
Definition: TBTree_CaloClusterH6.h:43
TBTree_CaloClusterH6::m_eFCAL0
float m_eFCAL0
Definition: TBTree_CaloClusterH6.h:75
TBTree_CaloClusterH6::m_cell_quality
std::vector< float > * m_cell_quality
Definition: TBTree_CaloClusterH6.h:110
TBTree_CaloClusterH6::m_beam_chi2_y
float m_beam_chi2_y
Definition: TBTree_CaloClusterH6.h:116
TBTree_CaloClusterH6::m_nEventRandomTrigger
int m_nEventRandomTrigger
Definition: TBTree_CaloClusterH6.h:44
TBTree_CaloClusterH6::m_addWTC
bool m_addWTC
Definition: TBTree_CaloClusterH6.h:50
TBTree_CaloClusterH6::m_nClusters
int m_nClusters
Definition: TBTree_CaloClusterH6.h:79
TBTree_CaloClusterH6::m_eHEC2
float m_eHEC2
Definition: TBTree_CaloClusterH6.h:74
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
TBTree_CaloClusterH6::m_beam_coor_x
float m_beam_coor_x
Definition: TBTree_CaloClusterH6.h:113
TBTree_CaloClusterH6::m_phiCluster
std::vector< float > * m_phiCluster
Definition: TBTree_CaloClusterH6.h:83
CaloNoise.h
TBTree_CaloClusterH6::m_lateral
std::vector< float > * m_lateral
Definition: TBTree_CaloClusterH6.h:96
TBTree_CaloClusterH6::m_eFCAL1
float m_eFCAL1
Definition: TBTree_CaloClusterH6.h:76
TBTree_CaloClusterH6::m_clusterContainerName
std::string m_clusterContainerName
Definition: TBTree_CaloClusterH6.h:128
TBTree_CaloClusterH6::finalize
virtual StatusCode finalize() override
Definition: TBTree_CaloClusterH6.cxx:287
TBTree_CaloClusterH6::m_nRun
int m_nRun
Definition: TBTree_CaloClusterH6.h:55
SG::ReadCondHandleKey< CaloNoise >
TBTree_CaloClusterH6::m_eEME2
float m_eEME2
Definition: TBTree_CaloClusterH6.h:70
TBTree_CaloClusterH6::m_center_lambda
std::vector< float > * m_center_lambda
Definition: TBTree_CaloClusterH6.h:95
TBTree_CaloClusterH6::m_eng_frac_core
std::vector< float > * m_eng_frac_core
Definition: TBTree_CaloClusterH6.h:100
y
#define y
TBTree_CaloClusterH6::m_eTotal
float m_eTotal
Definition: TBTree_CaloClusterH6.h:67
TBTree_CaloClusterH6::m_etaCluster
std::vector< float > * m_etaCluster
Definition: TBTree_CaloClusterH6.h:82
TBTree_CaloClusterH6::m_wtcSignal
std::vector< float > * m_wtcSignal
Definition: TBTree_CaloClusterH6.h:124
TBTree_CaloClusterH6::m_eHEC1
float m_eHEC1
Definition: TBTree_CaloClusterH6.h:73
TBTree_CaloClusterH6::m_beam_chi2_x
float m_beam_chi2_x
Definition: TBTree_CaloClusterH6.h:115
LArDigitContainer
Container class for LArDigit.
Definition: LArDigitContainer.h:24
Generate_ecmenergies.eBeam
float eBeam
Definition: Generate_ecmenergies.py:9
TBTree_CaloClusterH6
Definition: TBTree_CaloClusterH6.h:26
TBTree_CaloClusterH6::m_beamMom
float m_beamMom
Run number.
Definition: TBTree_CaloClusterH6.h:56
TBTree_CaloClusterH6::m_beam_coor_y
float m_beam_coor_y
Definition: TBTree_CaloClusterH6.h:114
TBTree_CaloClusterH6::m_TBTreeName
std::string m_TBTreeName
Definition: TBTree_CaloClusterH6.h:130
TBTree_CaloClusterH6::m_eHEC0
float m_eHEC0
Definition: TBTree_CaloClusterH6.h:72
TBTree_CaloClusterH6::m_eFCAL2
float m_eFCAL2
Definition: TBTree_CaloClusterH6.h:77
TBTree_CaloClusterH6::m_cell_energy
std::vector< float > * m_cell_energy
Definition: TBTree_CaloClusterH6.h:107
TBTree_CaloClusterH6::m_cell_time
std::vector< float > * m_cell_time
Definition: TBTree_CaloClusterH6.h:109
TBTree_CaloClusterH6::m_nCells
int m_nCells
Definition: TBTree_CaloClusterH6.h:104
TBTree_CaloClusterH6::m_eng_frac_em
std::vector< float > * m_eng_frac_em
Definition: TBTree_CaloClusterH6.h:98
TBTree_CaloClusterH6::m_m2_dens
std::vector< float > * m_m2_dens
Definition: TBTree_CaloClusterH6.h:102
TBTree_CaloClusterH6::m_xCryo
float m_xCryo
Beam momentum.
Definition: TBTree_CaloClusterH6.h:57