17 double nFactorial(
int n);
18 double aScalingConstant(
int N,
int i);
21 double nFactorial(
int n) {
return std::tgamma(n + 1); }
22 double aScalingConstant(
int N,
int i) {
23 return std::pow(-1, (
double)i) * nFactorial(N) * nFactorial(N + 2) /
24 (nFactorial(N - i) * nFactorial(N + 2 - i) * nFactorial(i));
29 if (use_LorentzAngle_DB_) {
30 siPhase2OTLorentzAngle_ = &es.
getData(siPhase2OTLorentzAngleToken_);
33 geom_ = &es.
getData(geomToken_);
40 hitDetectionMode_(conf.getParameter<
ParameterSet>(
"SSDigitizerAlgorithm").getParameter<int>(
"HitDetectionMode")),
41 pulseShapeParameters_(conf.getParameter<
ParameterSet>(
"SSDigitizerAlgorithm")
42 .getParameter<std::
vector<double> >(
"PulseShapeParameters")),
43 deadTime_(conf.getParameter<
ParameterSet>(
"SSDigitizerAlgorithm").getParameter<double>(
"CBCDeadTime")),
48 LogDebug(
"SSDigitizerAlgorithm ") <<
"SSDigitizerAlgorithm constructed "
49 <<
"Configuration parameters:"
50 <<
"Threshold/Gain = "
68 double toa = hit.
tof() - tCorr;
77 double toa = hit.
tof() - tCorr;
81 float theThresholdInE =
91 float toa = hit.
tof() - tCorr;
97 float theThresholdInE =
100 bool lastPulse =
true;
101 bool aboveThr =
false;
106 if (!lastPulse && aboveThr)
109 lastPulse = aboveThr;
114 constexpr
size_t max_par = 6;
128 for (
int i = 0;
i < nTerms;
i++) {
129 double angularTerm = 0;
130 double temporalTerm = 0;
132 for (
int j = 0;
j <=
i;
j++) {
134 temporalTerm += ::aScalingConstant(
i, j) *
std::pow(xx, (
double)(
i - j)) *
std::pow(tau, (
double)j);
136 double fi = rTerm * angularTerm * temporalTerm;
161 if (xval < 0.0 || xval * interpolationStep >= len)
181 return (charge >= thr);
constexpr int32_t ceil(float num)
float tof() const
deprecated name for timeOfFlight()
const float theElectronPerADC_
Sin< T >::type sin(const T &t)
Geom::Theta< T > theta() const
const float theThresholdInE_Endcap_
Exp< T >::type exp(const T &t)
const bool use_LorentzAngle_DB_
static constexpr size_t interpolationPoints
~SSDigitizerAlgorithm() override
SSDigitizerAlgorithm(const edm::ParameterSet &conf, edm::ConsumesCollector iC)
bool getData(T &iHolder) const
double signalShape(double x) const
const bool addPixelInefficiency_
int bunchCrossing() const
get the detector field from this detid
Cos< T >::type cos(const T &t)
bool isAboveThreshold(const DigitizerUtility::SimHitInfo *hitInfo, float charge, float thr) const override
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
const float theThresholdInE_Barrel_
EncodedEventId eventId() const
static constexpr auto TOB
std::vector< double > pulseShapeVec_
void init(const edm::EventSetup &es) override
double getSignalScale(double xval) const
const float theTofLowerCut_
constexpr int16_t xOffset
std::vector< double > pulseShapeParameters_
bool select_hit(const PSimHit &hit, double tCorr, double &sigScale) const override
bool select_hit_latchedMode(const PSimHit &hit, double tCorr, double &sigScale) const
static constexpr float bx_time
double cbc3PulsePolarExpansion(double x) const
float energyLoss() const
The energy deposit in the PSimHit, in ???.
bool select_hit_sampledMode(const PSimHit &hit, double tCorr, double &sigScale) const
const int theAdcFullScale_
const float GeVperElectron_
Power< A, B >::type pow(const A &a, const B &b)
const float theTofUpperCut_
edm::ESGetToken< SiPhase2OuterTrackerLorentzAngle, SiPhase2OuterTrackerLorentzAngleSimRcd > siPhase2OTLorentzAngleToken_
static constexpr int interpolationStep
unsigned int detUnitId() const