ATLAS Offline Software
Static Public Member Functions | Static Private Member Functions | List of all members
CaloClusterCorr::CaloSwCalibHitsShowerDepth Class Reference

Helper to calculate the shower depth as used in the calib hits SW cluster correction. More...

#include <CaloSwCalibHitsShowerDepth.h>

Collaboration diagram for CaloClusterCorr::CaloSwCalibHitsShowerDepth:

Static Public Member Functions

static double depth (const float aeta, const float start_crack, const float end_crack, const CaloRec::Array< 2 > &sampling_depth, const float etamax, const xAOD::CaloCluster *cluster, MsgStream &log)
 Calculate the depth of the cluster. More...
 

Static Private Member Functions

static void barrelCoefs (const float aeta, float R[4])
 Calculate the sampling depth coefficients for the barrel. More...
 
static bool endcapCoefs (const float aeta, const CaloRec::Array< 2 > &sampling_depth, const float etamax, float R[4])
 Calculate the sampling depth coefficients for the endcap. More...
 

Detailed Description

Helper to calculate the shower depth as used in the calib hits SW cluster correction.

Broken out into a separate class so that it can be used by other components.

Definition at line 32 of file CaloSwCalibHitsShowerDepth.h.

Member Function Documentation

◆ barrelCoefs()

void CaloClusterCorr::CaloSwCalibHitsShowerDepth::barrelCoefs ( const float  aeta,
float  R[4] 
)
staticprivate

Calculate the sampling depth coefficients for the barrel.

Parameters
aetaabs(eta) of the cluster.
R[out]The set of coefficients per layer.

Definition at line 94 of file CaloSwCalibHitsShowerDepth.cxx.

96 {
97 //----------------------------------------------------------------------
98 // APPROXIMATE Longitudinal segmentation of the EM Barrel
99 // Inspired from M.Seman's former ACCOMPA.
100 // - PURPOSE Computes the shower longitudinal barycenter
101 // - Inputs: shower eta and energies in the compartments
102 //----------------------------------------------------------------------
103 
104  static const float
105  X0IN = 1.6, // 1.7 X0 before strips
106  X0S1 = 6.0, // 6 X0 till end of strips
107  // X0S2 = 24.0, // 24 X0 till end of S2
108  // X0S3 = 2.0, // 2 X0 at least in S3
109  // RIN = 150.0024, // where strips start (cm)
110  // ROUT = 197.0482, // where S3 ends (cm)
111  // RCLR = 0.7, // clearance for resistive ink (cm)
112  //BEND1 = 152.1000, // first 3 bends radii (cm)
113  //BEND2 = 155.9659,
114  //BEND3 = 159.7202,
115  ETASTEP = 0.8, // where lead changes
116  //DENSHI = 2.137, // cm/X0 high density
117  //DENSLO = 2.695, // cm/X0 low density
118  X0THI = 23.74, // total depth high density part (not indep?)
119  X0TLO = 19.177; // total depth low density part (not indep?)
120 
121  float X0T;
122  float R12, R23;
123 
124  if ( aeta < ETASTEP ) {
125  //DENS = DENSHI;
126  X0T = X0THI;
127  //RLO = BEND2; // break strips between bends 2 and 3
128  //RHI = BEND3;
129  }else{
130  //DENS = DENSLO;
131  X0T = X0TLO;
132  //RLO = BEND1; // break strips between bends 1 and 2
133  //RHI = BEND2;
134  }
135 
136  R[0] = (X0IN) * cosh(aeta);
137 
138  // R12 is radius at transition strips->Sampling2
139  // R23 is radius at transition Sampling2->Sampling3
140 
141  R12 = X0S1;
142 
143  //.. total depth of calo at given eta
144 
145  float RADLTOT = X0T*cosh(aeta);
146 
147  //.. radius where S2 ends. Make sure there are 2X0 left for S3
148 
149  if (aeta < 0.5){
150  R23 = 22 * cosh(aeta) ;
151  }else{
152  R23 = 25;
153  }
154 
155  R[1] = R[0] + (R12 - R[0])/2 ;
156  R[2] = R12 + (R23 - R12)/2;
157  R[3] = R23 + (RADLTOT - R23)/2;
158 }

◆ depth()

double CaloClusterCorr::CaloSwCalibHitsShowerDepth::depth ( const float  aeta,
const float  start_crack,
const float  end_crack,
const CaloRec::Array< 2 > &  sampling_depth,
const float  etamax,
const xAOD::CaloCluster cluster,
MsgStream &  log 
)
static

Calculate the depth of the cluster.

Parameters
aetaabs(eta) of the cluster.
start_crackEta of the start of the crack.
end_crackEta of the end of the crack.
sampling_depthArray of sampling depths per bin/sampling in the EC.
etamaxMaximum eta value in sampling_depth.
clusterCluster for which to calculate the depth.
logStream for debug messages.

