ATLAS Offline Software
Loading...
Searching...
No Matches
H1WeightToolCSC12Generic Class Reference

#include <H1WeightToolCSC12Generic.h>

Inheritance diagram for H1WeightToolCSC12Generic:
Collaboration diagram for H1WeightToolCSC12Generic:

Public Member Functions

virtual StatusCode initialize () override
virtual double etCell (const CaloCell *thisCell, double weight) override
virtual double etCryo (double etAccb3, double etTile1) override
virtual double jetScale (double e, double eta) override
virtual double wtCell (const CaloCell *thisCell) const override
virtual double wtCryo () override

Private Attributes

Constant< CxxUtils::Array< 1 > > m_wtEMB0 { this, "wtEMB0" }
Constant< CxxUtils::Array< 1 > > m_wtEME0 { this, "wtEME0" }
Constant< CxxUtils::Array< 1 > > m_wtEMB1 { this, "wtEMB1" }
Constant< CxxUtils::Array< 1 > > m_wtEMB2 { this, "wtEMB2" }
Constant< CxxUtils::Array< 1 > > m_wtEME1 { this, "wtEME1" }
Constant< CxxUtils::Array< 1 > > m_wtEME2 { this, "wtEME2" }
Constant< CxxUtils::Array< 1 > > m_wtTile1 { this, "wtTile1" }
Constant< CxxUtils::Array< 1 > > m_wtTile2 { this, "wtTile2" }
Constant< CxxUtils::Array< 1 > > m_wtHec1 { this, "wtHec1" }
Constant< CxxUtils::Array< 1 > > m_wtHec2 { this, "wtHec2" }
Constant< CxxUtils::Array< 1 > > m_wtFCal1 { this, "wtFCal1" }
Constant< CxxUtils::Array< 1 > > m_wtFCal2 { this, "wtFCal2" }
Constant< float > m_wtGap { this, "wtGap" }
Constant< float > m_wtScint { this, "wtScint" }
Constant< float > m_wtCryo { this, "wtCyo" }
Constant< CxxUtils::Array< 2 > > m_etaFit { this, "etaFit" }

Detailed Description

Definition at line 25 of file H1WeightToolCSC12Generic.h.

Member Function Documentation

◆ etCell()

double H1WeightToolCSC12Generic::etCell ( const CaloCell * thisCell,
double weight )
overridevirtual

Definition at line 32 of file H1WeightToolCSC12Generic.cxx.

33{
34
35 double etcell = weight * thisCell->et() * wtCell(thisCell);
36 return etcell;
37
38}
virtual double et() const override final
get et
Definition CaloCell.h:423
virtual double wtCell(const CaloCell *thisCell) const override

◆ etCryo()

double H1WeightToolCSC12Generic::etCryo ( double etAccb3,
double etTile1 )
overridevirtual

Definition at line 162 of file H1WeightToolCSC12Generic.cxx.

163{
164
165 if( etAccb3*etTile1 > 0 ) {
166 return wtCryo() * sqrt( etAccb3*etTile1 );
167 } else {
168 return 0;
169 }
170
171}
virtual double wtCryo() override

◆ initialize()

StatusCode H1WeightToolCSC12Generic::initialize ( )
overridevirtual

Definition at line 26 of file H1WeightToolCSC12Generic.cxx.

26 {
27 ATH_CHECK( base_class::initialize() );
28 return StatusCode::SUCCESS;
29}
#define ATH_CHECK
Evaluate an expression and check for errors.

◆ jetScale()

double H1WeightToolCSC12Generic::jetScale ( double e,
double eta )
overridevirtual

Definition at line 181 of file H1WeightToolCSC12Generic.cxx.

182{
183 Context myctx = context (Gaudi::Hive::currentContext());
184 const CxxUtils::Array<2> etaFit = m_etaFit(myctx);
185
186 int nEtaBins=etaFit.size();
187 if (nEtaBins==0)
188 return 1.0;
189
190 int ieta = static_cast<int>(fabs(eta)*(1./0.10));
191 if (ieta>=nEtaBins) ieta=nEtaBins-1;
192 //if(ieta > 49) ieta = 49;
193 double ptlog = log(fabs(e)/(cosh(eta)*GeV));
194 if(ptlog < 2.3) ptlog = 2.3;
195 if(ptlog > etaFit[ieta][4]) ptlog = etaFit[ieta][4];
196 double func = etaFit[ieta][0] + etaFit[ieta][1]/ptlog
197 + etaFit[ieta][2]/(ptlog*ptlog)
198 + etaFit[ieta][3]/(ptlog*ptlog*ptlog);
199
200 return 1./func;
201
202}
Scalar eta() const
pseudorapidity method
unsigned int size(unsigned int dim=0) const
Return the size of the array along one dimension.
Constant< CxxUtils::Array< 2 > > m_etaFit
constexpr unsigned nEtaBins

◆ wtCell()

double H1WeightToolCSC12Generic::wtCell ( const CaloCell * thisCell) const
overridevirtual

