8 ignoreSiPMarea_(
false),
9 overrideSiPMarea_(
false),
10 ignoreTileArea_(
false),
11 ignoreDoseScale_(
false),
12 ignoreFluenceScale_(
false),
61 std::unordered_map<int, float>
result;
69 throw cms::Exception(
"FileNotFound") <<
"Unable to open '" << fullpath <<
"'" << std::endl;
72 while (getline(
infile, line)) {
77 std::stringstream linestream(line);
78 linestream >> layer >> boundary;
80 result[
layer] = boundary;
97 double lyScaleFactor(1.
f);
102 constexpr
double expofactor = 1. / 199.6;
103 const double dosespower = 0.65;
117 constexpr
double fluencefactor = 2. / (2 * 1e13);
118 noise *=
sqrt(cellFluence * fluencefactor);
125 constexpr
double refFluence(2.0E+13);
126 constexpr
double refGain(235000.);
129 Rdark *= (cellFluence / refFluence);
130 noise = 3.16 *
sqrt(Rdark);
136 std::pair<double, HGCalSciNoiseMap::GainRange_t> sipm =
scaleBySipmArea(cellId, radius, gainPreChoice);
137 double sipmAreaSF = sipm.first;
140 lyScaleFactor *= tileAreaSF * sipmAreaSF;
141 noise *=
sqrt(sipmAreaSF);
151 sipmChar.
lySF = lyScaleFactor;
153 sipmChar.
gain = gain;
168 if (cellId.
type() == 0) {
169 constexpr
double factor = 2 *
M_PI * 1. / 360.;
170 edge = radius * factor;
172 constexpr
double factor = 2 *
M_PI * 1. / 288.;
173 edge = radius * factor;
185 if (gainPreChoice == HGCalSciNoiseMap::GainRange_t::AUTO)
186 gain = GainRange_t::GAIN_2;
191 return std::pair<double, HGCalSciNoiseMap::GainRange_t>(
scaleFactor, gain);
198 if (gainPreChoice == HGCalSciNoiseMap::GainRange_t::AUTO)
199 gain = GainRange_t::GAIN_4;
204 int sipm = cellId.
sipm();
207 if (gainPreChoice == HGCalSciNoiseMap::GainRange_t::AUTO)
208 gain = GainRange_t::GAIN_4;
212 return std::pair<double, HGCalSciNoiseMap::GainRange_t>(
scaleFactor, gain);
std::unordered_map< int, float > readSipmPars(const std::string &)
parses the radius boundaries for the SiPM area assignment from a custom file
double getDoseValue(const int, const int, const double, bool logVal=false)
double scaleByTileArea(const HGCScintillatorDetId &, const double)
returns the signal scaling and the noise
void setSipmMap(const std::string &)
std::array< double, GAINRANGE_N > fscADCPerGain_
int type() const
get/set the type
Exp< T >::type exp(const T &t)
constexpr std::array< uint8_t, layerIndexSize > layer
std::unordered_map< int, float > sipmMap_
std::array< double, GAINRANGE_N > lsbPerGain_
int sipm() const
get/set the sipm size
void setReferenceDarkCurrent(double idark)
double getFluenceValue(const int, const int, const double, bool logVal=false)
std::pair< double, GainRange_t > scaleBySipmArea(const HGCScintillatorDetId &, const double, const GainRange_t &)
void setDoseMap(const std::string &, const unsigned int)
std::array< double, TILETYPE_N > nPEperMIP_
void setDoseMap(const std::string &, const unsigned int)
void setNpePerMIP(float npePerMIP)
int layer() const
get the layer #
SiPMonTileCharacteristics scaleByDose(const HGCScintillatorDetId &, const double, const int aimMIPtoADC=15, const GainRange_t gainPreChoice=GainRange_t::AUTO)
std::string fullPath() const
const doseParametersMap & getDoseMap()
Power< A, B >::type pow(const A &a, const B &b)