Belle II Software  release-06-01-15
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 >> &)
 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 829 of file TrgEclDigitizer.cc.

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