Note that the sampling depth is used only in the endcap. Parameters for the barrel are hardcoded. (FIXME!) Parameters are passed by reference to allow them to be changed.

Definition at line 36 of file CaloSwCalibHitsShowerDepth.cxx.

43 {
44  float R[4];
45  int si;
46 
47  if (aeta < start_crack) {
48  barrelCoefs (aeta, R);
49  si = 0;
50  }
51  else if (aeta > end_crack) {
52  if (!endcapCoefs (aeta, sampling_depth, etamax, R))
53  return 0;
54  si = 1;
55  }
56  else
57  return 0;
58 
59  static const CaloSampling::CaloSample samps[2][4] = {
68  };
69 
70  double rsum = 0;
71  double esum = 0;
72  for (int i=0; i < 4; i++) {
73  float e = cluster->eSample (samps[si][i]);
74  rsum += R[i] * e;
75  esum += e;
76  }
77 
78  if (esum == 0)
79  return 0;
80 
81  double depth = rsum / esum;
82 
83  if (log.level() <= MSG::DEBUG) log << MSG::DEBUG << "Shower barycenter ---->> " << depth << endmsg;
84 
85  return depth;
86 }

◆ endcapCoefs()

bool CaloClusterCorr::CaloSwCalibHitsShowerDepth::endcapCoefs ( const float  aeta,
const CaloRec::Array< 2 > &  sampling_depth,
const float  etamax,
float  R[4] 
)
staticprivate

Calculate the sampling depth coefficients for the endcap.

Parameters
aetaabs(eta) of the cluster.
sampling_depthArray of sampling depths per bin/sampling in the EC.
etamaxMaximum eta value in sampling_depth.
R[out]The set of coefficients per layer.
aetaabs(eta) of the cluster.
etamaxMaximum eta value in sampling_depth.
etamaxMaximum eta value in sampling_depth.
R[out]The set of coefficients per layer.

Definition at line 168 of file CaloSwCalibHitsShowerDepth.cxx.

172 {
173  unsigned int ibin = (static_cast<unsigned int> (aeta / etamax * 100)) ;
174  if (ibin >= sampling_depth.size())
175  return false;
176 
177  for (int i=0; i < 4; i++)
178  R[i] = sampling_depth[ibin][i+1];
179  return true;
180 }

The documentation for this class was generated from the following files:
AllowedVariables::e
e
Definition: AsgElectronSelectorTool.cxx:37
CaloClusterCorr::CaloSwCalibHitsShowerDepth::barrelCoefs
static void barrelCoefs(const float aeta, float R[4])
Calculate the sampling depth coefficients for the barrel.
Definition: CaloSwCalibHitsShowerDepth.cxx:94
constants.EMB1
int EMB1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:53
CxxUtils::Array::size
unsigned int size(unsigned int dim=0) const
Return the size of the array along one dimension.
constants.EMB2
int EMB2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:54
lumiFormat.i
int i
Definition: lumiFormat.py:85
CaloSampling::CaloSample
CaloSample
Definition: Calorimeter/CaloGeoHelpers/CaloGeoHelpers/CaloSampling.h:22
CaloClusterCorr::CaloSwCalibHitsShowerDepth::endcapCoefs
static bool endcapCoefs(const float aeta, const CaloRec::Array< 2 > &sampling_depth, const float etamax, float R[4])
Calculate the sampling depth coefficients for the endcap.
Definition: CaloSwCalibHitsShowerDepth.cxx:168
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
constants.EME1
int EME1
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:55
AnalysisUtils::Delta::R
double R(const INavigable4Momentum *p1, const double v_eta, const double v_phi)
Definition: AnalysisMisc.h:49
CaloCell_ID_FCS::EME3
@ EME3
Definition: FastCaloSim_CaloCell_ID.h:26
CaloClusterCorr::CaloSwCalibHitsShowerDepth::depth
static double depth(const float aeta, const float start_crack, const float end_crack, const CaloRec::Array< 2 > &sampling_depth, const float etamax, const xAOD::CaloCluster *cluster, MsgStream &log)
Calculate the depth of the cluster.
Definition: CaloSwCalibHitsShowerDepth.cxx:36
xAOD::CaloCluster_v1::eSample
float eSample(const CaloSample sampling) const
Definition: CaloCluster_v1.cxx:521
CaloCell_ID_FCS::PreSamplerE
@ PreSamplerE
Definition: FastCaloSim_CaloCell_ID.h:23
CaloCell_ID_FCS::PreSamplerB
@ PreSamplerB
Definition: FastCaloSim_CaloCell_ID.h:19
DEBUG
#define DEBUG
Definition: page_access.h:11
python.CaloCondTools.log
log
Definition: CaloCondTools.py:20
CaloCell_ID_FCS::EMB3
@ EMB3
Definition: FastCaloSim_CaloCell_ID.h:22
constants.EME2
int EME2
Definition: Calorimeter/CaloClusterCorrection/python/constants.py:56