SimG4CMS
Calo
src
HFDarkening.cc
Go to the documentation of this file.
1
//File: HFDarkening.cc
3
//Description: simple helper class containing parameterized function
4
// to be used for the SLHC darkening calculation in HF
6
7
#include "
SimG4CMS/Calo/interface/HFDarkening.h
"
8
#include <algorithm>
9
#include <cmath>
10
11
// CMSSW Headers
12
#include "
FWCore/ParameterSet/interface/ParameterSet.h
"
13
#include "
FWCore/MessageLogger/interface/MessageLogger.h
"
14
15
using namespace
edm
;
16
17
HFDarkening::HFDarkening
(
const
edm::ParameterSet
&
pset
) {
18
//HF area of consideration is 1115 cm from interaction point to 1280cm in z-axis
19
//Radius (cm) - 13 cm from Beam pipe to 130cm (the top of HF active area)
20
//Dose in MRad
21
22
vecOfDoubles
HFDosePars =
pset
.getParameter<
vecOfDoubles
>(
"doseLayerDepth"
);
23
int
i
= 0;
24
for
(
int
Z
= 0;
Z
!= _numberOfZLayers; ++
Z
) {
25
for
(
int
R
= 0;
R
!= _numberOfRLayers; ++
R
) {
26
HFDoseLayerDarkeningPars[
Z
][
R
] = HFDosePars[
i
];
27
++
i
;
28
}
29
}
30
}
31
32
HFDarkening::~HFDarkening
() {}
33
34
double
HFDarkening::dose
(
unsigned
int
layer
,
double
Radius
) {
35
// Radii are 13-17, 17-20, 20-24, 24-29, 29-34, 34-41, 41-48, 48-58, 58-69, 69-82, 82-98, 98-116, 116-130
36
// These radii are specific to the geometry of the dose map, which closely matches HF Tower Geometry,
37
// but not exactly.
38
if
(
layer
> (_numberOfZLayers - 1)) {
39
return
0.;
40
}
41
42
int
radius
= 0;
43
if
(
Radius
<= 17.0)
44
radius
= 0;
45
else
if
(
Radius
<= 20.0)
46
radius
= 1;
47
else
if
(
Radius
<= 24.0)
48
radius
= 2;
49
else
if
(
Radius
<= 29.0)
50
radius
= 3;
51
else
if
(
Radius
<= 34.0)
52
radius
= 4;
53
else
if
(
Radius
<= 41.0)
54
radius
= 5;
55
else
if
(
Radius
<= 48.0)
56
radius
= 6;
57
else
if
(
Radius
<= 58.0)
58
radius
= 7;
59
else
if
(
Radius
<= 69.0)
60
radius
= 8;
61
else
if
(
Radius
<= 82.0)
62
radius
= 9;
63
else
if
(
Radius
<= 98.0)
64
radius
= 10;
65
else
if
(
Radius
<= 116.0)
66
radius
= 11;
67
else
if
(
Radius
<= 130.0)
68
radius
= 12;
69
else
70
return
0.;
71
72
return
HFDoseLayerDarkeningPars[
layer
][
radius
];
73
}
74
75
double
HFDarkening::degradation
(
double
mrad) {
return
(
exp
(-1.44 *
pow
(mrad / 100, 0.44) * 0.2 / 4.343)); }
76
77
double
HFDarkening::int_lumi
(
double
intlumi) {
return
(intlumi / 500.); }
mps_fire.i
i
Definition:
mps_fire.py:428
MessageLogger.h
edm
HLT enums.
Definition:
AlignableModifier.h:19
HFDarkening::dose
double dose(unsigned int layer, double radius)
Definition:
HFDarkening.cc:34
JetPartonCorrections_cff.Radius
Radius
Definition:
JetPartonCorrections_cff.py:11
HFDarkening::degradation
double degradation(double mrad)
Definition:
HFDarkening.cc:75
HFDarkening::int_lumi
double int_lumi(double intlumi)
Definition:
HFDarkening.cc:77
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition:
phase1PixelTopology.h:99
edm::ParameterSet
Definition:
ParameterSet.h:47
HFDarkening::HFDarkening
HFDarkening(const edm::ParameterSet &pset)
Definition:
HFDarkening.cc:17
HFDarkening.h
HFDarkening::~HFDarkening
~HFDarkening()
Definition:
HFDarkening.cc:32
CosmicsPD_Skims.radius
radius
Definition:
CosmicsPD_Skims.py:135
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition:
Power.h:29
ParameterSet.h
BeamSpotPI::Z
Definition:
BeamSpotPayloadInspectorHelper.h:33
JetChargeProducer_cfi.exp
exp
Definition:
JetChargeProducer_cfi.py:6
dttmaxenums::R
Definition:
DTTMax.h:29
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
vecOfDoubles
std::vector< double > vecOfDoubles
Definition:
HFRecalibration.h:13
Generated for CMSSW Reference Manual by
1.8.16