53 {
54
55
57 const std::vector<std::vector<float>>& qStrip = digiInput.
chipCharge();
58 const std::vector<std::vector<float>>& tStrip = digiInput.
chipTime();
59 const std::vector<float>& stripsElectronicsThreshold = digiInput.
stripThreshold();
60
61 for (unsigned int ii = 0; ii < numberofStrip.size(); ii++) {
62
63 bool thisStripFired{false};
64 double leftStripFired = false;
65 double rightStripFired = false;
66
67
68 if (
m_cfg.useNeighborLogic) {
69 if (ii > 0) {
70 leftStripFired =
71 m_vmmShaper->hasChargeAboveThreshold(qStrip.at(ii - 1), tStrip.at(ii - 1), stripsElectronicsThreshold.at(ii - 1));
72 }
73
74 if (ii + 1 < numberofStrip.size()) {
75 rightStripFired =
76 m_vmmShaper->hasChargeAboveThreshold(qStrip.at(ii + 1), tStrip.at(ii + 1), stripsElectronicsThreshold.at(ii + 1));
77 }
78 }
79
80 thisStripFired =
m_vmmShaper->hasChargeAboveThreshold(qStrip.at(ii), tStrip.at(ii), stripsElectronicsThreshold.at(ii));
81
82
83 bool neighborFired = leftStripFired || rightStripFired;
84
85
86 if (thisStripFired || (
m_cfg.useNeighborLogic && neighborFired)) {
88
89
90 float tmpScaledThreshold = (thisStripFired ? stripsElectronicsThreshold.at(ii) : 1);
91
92 bool foundPeak =
m_vmmShaper->vmmPeakResponse(qStrip.at(ii), tStrip.at(ii), tmpScaledThreshold,
charge, time);
93 if (!foundPeak) continue;
94 if (time < m_cfg.timeWindowLowerOffset || time >
m_cfg.timeWindowUpperOffset)
95 continue;
96
97 cache.nStripElectronics.push_back(numberofStrip.at(ii));
98 cache.tStripElectronicsAbThr.push_back(time);
99 cache.qStripElectronics.push_back(
charge);
100 }
101 }
102}
double charge(const T &p)
time(flags, cells_name, *args, **kw)