15 using std::unique_ptr;
32 Int_t index = cluster.
GetDigi(0);
37 Double_t time = digi->
GetTime();
38 Double_t timeError = asic.GetTimeResol();
39 Double_t charge = asic.AdcToCharge(digi->
GetCharge());
40 Double_t xError = 1. /
sqrt(24.);
52 Int_t index1 = cluster.
GetDigi(0);
53 Int_t index2 = cluster.
GetDigi(1);
60 auto& asic2 = modPar->
GetParAsic(digi2->GetChannel());
63 Double_t eNoiseSq = 0.5
64 * (asic1.GetNoise() * asic1.GetNoise()
65 + asic2.GetNoise() * asic2.GetNoise());
66 Double_t chargePerAdc =
68 * (asic1.GetDynRange() / Double_t(asic1.GetNofAdc())
69 + asic2.GetDynRange() / Double_t(asic2.GetNofAdc()));
70 Double_t eDigitSq = chargePerAdc * chargePerAdc / 12.;
73 UInt_t chan2 = digi2->GetChannel();
74 assert(chan2 == chan1 + 1
78 Double_t x1 = Double_t(chan1);
79 Double_t q1 = asic1.AdcToCharge(digi1->
GetCharge());
80 Double_t q2 = asic2.AdcToCharge(digi2->GetCharge());
87 Double_t eq1sq = width1 * width1 + eNoiseSq + eDigitSq;
89 Double_t eq2sq = width2 * width2 + eNoiseSq + eDigitSq;
92 Double_t time = 0.5 * (digi1->
GetTime() + digi2->GetTime());
93 Double_t timeError = 0.5 * (asic1.GetTimeResol() + asic2.GetTimeResol())
98 Double_t
x = x1 + 0.5 + (q2 - q1) / 3. / TMath::Max(q1, q2);
108 ex0sq = (q2 - q1) * (q2 - q1) / q2 / q2 / 72.;
109 ex1sq = eq1sq / q2 / q2 / 9.;
110 ex2sq = eq2sq * q1 * q1 / q2 / q2 / q2 / q2 / 9.;
112 ex0sq = (q2 - q1) * (q2 - q1) / q1 / q1 / 72.;
113 ex1sq = eq1sq * q2 * q2 / q1 / q1 / q1 / q1 / 9.;
114 ex2sq = eq2sq / q1 / q1 / 9.;
116 Double_t xError = TMath::Sqrt(ex0sq + ex1sq + ex2sq);
119 Double_t charge = q1 + q2;
132 Int_t chanF = 9999999;
140 Double_t prevChannel = 0;
141 Double_t tResolSum = 0.;
143 for (Int_t iDigi = 0; iDigi < cluster.
GetNofDigis(); iDigi++) {
145 Int_t index = cluster.
GetDigi(iDigi);
152 Double_t eNoiseSq = asic.
GetNoise() * asic.GetNoise();
153 Double_t chargePerAdc = asic.GetDynRange() / Double_t(asic.GetNofAdc());
154 Double_t eDigitSq = chargePerAdc * chargePerAdc / 12.;
155 tResolSum += asic.GetTimeResol();
158 Double_t charge = asic.AdcToCharge(digi->
GetCharge());
160 Double_t eChargeSq = lWidth * lWidth + eNoiseSq + eDigitSq;
164 assert(channel == prevChannel + 1
166 prevChannel = channel;
188 Double_t tError = (tResolSum / Double_t(cluster.
GetNofDigis()))
190 Double_t qSum = qF + qM + qL;
197 Double_t
x = 0.5 * (Double_t(chanF + chanL) + (qL - qF) / qM);
203 Double_t exFsq = eqFsq / qM / qM / 4.;
204 Double_t exMsq = eqMsq * (qL - qF) * (qL - qF) / qM / qM / qM / qM / 4.;
205 Double_t exLsq = eqLsq / qM / qM / 4.;
206 Double_t xError = TMath::Sqrt(exFsq + exMsq + exLsq);
209 if (x < chanF || x > chanL)
x =
WeightedMean(cluster, modPar);
211 assert(
x >= chanF &&
x <= chanL);
214 cluster.
SetSize(chanL - chanF + 1);
229 case 1:
AnaSize1(cluster, modPar);
break;
230 case 2:
AnaSize2(cluster, modPar);
break;
231 default:
AnaSizeN(cluster, modPar);
break;
244 for (Int_t iDigi = 0; iDigi < cluster.
GetNofDigis(); iDigi++) {
245 Int_t index = cluster.
GetDigi(iDigi);
252 xSum += charge * Double_t(channel);