9#include <framework/datastore/StoreArray.h>
10#include <framework/gearbox/Unit.h>
12#include <ecl/geometry/ECLGeometryPar.h>
13#include <ecl/dataobjects/ECLSimHit.h>
14#include <ecl/dataobjects/ECLHit.h>
16#include "trg/ecl/TrgEclDigitizer.h"
19#include "trg//ecl/dataobjects/TRGECLDigi0.h"
20#include "trg/ecl/dataobjects/TRGECLWaveform.h"
67 for (uint i = 0; i <
c_NTC; i++) {
76 for (uint j = 0; j < 64; j++) {
102 for (
int iHits = 0; iHits < nHits_hit; iHits++) {
104 ECLHit* aECLHit = eclHitArray[iHits];
108 int hitCellId = aECLHit->
getCellId() - 1;
111 if (aveT < - m_TimeRange || aveT >
m_TimeRange) {
continue;}
114 int iTCIdm =
m_TCMap->getTCIdFromXtalId(hitCellId + 1) - 1;
121 for (
int iTCIdm = 0; iTCIdm <
c_NTC; iTCIdm++) {
122 for (
int iTime = 0; iTime <
c_nTimeBins; iTime++) {
124 if (
m_TCEnergy[iTCIdm][iTime] < 1e-9) {
continue;}
135 int iTCId =
m_TCMap->getTCIdFromXtalId(iXtalIdm + 1) - 1;
136 if (iTCIdm != iTCId) {
continue;}
137 if (maxbkgE < E_cell[iXtalIdm][iTime]) {
138 maxbkgE = E_cell[iXtalIdm][iTime];
139 maxbkgtag = beambkg_tag[iXtalIdm][iTime];
163 for (
int iHits = 0; iHits < nHits; iHits++) {
167 int hitCellId = aECLSimHit->
getCellId() - 1;
171 G4ThreeVector t = aECLSimHit->
getPosIn();
172 ROOT::Math::XYZVector HitInPos(t.x(), t.y(), t.z());
173 ROOT::Math::XYZVector PosCell = eclp->
GetCrystalPos(hitCellId);
174 ROOT::Math::XYZVector VecCell = eclp->
GetCrystalVec(hitCellId);
175 float local_pos_r = 15.0 - (HitInPos - PosCell).Dot(VecCell);
176 if (hitTOF < - m_TimeRange || hitTOF >
m_TimeRange) {
continue;}
177 int TimeIndex = (int)((hitTOF +
m_TimeRange) / 100);
178 E_cell[hitCellId][TimeIndex] = E_cell[hitCellId][TimeIndex] + hitE;
179 T_ave[hitCellId][TimeIndex] = T_ave[hitCellId][TimeIndex] + hitE * local_pos_r;
180 Tof_ave[hitCellId][TimeIndex] = Tof_ave[hitCellId][TimeIndex] + hitE * hitTOF;
189 for (
int TimeIndex = 0; TimeIndex <
c_nTimeBins; TimeIndex++) {
191 if (E_cell[iECLCell][TimeIndex] < 1e-9) {
continue;}
193 T_ave[iECLCell][TimeIndex] = T_ave[iECLCell][TimeIndex] / E_cell[iECLCell][TimeIndex];
194 T_ave[iECLCell][TimeIndex] =
196 0.0749 * T_ave[iECLCell][TimeIndex] -
197 0.00112 * T_ave[iECLCell][TimeIndex] * T_ave[iECLCell][TimeIndex];
198 Tof_ave[iECLCell][TimeIndex] = Tof_ave[iECLCell][TimeIndex] / E_cell[iECLCell][TimeIndex];
206 int iTCIdm =
m_TCMap->getTCIdFromXtalId(iXtalIdm + 1) - 1;
207 for (
int iTime = 0; iTime <
c_nTimeBins; iTime++) {
209 if (E_cell[iXtalIdm][iTime] < 1e-9) {
continue;}
210 m_TCEnergy[iTCIdm][iTime] += E_cell[iXtalIdm][iTime];
211 m_TCTiming[iTCIdm][iTime] += E_cell[iXtalIdm][iTime] * (T_ave[iXtalIdm][iTime]);
212 if (beambkg_tag[iXtalIdm][iTime] > 0) {
m_TCBkgContribution[iTCIdm][iTime] += E_cell[iXtalIdm][iTime];}
213 if (beambkg_tag[iXtalIdm][iTime] == 0) {
m_TCSigContribution[iTCIdm][iTime] += E_cell[iXtalIdm][iTime];}
217 for (
int iTCIdm = 0; iTCIdm <
c_NTC; iTCIdm++) {
218 for (
int iTime = 0; iTime <
c_nTimeBins; iTime++) {
224 if (
m_TCEnergy[iTCIdm][iTime] < 1e-9) {
continue;}
231 int iTCId =
m_TCMap->getTCIdFromXtalId(iXtalIdm + 1) - 1;
232 if (iTCIdm != iTCId) {
continue;}
233 if (maxbkgE < E_cell[iXtalIdm][iTime]) {
234 maxbkgE = E_cell[iXtalIdm][iTime];
235 maxbkgtag = beambkg_tag[iXtalIdm][iTime];
255 for (
int iHits = 0; iHits < nHits_hit; iHits++) {
257 ECLHit* aECLHit = eclHitArray[iHits];
259 int hitCellId = aECLHit->
getCellId() - 1;
263 if (aveT < - m_TimeRange || aveT >
m_TimeRange) {
continue;}
267 int iTCIdm =
m_TCMap->getTCIdFromXtalId(hitCellId + 1) - 1;
275 double tcbg_t = ttt.getTimeAve();
279 int TimeIndex = (int)((tcbg_t +
m_TimeRange) / 100);
281 double tcbg_e = ttt.getEnergyDep();
283 int iTCIdm = ttt.getTCId() - 1;
288 m_TCTiming[iTCIdm][TimeIndex] += (tcbg_e * tcbg_t + tc_e * tc_t);
290 for (
int iTCIdm = 0; iTCIdm <
c_NTC; iTCIdm++) {
291 for (
int iTime = 0; iTime <
c_nTimeBins; iTime++) {
299 for (
int iTCIdm = 0; iTCIdm <
c_NTC; iTCIdm++) {
300 for (
int iTime = 40; iTime < 50; iTime++) {
314 std::vector<std::vector<double>>& TCDigiT)
316 for (uint i = 0; i <
c_NTC; i++) {
322 static constexpr double cut_energy_tot = 0.03;
323 static constexpr int nbin_pedestal = 4;
324 static constexpr double fam_sampling_interval = 125;
328 const double random_sampling_correction = gRandom->Rndm() * fam_sampling_interval;
334 std::bitset<c_NTC> hasEnergy;
335 for (
int iTCIdm = 0; iTCIdm <
c_NTC; iTCIdm++) {
336 for (
int iTimeBin = 0; iTimeBin <
c_nTimeBins; iTimeBin++) {
339 hasEnergy[iTCIdm] =
true;
347 = (-
m_TCTiming[iTCIdm][iTimeBin] -
m_TimeRange + (-nbin_pedestal + iSampling) * fam_sampling_interval) * 0.001;
348 inputTiming += random_sampling_correction * 0.001;
349 if (inputTiming < 0 || inputTiming > 2.0) {
continue;}
359 TCDigiT[iTCIdm][iSampling] = (-nbin_pedestal + iSampling -
m_TimeRange / fam_sampling_interval) * fam_sampling_interval +
360 random_sampling_correction;
367 FILE* f_out_dat = fopen(
"ztsim.no_noise.dat",
"w");
368 for (
int iTCIdm = 0; iTCIdm <
c_NTC; iTCIdm++) {
370 fprintf(f_out_dat,
"%5i %8.5f %8.5f %8.1f ",
373 fprintf(f_out_dat,
"%7.4f ", TCDigiE[iTCIdm][iSampling]);
375 fprintf(f_out_dat,
"\n");
382 static constexpr double tmin_noise = -4;
383 static constexpr double tgen = 10.3;
384 static constexpr int bkg_level = 1030;
391 static constexpr double frac_pileup = 0.035;
392 static constexpr double frac_parallel = 0.023;
393 static constexpr double frac_serial = 0.055;
394 static constexpr double times_pileup = 1;
395 static constexpr double times_parallel = 3.15;
396 static constexpr double times_serial = 3.15;
398 const double sqrTerm = std::sqrt(fam_sampling_interval * 0.001);
399 const double corr_pileup = times_pileup * frac_pileup * sqrTerm;
400 const double corr_parallel = times_parallel * frac_parallel * sqrTerm;
401 const double corr_serial = times_serial * frac_serial * sqrTerm;
402 const double parallelNoiseCorrection = 10 * corr_parallel;
403 const double serialNoiseCorrection = 10 * corr_serial;
407 for (
int iTCIdm = 0; iTCIdm <
c_NTC; iTCIdm++) {
409 for (
int jjj = 0; jjj < bkg_level; jjj++) {
410 ttt0 = -(tmin_noise + tgen * gRandom->Rndm());
411 ttt1 = -(tmin_noise + tgen * gRandom->Rndm());
412 ttt2 = -(tmin_noise + tgen * gRandom->Rndm());
415 if (ttt0 > 0) { TCDigiE[iTCIdm][iSampling] +=
SimplifiedFADC(0, ttt0) * corr_pileup * 0.001; }
417 if (ttt1 > 0) { TCDigiE[iTCIdm][iSampling] +=
SimplifiedFADC(1, ttt1) * corr_parallel; }
419 if (ttt2 > 0) { TCDigiE[iTCIdm][iSampling] +=
SimplifiedFADC(2, ttt2) * corr_serial; }
420 ttt0 += fam_sampling_interval * 0.001;
421 ttt1 += fam_sampling_interval * 0.001;
422 ttt2 += fam_sampling_interval * 0.001;
432 for (
int iTCIdm = 0; iTCIdm <
c_NTC; iTCIdm++) {
435 m_Xpr[iSampling] = gRandom ->Gaus(0, 1);
436 m_Xsr[iSampling] = gRandom ->Gaus(0, 1);
440 if (!hasEnergy[iTCIdm]) {
continue; }
446 double parallelNoiseTerm = 0., serialNoiseTerm = 0.;
448 parallelNoiseTerm += parallelNoiseCorrection *
m_MatrixParallel[iSampling][jSampling] *
m_Xpr[jSampling];
449 serialNoiseTerm += serialNoiseCorrection *
m_MatrixSerial[iSampling][jSampling] *
m_Xsr[jSampling];
460 for (
int iTCIdm = 0; iTCIdm <
c_NTC; iTCIdm++) {
462 for (
int jjj = 0; jjj < bkg_level; jjj++) {
463 ttt0 = -(tmin_noise + tgen * gRandom->Rndm());
466 if (ttt0 > 0) { TCDigiE[iTCIdm][iSampling] +=
SimplifiedFADC(0, ttt0) * corr_pileup * 0.001; }
467 ttt0 += fam_sampling_interval * 0.001;
476 for (
int iTCIdm = 0; iTCIdm <
c_NTC; iTCIdm++) {
478 m_WaveForm[iTCIdm][iSampling] = TCDigiE[iTCIdm][iSampling];
491 for (uint i = 0; i <
c_NTC; i++) {
495 double cut_energy_tot = 0.03;
496 int nbin_pedestal = 100;
497 float fam_sampling_interval = 12;
503 float random_sampling_correction = 0;
504 random_sampling_correction = gRandom->Rndm() * fam_sampling_interval;
505 for (
int iTCIdm = 0; iTCIdm <
c_NTC; iTCIdm++) {
507 for (
int iTimeBin = 0; iTimeBin <
c_nTimeBins; iTimeBin++) {
508 if (
m_TCEnergy[iTCIdm][iTimeBin] < 0.0001) {
continue; }
512 = (-
m_TCTiming[iTCIdm][iTimeBin] -
m_TimeRange + (-nbin_pedestal + iSampling) * fam_sampling_interval) * 0.001;
514 inputTiming += random_sampling_correction * 0.001;
515 if (inputTiming < 0 || inputTiming > 2.0) {
continue;}
517 TCDigiEnergy[iTCIdm][iSampling] +=
FADC(0, inputTiming) *
m_TCEnergy[iTCIdm][iTimeBin];
521 TCDigiTiming[iTCIdm][iSampling] = (-nbin_pedestal + iSampling -
m_TimeRange / fam_sampling_interval) * fam_sampling_interval;
522 TCDigiTiming[iTCIdm][iSampling] += random_sampling_correction;
529 double tmin_noise = -4;
531 int bkg_level = 1030;
544 double corr_pileup = 0.011068;
545 double corr_parallel = 0.00727324;
546 double corr_serial = 0.0173925;
549 for (
int iTCIdm = 0; iTCIdm <
c_NTC; iTCIdm++) {
551 for (
int jjj = 0; jjj < bkg_level; jjj++) {
552 ttt0 = -(tmin_noise + tgen * gRandom->Rndm());
553 ttt1 = -(tmin_noise + tgen * gRandom->Rndm());
554 ttt2 = -(tmin_noise + tgen * gRandom->Rndm());
557 if (ttt0 > 0) { TCDigiEnergy[iTCIdm][iSampling] +=
FADC(0, ttt0) * corr_pileup * 0.001; }
559 if (ttt1 > 0) { TCDigiEnergy[iTCIdm][iSampling] +=
FADC(1, ttt1) * corr_parallel; }
561 if (ttt2 > 0) { TCDigiEnergy[iTCIdm][iSampling] +=
FADC(2, ttt2) * corr_serial; }
562 ttt0 += fam_sampling_interval * 0.001;
563 ttt1 += fam_sampling_interval * 0.001;
564 ttt2 += fam_sampling_interval * 0.001;
580 for (
int iTCIdm = 0; iTCIdm <
c_NTC; iTCIdm++) {
581 for (
int iBinTime = 0; iBinTime <
c_nTimeBins; iBinTime++) {
582 if (
m_TCEnergy[iTCIdm][iBinTime] < 0.001) {
continue;}
587 TCDigiArray[m_hitNum]->setEventId(m_nEvent);
588 TCDigiArray[m_hitNum]->setTCId(iTCIdm + 1);
589 TCDigiArray[m_hitNum]->setiBinTime(iBinTime);
590 TCDigiArray[m_hitNum]->setRawEnergy(
m_TCEnergy[iTCIdm][iBinTime]);
591 TCDigiArray[m_hitNum]->setRawTiming(
m_TCTiming[iTCIdm][iBinTime]);
592 TCDigiArray[m_hitNum]->setBeamBkgTag(
m_TCBeambkgTag[iTCIdm][iBinTime]);
598 for (
int iTCIdm = 0; iTCIdm <
c_NTC; iTCIdm++) {
600 int tc_phi_id =
m_TCMap->getTCPhiIdFromTCId(iTCIdm + 1);
601 int tc_theta_id =
m_TCMap->getTCThetaIdFromTCId(iTCIdm + 1);
618 timing = timing * 1000;
624 if (timing < 0 || timing >= 12.0 * (
m_SignalAmp.size() - 1)) {
return E_out;}
626 const int startbin = (int)(timing) / 12;
627 const int endbin = startbin + 1;
629 const double starttime = 12.0 * startbin;
630 const double endtime = 12.0 * endbin;
632 if (timing > starttime) {
656 static double tc, tc2, tsc, tris, b1, b2;
657 static double amp, dft, as;
658 static double td, t1, t2;
683 while (flag_once == 0) {
684 double dt = tt / 1000;
686 for (
int j = 1; j <= 1000; j++) {
689 (
ShapeF(tc, t1, b1, t2, b2, td, tsc) -
690 ShapeF(tc, t1, b1, t2, b2, td, tris) * 0.01) -
691 (
ShapeF(tc2, t1, b1, t2, b2, td, tsc) -
692 ShapeF(tc2, t1, b1, t2, b2, td, tris) * 0.01) * as;
708 dt = tm * 0.02 / 1000;
724 (
ShapeF(timing, t1, b1, t2, b2, td, tsc) -
725 ShapeF(timing, t1, b1, t2, b2, td, tris) * 0.01) -
726 (
ShapeF(tc2, t1, b1, t2, b2, td, tsc) -
727 ShapeF(tc2, t1, b1, t2, b2, td, tris) * 0.01) * as);
728 }
else if (flag_gen == 1) {
733 ShapeF(timing, t1, b1, t2, b2, td, tsh) -
734 ShapeF(tc2, t1, b1, t2, b2, td, tsh) * as);
741 ShapeF(timing, t1, b1, t2, b2, td, tsh) -
742 ShapeF(tc2, t1, b1, t2, b2, td, tsh) * as);
745 if (tc < 0) { tc = 0; }
749 ShapeF(tc, t1, b1, t2, b2, td, tsh) -
750 ShapeF(tc2, t1, b1, t2, b2, td, tsh) * as) - pdf) / dd;
770 double das1, das0, dac0;
771 double dcs0s, dsn0s, dcs0d, dsn0d;
772 double dcs1s, dsn1s, dcs1d, dsn1d;
775 if (t00 < 0)
return 0;
777 dr = (ts1 - td1) / td1;
778 if (fabs(dr) <= 1.0e-5) {
779 if (ts1 > td1) { ts1 = td1 * 1.00001; }
780 else { ts1 = td1 * 0.99999; }
783 dr = (pow((t01 - t02), 2) + pow((tb1 - tb2), 2)) / (pow((t01), 2) + pow((tb1), 2));
785 if (t01 < t02) { t01 = t02 / 1.00001; }
786 else { t01 = t02 / 0.99999; }
788 if (t00 <= 0.0)
return 0;
799 das0 = b2 * (pow((b1 - a1), 2) + (b2 + a2) * (b2 - a2));
800 dac0 = -2 * (b1 - a1) * a2 * b2;
801 das1 = a2 * (pow((b1 - a1), 2) - (b2 + a2) * (b2 - a2));
803 dsn0s = ((c2 - a1) * das0 - (-a2) * dac0) / (pow(a2, 2) + pow((c2 - a1), 2));
804 dcs0s = ((-a2) * das0 + (c2 - a1) * dac0) / (pow(a2, 2) + pow((c2 - a1), 2));
806 dsn1s = ((c2 - b1) * das1 - (-b2) * (-dac0)) / (pow(b2, 2) + pow((c2 - b1), 2));
807 dcs1s = ((-b2) * das1 + (c2 - b1) * (-dac0)) / (pow(b2, 2) + pow((c2 - b1), 2));
809 dsn0d = ((c1 - a1) * das0 - (-a2) * dac0) / (pow(a2, 2) + pow((c1 - a1), 2));
810 dcs0d = ((-a2) * das0 + (c1 - a1) * dac0) / (pow(a2, 2) + pow((c1 - a1), 2));
812 dsn1d = ((c1 - b1) * das1 - (-b2) * (-dac0)) / (pow(b2, 2) + pow((c1 - b1), 2));
813 dcs1d = ((-b2) * das1 + (c1 - b1) * (-dac0)) / (pow(b2, 2) + pow((c1 - b1), 2));
817 dzna = (pow((b1 - a1), 2) + pow((b2 - a2), 2)) * (pow((b1 - a1), 2) + pow((a2 + b2), 2));
820 (dcs0s + dcs1s) * exp(-c2 * t00) * (-1) +
821 (dcs0d + dcs1d) * exp(-c1 * t00) +
822 ((dsn0s - dsn0d) * sin(a2 * t00) + (dcs0s - dcs0d) * cos(a2 * t00)) * exp(-a1 * t00) +
823 ((dsn1s - dsn1d) * sin(b2 * t00) + (dcs1s - dcs1d) * cos(b2 * t00)) * exp(-b1 * t00)
825 / dzna / (1 / c2 - 1 / c1);
850 static double tc, tc2, tsc, tris;
851 static double amp, dft, as;
860 const double td = 0.10;
861 const double t1 = 0.10;
863 const double t2 = 0.01;
880 while (flag_once == 0) {
881 double dt = tt / 1000;
884 for (
int j = 1; j <= 1000; j++) {
888 ShapeF(tc, tris) * 0.01) -
890 ShapeF(tc2, tris) * 0.01) * as;
906 dt = tm * 0.02 / 1000;
923 ShapeF(timing, tris) * 0.01) -
925 ShapeF(tc2, tris) * 0.01) * as);
926 }
else if (flag_gen == 1) {
943 if (tc < 0) { tc = 0; }
948 ShapeF(tc2, tsh) * as) - pdf) / dd;
958 static const double realNaN = std::numeric_limits<double>::quiet_NaN();
964 double a1, a2, b1, b2, c1, c2 =
realNaN;
967 if (t00 <= 0.0)
return 0;
996 dcs0s = -0.000204983;
1006 dcs1d = -0.00323517;
1013 (dcs0s + dcs1s) * exp(-c2 * t00) * (-1) +
1014 (dcs0d + dcs1d) * exp(-c1 * t00) +
1015 ((dsn0s - dsn0d) * sin(a2 * t00) + (dcs0s - dcs0d) * cos(a2 * t00)) * exp(-a1 * t00) +
1016 ((dsn1s - dsn1d) * sin(b2 * t00) + (dcs1s - dcs1d) * cos(b2 * t00)) * exp(-b1 * t00)
1018 / dzna / (1 / c2 - 1 / c1);
1028 if (aaa > bbb) {
return aaa; }
1029 else {
return bbb; }
Class to store simulated hits which equate to average of ECLSImHit on crystals input for digitization...
double getTimeAve() const
Get average time.
int getCellId() const
Get Cell ID.
double getEnergyDep() const
Get deposit energy.
ClassECLSimHit - Geant4 simulated hit for the ECL.
int getCellId() const
Get Cell ID.
double getFlightTime() const
Get Flight time from IP.
double getEnergyDep() const
Get Deposit energy.
G4ThreeVector getPosIn() const
Get Position.
The Class for ECL Geometry Parameters.
static ECLGeometryPar * Instance()
Static method to get a reference to the ECLGeometryPar instance.
ROOT::Math::XYZVector GetCrystalPos(int cid)
The Position of crystal.
ROOT::Math::XYZVector GetCrystalVec(int cid)
The direction of crystal.
virtual unsigned short getBackgroundTag() const
Get background tag.
Accessor to arrays stored in the data store.
T * appendNew()
Construct a new T object at the end of the array.
int getEntries() const
Get the number of objects in the array.
std::array< std::array< double, c_nTimeBins >, c_NTC > m_TCEnergy
TC Energy converted from Xtarl Energy [GeV].
std::array< std::array< double, c_nTimeBins >, c_NTC > m_TCBkgContribution
Beambackground contribution.
virtual ~TrgEclDigitizer()
Destructor.
std::array< float, c_NSamplingDigi01 > m_Xpr
Random parallel noise.
void save(int)
save fitting result into tables
std::array< std::array< double, 64 >, 64 > m_MatrixParallel
Noise Matrix of Parallel and Serial Noise.
void initialize()
Initialize the class.
static constexpr int c_nTimeBins
Numer of time bins.
std::array< std::array< double, c_nTimeBins >, c_NTC > m_TCTiming
TC Timing converted from Xtarl Timing [GeV].
static constexpr int c_NTC
Number of ECL TriggerCells (TC)
std::array< float, c_NSamplingDigi01 > m_noiseParallel
Noise from parallel.
std::array< float, c_NSamplingDigi01 > m_Xsr
Random serial noise.
static constexpr int c_NSamplingDigi02
Numer of sampling points for digitizer02.
double m_WaveForm[c_NTC][c_NSamplingDigi01]
TC Energy converted from Xtarl Energy [GeV].
void digitization01(std::vector< std::vector< double > > &, std::vector< std::vector< double > > &)
fit method, digi with 125ns interval
static constexpr std::array< double, 245 > m_SignalAmp
Normalised FADC signal shape, sampled every 12 ns from 0 to 2928 ns.
std::array< std::array< double, c_nTimeBins >, c_NTC > m_TCSigContribution
Signal contribution.
int m_SaveTCWaveForm
Flag of waveform table.
std::array< std::array< double, c_nTimeBins >, c_NTC > m_TCBeambkgTag
Beambackground tag.
std::array< std::array< double, 60 >, c_NTC > m_TCRawBkgTag
Input Beambackground tag.
std::array< double, c_NTC > m_TCEnergy_tot
TC Energy converted from Xtarl Energy [GeV].
std::array< std::array< double, 64 >, 64 > m_MatrixSerial
Noise Low triangle Matrix of Serial noise.
double interFADC(double)
Faster FADC using interpolation.
void getTCHit()
get TC Hits from Xtal hits Set TC data m_sourceOfTC => 1=ECLHit, 2=ECLSimHit, 3=ECLHit+TRGECLBGTCHit ...
TrgEclDigitizer()
Constructor.
std::array< float, c_NSamplingDigi01 > m_noiseSerial
Noise from serial.
std::array< std::array< double, 60 >, c_NTC > m_TCRawTiming
Input TC timing[ns].
TrgEclDataBase * m_DataBase
Object of DataBase.
double FADC(int, double)
FADC.
double SimplifiedFADC(int, double)
FADC.
std::array< std::array< double, 60 >, c_NTC > m_TCRawEnergy
Input TC energy[GeV].
double u_max(double, double)
Find max value between 2 vals;.
void clear()
Clear all the data fields.
std::array< float, c_NSamplingDigi01 > m_noisePileup
Noise from pileup.
double ShapeF(double, double, double, double, double, double, double)
return shape using FADC function
void digitization02(std::vector< std::vector< double > > &, std::vector< std::vector< double > > &)
original no fit method, digi with 12ns interval
static constexpr int c_nECLCrystals
Numer of time bins.
int m_FADC
Flag of choosing the method of waveform generation function 0: use simplifiedFADC,...
TrgEclMapping * m_TCMap
Object of TC Mapping.
int m_BeambkgTag
Flag of saving beam background tag or not.
int m_sourceOfTC
Which TC source to use.
double m_TimeRange
time range(default : -4000 ~ 4000 ns )
static constexpr int c_NSamplingDigi01
Numer of sampling points for digitizer01.
std::array< double, c_NTC > m_TCTiming_tot
TC Timing converted from Xtarl Timing [GeV].
static const double ns
Standard of [time].
static const double GeV
Standard of [energy, momentum, mass].
static const double realNaN
This collects the B-meson properties in the hadronic B-decays It is used for the Ecms calibration in ...
Abstract base class for different kinds of events.