CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
APV25GTS Class Reference

#include <APV25GTS.h>

Public Member Functions

 APV25GTS ()
 
 ~APV25GTS ()
 
void add_charge (double q, double t)
 
double compute_charge ()
 
double compute_tFD ()
 
void set_dtFD (double t)
 
void set_FD_par (int i, double p)
 
double get_dtFD ()
 
double get_FD_par (int i)
 
 APV25GTS ()
 
 ~APV25GTS ()
 
void add_charge (double q, double t)
 
double compute_charge ()
 
double compute_tFD ()
 
void set_dtFD (double t)
 
void set_FD_par (int i, double p)
 
double get_dtFD ()
 
double get_FD_par (int i)
 

Detailed Description

Constructor & Destructor Documentation

◆ APV25GTS() [1/2]

APV25GTS::APV25GTS ( )

Definition at line 14 of file APV25GTS.cxx.

14 : histo_q_vs_t(NULL) {
15 histo_q_vs_t = new TH1F("histo_q_vs_t", "", 27, 0, 675); // 25 ns x 27 time bins
16}

◆ ~APV25GTS() [1/2]

APV25GTS::~APV25GTS ( )

Definition at line 18 of file APV25GTS.cxx.

18 {
19 delete histo_q_vs_t;
20}

◆ APV25GTS() [2/2]

APV25GTS::APV25GTS ( )

◆ ~APV25GTS() [2/2]

APV25GTS::~APV25GTS ( )

Member Function Documentation

◆ add_charge() [1/2]

void APV25GTS::add_charge ( double  q,
double  t 
)

Definition at line 22 of file APV25GTS.cxx.

22 {
23 histo_q_vs_t->Fill(t, q);
24}
****INTEGER imax DOUBLE PRECISION m_pi *DOUBLE PRECISION m_amfin DOUBLE PRECISION m_Chfin DOUBLE PRECISION m_Xenph DOUBLE PRECISION m_sinw2 DOUBLE PRECISION m_GFermi DOUBLE PRECISION m_MfinMin DOUBLE PRECISION m_ta2 INTEGER m_out INTEGER m_KeyFSR INTEGER m_KeyQCD *COMMON c_Semalib $ !copy of input $ !CMS energy $ !beam mass $ !final mass $ !beam charge $ !final charge $ !smallest final mass $ !Z mass $ !Z width $ !EW mixing angle $ !Gmu Fermi $ alphaQED at q
Definition: KKsem.h:33
int t()
Definition: t.c:1

◆ add_charge() [2/2]

void APV25GTS::add_charge ( double  q,
double  t 
)

◆ compute_charge() [1/2]

double APV25GTS::compute_charge ( )

Definition at line 27 of file APV25GTS.cxx.

27 { // in fC
28 double qmax = histo_q_vs_t->GetMaximum();
29 double qmax_fC = qmax/ele_to_fC;
30 return qmax_fC;
31}
#define ele_to_fC
Definition: APV25GTS.cxx:11

Referenced by compute_tFD().

◆ compute_charge() [2/2]

double APV25GTS::compute_charge ( )

◆ compute_tFD() [1/2]

double APV25GTS::compute_tFD ( )

double zzz = (tFD-strip_t0-Get_Track_T0())*drift_velocity; // chech --> // This Z assign Z=0.5 to the cathode and Z=0 to G1 CHECK
set_APV25_Z(zzz);

if(Get_APV25_Q(iS)>qcut && Get_APV25_T(iS)!=0){ Set_APV25_X(iS,iS*pitch+0.5*pitch+x_min); }

Definition at line 33 of file APV25GTS.cxx.

33 {
34
35 // TIME from FERMI DIRAC %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
36 // start parameters
37 double maxbin = histo_q_vs_t->GetMaximumBin();
38 double QMaxHisto = compute_charge();
39
40 // double startBin = maxbin - 5;
41 // double endBin = maxbin + 10;
42 //find the lower edge of the rising @ 10% of the maximum
43 double minbin = 0;
44 for(int ibin = maxbin; ibin > 1; ibin--){
45 if(histo_q_vs_t->GetBinContent(ibin) < 0.1 * QMaxHisto) {
46 minbin = ibin;
47 break;
48 }
49 }
50 double startvalues[5] = {0};
51 double fitlimup[5] = {0};
52 double fitlimlow[5] = {0};
53 // media dei tre bin prima del minbin
54 double meanfirstbin = (histo_q_vs_t->GetBinContent(minbin-1) + histo_q_vs_t->GetBinContent(minbin-2) + histo_q_vs_t->GetBinContent(minbin-3))/3.;
55 double sigma_MFB = TMath::Sqrt( ( pow(histo_q_vs_t->GetBinContent(minbin-1) - meanfirstbin, 2) + pow(histo_q_vs_t->GetBinContent(minbin-2) - meanfirstbin,2) + pow(histo_q_vs_t->GetBinContent(minbin-3)- meanfirstbin,2)) / 3.);
56 if(sigma_MFB < TMath::Abs(meanfirstbin)) sigma_MFB = TMath::Abs(meanfirstbin);
57
58 startvalues[0] = meanfirstbin;
59 startvalues[1] = QMaxHisto;
60 startvalues[2] = 0.5* (minbin + maxbin) * tstep;
61 startvalues[3] = 0.5*tstep;
62
63 // put liimits
64 fitlimlow[0] = startvalues[0] - 2 * sigma_MFB;
65 fitlimlow[1] = startvalues[1] - 0.3 * startvalues[1];
66 fitlimlow[2] = minbin * tstep;
67 fitlimlow[3] = 0.1*tstep;
68
69 fitlimup[0] = startvalues[0] + 2 * sigma_MFB;
70 fitlimup[1] = startvalues[1] + 0.3 * startvalues[1];
71 fitlimup[2] = maxbin * tstep;
72 fitlimup[3] = 0.9*tstep;
73 // ...................
74 // the real Fermi Dirac
75 // 1
76 // FD(t) = K ----------------------------- + B
77 // 1 + exp( -(t - tFD)/sigFD )
78 // [0] = B
79 // [1] = K
80 // [2] = tFD
81 // [3] = sigFD
82 double minFD = minbin - 4;
83 double maxFD = maxbin + 0;
84
85 TF1 f_FD("f_FD", "[0] + [1]/(1+TMath::Exp(-(x - [2])/[3]))", minFD*tstep, maxFD*tstep);
86 f_FD.SetParameters(startvalues[0], startvalues[1], startvalues[2], startvalues[3]);
87 f_FD.SetParLimits(0, fitlimlow[0], fitlimup[0]);
88 f_FD.SetParLimits(1, fitlimlow[1], fitlimup[1]);
89 f_FD.SetParLimits(2, fitlimlow[2], fitlimup[2]);
90 f_FD.SetParLimits(3, fitlimlow[3], fitlimup[3]);
91
92 gStyle->SetOptFit(1111);
93 histo_q_vs_t->Fit("f_FD","WQRB"); // quiet/range/params
94
95 double tFD = 0;
96 tFD = gRandom->Gaus(f_FD.GetParameter(2), 8);
97 double dtFD = 0.;
98 dtFD = f_FD.GetParError(2);
99 set_dtFD(dtFD);
100
101 // save parameters
102 set_FD_par(0, f_FD.GetParameter(0));
103 set_FD_par(1, f_FD.GetParameter(1));
104 set_FD_par(2, f_FD.GetParameter(2));
105 set_FD_par(3, f_FD.GetParameter(3));
106
107
108 // CHECK
109 /**
110 double zzz = (tFD-strip_t0-Get_Track_T0())*drift_velocity; // chech --> // This Z assign Z=0.5 to the cathode and Z=0 to G1 CHECK
111 set_APV25_Z(zzz);
112
113 if(Get_APV25_Q(iS)>qcut && Get_APV25_T(iS)!=0){
114 Set_APV25_X(iS,iS*pitch+0.5*pitch+x_min);
115 }
116 **/
117
118 return tFD;
119}
#define tstep
Definition: APV25GTS.cxx:12
double compute_charge()
Definition: APV25GTS.cxx:27

◆ compute_tFD() [2/2]

double APV25GTS::compute_tFD ( )

◆ get_dtFD() [1/2]

double APV25GTS::get_dtFD ( )
inline

◆ get_dtFD() [2/2]

double APV25GTS::get_dtFD ( )
inline

Definition at line 18 of file InstallArea/include/CgemDigitizerSvc/CgemDigitizerSvc/APV25GTS.h.

18{ return dtFD; }

◆ get_FD_par() [1/2]

double APV25GTS::get_FD_par ( int  i)
inline

Definition at line 19 of file Cgem/CgemDigitizerSvc/CgemDigitizerSvc-00-00-24/CgemDigitizerSvc/APV25GTS.h.

19{ return FD_par[i]; }

◆ get_FD_par() [2/2]

double APV25GTS::get_FD_par ( int  i)
inline

Definition at line 19 of file InstallArea/include/CgemDigitizerSvc/CgemDigitizerSvc/APV25GTS.h.

19{ return FD_par[i]; }

◆ set_dtFD() [1/2]

void APV25GTS::set_dtFD ( double  t)
inline

Definition at line 15 of file Cgem/CgemDigitizerSvc/CgemDigitizerSvc-00-00-24/CgemDigitizerSvc/APV25GTS.h.

15{ dtFD = t; }

Referenced by compute_tFD().

◆ set_dtFD() [2/2]

void APV25GTS::set_dtFD ( double  t)
inline

Definition at line 15 of file InstallArea/include/CgemDigitizerSvc/CgemDigitizerSvc/APV25GTS.h.

15{ dtFD = t; }

◆ set_FD_par() [1/2]

void APV25GTS::set_FD_par ( int  i,
double  p 
)
inline

Definition at line 16 of file Cgem/CgemDigitizerSvc/CgemDigitizerSvc-00-00-24/CgemDigitizerSvc/APV25GTS.h.

16{ FD_par[i] = p; }

Referenced by compute_tFD().

◆ set_FD_par() [2/2]

void APV25GTS::set_FD_par ( int  i,
double  p 
)
inline

Definition at line 16 of file InstallArea/include/CgemDigitizerSvc/CgemDigitizerSvc/APV25GTS.h.

16{ FD_par[i] = p; }

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