ATLAS Offline Software
JetSampling.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #include "JetEvent/JetSampling.h"
6 
8  : m_pr(0.,0.,0.,0.) // reconstructed at EM scale
9  , m_pt(0.,0.,0.,0.) // PIC jet
10  , m_pn(0.,0.,0.,0.) // NTJ jet
11  , m_pd(0.,0.,0.,0.) // Data driven jet kinematics
12  , m_h1(0.,0.,0.,0.) // calibrated H1 jet
13  , m_pisa(0.,0.,0.,0.) // calibrated pisa jet
14  , m_samp(0.,0.,0.,0.) // calibrated sampling jet
15 {
16  // Initialize members to zero
17  this->init();
18 }
19 
21 = default;
22 
23 void
25 {
26  // Initialize all private members to zero
27 
28  // Distantce to NTJ jet
29  m_dr1 = 0.;
30  m_dr2 = 0.;
31 
32  // Sampling or Layer members
33  m_ejsPreSamplerB = 0;
34  m_ejsPreSamplerE = 0;
35  m_ejsEMB1 = 0;
36  m_ejsEME1 = 0;
37  m_ejsEMB2 = 0;
38  m_ejsEME2 = 0;
39  m_ejsEMB3 = 0;
40  m_ejsEME3 = 0;
41  m_ejsTileBar0 = 0;
42  m_ejsTileExt0 = 0;
43  m_ejsTileBar1 = 0;
44  m_ejsTileExt1 = 0;
45  m_ejsTileBar2 = 0;
46  m_ejsTileExt2 = 0;
47  m_ejsHEC0 = 0;
48  m_ejsHEC1 = 0;
49  m_ejsHEC2 = 0;
50  m_ejsHEC3 = 0;
51  m_ejsTileGap1 = 0;
52  m_ejsTileGap2 = 0;
53  m_ejsTileGap3 = 0;
54  m_ejsFCAL0 = 0;
55  m_ejsFCAL1 = 0;
56  m_ejsFCAL2 = 0;
57  m_tot = 0.;
58  m_ctot = 0.;
59  m_ehad = 0.;
60  m_eem = 0.;
61 
62  m_eCryo = 0.;
63  m_eGap = 0.;
64  m_eScint = 0.;
65  m_eNull = 0.;
66 
67  // JetECS: Loop over the 16 cell energy density bins
68  for(int ie=0; ie<16; ++ie) {
69  m_ePreSamBCell.at(ie) = 0.;
70  m_ePreSamECell.at(ie) = 0.;
71  //
72  m_eEMB1Cell.at(ie) = 0.;
73  m_eEME1Cell.at(ie) = 0.;
74  //
75  m_eEMB2Cell1.at(ie) = 0.;
76  m_eEMB2Cell2.at(ie) = 0.;
77  //
78  m_eEMB3Cell1.at(ie) = 0.;
79  m_eEMB3Cell2.at(ie) = 0.;
80  //
81  m_eEME2Cell1.at(ie) = 0.;
82  m_eEME2Cell2.at(ie) = 0.;
83  //
84  m_eEME3Cell1.at(ie) = 0.;
85  m_eEME3Cell2.at(ie) = 0.;
86  //
87  m_eTileBar0Cell.at(ie) = 0.;
88  m_eTileBar1Cell.at(ie) = 0.;
89  m_eTileBar2Cell.at(ie) = 0.;
90  m_eTileExt0Cell.at(ie) = 0.;
91  m_eTileExt1Cell.at(ie) = 0.;
92  m_eTileExt2Cell.at(ie) = 0.;
93  //
94  m_eHec0Cell1.at(ie) = 0.;
95  m_eHec1Cell1.at(ie) = 0.;
96  m_eHec2Cell1.at(ie) = 0.;
97  m_eHec3Cell1.at(ie) = 0.;
98  //
99  m_eHec0Cell2.at(ie) = 0.;
100  m_eHec1Cell2.at(ie) = 0.;
101  m_eHec2Cell2.at(ie) = 0.;
102  m_eHec3Cell2.at(ie) = 0.;
103  //
104  m_eFCal0Cell.at(ie) = 0.;
105  m_eFCal1Cell.at(ie) = 0.;
106  m_eFCal2Cell.at(ie) = 0.;
107  }
108 
109  // Energy in cone Radii, loop over the 10 possible values
110  for ( int i = 0; i < 10; ++i ) {
111  m_erad_cells.at(i) = 0.; // from cells
112  m_erad_tracks.at(i) = 0.; // from tracks
113  }
114 }
115 
117 double JetSampling::eEMBCell(const int ireg) const {
118  // Returns the jet energy in PreSamplerB and EMB1
119  // ireg=0 PreSamplerB
120  // ireg=1 EMB1
121  const int dim=16;
122  double energy = 0.;
123  if (ireg == 0) for (int i=0; i<dim; i++) energy += m_ePreSamBCell.at(i);
124  else if (ireg == 1) for (int i=0; i<dim; i++) energy += m_eEMB1Cell.at(i);
125  return energy;
126 }
127 
129 double JetSampling::eEMBCell(const int ireg, const int ie) const {
130  // Returns the jet energy in EMB2 and EMB3
131  // ireg=0 EMB2+EMB3 eta<0.8
132  // ireg=1 EMB2+EMB3 eta>=0.8
133  double energy = 0.;
134  if (ireg==0) {
135  energy += m_eEMB2Cell1.at(ie);
136  energy += m_eEMB3Cell1.at(ie);
137  } else if (ireg==1) {
138  energy += m_eEMB2Cell2.at(ie);
139  energy += m_eEMB3Cell2.at(ie);
140  }
141  return energy;
142 }
143 
145 double JetSampling::eEMECell(const int ireg) const {
146  // Returns the jet energy in PreSamplerE and EME1
147  // ireg=0 PreSamplerE
148  // ireg=1 EME1
149  const int dim=16;
150  double energy=0.;
151  if (ireg == 0) for (int i=0; i<dim; i++) energy += m_ePreSamECell.at(i);
152  else if (ireg==1) for (int i=0; i<dim; i++) energy += m_eEME1Cell.at(i);
153  return energy;
154 }
155 
157 double JetSampling::eEMECell(const int ireg, const int ie) const {
158  // Returns the jet energy in EME2 and EME3
159  // ireg=0 EME2+EME3 eta<2.5
160  // ireg=1 EME2+EME3 eta>=2.5
161  double energy = 0.;
162  if (ireg==0) {
163  energy += m_eEME2Cell1.at(ie);
164  energy += m_eEME3Cell1.at(ie);
165  } else if (ireg==1) {
166  energy += m_eEME2Cell2.at(ie);
167  energy += m_eEME3Cell2.at(ie);
168  }
169  return energy;
170 }
171 
173 double JetSampling::eTileCell(const int ireg, const int ie) const {
174  // Returns the jet energy in Tile
175  // ireg=0 TileBar0+TileBar1+TileBar2
176  // ireg=1 TileExt0+TileExt1+TileExt2
177  double energy =0.;
178  if (ireg==0){
179  energy += m_eTileBar0Cell.at(ie);
180  energy += m_eTileBar1Cell.at(ie);
181  energy += m_eTileBar2Cell.at(ie);
182  }else if (ireg==1) {
183  energy += m_eTileExt0Cell.at(ie);
184  energy += m_eTileExt1Cell.at(ie);
185  energy += m_eTileExt2Cell.at(ie);
186  }
187  return energy;
188 }
189 
191 double JetSampling::eHecCell(const int ireg, const int ie) const {
192  // Returns the jet energy in HEC
193  // ireg=0 HEC0 + HEC1 + HEC2 + HEC3 eta<2.5
194  // ireg=1 HEC0 + HEC1 + HEC2 + HEC3 eta>=2.5
195  double energy = 0.;
196  if (ireg==0){
197  energy += m_eHec0Cell1.at(ie);
198  energy += m_eHec1Cell1.at(ie);
199  energy += m_eHec2Cell1.at(ie);
200  energy += m_eHec3Cell1.at(ie);
201  }else if (ireg==1){
202  energy += m_eHec0Cell2.at(ie);
203  energy += m_eHec1Cell2.at(ie);
204  energy += m_eHec2Cell2.at(ie);
205  energy += m_eHec3Cell2.at(ie);
206  }
207  return energy;
208 }
209 
211 double JetSampling::eFCalCell(const int ireg, const int ie) const {
212  // Returns the jet energy in FCAL
213  // ireg = 0 FCAL0
214  // ireg = 1 FCAL1 + FCAL2
215  if (ireg==0) return m_eFCal0Cell.at(ie);
216  else if (ireg==1) return (m_eFCal1Cell.at(ie) + m_eFCal2Cell.at(ie));
217  return 0.;
218 }
JetSampling::m_ejsEME1
double m_ejsEME1
Definition: JetSampling.h:285
JetSampling::m_eEME1Cell
double_array16 m_eEME1Cell
Definition: JetSampling.h:324
JetSampling::m_eTileExt1Cell
double_array16 m_eTileExt1Cell
Definition: JetSampling.h:337
JetSampling::m_eTileBar0Cell
double_array16 m_eTileBar0Cell
Definition: JetSampling.h:333
JetSampling::m_eHec3Cell1
double_array16 m_eHec3Cell1
Definition: JetSampling.h:342
JetSampling::m_ejsTileBar0
double m_ejsTileBar0
Definition: JetSampling.h:290
JetSampling::m_eCryo
double m_eCryo
Definition: JetSampling.h:315
yodamerge_tmp.dim
dim
Definition: yodamerge_tmp.py:239
JetSampling::m_ejsTileGap2
double m_ejsTileGap2
Definition: JetSampling.h:301
JetSampling::m_eFCal0Cell
double_array16 m_eFCal0Cell
Definition: JetSampling.h:347
JetSampling::m_ejsHEC3
double m_ejsHEC3
Definition: JetSampling.h:299
JetSampling::m_eFCal2Cell
double_array16 m_eFCal2Cell
Definition: JetSampling.h:349
JetSampling.h
JetSampling::eFCalCell
double eFCalCell(const int ireg, const int ie) const
Returns the jet energy in cell energy density bin ie for HEC, eta<2.5 (ireg=0) and eta>=2....
Definition: JetSampling.cxx:211
JetSampling::m_eTileBar1Cell
double_array16 m_eTileBar1Cell
Definition: JetSampling.h:334
JetSampling::eEMBCell
double eEMBCell(const int ireg) const
Sets jet energy in layer FCAL2
Definition: JetSampling.cxx:117
JetSampling::m_eEMB2Cell1
double_array16 m_eEMB2Cell1
Definition: JetSampling.h:325
JetSampling::m_ejsPreSamplerB
double m_ejsPreSamplerB
Distance between reconstructed jet and 2nd closest NTJ jet
Definition: JetSampling.h:282
JetSampling::m_ejsTileBar1
double m_ejsTileBar1
Definition: JetSampling.h:292
JetSampling::m_ePreSamBCell
double_array16 m_ePreSamBCell
Definition: JetSampling.h:321
JetSampling::m_ejsTileBar2
double m_ejsTileBar2
Definition: JetSampling.h:294
JetSampling::m_eEME2Cell2
double_array16 m_eEME2Cell2
Definition: JetSampling.h:330
JetSampling::m_ePreSamECell
double_array16 m_ePreSamECell
Definition: JetSampling.h:322
JetSampling::~JetSampling
virtual ~JetSampling()
JetSampling destructor.
JetSampling::m_ejsEMB3
double m_ejsEMB3
Definition: JetSampling.h:288
JetSampling::m_ejsTileGap3
double m_ejsTileGap3
Definition: JetSampling.h:302
JetSampling::m_ejsTileExt0
double m_ejsTileExt0
Definition: JetSampling.h:291
PlotCalibFromCool.ie
ie
Definition: PlotCalibFromCool.py:420
JetSampling::m_ejsFCAL1
double m_ejsFCAL1
Definition: JetSampling.h:304
JetSampling::m_ejsEMB2
double m_ejsEMB2
Definition: JetSampling.h:286
JetSampling::m_eem
double m_eem
Jet energy deposited in hadronic calorimeters
Definition: JetSampling.h:310
JetSampling::m_eEME3Cell1
double_array16 m_eEME3Cell1
Definition: JetSampling.h:331
JetSampling::m_ejsFCAL2
double m_ejsFCAL2
Definition: JetSampling.h:305
JetSampling::m_eEMB3Cell1
double_array16 m_eEMB3Cell1
Definition: JetSampling.h:327
JetSampling::m_ejsTileExt1
double m_ejsTileExt1
Definition: JetSampling.h:293
JetSampling::m_ejsTileGap1
double m_ejsTileGap1
Definition: JetSampling.h:300
JetSampling::m_ctot
double m_ctot
Definition: JetSampling.h:308
ParticleGun_FastCalo_ChargeFlip_Config.energy
energy
Definition: ParticleGun_FastCalo_ChargeFlip_Config.py:78
JetSampling::m_eTileExt2Cell
double_array16 m_eTileExt2Cell
Definition: JetSampling.h:338
JetSampling::m_ehad
double m_ehad
Definition: JetSampling.h:309
JetSampling::init
void init()
Definition: JetSampling.cxx:24
JetSampling::JetSampling
JetSampling()
JetSampling constructor.
Definition: JetSampling.cxx:7
lumiFormat.i
int i
Definition: lumiFormat.py:85
JetSampling::m_ejsHEC0
double m_ejsHEC0
Definition: JetSampling.h:296
JetSampling::m_eHec3Cell2
double_array16 m_eHec3Cell2
Definition: JetSampling.h:346
JetSampling::m_ejsTileExt2
double m_ejsTileExt2
Definition: JetSampling.h:295
JetSampling::m_eEME3Cell2
double_array16 m_eEME3Cell2
Definition: JetSampling.h:332
JetSampling::m_eNull
double m_eNull
Definition: JetSampling.h:318
JetSampling::m_dr1
double m_dr1
Kinematics of the Sampling calbirated jet
Definition: JetSampling.h:278
JetSampling::m_eHec2Cell2
double_array16 m_eHec2Cell2
Definition: JetSampling.h:345
JetSampling::m_ejsHEC2
double m_ejsHEC2
Definition: JetSampling.h:298
JetSampling::eEMECell
double eEMECell(const int ireg) const
Returns the jet energy in cell energy density bin ie for EMB2 (ireg=0) and EMB3 (ireg=1)
Definition: JetSampling.cxx:145
JetSampling::m_ejsFCAL0
double m_ejsFCAL0
Definition: JetSampling.h:303
JetSampling::eHecCell
double eHecCell(const int ireg, const int ie) const
Returns the jet energy in cell energy density bin ie for TileBar (ireg=0) and TileExt (ireg=1) calori...
Definition: JetSampling.cxx:191
JetSampling::m_ejsEME2
double m_ejsEME2
Definition: JetSampling.h:287
JetSampling::m_eHec2Cell1
double_array16 m_eHec2Cell1
Definition: JetSampling.h:341
JetSampling::m_eHec0Cell2
double_array16 m_eHec0Cell2
Definition: JetSampling.h:343
JetSampling::m_eEMB3Cell2
double_array16 m_eEMB3Cell2
Definition: JetSampling.h:328
JetSampling::m_eEMB1Cell
double_array16 m_eEMB1Cell
Definition: JetSampling.h:323
JetSampling::m_eGap
double m_eGap
Definition: JetSampling.h:316
JetSampling::m_tot
double m_tot
Definition: JetSampling.h:307
JetSampling::m_erad_cells
double_array10 m_erad_cells
Definition: JetSampling.h:352
JetSampling::m_eHec0Cell1
double_array16 m_eHec0Cell1
Definition: JetSampling.h:339
JetSampling::m_eTileExt0Cell
double_array16 m_eTileExt0Cell
Definition: JetSampling.h:336
JetSampling::m_ejsHEC1
double m_ejsHEC1
Definition: JetSampling.h:297
JetSampling::m_eEMB2Cell2
double_array16 m_eEMB2Cell2
Definition: JetSampling.h:326
JetSampling::m_eTileBar2Cell
double_array16 m_eTileBar2Cell
Definition: JetSampling.h:335
JetSampling::m_eHec1Cell1
double_array16 m_eHec1Cell1
Definition: JetSampling.h:340
JetSampling::m_dr2
double m_dr2
Distance between reconstructed jet and closest NTJ jet
Definition: JetSampling.h:279
JetSampling::eTileCell
double eTileCell(const int ireg, const int ie) const
Returns the jet energy in cell energy density bin ie for EME2 (ireg=0) and EME3 (ireg=1)
Definition: JetSampling.cxx:173
JetSampling::m_erad_tracks
double_array10 m_erad_tracks
Definition: JetSampling.h:355
JetSampling::m_eFCal1Cell
double_array16 m_eFCal1Cell
Definition: JetSampling.h:348
JetSampling::m_ejsPreSamplerE
double m_ejsPreSamplerE
Definition: JetSampling.h:283
JetSampling::m_ejsEME3
double m_ejsEME3
Definition: JetSampling.h:289
JetSampling::m_ejsEMB1
double m_ejsEMB1
Definition: JetSampling.h:284
JetSampling::m_eEME2Cell1
double_array16 m_eEME2Cell1
Definition: JetSampling.h:329
JetSampling::m_eHec1Cell2
double_array16 m_eHec1Cell2
Definition: JetSampling.h:344
JetSampling::m_eScint
double m_eScint
Definition: JetSampling.h:317