#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(), debug, edm::ParameterSet::getParameter(), HCAL, i, j, gen::k, m, 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 543 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
int HCALResponse::getDet |
( |
int |
ieta | ) |
|
|
private |
Definition at line 496 of file HCALResponse.cc.
References trackerHits::c, create_public_lumi_plots::exp, HCAL, hcforward, fff_deleter::log, n, AlCaHLTBitMon_ParallelJobs::p, dtDQMClient_cfg::resolution, alignCSCRings::s, mathSSE::sqrt(), and VFCAL.
Referenced by CalorimetryManager::HDShowerSimulation(), and CalorimetryManager::reconstructHCAL().
503 double response =
e * p / (1+c*
exp(n *
log(s/
e)));
505 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 458 of file HCALResponse.cc.
References debug, alignCSCRings::e, and timingPdfMaker::mean.
459 double y1 =
meanEM[ie][ieta];
460 double y2 =
meanEM[ie+1][ieta];
466 LogInfo(
"FastCalorimetry") << std::endl
467 <<
" HCALResponse::interEM mean " << std::endl
468 <<
" x, x1-x2, y1-y2 = "
469 <<
e <<
", " << x1 <<
"-" << x2 <<
" " << y1 <<
"-" << y2 << std::endl;
473 double mean = (y1*(x2-
e) + y2*(
e-x1))/(x2-x1);
480 LogInfo(
"FastCalorimetry") << std::endl
481 <<
" HCALResponse::interEM sigma" << std::endl
482 <<
" x, x1-x2, y1-y2 = "
483 <<
e <<
", " << x1 <<
"-" << x2 <<
" " << y1 <<
"-" << y2 << std::endl;
487 double sigma = (y1*(x2-
e) + y2*(
e-x1))/(x2-x1);
double gaussShootNoNegative(double e, double sigma, RandomEngineAndDistribution const *)
Definition at line 390 of file HCALResponse.cc.
References alignCSCRings::e, RandomEngineAndDistribution::flatShoot(), timingPdfMaker::mean, AlCaHLTBitMon_ParallelJobs::p, Parameters::parameters, RandomEngineAndDistribution::poissonShoot(), and tmp.
397 if (det==2 && ieta>5 &&
e<20){
401 for(
int p = 0;
p < 4;
p++){
404 if(
e>5)pars[
p] = (y1*(x2-
e) + y2*(
e-x1))/(x2-x1);
422 bool use_custom =
false;
426 if((
p==0 ||
p==1) &&
e < x1){
427 double tmp = (y1*x2-y2*x1)/(x2-x1);
434 else if((
p==2 ||
p==3 ||
p==4 ||
p==5)){
435 if(
e < x1 && y1 < y2){
439 else if(
e > x2 && y2 < y1){
446 if(use_custom) pars[
p] = custom;
447 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 344 of file HCALResponse.cc.
References debug, alignCSCRings::e, RandomEngineAndDistribution::flatShoot(), i, timingPdfMaker::mean, and x.
345 double x =
random->flatShoot();
369 LogInfo(
"FastCalorimetry") << std::endl
370 <<
" HCALResponse::interMU " << std::endl
371 <<
" x, x1-x2, y1-y2 = "
372 <<
e <<
", " << x1 <<
"-" << x2 <<
" " << y1 <<
"-" << y2 << std::endl;
377 double mean = (y1*(x2-
e) + y2*(
e-x1))/(x2-x1);
381 LogInfo(
"FastCalorimetry") << std::endl
382 <<
" HCALResponse::interMU " << std::endl
383 <<
" e, ie, ieta = " <<
e <<
" " << ie <<
" " << ieta << std::endl
384 <<
" response = " << mean << std::endl;
Definition at line 238 of file HCALResponse.cc.
References funct::abs(), debug, relval_parameters_module::energy, i, and timingPdfMaker::mean.
Referenced by CalorimetryManager::HDShowerSimulation(), and CalorimetryManager::reconstructHCAL().
254 else if(ieta < 0) ieta = 0;
264 if(ie == -1) ie = maxEMe - 2;
271 else if(partype == 1) {
274 int deta = ieta -
HDeta[det];
276 else if(deta < 0 ) deta = 0;
279 for (
int i = 0; i <
maxHDe[det]; i++) {
286 if(ie == -1) ie = maxHDe[det] - 2;
289 if(det==2 && energy <20 && deta>5){
290 for (
int i = 0; i < maxHDe[3]; i++) {
304 else if(partype == 2) {
313 if(ieta < 0) ieta = 0;
315 if(ieta < maxMUeta) {
317 for (
int i = 0; i <
maxMUe; i++) {
324 if(ie == -1) ie = maxMUe - 2;
335 LogInfo(
"FastCalorimetry") << std::endl
336 <<
" HCALResponse::responseHCAL, partype = " << partype
338 <<
" 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::eGridEM |
|
private |
vec1 HCALResponse::eGridHD[3] |
|
private |
vec1 HCALResponse::eGridMU |
|
private |
int HCALResponse::endcapMUeta |
|
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 |