40 .getParameter<double>(
"Even_row_interchannelCoupling_next_row");
42 LogDebug(
"PixelBrickedDigitizerAlgorithm")
43 <<
"Algorithm constructed " 44 <<
"Configuration parameters:" 45 <<
"Threshold/Gain = " 51 LogDebug(
"PixelBrickedDigitizerAlgorithm") <<
"Algorithm deleted";
54 const size_t hitIndex,
55 const uint32_t tofBin,
57 const std::vector<DigitizerUtility::SignalPoint>& collection_points) {
65 using hit_map_type = std::map<int, float, std::less<int> >;
66 hit_map_type hit_signal;
70 for (
auto const&
v : collection_points) {
71 float CloudCenterX =
v.position().x();
72 float CloudCenterY =
v.position().y();
97 int IPixRightUpX =
static_cast<int>(std::floor(mp.
x()));
101 int numRows = topol->
nrows();
102 IPixRightUpX = numRows > IPixRightUpX ? IPixRightUpX : numRows - 1;
105 int IPixRightUpY =
static_cast<int>(mp.
y() - 0.5 * (IPixRightUpX % 2));
109 int IPixLeftDownX =
static_cast<int>(std::floor(mp.
x()));
111 IPixLeftDownX = 0 < IPixLeftDownX ? IPixLeftDownX : 0;
114 int IPixLeftDownY =
static_cast<int>(mp.
y() - 0.5 * (IPixLeftDownX % 2));
116 IPixRightUpY = numColumns > IPixRightUpY ? IPixRightUpY : numColumns - 1;
117 IPixLeftDownY = 0 < IPixLeftDownY ? IPixLeftDownY : 0;
121 for (
int ix = IPixLeftDownX; ix <= IPixRightUpX; ++ix) {
122 float xLB, LowerBound;
125 if (ix == 0 ||
SigmaX == 0.) {
130 LowerBound = 1 -
calcQ((xLB - CloudCenterX) /
SigmaX);
133 float xUB, UpperBound;
134 if (ix == numRows - 1 ||
SigmaX == 0.) {
139 UpperBound = 1. -
calcQ((xUB - CloudCenterX) /
SigmaX);
141 float TotalIntegrationRange = UpperBound - LowerBound;
142 x.emplace(ix, TotalIntegrationRange);
146 int IPixLeftDownY_bricked = IPixLeftDownY;
147 int IPixRightUpY_bricked = IPixRightUpY;
150 IPixRightUpY =
std::min(IPixRightUpY +
int((IPixRightUpX % 2)), numColumns - 1);
154 for (
int iy = IPixLeftDownY; iy <= IPixRightUpY; ++iy) {
155 float yLB, LowerBound;
156 if (iy == 0 ||
SigmaY == 0.) {
161 LowerBound = 1. -
calcQ((yLB - CloudCenterY) /
SigmaY);
164 float yUB, UpperBound;
165 if (iy >= numColumns - 1 ||
SigmaY == 0.) {
170 UpperBound = 1. -
calcQ((yUB - CloudCenterY) /
SigmaY);
173 float TotalIntegrationRange = UpperBound - LowerBound;
176 y.emplace(2 * iy, TotalIntegrationRange);
179 IPixLeftDownY_bricked =
std::max(IPixLeftDownY_bricked -
int((!(IPixLeftDownX % 2))), 0);
180 for (
int iy = IPixLeftDownY_bricked; iy <= IPixRightUpY_bricked; ++iy) {
181 float yLB, LowerBound;
182 if (iy == 0 ||
SigmaY == 0.) {
187 LowerBound = 1. -
calcQ((yLB - CloudCenterY) /
SigmaY);
190 float yUB, UpperBound;
191 if (iy >= numColumns ||
SigmaY == 0.) {
196 UpperBound = 1. -
calcQ((yUB - CloudCenterY) /
SigmaY);
199 float TotalIntegrationRange = UpperBound - LowerBound;
201 y.emplace(2 * iy + 1, TotalIntegrationRange);
205 for (
int ix = IPixLeftDownX; ix <= IPixRightUpX; ++ix) {
206 for (
int iy =
std::max(0, IPixLeftDownY -
int((ix % 2))); iy <= IPixRightUpY; ++iy) {
207 int iy_considered = iy * 2 + ix % 2;
208 float ChargeFraction =
Charge *
x[ix] *
y[iy_considered];
211 if (ChargeFraction > 0.) {
215 hit_signal[chanFired] += ChargeFraction;
222 for (
auto const& hit_s : hit_signal) {
223 int chan = hit_s.first;
T getParameter(std::string const &) const
~PixelBrickedDigitizerAlgorithm() override
const float theElectronPerADC_
Point3DBase< Scalar, LocalTag > LocalPoint
virtual LocalPoint localPosition(const MeasurementPoint &) const =0
virtual int ncolumns() const =0
virtual int nrows() const =0
double even_row_interchannelCoupling_next_row_
const float theThresholdInE_Endcap_
PixelBrickedDigitizerAlgorithm(const edm::ParameterSet &conf, edm::ConsumesCollector iC)
void induce_signal(const PSimHit &hit, const size_t hitIndex, const unsigned int tofBin, const Phase2TrackerGeomDetUnit *pixdet, const std::vector< DigitizerUtility::SignalPoint > &collection_points) override
static int pixelToChannel(int row, int col)
Measurement2DPoint MeasurementPoint
Measurement points are two-dimensional by default.
static PackedDigiType pixelToChannel(unsigned int row, unsigned int col)
const bool addPixelInefficiency_
const float theThresholdInE_Barrel_
virtual MeasurementPoint measurementPosition(const LocalPoint &) const =0
DetId geographicalId() const
The label of this GeomDet.
std::map< int, DigitizerUtility::Amplitude, std::less< int > > signal_map_type
GlobalPoint toGlobal(const Point2DBase< Scalar, LocalTag > lp) const
const Plane & surface() const
The nominal surface of the GeomDet.
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
const float clusterWidth_
constexpr uint32_t rawId() const
get the raw id
chan
lumi = TPaveText(lowX+0.38, lowY+0.061, lowX+0.45, lowY+0.161, "NDC") lumi.SetBorderSize( 0 ) lumi...
virtual const PixelTopology & specificTopology() const
Returns a reference to the pixel proxy topology.
const int theAdcFullScale_
const bool makeDigiSimLinks_