BOSS 7.0.1
BESIII Offline Software System
Loading...
Searching...
No Matches
Simulation/BOOST/TofSim/TofSim-00-02-28/TofSim/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 {
47 void print();
48 void setPar(int nstep, double E_weight);
49
50 //parameters fixed
52 int nstrip;
53 double strip_x[12];
54 double strip_z;
55 double strip_gap;
56 double ngap;
57 double gapWidth;
58 int nstep;
59 double stepWidth;
60 double E_weight;
61 double eCharge;
62 };
63
64 struct HitStruct
65 {
66 //HitStruct(const Param&);
68 void initial();
69 void print();
71 double calAvaLength();
72
74 int trkIndex;
75 int pdgCode;
76 int ions;
77 int strip;
78 int underStrip;
79 int gap;
80 double glbTime;
81 double locx;
82 double locy;
83 double locz;
84 double x;
85 double y;
86 double z;
87 double px;
88 double py;
89 double pz;
90 double v_propagate;
91 double tPropagate_sphi;
92 double tPropagate_xphi;
93
94
97 };
98
99 struct StripStruct
100 {
101 //StripStruct(const Param&);
103 void initial();
104 void print();
105 void avalanche();
107 long int calNextN(int num);
108 long int multiply(double rdm);
109 double calSigma();
110 void setPar(double V, double threshold, bool saturationFlag=true);
111 double getAlpha(double E);
112 double getEta(double E);
113 double getV(double E);
114
116 vector<HitStruct> hitStructCol;
117
118 //properties to get
119 int strip;
120 int trkIndex;
121 double tStart;
122 double tPropagate_sphi;
123 double tPropagate_xphi;
124 double tThreshold;
125 double charge;
126
127 //parameters to tune
128 double E;
129 double alpha;
130 double eta;
131 long int threshold;
132 double v_drift;
133 bool saturationFlag;
134 };
135
136
137 private:
138 Param m_param;
139 int partId;
140 int module;
141
142 double tdc_sphi;
143 double tdc_xphi;
144 double tdcRes_const;
145 double tdcRes;
146 double adc;
147 double adcRes_const;
148 double adcRes;
149
150 double time_leading_sphi;
151 double time_leading_xphi;
152 double time_trailing_sphi;
153 double time_trailing_xphi;
154
155 bool m_rootFlag;
156 string m_fileName;
157 double m_V;
158 double m_threshold;
159 TFile* m_file;
160 TTree* m_tree;
161
162 int m_nstep;
163 double m_E_weight;
164 bool m_saturationFlag;
165 int m_calTdcRes_charge_flag;
166 int m_charge2Time_flag;
167 int m_calAdcRes_charge_flag;
168
169 double m_partId;
170 double m_module;
171 double m_time_leading_sphi;
172 double m_time_leading_xphi;
173 double m_time_trailing_sphi;
174 double m_time_trailing_xphi;
175 double m_tdcRes;
176 double m_tdcRes_charge;
177 double m_adc;
178 double m_adcRes;
179 double m_adcRes_charge;
180 double m_strip;
181 double m_trkIndex;
182 double m_tStart;
183 double m_tPropagate_sphi;
184 double m_tPropagate_xphi;
185 double m_tThreshold;
186 double m_charge;
187 int m_nhit;
188 double m_ions_hit[10000];
189 double m_trkIndex_hit[10000];
190 double m_pdgCode_hit[10000];
191 double m_gap_hit[10000];
192 double m_underStrip_hit[10000];
193 double m_locx_hit[10000];
194 double m_locy_hit[10000];
195 double m_locz_hit[10000];
196 double m_x_hit[10000];
197 double m_y_hit[10000];
198 double m_z_hit[10000];
199 double m_px_hit[10000];
200 double m_py_hit[10000];
201 double m_pz_hit[10000];
202};
203
204
205#endif
206
G4TDigiCollection< BesTofDigi > BesTofDigitsCollection
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)
double charge2Time1(double charge_fC)
virtual void Digitize(ScintSingle *, BesTofDigitsCollection *)
double charge2Time(double charge_fC)
double calTdcRes_charge(double charge_fC)
int num[96]
Definition: ranlxd.c:373
void setPar(int nstep, double E_weight)
long int multiply(double rdm)
void setPar(double V, double threshold, bool saturationFlag=true)