19 double nFactorial(
int n);
20 double aScalingConstant(
int N,
int i);
23 double nFactorial(
int n) {
return std::tgamma(
n + 1); }
24 double aScalingConstant(
int N,
int i) {
25 return std::pow(-1, (
double)
i) * nFactorial(
N) * nFactorial(
N + 2) /
26 (nFactorial(
N -
i) * nFactorial(
N + 2 -
i) * nFactorial(
i));
31 if (use_LorentzAngle_DB_)
32 siPhase2OTLorentzAngle_ = &es.
getData(siPhase2OTLorentzAngleToken_);
34 if (use_deadmodule_DB_)
35 badChannelPayload_ = &es.
getData(badChannelToken_);
37 geom_ = &es.
getData(geomToken_);
44 hitDetectionMode_(conf.getParameter<
ParameterSet>(
"SSDigitizerAlgorithm").getParameter<
int>(
"HitDetectionMode")),
45 pulseShapeParameters_(conf.getParameter<
ParameterSet>(
"SSDigitizerAlgorithm")
46 .getParameter<
std::
vector<double> >(
"PulseShapeParameters")),
47 deadTime_(conf.getParameter<
ParameterSet>(
"SSDigitizerAlgorithm").getParameter<double>(
"CBCDeadTime")),
54 .getUntrackedParameter<std::string>(
"BadChannelLabel",
"");
59 LogDebug(
"SSDigitizerAlgorithm ") <<
"SSDigitizerAlgorithm constructed " 60 <<
"Configuration parameters:" 61 <<
"Threshold/Gain = " 79 double toa =
hit.tof() - tCorr;
88 double toa =
hit.tof() - tCorr;
92 float theThresholdInE =
102 float toa =
hit.tof() - tCorr;
103 toa -=
hit.eventId().bunchCrossing() *
bx_time;
105 float sampling_time = (-1) * (
hit.eventId().bunchCrossing() + 1) *
bx_time;
108 float theThresholdInE =
111 bool lastPulse =
true;
112 bool aboveThr =
false;
117 if (!lastPulse && aboveThr)
120 lastPulse = aboveThr;
125 constexpr
size_t max_par = 6;
135 double xx =
x - xOffset;
139 for (
int i = 0;
i < nTerms;
i++) {
140 double angularTerm = 0;
141 double temporalTerm = 0;
143 for (
int j = 0;
j <=
i;
j++) {
147 double fi = rTerm * angularTerm * temporalTerm;
158 double xx =
x - xOffset;
172 if (xval < 0.0 || xval * interpolationStep >= len)
204 for (std::vector<unsigned int>::const_iterator badChannel =
range.first; badChannel !=
range.second; ++badChannel) {
209 for (
auto&
s : theSignal) {
210 auto& channel =
s.first;
211 if (channel == firstStrip +
index)
bool select_hit_latchedMode(const PSimHit &hit, double tCorr, double &sigScale) const
double signalShape(double x) const
constexpr int32_t ceil(float num)
T getParameter(std::string const &) const
const float theElectronPerADC_
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
for(int i=first, nt=offsets[nh];i< nt;i+=gridDim.x *blockDim.x)
Sin< T >::type sin(const T &t)
bool select_hit_sampledMode(const PSimHit &hit, double tCorr, double &sigScale) const
double getSignalScale(double xval) const
const float theThresholdInE_Endcap_
const Range getRange(const uint32_t detID) const
std::map< int, digitizerUtility::Ph2Amplitude, std::less< int > > signal_map_type
const bool use_LorentzAngle_DB_
static constexpr size_t interpolationPoints
~SSDigitizerAlgorithm() override
SSDigitizerAlgorithm(const edm::ParameterSet &conf, edm::ConsumesCollector iC)
const bool use_deadmodule_DB_
bool isAboveThreshold(const digitizerUtility::SimHitInfo *hitInfo, float charge, float thr) const override
const bool addPixelInefficiency_
Cos< T >::type cos(const T &t)
const float theThresholdInE_Barrel_
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
static constexpr auto TOB
std::vector< double > pulseShapeVec_
DetId geographicalId() const
The label of this GeomDet.
void init(const edm::EventSetup &es) override
const float theTofLowerCut_
unsigned short firstStrip
std::vector< double > pulseShapeParameters_
double cbc3PulsePolarExpansion(double x) const
bool select_hit(const PSimHit &hit, double tCorr, double &sigScale) const override
constexpr uint32_t rawId() const
get the raw id
static constexpr float bx_time
void module_killing_DB(const Phase2TrackerGeomDetUnit *pixdet) override
edm::ESGetToken< SiStripBadStrip, SiPhase2OuterTrackerBadStripRcd > badChannelToken_
data decodePhase2(const unsigned int &value) const
std::pair< ContainerIterator, ContainerIterator > Range
const SiStripBadStrip * badChannelPayload_
const int theAdcFullScale_
const float GeVperElectron_
Geom::Theta< T > theta() const
Power< A, B >::type pow(const A &a, const B &b)
const float theTofUpperCut_
edm::ESGetToken< SiPhase2OuterTrackerLorentzAngle, SiPhase2OuterTrackerLorentzAngleSimRcd > siPhase2OTLorentzAngleToken_
static constexpr int interpolationStep