#include <HCALResponse.h>
|
double | cballShootNoNegative (double mu, double sigma, double aL, double nL, double aR, double nR, RandomEngineAndDistribution const *) |
|
double | gaussShootNoNegative (double e, double sigma, RandomEngineAndDistribution const *) |
|
int | getDet (int ieta) |
|
double | interEM (double e, int ie, int ieta, RandomEngineAndDistribution const *) |
|
double | interHD (int mip, double e, int ie, int ieta, int det, RandomEngineAndDistribution const *) |
|
double | interMU (double e, int ie, int ieta, RandomEngineAndDistribution const *) |
|
double | PoissonShootNoNegative (double e, double sigma, RandomEngineAndDistribution const *) |
|
Definition at line 29 of file HCALResponse.h.
Definition at line 18 of file HCALResponse.cc.
References funct::abs(), ztail::d, debug, HLT_25ns14e33_v1_cff::fraction, edm::ParameterSet::getParameter(), HCAL, i, j, relval_steps::k, visualization-live-secondInstance_cfg::m, maxEta, AlCaHLTBitMon_ParallelJobs::p, Parameters::parameters, AlCaHLTBitMon_QueryRunRegistry::string, tmp, and VFCAL.
26 RespPar[
HCAL][0][1] = pset.
getParameter<
double>(
"HadronBarrelResolution_Constant");
27 RespPar[
HCAL][0][2] = pset.
getParameter<
double>(
"HadronBarrelResolution_Noise");
29 RespPar[
HCAL][1][0] = pset.
getParameter<
double>(
"HadronEndcapResolution_Stochastic");
30 RespPar[
HCAL][1][1] = pset.
getParameter<
double>(
"HadronEndcapResolution_Constant");
31 RespPar[
HCAL][1][2] = pset.
getParameter<
double>(
"HadronEndcapResolution_Noise");
33 RespPar[
VFCAL][0][0] = pset.
getParameter<
double>(
"HadronForwardResolution_Stochastic");
34 RespPar[
VFCAL][0][1] = pset.
getParameter<
double>(
"HadronForwardResolution_Constant");
35 RespPar[
VFCAL][0][2] = pset.
getParameter<
double>(
"HadronForwardResolution_Noise");
37 RespPar[
VFCAL][1][0] = pset.
getParameter<
double>(
"ElectronForwardResolution_Stochastic");
38 RespPar[
VFCAL][1][1] = pset.
getParameter<
double>(
"ElectronForwardResolution_Constant");
39 RespPar[
VFCAL][1][2] = pset.
getParameter<
double>(
"ElectronForwardResolution_Noise");
42 eResponseScale[1] = pset.
getParameter<
double>(
"eResponseScaleHE");
43 eResponseScale[2] = pset.
getParameter<
double>(
"eResponseScaleHF");
46 eResponsePlateau[1] = pset.
getParameter<
double>(
"eResponsePlateauHE");
47 eResponsePlateau[2] = pset.
getParameter<
double>(
"eResponsePlateauHF");
86 for(
int m = 0;
m < 3;
m++){
87 for(
int d = 0;
d < 3;
d++){
95 for(
int i = 0;
i < maxHDe[
d];
i++){
110 std::string PoissonParName[] = {
"mean_overall",
"shift_overall",
"mean_between",
"shift_between"};
111 for(
int d = 0; d < 4; d++){
113 for(
int i = 0;
i < maxHDe[3];
i++){
126 for(
int d = 0; d < 3; d++){
128 std::string mipname = fraction + mipNames[0] + detNames[
d] ;
131 for(
int i = 0;
i < maxHDe[
d];
i++){
152 double _barrelMUeta = pset.
getParameter<
double>(
"barrelMUeta");
153 double _endcapMUeta = pset.
getParameter<
double>(
"endcapMUeta");
156 if(fabs(_barrelMUeta) <= etaGridMU[
i]) { barrelMUeta =
i;
break; }
159 if(fabs(_endcapMUeta) <= etaGridMU[
i]) {
endcapMUeta =
i;
break; }
177 responseMU[
i][
j][
k] = _responseMU[loc][
i*maxMUetas[loc]*maxMUbin + (
j-eta_loc)*maxMUbin +
k];
181 LogInfo(
"FastCalorimetry") <<
" responseMU " <<
i <<
" " <<
j <<
" " <<
k <<
" = "
T getParameter(std::string const &) const
double eResponseCoefficient
std::vector< std::string > parNames
std::vector< double > vec1
Abs< T >::type abs(const T &t)
std::vector< std::vector< double > > tmp
double eResponsePlateau[3]
HCALResponse::~HCALResponse |
( |
| ) |
|
|
inline |
double HCALResponse::cballShootNoNegative |
( |
double |
mu, |
|
|
double |
sigma, |
|
|
double |
aL, |
|
|
double |
nL, |
|
|
double |
aR, |
|
|
double |
nR, |
|
|
RandomEngineAndDistribution const * |
random |
|
) |
| |
|
private |
Definition at line 556 of file HCALResponse.cc.
References dbtoconf::out.
double shoot(double mu, double sigma, double aL, double nL, double aR, double nR, RandomEngineAndDistribution const *random)
DoubleCrystalBallGenerator cball
void HCALResponse::correctHF |
( |
double |
e, |
|
|
int |
type |
|
) |
| |
vec1& HCALResponse::getCorrHF |
( |
| ) |
|
|
inline |
int HCALResponse::getDet |
( |
int |
ieta | ) |
|
|
private |
Definition at line 509 of file HCALResponse.cc.
References EnergyCorrector::c, create_public_lumi_plots::exp, HCAL, hcforward, cmsBatch::log, gen::n, AlCaHLTBitMon_ParallelJobs::p, dtDQMClient_cfg::resolution, alignCSCRings::s, mathSSE::sqrt(), and VFCAL.
Referenced by CalorimetryManager::HDShowerSimulation(), and CalorimetryManager::reconstructHCAL().
516 double response =
e * p / (1+c*
exp(n *
log(s/
e)));
518 if(response<0.) response = 0.;
double eResponseCoefficient
double eResponsePlateau[3]
double gaussShootNoNegative(double e, double sigma, RandomEngineAndDistribution const *)
double HCALResponse::getMIPfraction |
( |
double |
energy, |
|
|
double |
eta |
|
) |
| |
Definition at line 471 of file HCALResponse.cc.
References debug, alignCSCRings::e, and timingPdfMaker::mean.
472 double y1 =
meanEM[ie][ieta];
473 double y2 =
meanEM[ie+1][ieta];
479 LogInfo(
"FastCalorimetry") << std::endl
480 <<
" HCALResponse::interEM mean " << std::endl
481 <<
" x, x1-x2, y1-y2 = "
482 <<
e <<
", " << x1 <<
"-" << x2 <<
" " << y1 <<
"-" << y2 << std::endl;
486 double mean = (y1*(x2-
e) + y2*(
e-x1))/(x2-x1);
493 LogInfo(
"FastCalorimetry") << std::endl
494 <<
" HCALResponse::interEM sigma" << std::endl
495 <<
" x, x1-x2, y1-y2 = "
496 <<
e <<
", " << x1 <<
"-" << x2 <<
" " << y1 <<
"-" << y2 << std::endl;
500 double sigma = (y1*(x2-
e) + y2*(
e-x1))/(x2-x1);
double gaussShootNoNegative(double e, double sigma, RandomEngineAndDistribution const *)
Definition at line 400 of file HCALResponse.cc.
References alignCSCRings::e, RandomEngineAndDistribution::flatShoot(), timingPdfMaker::mean, AlCaHLTBitMon_ParallelJobs::p, Parameters::parameters, RandomEngineAndDistribution::poissonShoot(), and tmp.
408 if (det==2 && ieta>5 &&
e<20){
410 for(
int p = 0;
p < 4;
p++){
416 pars[
p] = (y1*(x2-
e) + y2*(
e-x1))/(x2-x1);
435 bool use_custom =
false;
439 if((
p==0 ||
p==1) &&
e < x1){
440 double tmp = (y1*x2-y2*x1)/(x2-x1);
447 else if((
p==2 ||
p==3 ||
p==4 ||
p==5)){
448 if(
e < x1 && y1 < y2){
452 else if(
e > x2 && y2 < y1){
459 if(use_custom) pars[
p] = custom;
460 else pars[
p] = (y1*(x2-
e) + y2*(
e-x1))/(x2-x1);
double PoissonShootNoNegative(double e, double sigma, RandomEngineAndDistribution const *)
std::vector< double > vec1
std::vector< std::vector< double > > tmp
double gaussShootNoNegative(double e, double sigma, RandomEngineAndDistribution const *)
double cballShootNoNegative(double mu, double sigma, double aL, double nL, double aR, double nR, RandomEngineAndDistribution const *)
Definition at line 354 of file HCALResponse.cc.
References debug, alignCSCRings::e, RandomEngineAndDistribution::flatShoot(), i, timingPdfMaker::mean, and x.
355 double x =
random->flatShoot();
379 LogInfo(
"FastCalorimetry") << std::endl
380 <<
" HCALResponse::interMU " << std::endl
381 <<
" x, x1-x2, y1-y2 = "
382 <<
e <<
", " << x1 <<
"-" << x2 <<
" " << y1 <<
"-" << y2 << std::endl;
387 double mean = (y1*(x2-
e) + y2*(
e-x1))/(x2-x1);
391 LogInfo(
"FastCalorimetry") << std::endl
392 <<
" HCALResponse::interMU " << std::endl
393 <<
" e, ie, ieta = " <<
e <<
" " << ie <<
" " << ieta << std::endl
394 <<
" response = " << mean << std::endl;
Definition at line 246 of file HCALResponse.cc.
References funct::abs(), debug, relval_parameters_module::energy, i, and timingPdfMaker::mean.
Referenced by CalorimetryManager::HDShowerSimulation(), and CalorimetryManager::reconstructHCAL().
264 else if(ieta < 0) ieta = 0;
274 if(ie == -1) ie = maxEMe - 2;
281 else if(partype == 1) {
284 int deta = ieta -
HDeta[det];
286 else if(deta < 0 ) deta = 0;
289 for (
int i = 0; i <
maxHDe[det]; i++) {
296 if(ie == -1) ie = maxHDe[det] - 2;
299 if(det==2 && energy <20 && deta>5){
300 for (
int i = 0; i < maxHDe[3]; i++) {
314 else if(partype == 2) {
323 if(ieta < 0) ieta = 0;
325 if(ieta < maxMUeta) {
327 for (
int i = 0; i <
maxMUe; i++) {
334 if(ie == -1) ie = maxMUe - 2;
345 LogInfo(
"FastCalorimetry") << std::endl
346 <<
" HCALResponse::responseHCAL, partype = " << partype
348 <<
" mean = " << mean << std::endl;
double interEM(double e, int ie, int ieta, RandomEngineAndDistribution const *)
Abs< T >::type abs(const T &t)
double interHD(int mip, double e, int ie, int ieta, int det, RandomEngineAndDistribution const *)
double interMU(double e, int ie, int ieta, RandomEngineAndDistribution const *)
int HCALResponse::barrelMUeta |
|
private |
vec1 HCALResponse::corrHF |
|
private |
vec1 HCALResponse::corrHFg |
|
private |
vec1 HCALResponse::corrHFh |
|
private |
vec1 HCALResponse::eGridEM |
|
private |
vec1 HCALResponse::eGridHD[4] |
|
private |
vec1 HCALResponse::eGridMU |
|
private |
int HCALResponse::endcapMUeta |
|
private |
vec1 HCALResponse::energyHF |
|
private |
double HCALResponse::eResponseCoefficient |
|
private |
double HCALResponse::eResponseExponent |
|
private |
double HCALResponse::eResponsePlateau[3] |
|
private |
double HCALResponse::eResponseScale[3] |
|
private |
vec1 HCALResponse::etaGridMU |
|
private |
double HCALResponse::etaStep |
|
private |
int HCALResponse::HDeta[4] |
|
private |
int HCALResponse::maxEMeta |
|
private |
int HCALResponse::maxHDe[4] |
|
private |
int HCALResponse::maxHDetas[3] |
|
private |
int HCALResponse::maxMUbin |
|
private |
int HCALResponse::maxMUeta |
|
private |
vec2 HCALResponse::meanEM |
|
private |
vec3 HCALResponse::mipfraction |
|
private |
double HCALResponse::muStep |
|
private |
vec5 HCALResponse::parameters |
|
private |
std::vector<std::string> HCALResponse::parNames |
|
private |
vec3 HCALResponse::PoissonParameters |
|
private |
double HCALResponse::respFactorEM |
|
private |
vec3 HCALResponse::responseMU |
|
private |
double HCALResponse::RespPar[3][2][3] |
|
private |
vec2 HCALResponse::sigmaEM |
|
private |
bool HCALResponse::usemip |
|
private |