Definition at line 41 of file H1WeightToolCSC12Generic.cxx.

42{
43 Context myctx = context (Gaudi::Hive::currentContext());
44
45 const double mm3 = millimeter*millimeter*millimeter;
46 const double log2 = 0.69314718056;
47 const double inv_log2 = 1. / log2;
48
49 int dim=m_wtEMB1(myctx).size(); //FIXME: Assume same size for all m_wtXXXXX
50
51 // Process cell
52
53 double ecell = thisCell->e();
54 double etaa = fabs( thisCell->eta() );
55 double vol = thisCell->caloDDE()->volume();
56 const CaloSampling::CaloSample s = thisCell->caloDDE()->getSampling();//CaloSampling::getSampling( *thisCell );
57
58 int iET=0;
59 if( fabs(ecell) > 0 && vol > 0 ) {
60 iET=static_cast<int>(log(fabs(ecell)/fabs(vol)*(mm3/GeV))*inv_log2+26);
61 if(iET<0) iET=0;
62 if(iET >= dim) iET = dim-1;
63 } else {
64 iET=-1;
65 }
66
67 double wt = 0;
68
69 switch ( s ) {
70
71 // Presampler
72 case CaloSampling::PreSamplerB:
73 wt = m_wtEMB0(myctx)[0];
74 break;
75
76 case CaloSampling::PreSamplerE:
77 wt = m_wtEME0(myctx)[0];
78 break;
79
80 // First EM layer
81
82 case CaloSampling::EMB1:
83 wt = m_wtEMB0(myctx)[1];
84 break;
85
86 case CaloSampling::EME1:
87 wt = m_wtEME0(myctx)[1];
88 break;
89
90
91 // EM Barrel
92 case CaloSampling::EMB2:
93 case CaloSampling::EMB3:
94 if(iET >= 0 && etaa < 0.8) wt = m_wtEMB1(myctx)[iET];
95 if(iET >= 0 && etaa >= 0.8) wt = m_wtEMB2(myctx)[iET];
96 break;
97
98 // EM Endcap
99 case CaloSampling::EME2:
100 case CaloSampling::EME3:
101 if(iET >= 0 && etaa < 2.5) wt = m_wtEME1(myctx)[iET];
102 if(iET >= 0 && etaa >= 2.5) wt = m_wtEME2(myctx)[iET];
103 break;
104
105 // Tile
106 case CaloSampling::TileBar0:
107 case CaloSampling::TileBar1:
108 case CaloSampling::TileBar2:
109 if(iET >= 0) wt = m_wtTile1(myctx)[iET];
110 break;
111
112 case CaloSampling::TileExt0:
113 case CaloSampling::TileExt1:
114 case CaloSampling::TileExt2:
115 if(iET >= 0) wt = m_wtTile2(myctx)[iET];
116 break;
117
118 // Had endcap
119 case CaloSampling::HEC0:
120 case CaloSampling::HEC1:
121 case CaloSampling::HEC2:
122 case CaloSampling::HEC3:
123 if(iET>=0 && etaa<2.5) wt = m_wtHec1(myctx)[iET];
124 if(iET>=0 && etaa>=2.5) wt = m_wtHec2(myctx)[iET];
125 break;
126
127 // FCal
128 case CaloSampling::FCAL0:
129 if(iET >= 0) wt = m_wtFCal1(myctx)[iET];
130 break;
131
132 case CaloSampling::FCAL1:
133 case CaloSampling::FCAL2:
134 if(iET >= 0) wt = m_wtFCal2(myctx)[iET];
135 break;
136
137 // Gap calorimeter
138 case CaloSampling::TileGap3:
139 wt = m_wtGap(myctx);
140 break;
141
142 // Gap scintillators
143 case CaloSampling::TileGap1:
144 case CaloSampling::TileGap2:
145 wt = m_wtScint(myctx);
146 break;
147
148 case CaloSampling::MINIFCAL0:
149 case CaloSampling::MINIFCAL1:
150 case CaloSampling::MINIFCAL2:
151 case CaloSampling::MINIFCAL3:
152 case CaloSampling::Unknown:
153 break;
154
155 } // end switch
156
157 return wt;
158
159}
virtual double e() const override final
get energy (data member) (synonym to method energy()
Definition CaloCell.h:333
const CaloDetDescrElement * caloDDE() const
get pointer to CaloDetDescrElement (data member)
Definition CaloCell.h:321
virtual double eta() const override final
get eta (through CaloDetDescrElement)
Definition CaloCell.h:382
CaloCell_ID::CaloSample getSampling() const
cell sampling
Constant< CxxUtils::Array< 1 > > m_wtTile2
Constant< CxxUtils::Array< 1 > > m_wtEME2
Constant< CxxUtils::Array< 1 > > m_wtTile1
Constant< CxxUtils::Array< 1 > > m_wtFCal2
Constant< CxxUtils::Array< 1 > > m_wtHec1
Constant< CxxUtils::Array< 1 > > m_wtEME1
Constant< CxxUtils::Array< 1 > > m_wtHec2
Constant< CxxUtils::Array< 1 > > m_wtEME0
Constant< CxxUtils::Array< 1 > > m_wtFCal1
Constant< CxxUtils::Array< 1 > > m_wtEMB0
Constant< CxxUtils::Array< 1 > > m_wtEMB1
Constant< CxxUtils::Array< 1 > > m_wtEMB2
float millimeter
Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration # This software is distribute...

◆ wtCryo()

double H1WeightToolCSC12Generic::wtCryo ( )
overridevirtual

Definition at line 173 of file H1WeightToolCSC12Generic.cxx.

174{
175 Context myctx = context (Gaudi::Hive::currentContext());
176 return m_wtCryo(myctx);
177}

Member Data Documentation

◆ m_etaFit

Constant<CxxUtils::Array<2> > H1WeightToolCSC12Generic::m_etaFit { this, "etaFit" }
private

Definition at line 58 of file H1WeightToolCSC12Generic.h.

58{ this, "etaFit" };

◆ m_wtCryo

Constant<float> H1WeightToolCSC12Generic::m_wtCryo { this, "wtCyo" }
private

Definition at line 57 of file H1WeightToolCSC12Generic.h.

57{ this, "wtCyo" };

◆ m_wtEMB0

Constant<CxxUtils::Array<1> > H1WeightToolCSC12Generic::m_wtEMB0 { this, "wtEMB0" }
private

Definition at line 43 of file H1WeightToolCSC12Generic.h.

43{ this, "wtEMB0" };

◆ m_wtEMB1

Constant<CxxUtils::Array<1> > H1WeightToolCSC12Generic::m_wtEMB1 { this, "wtEMB1" }
private

Definition at line 45 of file H1WeightToolCSC12Generic.h.

45{ this, "wtEMB1" };

◆ m_wtEMB2

Constant<CxxUtils::Array<1> > H1WeightToolCSC12Generic::m_wtEMB2 { this, "wtEMB2" }
private

Definition at line 46 of file H1WeightToolCSC12Generic.h.

46{ this, "wtEMB2" };

◆ m_wtEME0

Constant<CxxUtils::Array<1> > H1WeightToolCSC12Generic::m_wtEME0 { this, "wtEME0" }
private

Definition at line 44 of file H1WeightToolCSC12Generic.h.

44{ this, "wtEME0" };

◆ m_wtEME1

Constant<CxxUtils::Array<1> > H1WeightToolCSC12Generic::m_wtEME1 { this, "wtEME1" }
private

Definition at line 47 of file H1WeightToolCSC12Generic.h.

47{ this, "wtEME1" };

◆ m_wtEME2

Constant<CxxUtils::Array<1> > H1WeightToolCSC12Generic::m_wtEME2 { this, "wtEME2" }
private

Definition at line 48 of file H1WeightToolCSC12Generic.h.

48{ this, "wtEME2" };

◆ m_wtFCal1

Constant<CxxUtils::Array<1> > H1WeightToolCSC12Generic::m_wtFCal1 { this, "wtFCal1" }
private

Definition at line 53 of file H1WeightToolCSC12Generic.h.

53{ this, "wtFCal1" };

◆ m_wtFCal2

Constant<CxxUtils::Array<1> > H1WeightToolCSC12Generic::m_wtFCal2 { this, "wtFCal2" }
private

Definition at line 54 of file H1WeightToolCSC12Generic.h.

54{ this, "wtFCal2" };

◆ m_wtGap

Constant<float> H1WeightToolCSC12Generic::m_wtGap { this, "wtGap" }
private

Definition at line 55 of file H1WeightToolCSC12Generic.h.

55{ this, "wtGap" };

◆ m_wtHec1

Constant<CxxUtils::Array<1> > H1WeightToolCSC12Generic::m_wtHec1 { this, "wtHec1" }
private

Definition at line 51 of file H1WeightToolCSC12Generic.h.

51{ this, "wtHec1" };

◆ m_wtHec2

Constant<CxxUtils::Array<1> > H1WeightToolCSC12Generic::m_wtHec2 { this, "wtHec2" }
private

Definition at line 52 of file H1WeightToolCSC12Generic.h.

52{ this, "wtHec2" };

◆ m_wtScint

Constant<float> H1WeightToolCSC12Generic::m_wtScint { this, "wtScint" }
private

Definition at line 56 of file H1WeightToolCSC12Generic.h.

56{ this, "wtScint" };

◆ m_wtTile1

Constant<CxxUtils::Array<1> > H1WeightToolCSC12Generic::m_wtTile1 { this, "wtTile1" }
private

Definition at line 49 of file H1WeightToolCSC12Generic.h.

49{ this, "wtTile1" };

◆ m_wtTile2

Constant<CxxUtils::Array<1> > H1WeightToolCSC12Generic::m_wtTile2 { this, "wtTile2" }
private

Definition at line 50 of file H1WeightToolCSC12Generic.h.

50{ this, "wtTile2" };

The documentation for this class was generated from the following files: