Belle II Software  release-05-02-19
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 ()
 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 >> &)
 orignal 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(defult : -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 Beambackgroun 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 28 of file TrgEclDigitizer.h.

Member Function Documentation

◆ SimplifiedFADC()

double SimplifiedFADC ( int  flag_gen,
double  timing 
)

FADC.

Faster FADC

Definition at line 807 of file TrgEclDigitizer.cc.

809 {
810 
811  //--------------------------------------
812  //
813  // o "timing" unit is [us]
814  // o flag_gen = 0(=signal), 1(=parallel), 2(=serial)
815  // o return value(PDF) is [GeV]
816  // o Generate signal shape using a simplified function.
817  //
818  //
819  //--------------------------------------
820  double tsh, dd;
821  static double tc, tc2, tsc, tris;
822  static double amp, td, t1, t2, dft, as;
823 
824 
825  // int im, ij;
826 
827  static int ifir = 0;
828 
829  if (ifir == 0) {
830 
831  td = 0.10; // diff time ( 0.10)
832  t1 = 0.10; // integ1 real ( 0.10)
833  // b1 = 30.90; // integ1 imag ( 30.90)
834  t2 = 0.01; // integ2 real ( 0.01)
835  // b2 = 30.01; // integ2 imag ( 30.01)
836  double ts = 1.00; // scint decay ( 1.00)
837  dft = 0.600; // diff delay ( 0.600)
838  as = 0.548; // diff frac ( 0.548)
839  //
840  amp = 1.0;
841  tris = 0.01;
842  // ts0 = 0.0;
843  tsc = ts;
844  double fm = 0;
845  //
846  int im = 0;
847  int ij = 0;
848  tc = 0;
849  double tt = u_max(u_max(td, t1), u_max(t2, ts)) * 2;
850  int flag_once = 0;
851  while (flag_once == 0) {
852  double dt = tt / 1000;
853 
854  double tm = 0;
855  for (int j = 1; j <= 1000; j++) {
856  tc2 = tc - dft;
857  double fff =
858  (ShapeF(tc, tsc) -
859  ShapeF(tc, tris) * 0.01) -
860  (ShapeF(tc2, tsc) -
861  ShapeF(tc2, tris) * 0.01) * as;
862  if (fff > fm) {
863  fm = fff;
864  tm = tc;
865  im = j;
866  }
867  tc = tc + dt;
868  }
869  if (im >= 1000) {
870  tt = 2 * tt;
871  flag_once = 0;
872  continue;
873  }
874  if (ij == 0) {
875  ij = 1;
876  tc = 0.99 * tm;
877  dt = tm * 0.02 / 1000;
878  flag_once = 0;
879  continue;
880  }
881  flag_once = 1;
882  }
883  amp = 1.0 / fm;
884  ifir = 1;
885  }
886  //
887  //
888  double pdf = 0;
889  if (flag_gen == 0) {
890  //-----<signal>
891  tc2 = timing - dft;
892  pdf = amp * (
893  (ShapeF(timing, tsc) -
894  ShapeF(timing, tris) * 0.01) -
895  (ShapeF(tc2, tsc) -
896  ShapeF(tc2, tris) * 0.01) * as);
897  } else if (flag_gen == 1) {
898  //-----<parallel>
899  tc2 = timing - dft;
900  tsh = 0.001;
901  pdf = amp * (
902  ShapeF(timing, tsh) -
903  ShapeF(tc2, tsh) * as);
904  pdf = pdf * 0.001; // GeV
905  } else {
906  //-----<serial>
907  tc2 = timing - dft;
908  tsh = 0.001;
909  pdf = amp * (
910  ShapeF(timing, tsh) -
911  ShapeF(tc2, tsh) * as);
912  //
913  tc = timing - 0.01;
914  if (tc < 0) { tc = 0; }
915  dd = timing - tc;
916  tc2 = tc - dft;
917  pdf = (amp * (
918  ShapeF(tc, tsh) -
919  ShapeF(tc2, tsh) * as) - pdf) / dd;
920  pdf = pdf * 0.001; // GeV
921  }
922 
923  return pdf;
924 }

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 95 of file TrgEclDigitizer.h.


The documentation for this class was generated from the following files:
Belle2::TrgEclDigitizer::ShapeF
double ShapeF(double, double, double, double, double, double, double)
return shape using FADC function
Definition: TrgEclDigitizer.cc:731
Belle2::TrgEclDigitizer::u_max
double u_max(double, double)
Find max value between 2 vals;.
Definition: TrgEclDigitizer.cc:1007