Belle II Software  release-08-01-10
TrgEclDigitizer Class Reference

FAM module
More...

#include <TrgEclDigitizer.h>

Inheritance diagram for TrgEclDigitizer:
Collaboration diagram for TrgEclDigitizer:

Public Member Functions

 TrgEclDigitizer ()
 Constructor.
 
virtual ~TrgEclDigitizer ()
 Destructor.
 
void setup (int)
 setup fam module

 
void getTCHit (int)
 get TC Hits from Xtal hits
 
void digitization01 (std::vector< std::vector< double >> &, std::vector< std::vector< double >> &)
 fit method, digi with 125ns interval
 
void digitization02 (std::vector< std::vector< double >> &, std::vector< std::vector< double >> &)
 original no fit method, digi with 12ns interval
 
void save (int)
 save fitting result into tables
 
void setWaveform (int wave)
 Set flag of waveform table.
 
void setFADC (int fadc)
 Set flag of waveform table.
 
double FADC (int, double)
 FADC

 
double SimplifiedFADC (int, double)
 FADC. More...
 
double interFADC (double)
 Faster FADC using interpolation.
 
double ShapeF (double, double, double, double, double, double, double)
 return shape using FADC function

 
double ShapeF (double, double)
 Return shape using Simplified FADC.
 
double u_max (double, double)
 Find max value between 2 vals;.
 

Private Attributes

double TimeRange
 time range(default : -4000 ~ 4000 ns )
 
double TCEnergy [576][80]
 TC Energy converted from Xtarl Energy [GeV].
 
double TCTiming [576][80]
 TC Timing converted from Xtarl Timing [GeV].
 
double TCEnergy_tot [576]
 TC Energy converted from Xtarl Energy [GeV].
 
double TCTiming_tot [576]
 TC Timing converted from Xtarl Timing [GeV].
 
double TCRawEnergy [576][60]
 Input TC energy[GeV].
 
double TCRawTiming [576][60]
 Input TC timing[ns]

 
double TCRawBkgTag [576][60]
 Input Beambackground tag

 
TrgEclMapping_TCMap
 Object of TC Mapping.
 
TrgEclDataBase_DataBase
 Object of DataBase.
 
std::vector< std::vector< double > > MatrixParallel
 Noise Matrix of Parallel and Serial Noise. More...
 
std::vector< std::vector< double > > MatrixSerial
 Noise Low triangle Matrix of Serial noise

 
double TCBkgContribution [576][80]
 Beambackground contribution.
 
double TCSigContribution [576][80]
 Signal contribution.
 
int TCBeambkgTag [576][80]
 Beambackground tag.
 
int _waveform
 Flag of waveform table.
 
double WaveForm [576][64]
 TC Energy converted from Xtarl Energy [GeV].
 
int _FADC
 Flag of choosing the method of waveform generation function 0: use simplifiedFADC, 1: use interFADC(interpolation)
 
int _BeambkgTag
 Flag of saving beam background tag or not.
 

Detailed Description

FAM module

Definition at line 24 of file TrgEclDigitizer.h.

Member Function Documentation

◆ SimplifiedFADC()

double SimplifiedFADC ( int  flag_gen,
double  timing 
)

FADC.

Faster FADC

Definition at line 838 of file TrgEclDigitizer.cc.

840 {
841 
842  //--------------------------------------
843  //
844  // o "timing" unit is [us]
845  // o flag_gen = 0(=signal), 1(=parallel), 2(=serial)
846  // o return value(PDF) is [GeV]
847  // o Generate signal shape using a simplified function.
848  //
849  //
850  //--------------------------------------
851  double tsh, dd;
852  static double tc, tc2, tsc, tris;
853  static double amp, dft, as;
854 
855 
856  // int im, ij;
857 
858  static int ifir = 0;
859 
860  if (ifir == 0) {
861 
862  const double td = 0.10; // diff time ( 0.10)
863  const double t1 = 0.10; // integ1 real ( 0.10)
864  // b1 = 30.90; // integ1 imag ( 30.90)
865  const double t2 = 0.01; // integ2 real ( 0.01)
866  // b2 = 30.01; // integ2 imag ( 30.01)
867  double ts = 1.00; // scint decay ( 1.00)
868  dft = 0.600; // diff delay ( 0.600)
869  as = 0.548; // diff frac ( 0.548)
870  //
871  amp = 1.0;
872  tris = 0.01;
873  // ts0 = 0.0;
874  tsc = ts;
875  double fm = 0;
876  //
877  int im = 0;
878  int ij = 0;
879  tc = 0;
880  double tt = u_max(u_max(td, t1), u_max(t2, ts)) * 2;
881  int flag_once = 0;
882  while (flag_once == 0) {
883  double dt = tt / 1000;
884 
885  double tm = 0;
886  for (int j = 1; j <= 1000; j++) {
887  tc2 = tc - dft;
888  double fff =
889  (ShapeF(tc, tsc) -
890  ShapeF(tc, tris) * 0.01) -
891  (ShapeF(tc2, tsc) -
892  ShapeF(tc2, tris) * 0.01) * as;
893  if (fff > fm) {
894  fm = fff;
895  tm = tc;
896  im = j;
897  }
898  tc = tc + dt;
899  }
900  if (im >= 1000) {
901  tt = 2 * tt;
902  flag_once = 0;
903  continue;
904  }
905  if (ij == 0) {
906  ij = 1;
907  tc = 0.99 * tm;
908  dt = tm * 0.02 / 1000;
909  flag_once = 0;
910  continue;
911  }
912  flag_once = 1;
913  }
914  amp = 1.0 / fm;
915  ifir = 1;
916  }
917  //
918  //
919  double pdf = 0;
920  if (flag_gen == 0) {
921  //-----<signal>
922  tc2 = timing - dft;
923  pdf = amp * (
924  (ShapeF(timing, tsc) -
925  ShapeF(timing, tris) * 0.01) -
926  (ShapeF(tc2, tsc) -
927  ShapeF(tc2, tris) * 0.01) * as);
928  } else if (flag_gen == 1) {
929  //-----<parallel>
930  tc2 = timing - dft;
931  tsh = 0.001;
932  pdf = amp * (
933  ShapeF(timing, tsh) -
934  ShapeF(tc2, tsh) * as);
935  pdf = pdf * 0.001; // GeV
936  } else {
937  //-----<serial>
938  tc2 = timing - dft;
939  tsh = 0.001;
940  pdf = amp * (
941  ShapeF(timing, tsh) -
942  ShapeF(tc2, tsh) * as);
943  //
944  tc = timing - 0.01;
945  if (tc < 0) { tc = 0; }
946  dd = timing - tc;
947  tc2 = tc - dft;
948  pdf = (amp * (
949  ShapeF(tc, tsh) -
950  ShapeF(tc2, tsh) * as) - pdf) / dd;
951  pdf = pdf * 0.001; // GeV
952  }
953 
954  return pdf;
955 }
double u_max(double, double)
Find max value between 2 vals;.
double ShapeF(double, double, double, double, double, double, double)
return shape using FADC function

Member Data Documentation

◆ MatrixParallel

std::vector<std::vector<double> > MatrixParallel
private

Noise Matrix of Parallel and Serial Noise.

Noise Low triangle Matrix of Parallel noise

Definition at line 96 of file TrgEclDigitizer.h.


The documentation for this class was generated from the following files: