4 #include "CLHEP/Units/GlobalSystemOfUnits.h"
16 std::string
fName = fp.fullPath();
19 edm::LogInfo(
"CaloSim") <<
"CaloMeanResponse initialized with scale "
20 << scale <<
" and use Table " <<
useTable
21 <<
" from file " <<
fName;
52 LogDebug(
"CaloSim") <<
"CaloMeanResponse::getWeight PID " << genPID
53 <<
" uses pion list and gets weight " << weight
54 <<
" for momentum " << genP/GeV <<
" GeV/c";
78 LogDebug(
"CaloSim") <<
"CaloMeanResponse::getWeight PID " << genPID
79 <<
" uses proton list and gets weight " << weight
80 <<
" for momentum " << genP/GeV <<
" GeV/c";
84 LogDebug(
"CaloSim") <<
"CaloMeanResponse::getWeight PID " << genPID
85 <<
" is not in either lists and weight " <<
weight;
99 double ene, responseData, responseMC, ratio;
102 infile >> nene >>
npart;
107 for (
int i=0;
i<nene;
i++) {
108 infile >> ene >> responseData >> responseMC;
109 if (responseMC > 0) ratio = responseData/responseMC;
116 infile >> nene >>
npart;
121 for (
int i=0;
i<nene;
i++) {
122 infile >> ene >> responseData >> responseMC;
123 if (responseMC > 0) ratio = responseData/responseMC;
134 LogDebug(
"CaloSim") <<
"CaloMeanResponse::readResponse finds "
135 <<
pionTypes.size() <<
" particles to use pion response"
136 <<
" map with a table of " <<
pionTable.size()
137 <<
" data points " <<
piLast;
143 LogDebug(
"CaloSim") <<
"CaloMeanResponse::readResponse finds "
144 <<
protonTypes.size() <<
" particles to use proton "
145 <<
"response map with a table of " <<
protonTable.size()
146 <<
" data points " <<
pLast;
T getParameter(std::string const &) const
void readResponse(std::string fName)
std::vector< int > protonTypes
virtual ~CaloMeanResponse()
double getWeight(int genPID, double genP)
std::vector< double > protonMomentum
std::vector< double > pionTable
std::vector< int > pionTypes
CaloMeanResponse(edm::ParameterSet const &p)
std::vector< double > protonTable
std::vector< double > pionMomentum