Main Page
Namespaces
Classes
Package Documentation
FastSimulation
Calorimetry
interface
HCALResponse.h
Go to the documentation of this file.
1
#ifndef HCALResponse_h
2
#define HCALResponse_h
3
10
#include "
FastSimulation/Utilities/interface/DoubleCrystalBallGenerator.h
"
11
#include <vector>
12
#include <string>
13
14
//define multidimensional vector types
15
typedef
std::vector<double>
vec1
;
16
typedef
std::vector<vec1>
vec2
;
17
typedef
std::vector<vec2>
vec3
;
18
typedef
std::vector<vec3>
vec4
;
19
typedef
std::vector<vec4>
vec5
;
20
enum
part
{
hcbarrel
= 0,
hcendcap
= 1,
hcforward
= 2 };
21
enum
type
{
ECAL
= 0,
HCAL
= 1,
VFCAL
= 2 };
22
23
class
RandomEngineAndDistribution
;
24
25
namespace
edm
{
26
class
ParameterSet
;
27
}
28
29
class
HCALResponse
{
30
public
:
31
HCALResponse
(
const
edm::ParameterSet
&
pset
);
32
~HCALResponse
() {}
33
34
// Get the response smearing factor
35
// for e/gamma = 0, hadron = 1, mu = 2, mip: 0/1/2
36
// mip = 2 means "mean" response regardless actual mip
37
double
responseHCAL(
int
_mip,
double
energy
,
double
eta
,
int
partype,
RandomEngineAndDistribution
const
*);
38
39
//Get the energy and eta dependent mip fraction
40
double
getMIPfraction(
double
energy,
double
eta);
41
42
// legacy methods using simple formulae
43
double
getHCALEnergyResponse(
double
e
,
int
hit
,
RandomEngineAndDistribution
const
*);
44
45
// correct HF response for SL
46
void
correctHF(
double
e,
int
type
);
47
vec1
&
getCorrHFem
() {
return
corrHFem; }
48
vec1
&
getCorrHFhad
() {
return
corrHFhad; }
49
50
private
:
51
// calculates interpolated-extrapolated response smearing factors
52
// for hadrons, muons, and e/gamma (the last in HF specifically)
53
double
interHD(
int
mip,
double
e,
int
ie,
int
ieta
,
int
det,
RandomEngineAndDistribution
const
*);
54
double
interEM(
double
e,
int
ie,
int
ieta,
RandomEngineAndDistribution
const
*);
55
double
interMU(
double
e,
int
ie,
int
ieta,
RandomEngineAndDistribution
const
*);
56
57
//random shooting functions w/ protection from negative energies
58
double
gaussShootNoNegative(
double
e,
double
sigma,
RandomEngineAndDistribution
const
*);
59
double
cballShootNoNegative(
60
double
mu
,
double
sigma,
double
aL,
double
nL,
double
aR,
double
nR,
RandomEngineAndDistribution
const
*);
61
double
PoissonShootNoNegative(
double
e,
double
sigma,
RandomEngineAndDistribution
const
*);
62
63
//find subdet
64
int
getDet(
int
ieta);
65
66
//debugging and mip toggles
67
bool
debug
,
usemip
;
68
69
//Default values for resolution parametrisation:
70
//stochastic, constant and noise.
71
//in the barrel and in the endcap
72
//in the ECAL, HCAL, VFCAL
73
double
RespPar[3][2][3];
74
75
//HCAL response parameters
76
double
eResponseScale[3];
77
double
eResponsePlateau[3];
78
double
eResponseExponent
;
79
double
eResponseCoefficient
;
80
81
//max values
82
int
maxMUe
,
maxMUeta
,
maxMUbin
,
maxEMe
, maxEMeta;
83
int
maxHDe[4];
84
// eta step for eta index calc
85
double
etaStep
;
86
// eta index for different regions
87
int
HDeta[4], maxHDetas[3],
barrelMUeta
,
endcapMUeta
;
88
// energy step of the tabulated muon data
89
double
muStep
;
90
// correction factor for HF EM
91
double
respFactorEM
;
92
93
// Tabulated energy, et/pt and eta points
94
vec1
eGridHD[4];
95
vec1
eGridEM
;
96
vec1
eGridMU
;
97
vec1
etaGridMU
;
98
99
// Tabulated response and mean for hadrons normalized to the energy
100
// indices: parameters[par][mip][det][energy][eta]
101
int
nPar
;
102
std::vector<std::string>
parNames
;
103
vec5
parameters
;
104
105
// Tabulated response and mean for e/gamma in HF specifically (normalized)
106
// indices: meanEM[energy][eta]
107
vec2
meanEM
,
sigmaEM
;
108
109
// muon histos
110
// indices: responseMU[energy][eta][bin]
111
vec3
responseMU
;
112
vec3
mipfraction
;
113
vec3
PoissonParameters
;
114
115
// crystal ball generator
116
DoubleCrystalBallGenerator
cball
;
117
118
// HF correction for SL
119
int
maxEta
,
maxEne
;
120
vec1
energyHF
;
121
vec2
corrHFgEm
,
corrHFgHad
;
122
vec2
corrHFhEm
,
corrHFhHad
;
123
vec1
corrHFem,
corrHFhad
;
124
};
125
#endif
HCALResponse::etaStep
double etaStep
Definition:
HCALResponse.h:85
type
type
Definition:
HCALResponse.h:21
VFCAL
Definition:
HCALResponse.h:21
HcalResponse_cfi.maxMUe
maxMUe
Definition:
HcalResponse_cfi.py:1016
HCALResponse::eResponseCoefficient
double eResponseCoefficient
Definition:
HCALResponse.h:79
ParameterSet
Definition:
Functions.h:16
HCALResponse::etaGridMU
vec1 etaGridMU
Definition:
HCALResponse.h:97
HCALResponse::usemip
bool usemip
Definition:
HCALResponse.h:67
HCALResponse::parNames
std::vector< std::string > parNames
Definition:
HCALResponse.h:102
hcforward
Definition:
HCALResponse.h:20
HCALResponse::corrHFhad
vec1 corrHFhad
Definition:
HCALResponse.h:123
amptDefaultParameters_cff.mu
mu
Definition:
amptDefaultParameters_cff.py:16
HcalResponse_cfi.endcapMUeta
endcapMUeta
Definition:
HcalResponse_cfi.py:1019
muonDTDigis_cfi.pset
pset
Definition:
muonDTDigis_cfi.py:27
HCALResponse::maxMUeta
int maxMUeta
Definition:
HCALResponse.h:82
PVValHelper::eta
Definition:
PVValidationHelpers.h:69
HCALResponse::eResponseExponent
double eResponseExponent
Definition:
HCALResponse.h:78
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
HCALResponse::~HCALResponse
~HCALResponse()
Definition:
HCALResponse.h:32
hcendcap
Definition:
HCALResponse.h:20
HcalResponse_cfi.maxEne
maxEne
Definition:
HcalResponse_cfi.py:1083
HcalResponse_cfi.corrHFgEm
corrHFgEm
Definition:
HcalResponse_cfi.py:1085
HcalResponse_cfi.corrHFhEm
corrHFhEm
Definition:
HcalResponse_cfi.py:1181
ECAL
Definition:
HCALResponse.h:21
vec5
std::vector< vec4 > vec5
Definition:
HCALResponse.h:19
HcalResponse_cfi.maxMUbin
maxMUbin
Definition:
HcalResponse_cfi.py:1020
vec3
std::vector< vec2 > vec3
Definition:
HCALResponse.h:17
HCALResponse::sigmaEM
vec2 sigmaEM
Definition:
HCALResponse.h:107
HCALResponse::PoissonParameters
vec3 PoissonParameters
Definition:
HCALResponse.h:113
vec1
std::vector< double > vec1
Definition:
HCALResponse.h:15
HCALResponse::muStep
double muStep
Definition:
HCALResponse.h:89
HCALResponse::corrHFhHad
vec2 corrHFhHad
Definition:
HCALResponse.h:122
HcalResponse_cfi.meanEM
meanEM
Definition:
HcalResponse_cfi.py:1064
HCALResponse::getCorrHFhad
vec1 & getCorrHFhad()
Definition:
HCALResponse.h:48
vec4
std::vector< vec3 > vec4
Definition:
HCALResponse.h:18
HCALResponse::energyHF
vec1 energyHF
Definition:
HCALResponse.h:120
HCALResponse::parameters
vec5 parameters
Definition:
HCALResponse.h:103
HCALResponse::eGridEM
vec1 eGridEM
Definition:
HCALResponse.h:95
HCALResponse::corrHFgHad
vec2 corrHFgHad
Definition:
HCALResponse.h:121
HCALResponse::getCorrHFem
vec1 & getCorrHFem()
Definition:
HCALResponse.h:47
HCALHighEnergyHPDFilter_cfi.energy
energy
Definition:
HCALHighEnergyHPDFilter_cfi.py:5
HCAL
Definition:
HCAL.py:1
HcalResponse_cfi.barrelMUeta
barrelMUeta
Definition:
HcalResponse_cfi.py:1018
HCALResponse::maxEta
int maxEta
Definition:
HCALResponse.h:119
debug
#define debug
Definition:
HDRShower.cc:19
DoubleCrystalBallGenerator
Definition:
DoubleCrystalBallGenerator.h:12
LEDCalibrationChannels.ieta
ieta
Definition:
LEDCalibrationChannels.py:63
part
part
Definition:
HCALResponse.h:20
HCALResponse::mipfraction
vec3 mipfraction
Definition:
HCALResponse.h:112
HCALResponse
Definition:
HCALResponse.h:29
HCALResponse::respFactorEM
double respFactorEM
Definition:
HCALResponse.h:91
hit
Definition:
SiStripHitEffFromCalibTree.cc:88
edm
HLT enums.
Definition:
AlignableModifier.h:19
HcalResponse_cfi.maxEMe
maxEMe
Definition:
HcalResponse_cfi.py:1061
HCALResponse::cball
DoubleCrystalBallGenerator cball
Definition:
HCALResponse.h:116
edm::ParameterSet
Definition:
ParameterSet.h:36
HCALResponse::nPar
int nPar
Definition:
HCALResponse.h:101
vec2
std::vector< vec1 > vec2
Definition:
HCALResponse.h:16
hcbarrel
Definition:
HCALResponse.h:20
RandomEngineAndDistribution
Definition:
RandomEngineAndDistribution.h:18
HCALResponse::eGridMU
vec1 eGridMU
Definition:
HCALResponse.h:96
DoubleCrystalBallGenerator.h
HCALResponse::responseMU
vec3 responseMU
Definition:
HCALResponse.h:111
HcalResponse_cfi.HCALResponse
HCALResponse
Definition:
HcalResponse_cfi.py:15
Generated for CMSSW Reference Manual by
1.8.11