9 #include <framework/logging/Logger.h>
10 #include <svd/reconstruction/SVDClusterCharge.h>
11 #include <svd/reconstruction/SVDMaxSumAlgorithm.h>
12 #include <svd/dataobjects/SVDEventInfo.h>
32 seedCharge = m_PulseShapeCal.getChargeFromADC(rawCluster.
getSensorID(), rawCluster.
isUSide(), seedCellID,
42 for (
int i = 0; i < (int)strips.size(); i++) {
46 double rawCharge = *std::max_element(begin(strip.
samples), end(strip.
samples));
49 double stripCharge = m_PulseShapeCal.getChargeFromADC(rawCluster.
getSensorID(), rawCluster.
isUSide(), strip.
cellID, rawCharge);
52 noise += tmp_noise * tmp_noise;
54 charge += stripCharge;
57 SNR = charge / sqrt(noise);
71 for (
int i = 0; i < (int)strips.size(); i++) {
76 for (
auto sample : strip.
samples)
80 double stripCharge = m_PulseShapeCal.getChargeFromADC(rawCluster.
getSensorID(), rawCluster.
isUSide(), strip.
cellID, rawCharge);
82 if (stripCharge > seedCharge)
83 seedCharge = stripCharge;
86 noise += tmp_noise * tmp_noise;
88 charge += stripCharge;
91 SNR = charge / sqrt(noise);
96 void SVDClusterCharge::applyELS3Charge(
const Belle2::SVD::RawCluster& rawCluster,
double& charge,
double& SNR,
double& seedCharge)
104 float m_ELS3tau = 55;
109 seedCharge = m_PulseShapeCal.getChargeFromADC(rawCluster.
getSensorID(), rawCluster.
isUSide(), seedCellID,
120 auto begin = selectedSamples.begin();
122 const double E = std::exp(- m_apvClockPeriod / m_ELS3tau);
123 const double E2 = E * E;
124 const double E3 = E * E * E;
125 const double E4 = E * E * E * E;
126 double a0 = (*begin);
127 double a1 = (*(begin + 1));
128 double a2 = (*(begin + 2));
131 const double w = (a0 - E2 * a2) / (2 * a0 + E * a1);
132 auto rawtime_num = 2 * E4 + w * E2;
133 auto rawtime_den = 1 - E4 - w * (2 + E2);
134 float rawtime = - m_apvClockPeriod * rawtime_num / rawtime_den;
144 double num = (1. / E - E3) * a1 + (2 + E2) * a2 - (1 + 2 * E2) * a0;
145 double den = m_apvClockPeriod / m_ELS3tau * std::exp(1 + rawtime / m_ELS3tau) * (1 + 4 * E2 + E4);
152 for (
int i = 0; i < (int)strips.size(); i++) {
157 noise += tmp_noise * tmp_noise;
160 SNR = charge / sqrt(noise);
Class representing a raw cluster candidate during clustering of the SVD.
int getSeedInternalIndex() const
int getSeedMaxSample() const
Belle2::SVDShaperDigit::APVFloatSamples getClsSamples(bool inElectrons) const
VxdID getSensorID() const
const std::vector< StripInRawCluster > getStripsInRawCluster() const
Class implementing the MaxSum algorithm.
std::vector< float > getSelectedSamples()
Abstract base class for different kinds of events.
structure containing the relevant informations of each strip of the raw cluster
Belle2::SVDShaperDigit::APVFloatSamples samples
ADC of the acquired samples.