10 #include "CLHEP/Random/RandGaussQ.h"
38 using namespace sipixelobjects;
40 namespace ph2tkdigialgo {
52 makeDigiSimLinks_(conf_common.getUntrackedParameter<bool>(
"makeDigiSimLinks",
true)),
53 use_ineff_from_db_(conf_specific.getParameter<bool>(
"Inefficiency_DB")),
54 use_module_killing_(conf_specific.getParameter<bool>(
"KillModules")),
55 use_deadmodule_DB_(conf_specific.getParameter<bool>(
"DeadModules_DB")),
57 use_LorentzAngle_DB_(conf_specific.getParameter<bool>(
"LorentzAngle_DB")),
60 deadModules_(use_deadmodule_DB_ ?
Parameters() : conf_specific.getParameter<
Parameters>(
"DeadModules")),
64 GeVperElectron_(3.61E-09),
65 alpha2Order_(conf_specific.getParameter<bool>(
"Alpha2Order")),
66 addXtalk_(conf_specific.getParameter<bool>(
"AddXTalk")),
68 interstripCoupling_(conf_specific.getParameter<double>(
"InterstripCoupling")),
70 Sigma0_(conf_specific.getParameter<double>(
"SigmaZero")),
71 SigmaCoeff_(conf_specific.getParameter<double>(
"SigmaCoeff")),
77 clusterWidth_(conf_specific.getParameter<double>(
"ClusterWidth")),
83 thePhase2ReadoutMode_(conf_specific.getParameter<int>(
"Phase2ReadoutMode")),
90 theElectronPerADC_(conf_specific.getParameter<double>(
"ElectronPerAdc")),
93 theAdcFullScale_(conf_specific.getParameter<int>(
"AdcFullScale")),
97 theNoiseInElectrons_(conf_specific.getParameter<double>(
"NoiseInElectrons")),
100 theReadoutNoise_(conf_specific.getParameter<double>(
"ReadoutNoiseInElec")),
105 theThresholdInE_Endcap_(conf_specific.getParameter<double>(
"ThresholdInElectrons_Endcap")),
106 theThresholdInE_Barrel_(conf_specific.getParameter<double>(
"ThresholdInElectrons_Barrel")),
109 theThresholdSmearing_Endcap_(conf_specific.getParameter<double>(
"ThresholdSmearing_Endcap")),
110 theThresholdSmearing_Barrel_(conf_specific.getParameter<double>(
"ThresholdSmearing_Barrel")),
113 theHIPThresholdInE_Endcap_(conf_specific.getParameter<double>(
"HIPThresholdInElectrons_Endcap")),
114 theHIPThresholdInE_Barrel_(conf_specific.getParameter<double>(
"HIPThresholdInElectrons_Barrel")),
117 theTofLowerCut_(conf_specific.getParameter<double>(
"TofLowerCut")),
118 theTofUpperCut_(conf_specific.getParameter<double>(
"TofUpperCut")),
121 tanLorentzAnglePerTesla_Endcap_(
122 use_LorentzAngle_DB_ ? 0.0 : conf_specific.getParameter<double>(
"TanLorentzAnglePerTesla_Endcap")),
123 tanLorentzAnglePerTesla_Barrel_(
124 use_LorentzAngle_DB_ ? 0.0 : conf_specific.getParameter<double>(
"TanLorentzAnglePerTesla_Barrel")),
127 addNoise_(conf_specific.getParameter<bool>(
"AddNoise")),
130 addNoisyPixels_(conf_specific.getParameter<bool>(
"AddNoisyPixels")),
133 fluctuateCharge_(conf_specific.getUntrackedParameter<bool>(
"FluctuateCharge",
true)),
136 addPixelInefficiency_(conf_specific.getParameter<bool>(
"AddInefficiency")),
139 addThresholdSmearing_(conf_specific.getParameter<bool>(
"AddThresholdSmearing")),
142 pseudoRadDamage_(conf_specific.exists(
"PseudoRadDamage") ? conf_specific.getParameter<double>(
"PseudoRadDamage")
144 pseudoRadDamageRadius_(conf_specific.exists(
"PseudoRadDamageRadius")
145 ? conf_specific.getParameter<double>(
"PseudoRadDamageRadius")
151 tMax_(conf_common.getParameter<double>(
"DeltaProductionCut")),
153 badPixels_(conf_specific.getParameter<
Parameters>(
"CellsToKill")),
157 theSiPixelGainCalibrationService_(
159 subdetEfficiencies_(conf_specific) {
160 LogDebug(
"Phase2TrackerDigitizerAlgorithm")
161 <<
"Phase2TrackerDigitizerAlgorithm constructed\n"
162 <<
"Configuration parameters:\n"
163 <<
"Threshold/Gain = "
166 <<
" ADC Scale (in bits) " <<
theAdcFullScale_ <<
" The delta cut-off is set to " <<
tMax_ <<
" pix-inefficiency "
171 LogDebug(
"Phase2TrackerDigitizerAlgorithm") <<
"Phase2TrackerDigitizerAlgorithm deleted";
179 std::vector<PSimHit>::const_iterator inputEnd,
180 const size_t inputBeginGlobalIndex,
181 const uint32_t tofBin,
187 size_t simHitGlobalIndex = inputBeginGlobalIndex;
190 std::vector<PSimHit> matchedSimHits;
191 std::copy_if(inputBegin, inputEnd, std::back_inserter(matchedSimHits), [detId](
auto const&
hit) ->
bool {
192 return hit.detUnitId() == detId;
195 for (
auto const&
hit : matchedSimHits) {
196 LogDebug(
"Phase2DigitizerAlgorithm") <<
hit.particleType() <<
" " <<
hit.pabs() <<
" " <<
hit.energyLoss() <<
" "
197 <<
hit.tof() <<
" " <<
hit.trackId() <<
" " <<
hit.processType() <<
" "
198 <<
hit.detUnitId() <<
hit.entryPoint() <<
" " <<
hit.exitPoint();
199 double signalScale = 1.0;
205 const auto& collection_points =
drift(
hit, pixdet, bfield, ionization_points);
223 constexpr
float SegmentLength = 0.0010;
228 float length = direction.
mag();
230 int NumberOfSegments =
static_cast<int>(length / SegmentLength);
231 if (NumberOfSegments < 1)
232 NumberOfSegments = 1;
233 LogDebug(
"Phase2TrackerDigitizerAlgorithm")
234 <<
"enter primary_ionzation " << NumberOfSegments <<
" shift = " << hit.
exitPoint().
x() - hit.
entryPoint().
x()
238 std::vector<float> elossVector;
239 elossVector.reserve(NumberOfSegments);
244 float averageEloss = eLoss / NumberOfSegments;
245 elossVector.resize(NumberOfSegments, averageEloss);
248 std::vector<DigitizerUtility::EnergyDepositUnit> ionization_points;
249 ionization_points.reserve(NumberOfSegments);
251 for (
size_t i = 0;
i < elossVector.size(); ++
i) {
257 ionization_points.push_back(edu);
258 LogDebug(
"Phase2TrackerDigitizerAlgorithm")
259 <<
i <<
" " << edu.
x() <<
" " << edu.
y() <<
" " << edu.
z() <<
" " << edu.
energy();
261 return ionization_points;
270 int pid,
float particleMomentum,
float eloss,
float length,
int NumberOfSegs)
const {
280 else if (pid == 2212)
284 float segmentLength = length / NumberOfSegs;
288 double segmentEloss = (1000. * eloss) / NumberOfSegs;
289 std::vector<float> elossVector;
290 elossVector.reserve(NumberOfSegs);
291 for (
int i = 0;
i < NumberOfSegs; ++
i) {
295 double deltaCutoff =
tMax_;
296 float de =
fluctuate_->SampleFluctuations(particleMomentum * 1000.,
303 elossVector.push_back(de);
308 float ratio = eloss / sum;
314 float averageEloss = eloss / NumberOfSegs;
315 elossVector.resize(NumberOfSegs, averageEloss);
330 const std::vector<DigitizerUtility::EnergyDepositUnit>& ionization_points)
const {
331 LogDebug(
"Phase2TrackerDigitizerAlgorithm") <<
"enter drift ";
333 std::vector<DigitizerUtility::SignalPoint> collection_points;
334 collection_points.reserve(ionization_points.size());
336 if (driftDir.
z() == 0.) {
337 LogWarning(
"Phase2TrackerDigitizerAlgorithm") <<
" pxlx: drift in z is zero ";
338 return collection_points;
341 float TanLorenzAngleX = driftDir.
x();
342 float TanLorenzAngleY = 0.;
343 float dir_z = driftDir.
z();
345 float CosLorenzAngleY = 1.;
347 TanLorenzAngleY = driftDir.
y();
354 LogDebug(
"Phase2TrackerDigitizerAlgorithm")
355 <<
" Lorentz Tan " << TanLorenzAngleX <<
" " << TanLorenzAngleY <<
" " << CosLorenzAngleX <<
" "
356 << CosLorenzAngleY <<
" " << moduleThickness * TanLorenzAngleX <<
" " << driftDir;
358 for (
auto const&
val : ionization_points) {
360 float SegX =
val.x(), SegY =
val.y(), SegZ =
val.z();
367 float driftDistance = moduleThickness / 2. - (dir_z * SegZ);
369 if (driftDistance < 0.)
371 else if (driftDistance > moduleThickness)
372 driftDistance = moduleThickness;
375 float XDriftDueToMagField = driftDistance * TanLorenzAngleX;
376 float YDriftDueToMagField = driftDistance * TanLorenzAngleY;
379 float CloudCenterX = SegX + XDriftDueToMagField;
380 float CloudCenterY = SegY + YDriftDueToMagField;
389 float Sigma =
std::sqrt(driftLength / moduleThickness) *
Sigma0_ * moduleThickness / 0.0300;
396 float Sigma_x = Sigma / CosLorenzAngleX;
397 float Sigma_y = Sigma / CosLorenzAngleY;
400 float energyOnCollector =
val.energy();
407 energyOnCollector *=
exp(-1 * kValue * driftDistance / moduleThickness);
410 LogDebug(
"Phase2TrackerDigitizerAlgorithm")
411 <<
"Dift DistanceZ = " << driftDistance <<
" module thickness = " << moduleThickness
412 <<
" Start Energy = " <<
val.energy() <<
" Energy after loss= " << energyOnCollector;
416 collection_points.push_back(sp);
418 return collection_points;
426 const size_t hitIndex,
427 const uint32_t tofBin,
429 const std::vector<DigitizerUtility::SignalPoint>& collection_points) {
436 LogDebug(
"Phase2TrackerDigitizerAlgorithm")
437 <<
" enter induce_signal, " << topol->
pitch().first <<
" " << topol->
pitch().second;
440 using hit_map_type = std::map<int, float, std::less<int> >;
441 hit_map_type hit_signal;
445 for (
auto const&
v : collection_points) {
446 float CloudCenterX =
v.position().x();
447 float CloudCenterY =
v.position().y();
448 float SigmaX =
v.sigma_x();
449 float SigmaY =
v.sigma_y();
452 LogDebug(
"Phase2TrackerDigitizerAlgorithm") <<
" cloud " <<
v.position().x() <<
" " <<
v.position().y() <<
" "
453 <<
v.sigma_x() <<
" " <<
v.sigma_y() <<
" " <<
v.amplitude();
474 int IPixRightUpX =
static_cast<int>(std::floor(mp.
x()));
475 int IPixRightUpY =
static_cast<int>(std::floor(mp.
y()));
476 LogDebug(
"Phase2TrackerDigitizerAlgorithm")
477 <<
" right-up " << PointRightUp <<
" " << mp.
x() <<
" " << mp.
y() <<
" " << IPixRightUpX <<
" " << IPixRightUpY;
480 int IPixLeftDownX =
static_cast<int>(std::floor(mp.
x()));
481 int IPixLeftDownY =
static_cast<int>(std::floor(mp.
y()));
482 LogDebug(
"Phase2TrackerDigitizerAlgorithm") <<
" left-down " << PointLeftDown <<
" " << mp.
x() <<
" " << mp.
y()
483 <<
" " << IPixLeftDownX <<
" " << IPixLeftDownY;
487 int numRows = topol->
nrows();
489 IPixRightUpX = numRows > IPixRightUpX ? IPixRightUpX : numRows - 1;
490 IPixRightUpY = numColumns > IPixRightUpY ? IPixRightUpY : numColumns - 1;
491 IPixLeftDownX = 0 < IPixLeftDownX ? IPixLeftDownX : 0;
492 IPixLeftDownY = 0 < IPixLeftDownY ? IPixLeftDownY : 0;
496 for (
int ix = IPixLeftDownX; ix <= IPixRightUpX; ++ix) {
497 float xLB, LowerBound;
500 if (ix == 0 || SigmaX == 0.) {
505 LowerBound = 1 -
calcQ((xLB - CloudCenterX) / SigmaX);
508 float xUB, UpperBound;
509 if (ix == numRows - 1 || SigmaX == 0.) {
514 UpperBound = 1. -
calcQ((xUB - CloudCenterX) / SigmaX);
516 float TotalIntegrationRange = UpperBound - LowerBound;
517 x.emplace(ix, TotalIntegrationRange);
522 for (
int iy = IPixLeftDownY; iy <= IPixRightUpY; ++iy) {
523 float yLB, LowerBound;
524 if (iy == 0 || SigmaY == 0.) {
529 LowerBound = 1. -
calcQ((yLB - CloudCenterY) / SigmaY);
532 float yUB, UpperBound;
533 if (iy == numColumns - 1 || SigmaY == 0.) {
538 UpperBound = 1. -
calcQ((yUB - CloudCenterY) / SigmaY);
541 float TotalIntegrationRange = UpperBound - LowerBound;
542 y.emplace(iy, TotalIntegrationRange);
546 for (
int ix = IPixLeftDownX; ix <= IPixRightUpX; ++ix) {
547 for (
int iy = IPixLeftDownY; iy <= IPixRightUpY; ++iy) {
548 float ChargeFraction = Charge * x[ix] * y[iy];
550 if (ChargeFraction > 0.) {
554 hit_signal[chanFired] += ChargeFraction;
561 LogDebug(
"Phase2TrackerDigitizerAlgorithm")
562 <<
" pixel " << ix <<
" " << iy <<
" - "
563 <<
" " << chanFired <<
" " << ChargeFraction <<
" " << mp.
x() <<
" " << mp.
y() <<
" " << lp.
x() <<
" "
571 for (
auto const& hit_s : hit_signal) {
572 int chan = hit_s.first;
575 : DigitizerUtility::Amplitude(hit_s.second,
nullptr, hit_s.second));
586 for (
auto&
s : theSignal) {
588 if ((
s.second.ampl() +
noise) < 0.)
604 int numRows = topol->
nrows();
606 for (
auto&
s : theSignal) {
607 float signalInElectrons =
s.second.ampl();
609 std::pair<int, int> hitChan;
617 s.second.set(signalInElectrons - signalInElectrons_Xtalk);
619 if (hitChan.first != 0) {
620 auto XtalkPrev = std::make_pair(hitChan.first - 1, hitChan.second);
625 if (hitChan.first < numRows - 1) {
626 auto XtalkNext = std::make_pair(hitChan.first + 1, hitChan.second);
632 for (
auto const&
l : signalNew) {
634 auto iter = theSignal.find(chan);
635 if (iter != theSignal.end()) {
636 theSignal[
chan] +=
l.second.ampl();
654 int numRows = topol->
nrows();
656 int numberOfPixels = numRows * numColumns;
657 std::map<int, float, std::less<int> > otherPixels;
665 LogDebug(
"Phase2TrackerDigitizerAlgorithm")
668 << otherPixels.size();
671 for (
auto const& el : otherPixels) {
672 int iy = el.first / numRows;
673 if (iy < 0 || iy > numColumns - 1)
674 LogWarning(
"Phase2TrackerDigitizerAlgorithm") <<
" error in iy " << iy;
676 int ix = el.first - iy * numRows;
677 if (ix < 0 || ix > numRows - 1)
678 LogWarning(
"Phase2TrackerDigitizerAlgorithm") <<
" error in ix " << ix;
682 LogDebug(
"Phase2TrackerDigitizerAlgorithm")
683 <<
" Storing noise = " << el.first <<
" " << el.second <<
" " << ix <<
" " << iy <<
" " <<
chan;
685 if (theSignal[chan] == 0)
700 float subdetEfficiency = 1.0;
705 uint32_t layerIndex = tTopo->
pxbLayer(detID);
709 uint32_t diskIndex = 2 * tTopo->
pxfDisk(detID) - tTopo->
pxfSide(detID);
714 LogDebug(
"Phase2TrackerDigitizerAlgorithm") <<
" enter pixel_inefficiency " << subdetEfficiency;
718 for (
auto&
s : theSignal) {
720 if (rand > subdetEfficiency) {
751 const DetId& detId)
const {
769 float alpha2 =
std::pow(lorentzAngle, 2);
771 dir_x = -(lorentzAngle * Bfield.y() + alpha2 * Bfield.z() * Bfield.x());
772 dir_y = +(lorentzAngle * Bfield.x() - alpha2 * Bfield.z() * Bfield.y());
773 dir_z = -(1 + alpha2 *
std::pow(Bfield.z(), 2));
774 scale = (1 + alpha2 *
std::pow(Bfield.z(), 2));
777 float alpha2_Endcap = 0.0;
778 float alpha2_Barrel = 0.0;
787 dir_z = -(1 + alpha2_Barrel *
std::pow(Bfield.z(), 2));
788 scale = (1 + alpha2_Barrel *
std::pow(Bfield.z(), 2));
793 dir_z = -(1 + alpha2_Endcap *
std::pow(Bfield.z(), 2));
794 scale = (1 + alpha2_Endcap *
std::pow(Bfield.z(), 2));
799 LogDebug(
"Phase2TrackerDigitizerAlgorithm") <<
" The drift direction in local coordinate is " << theDriftDirection;
800 return theDriftDirection;
809 for (
auto&
s : theSignal) {
810 std::pair<int, int> ip;
831 int Dead_detID = det_m.getParameter<
int>(
"Dead_detID");
832 Module = det_m.getParameter<
std::string>(
"Module");
833 if (detid == Dead_detID) {
843 for (
auto&
s : theSignal) {
844 std::pair<int, int> ip;
850 if (Module ==
"whole" || (Module ==
"tbmA" && ip.first >= 80 && ip.first <= 159) ||
851 (Module ==
"tbmB" && ip.first <= 79))
865 for (
size_t id = 0;
id < disabledModules.size();
id++) {
866 if (detID == disabledModules[
id].DetID) {
868 badmodule = disabledModules[
id];
878 for (
auto&
s : theSignal)
883 std::vector<GlobalPixel> badrocpositions;
884 for (
size_t j = 0; j < static_cast<size_t>(ncol);
j++) {
887 for (
auto const&
p : path) {
892 badrocpositions.push_back(global);
899 for (
auto&
s : theSignal) {
900 std::pair<int, int> ip;
906 for (
auto const&
p : badrocpositions) {
908 if (
p.row ==
k.getParameter<
int>(
"row") && ip.first ==
k.getParameter<
int>(
"row") &&
909 std::abs(ip.second -
p.col) <
k.getParameter<
int>(
"col")) {
920 auto& theSignal =
_signal[detId];
923 for (
const auto& elem : accumulator) {
925 if (!inserted.second) {
926 throw cms::Exception(
"LogicError") <<
"Signal was already set for DetId " << detId;
932 std::map<int, DigitizerUtility::DigiSimInfo>& digi_map,
943 float theThresholdInE = 0.;
944 float theHIPThresholdInE = 0.;
979 for (
auto const&
s : theSignal) {
981 float signalInElectrons = sig_data.
ampl();
985 if (!info_list.empty())
986 hitInfo = std::max_element(info_list.begin(), info_list.end())->
second.get();
991 info.
ot_bit = signalInElectrons > theHIPThresholdInE ?
true :
false;
994 float charge_frac =
l.first / signalInElectrons;
996 info.
simInfoList.push_back({charge_frac,
l.second.get()});
999 digi_map.insert({
s.first, info});
1009 const int max_limit = 10;
1021 if (temp_signal > kink_point)
1022 temp_signal = std::floor((temp_signal - kink_point) / (
pow(2, dualslope_param - 1))) + kink_point;
1025 LogTrace(
"Phase2TrackerDigitizerAlgorithm")
1026 <<
" DetId " << detID <<
" signal_in_elec " << signal_in_elec <<
" threshold " << threshold
1027 <<
" signal_above_thr " << signal_in_elec - threshold <<
" temp conversion "
1028 << std::floor((signal_in_elec - threshold) /
theElectronPerADC_) + 1 <<
" signal after slope correction "
1029 << temp_signal <<
" signal_in_adc " << signal_in_adc;
1031 return signal_in_adc;
1034 constexpr
float p1 = 12.5f;
1035 constexpr
float p2 = 0.2733f;
1036 constexpr
float p3 = 0.147f;
1039 return 0.5f * (1.f - std::copysign(
std::sqrt(1.
f - unsafe_expf<4>(-xx * (1.
f + p2 / (1.
f + p3 * xx)))), x));
CLHEP::HepRandomEngine * rengine_
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
virtual void module_killing_DB(const Phase2TrackerGeomDetUnit *pixdet)
LocalVector DriftDirection(const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield, const DetId &detId) const
Local3DVector LocalVector
const edm::EventSetup & c
float tof() const
deprecated name for timeOfFlight()
constexpr double m_proton
const float theElectronPerADC_
Point3DBase< Scalar, LocalTag > LocalPoint
void loadAccumulator(uint32_t detId, const std::map< int, float > &accumulator)
const float tanLorentzAnglePerTesla_Endcap_
virtual bool select_hit(const PSimHit &hit, double tCorr, double &sigScale) const
static std::pair< int, int > channelToPixel(int ch)
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
uint16_t *__restrict__ id
virtual int ncolumns() const =0
const double pseudoRadDamage_
const double pseudoRadDamageRadius_
virtual bool isAboveThreshold(const DigitizerUtility::SimHitInfo *hitInfo, float charge, float thr) const
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
unsigned int pxfDisk(const DetId &id) const
tuple chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
const SiPixelQuality * siPixelBadModule_
constexpr uint32_t rawId() const
get the raw id
virtual void initializeEvent(CLHEP::HepRandomEngine &eng)
virtual int nrows() const =0
const Bounds & bounds() const
std::vector< sipixelobjects::CablingPathToDetUnit > pathToDetUnit(uint32_t rawDetId) const final
virtual void add_cross_talk(const Phase2TrackerGeomDetUnit *pixdet)
const float theThresholdInE_Endcap_
const float theNoiseInElectrons_
Exp< T >::type exp(const T &t)
const SiPixelLorentzAngle * siPixelLorentzAngle_
bool IsRocBad(const uint32_t &detid, const short &rocNb) const
const std::unique_ptr< SiG4UniversalFluctuation > fluctuate_
const Plane & surface() const
The nominal surface of the GeomDet.
const bool addNoisyPixels_
virtual void add_noise(const Phase2TrackerGeomDetUnit *pixdet)
virtual void module_killing_conf(uint32_t detID)
identify pixel inside single ROC
virtual ~Phase2TrackerDigitizerAlgorithm()
const float interstripCoupling_
const bool use_LorentzAngle_DB_
const double theThresholdSmearing_Endcap_
const double theThresholdSmearing_Barrel_
static int pixelToChannel(int row, int col)
global coordinates (row and column in DetUnit, as in PixelDigi)
virtual float thickness() const =0
U second(std::pair< T, U > const &p)
const std::unique_ptr< SiPixelGainCalibrationOfflineSimService > theSiPixelGainCalibrationService_
const bool use_deadmodule_DB_
virtual void add_noisy_cells(const Phase2TrackerGeomDetUnit *pixdet, float thePixelThreshold)
std::unique_ptr< CLHEP::RandGaussQ > gaussDistribution_
const bool fluctuateCharge_
virtual 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)
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
Local3DPoint exitPoint() const
Exit point in the local Det frame.
Local3DPoint localPosition() const
const bool use_ineff_from_db_
static PackedDigiType pixelToChannel(unsigned int row, unsigned int col)
const bool addPixelInefficiency_
Phase2TrackerDigitizerAlgorithm(const edm::ParameterSet &conf_common, const edm::ParameterSet &conf_specific, edm::ConsumesCollector iC)
const std::unique_ptr< GaussianTailNoiseGenerator > theNoiser_
Cos< T >::type cos(const T &t)
unsigned int idInDetUnit() const
id of this ROC in DetUnit etermined by token path
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
const std::vector< std::pair< float, std::unique_ptr< SimHitInfo > > > & simInfoList() const
const sipixelobjects::PixelROC * findItem(const sipixelobjects::CablingPathToDetUnit &path) const final
Abs< T >::type abs(const T &t)
const float theThresholdInE_Barrel_
const bool use_module_killing_
virtual int channel(const LocalPoint &p) const =0
DetId geographicalId() const
The label of this GeomDet.
virtual void induce_signal(const PSimHit &hit, const size_t hitIndex, const uint32_t tofBin, const Phase2TrackerGeomDetUnit *pixdet, const std::vector< DigitizerUtility::SignalPoint > &collection_points)
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
virtual void pixel_inefficiency_db(uint32_t detID)
const std::vector< disabledModuleType > getBadComponentList() const
static constexpr auto TOB
std::vector< double > barrel_efficiencies
float pabs() const
fast and more accurate access to momentumAtEntry().mag()
std::unique_ptr< CLHEP::RandGaussQ > smearedThreshold_Endcap_
const Parameters deadModules_
virtual void digitize(const Phase2TrackerGeomDetUnit *pixdet, std::map< int, DigitizerUtility::DigiSimInfo > &digi_map, const TrackerTopology *tTopo)
std::map< int, DigitizerUtility::Amplitude, std::less< int > > signal_map_type
std::vector< edm::ParameterSet > Parameters
std::vector< std::pair< float, SimHitInfo * > > simInfoList
unsigned int pxbLayer(const DetId &id) const
constexpr double m_electron
const float theReadoutNoise_
const SiPhase2OuterTrackerLorentzAngle * siPhase2OTLorentzAngle_
const float clusterWidth_
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
T getParameter(std::string const &) const
const double theHIPThresholdInE_Endcap_
row and collumn in ROC representation
const bool addThresholdSmearing_
std::unique_ptr< CLHEP::RandGaussQ > smearedThreshold_Barrel_
SubdetEfficiencies(const edm::ParameterSet &conf)
const SubdetEfficiencies subdetEfficiencies_
virtual std::vector< DigitizerUtility::EnergyDepositUnit > primary_ionization(const PSimHit &hit) const
static std::pair< unsigned int, unsigned int > channelToPixel(unsigned int ch)
float energyLoss() const
The energy deposit in the PSimHit, in ???.
const SiPixelFedCablingMap * fedCablingMap_
const float tanLorentzAnglePerTesla_Barrel_
const int thePhase2ReadoutMode_
const double theHIPThresholdInE_Barrel_
bool isPixel(HitType hitType)
const int theAdcFullScale_
float getLorentzAngle(const uint32_t &) const
unsigned int pxfSide(const DetId &id) const
const RotationType & rotation() const
virtual void pixel_inefficiency(const SubdetEfficiencies &eff, const Phase2TrackerGeomDetUnit *pixdet, const TrackerTopology *tTopo)
virtual std::vector< DigitizerUtility::SignalPoint > drift(const PSimHit &hit, const Phase2TrackerGeomDetUnit *pixdet, const GlobalVector &bfield, const std::vector< DigitizerUtility::EnergyDepositUnit > &ionization_points) const
virtual std::pair< float, float > pitch() const =0
const bool makeDigiSimLinks_
Log< level::Warning, false > LogWarning
virtual std::vector< float > fluctuateEloss(int particleId, float momentum, float eloss, float length, int NumberOfSegments) const
const float GeVperElectron_
const PositionType & position() const
float getLorentzAngle(const uint32_t &) const
Local3DPoint entryPoint() const
Entry point in the local Det frame.
Power< A, B >::type pow(const A &a, const B &b)
*vegas h *****************************************************used in the default bin number in original ***version of VEGAS is ***a higher bin number might help to derive a more precise ***grade subtle point
unsigned int detUnitId() const
const Plane & specificSurface() const
Same as surface(), kept for backward compatibility.
int convertSignalToAdc(uint32_t detID, float signal_in_elec, float threshold)
GlobalPixel toGlobal(const LocalPixel &loc) const
std::vector< double > endcap_efficiencies