BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
BesTofDigitizerEcV4.hh
Go to the documentation of this file.
1//---------------------------------------------------------------------------//
2// BOOST --- BESIII Object_Oriented Simulation Tool //
3//---------------------------------------------------------------------------//
4//Description:
5//Author: An Fenfen
6//Created: Nov, 2015
7
8//---------------------------------------------------------------------------//
9// $Id: BesTofDigitizerEcV4.hh
10
11#ifndef BesTofDigitizerEcV4_h
12#define BesTofDigitizerEcV4_h 1
13
14#include "BesTofDigitizerV.hh"
15#include "BesTofDigi.hh"
16#include "BesTofGeoParameter.hh"
17#include "globals.hh"
18#include "TFile.h"
19#include "TTree.h"
20#include "ScintSingle.hh"
21#include <vector>
22
23using namespace std;
24
25typedef std::map<int, double> AVALANCH;
26
28{
29 public:
32
33 void initial();
35 int calStrip(double locZ);
36 bool underStrip(double locX, double locZ);
37 double calTdcRes_charge(double charge_fC);
38 double charge2Time(double charge_fC);
39 double calAdcRes_charge(double charge_fC);
40 double calTdcRes_charge1(double charge_fC);
41 double charge2Time1(double charge_fC);
42 double calAdcRes_charge1(double charge_fC);
43
44 struct Param
45 {
46 Param();
47 void print();
48 void setPar(int nstep, double E_weight, double E);
49 double getAlpha(double E);
50 double getEta(double E);
51 double getV(double E);
52
53 //parameters fixed
55 int nstrip;
57 double strip_x[12];
58 double strip_z;
59 double strip_gap;
60 int deadChannel[72][12];
61 double ngap;
62 double gapWidth;
63 int nstep;
64 double stepWidth;
65 double E_weight;
66 double eCharge;
67 double E;
68 double alpha;
69 double eta;
70 double v_drift;
71 };
72
73 struct HitStruct
74 {
75 HitStruct();
76 void initial();
77 void print();
78 void calTPropagate();
79 double calAvaLength();
80
84 int ions;
85 int strip;
87 int gap;
88 double glbTime;
89 double locx;
90 double locy;
91 double locz;
92 double x;
93 double y;
94 double z;
95 double px;
96 double py;
97 double pz;
101
102
105 };
106
108 {
109 StripStruct();
110 void initial();
111 void print();
112 void avalanche();
113 void calFirstHit();
114 long int calNextN(int num);
115 long int multiply(double rdm);
116 double calSigma();
117 void setPar(double alpha_n, double eta_n, double drift_n, double threshold, bool saturationFlag=true);
118
120 vector<HitStruct> hitStructCol;
121
122 //properties to get
123 int strip;
125 double tStart;
129 double charge;
130
131 //parameters to tune
132 double E;
133 double alpha;
134 double eta;
135 long int threshold;
136 double v_drift;
138 };
139
140
141 private:
142 Param m_param;
143 int partId;
144 int module;
145
146 double tdc_sphi;
147 double tdc_xphi;
148 double tdcRes_const;
149 double tdcRes;
150 double adc;
151 double adcRes_const;
152 double adcRes;
153
154 double time_leading_sphi;
155 double time_leading_xphi;
156 double time_trailing_sphi;
157 double time_trailing_xphi;
158
159 bool m_rootFlag;
160 string m_fileName;
161 double m_V;
162 double m_threshold;
163 TFile* m_file;
164 TTree* m_tree;
165
166 int m_nstep;
167 double m_E_weight;
168 bool m_saturationFlag;
169 int m_calTdcRes_charge_flag;
170 int m_charge2Time_flag;
171 int m_calAdcRes_charge_flag;
172
173 double m_event;
174 double m_partId;
175 double m_module;
176 double m_time_leading_sphi;
177 double m_time_leading_xphi;
178 double m_time_trailing_sphi;
179 double m_time_trailing_xphi;
180 double m_tdcRes;
181 double m_tdcRes_charge;
182 double m_adc;
183 double m_adcRes;
184 double m_adcRes_charge;
185 double m_strip;
186 double m_trkIndex;
187 double m_tStart;
188 double m_tPropagate_sphi;
189 double m_tPropagate_xphi;
190 double m_tThreshold;
191 double m_charge;
192 int m_nhit;
193 double m_ions_hit[10000];
194 double m_trkIndex_hit[10000];
195 double m_pdgCode_hit[10000];
196 double m_gap_hit[10000];
197 double m_underStrip_hit[10000];
198 double m_locx_hit[10000];
199 double m_locy_hit[10000];
200 double m_locz_hit[10000];
201 double m_x_hit[10000];
202 double m_y_hit[10000];
203 double m_z_hit[10000];
204 double m_px_hit[10000];
205 double m_py_hit[10000];
206 double m_pz_hit[10000];
207};
208
209
210#endif
211
G4TDigiCollection< BesTofDigi > BesTofDigitsCollection
Definition: BesTofDigi.hh:79
std::map< int, double > AVALANCH
double calTdcRes_charge1(double charge_fC)
double calAdcRes_charge(double charge_fC)
double calAdcRes_charge1(double charge_fC)
bool underStrip(double locX, double locZ)
int calStrip(double locZ)
virtual void Digitize(ScintSingle *, BesTofDigitsCollection *)
double charge2Time1(double charge_fC)
double charge2Time(double charge_fC)
double calTdcRes_charge(double charge_fC)
BesTofGeoParameter * tofPara
void setPar(int nstep, double E_weight, double E)
void setPar(double alpha_n, double eta_n, double drift_n, double threshold, bool saturationFlag=true)