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