|
|
Go to the documentation of this file.
20 conf.getParameter<
ParameterSet>(
"SSDigitizerAlgorithm")),
21 hitDetectionMode_(conf.getParameter<
ParameterSet>(
"SSDigitizerAlgorithm").getParameter<
int>(
"HitDetectionMode")),
22 pulseShapeParameters_(conf.getParameter<
ParameterSet>(
"SSDigitizerAlgorithm")
23 .getParameter<
std::vector<double> >(
"PulseShapeParameters")),
24 deadTime_(conf.getParameter<
ParameterSet>(
"SSDigitizerAlgorithm").getParameter<double>(
"CBCDeadTime")) {
26 LogDebug(
"SSDigitizerAlgorithm ") <<
"SSDigitizerAlgorithm constructed "
27 <<
"Configuration parameters:"
28 <<
"Threshold/Gain = "
37 std::vector<PSimHit>::const_iterator inputEnd,
38 const size_t inputBeginGlobalIndex,
39 const uint32_t tofBin,
45 size_t simHitGlobalIndex = inputBeginGlobalIndex;
48 std::vector<PSimHit> matchedSimHits;
49 std::copy_if(inputBegin, inputEnd, std::back_inserter(matchedSimHits), [detId](
auto const&
hit) ->
bool {
50 return hit.detUnitId() == detId;
53 for (
auto const&
hit : matchedSimHits) {
54 LogDebug(
"SSDigitizerAlgorithm") <<
hit.particleType() <<
" " <<
hit.pabs() <<
" " <<
hit.energyLoss() <<
" "
55 <<
hit.tof() <<
" " <<
hit.trackId() <<
" " <<
hit.processType() <<
" "
56 <<
hit.detUnitId() <<
hit.entryPoint() <<
" " <<
hit.exitPoint();
58 std::vector<DigitizerUtility::EnergyDepositUnit> ionization_points;
59 std::vector<DigitizerUtility::SignalPoint> collection_points;
61 double signalScale = 1.0;
67 drift(
hit, pixdet, bfield, ionization_points, collection_points);
86 double toa =
hit.tof() - tCorr;
95 double toa =
hit.tof() - tCorr;
99 float theThresholdInE =
109 float toa =
hit.tof() - tCorr;
110 toa -=
hit.eventId().bunchCrossing() *
bx_time;
112 float sampling_time = (-1) * (
hit.eventId().bunchCrossing() + 1) *
bx_time;
115 float theThresholdInE =
118 bool lastPulse =
true;
119 bool aboveThr =
false;
124 if (!lastPulse && aboveThr)
127 lastPulse = aboveThr;
138 constexpr
size_t max_par = 6;
152 for (
int i = 0;
i < nTerms;
i++) {
153 double angularTerm = 0;
154 double temporalTerm = 0;
156 for (
int j = 0;
j <=
i;
j++) {
160 double fi = rTerm * angularTerm * temporalTerm;
185 if (xval < 0.0 || xval * interpolationStep >= len)
const float theThresholdInE_Barrel_
SSDigitizerAlgorithm(const edm::ParameterSet &conf)
const float theTofUpperCut_
static constexpr int interpolationStep
std::vector< double > pulseShapeVec_
double getSignalScale(double xval)
static constexpr size_t interpolationPoints
static constexpr float bx_time
~SSDigitizerAlgorithm() override
Sin< T >::type sin(const T &t)
const float theTofLowerCut_
const Plane & surface() const
The nominal surface of the GeomDet.
void primary_ionization(const PSimHit &hit, std::vector< DigitizerUtility::EnergyDepositUnit > &ionization_points) const
double cbc3PulsePolarExpansion(double x)
Cos< T >::type cos(const T &t)
constexpr int32_t ceil(float num)
const int theAdcFullScale_
void accumulateSimHits(const std::vector< PSimHit >::const_iterator inputBegin, const std::vector< PSimHit >::const_iterator inputEnd, const size_t inputBeginGlobalIndex, const uint32_t tofBin, const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield) override
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
double signalShape(double x)
void induce_signal(const PSimHit &hit, const size_t hitIndex, const uint32_t tofBin, const Phase2TrackerGeomDetUnit *pixdet, const std::vector< DigitizerUtility::SignalPoint > &collection_points)
std::vector< double > pulseShapeParameters_
Geom::Theta< T > theta() const
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
bool select_hit_sampledMode(const PSimHit &hit, double tCorr, double &sigScale)
DetId geographicalId() const
The label of this GeomDet.
T const & get(Event const &event, InputTag const &tag) noexcept(false)
constexpr int16_t xOffset
const float theElectronPerADC_
const float GeVperElectron_
double aScalingConstant(int N, int i)
const float theThresholdInE_Endcap_
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
constexpr uint32_t rawId() const
get the raw id
bool select_hit(const PSimHit &hit, double tCorr, double &sigScale) override
void init(const edm::EventSetup &es) override
bool isAboveThreshold(const DigitizerUtility::SimHitInfo *hitInfo, float charge, float thr) override
static constexpr auto TOB
Power< A, B >::type pow(const A &a, const B &b)
void drift(const PSimHit &hit, const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield, const std::vector< DigitizerUtility::EnergyDepositUnit > &ionization_points, std::vector< DigitizerUtility::SignalPoint > &collection_points) const
const bool addPixelInefficiency_
bool select_hit_latchedMode(const PSimHit &hit, double tCorr, double &sigScale)