QwGeant4
QweakSimUserPMTOnly_DetectorEvent.cc
Go to the documentation of this file.
1 
2 // QweakSimUserPMTOnly_DetectorEvent.cc
3 // Martin McHugh
4 // 2013-07-20
5 
6 /////// --------------------------------------------------------------------
7 
9 
10 /////// --------------------------------------------------------------------
11 
13 
14 /////// --------------------------------------------------------------------
15 
17 {
18  SecondaryElectronCount = 0;
19  Initialize();
20 }
21 
22 
23 
24 /////// --------------------------------------------------------------------
25 
27 {
28 }
29 
30 
31 
32 /////// --------------------------------------------------------------------
33 
35 {
36  //DetectorID = 0.0;
37 
39 
40  TrackID.clear();
41 
42  ParticleName.clear();
43  ParticleType.clear();
44 
45  GlobalTimeOfHit.clear();
46 
47  HasBeenHit = 0;
48  EdgeEventFlag.clear();
49  NbOfHits = 0;
50 
51  //if(SecondaryElectronCount)
52  //{
53  // delete[] SecElecLocalOriginX;
54  // delete[] SecElecLocalOriginY;
55  // delete[] SecElecLocalOriginZ;
56  //
57  // delete[] SecElecLocalMomentumX;
58  // delete[] SecElecLocalMomentumY;
59  // delete[] SecElecLocalMomentumZ;
60  //
61  // delete[] SecElecLocalEnergy;
62  //}
63 
64  //if(SecondaryElectronCount)
65  //{
66  //
67  // SecElecLocalOriginX.clear();
68  // SecElecLocalOriginY.clear();
69  // SecElecLocalOriginZ.clear();
70  //
71  // SecElecLocalMomentumX.clear();
72  // SecElecLocalMomentumY.clear();
73  // SecElecLocalMomentumZ.clear();
74  //
75  // SecElecLocalEnergy.clear();
76  //}
77  //
78 
79  //SecondaryElectronCount = 0;
80 
81  HitGlobalPositionX.clear();
82  HitGlobalPositionY.clear();
83  HitGlobalPositionZ.clear();
84 
85  HitLocalPositionX.clear();
86  HitLocalPositionY.clear();
87  HitLocalPositionZ.clear();
88 
89  HitLocalExitPositionX.clear();
90  HitLocalExitPositionY.clear();
91  HitLocalExitPositionZ.clear();
92 
93  OriginVertexPositionX.clear();
94  OriginVertexPositionY.clear();
95  OriginVertexPositionZ.clear();
96 
100 
104 
105  OriginVertexThetaAngle.clear();
106  OriginVertexPhiAngle.clear();
107 
108  OriginVertexKineticEnergy.clear();
109  OriginVertexTotalEnergy.clear();
110 
111  LocalVertexKineticEnergy.clear();
112  LocalVertexTotalEnergy.clear();
113 
114  //PrimaryQ2 = 0.0;
115  //CrossSection = 0.0;
116  //CrossSectionWeight = 0.0;
117 
118  GlobalPhiAngle.clear();
119  GlobalThetaAngle.clear();
120 
121  //--- deposited energy in the PMTOnly in one step
122  DepositedEnergy.clear();
123  //--- total deposited energy in the PMTOnly in one event
124  TotalDepositedEnergy = 0.0;
125 }
126 
127 
128 
129 /////// --------------------------------------------------------------------
130 
131 // void QweakSimUserPMTOnly_DetectorEvent::AddSecondaryElectronEvent(Float_t XO, Float_t YO, Float_t ZO,
132 // Float_t XM, Float_t YM, Float_t ZM,
133 // Float_t Eng)
134 // {
135 // G4int cnt = SecondaryElectronCount;
136 //
137 // Float_t *tmp1X = NULL;
138 // Float_t *tmp1Y = NULL;
139 // Float_t *tmp1Z = NULL;
140 //
141 // Float_t *tmp2X = NULL;
142 // Float_t *tmp2Y = NULL;
143 // Float_t *tmp2Z = NULL;
144 //
145 // Float_t *tmp3 = NULL;
146 //
147 // if(cnt){
148 // tmp1X = new Float_t[cnt];
149 // tmp1Y = new Float_t[cnt];
150 // tmp1Z = new Float_t[cnt];
151 //
152 // tmp2X = new Float_t[cnt];
153 // tmp2Y = new Float_t[cnt];
154 // tmp2Z = new Float_t[cnt];
155 //
156 // tmp3 = new Float_t[cnt];
157 // }
158 //
159 // for(Int_t i = 0; i < cnt; i++){
160 // tmp1X[i] = SecElecLocalOriginX[i];
161 // tmp1Y[i] = SecElecLocalOriginY[i];
162 // tmp1Z[i] = SecElecLocalOriginZ[i];
163 //
164 // tmp2X[i] = SecElecLocalMomentumX[i];
165 // tmp2Y[i] = SecElecLocalMomentumY[i];
166 // tmp2Z[i] = SecElecLocalMomentumZ[i];
167 //
168 // tmp3[i] = SecElecLocalEnergy[i];
169 // }
170 //
171 // if(cnt && SecElecLocalOriginX) delete[] SecElecLocalOriginX;
172 // if(cnt && SecElecLocalOriginY) delete[] SecElecLocalOriginY;
173 // if(cnt && SecElecLocalOriginZ) delete[] SecElecLocalOriginZ;
174 //
175 // if(cnt && SecElecLocalMomentumX) delete[] SecElecLocalMomentumX;
176 // if(cnt && SecElecLocalMomentumX) delete[] SecElecLocalMomentumY;
177 // if(cnt && SecElecLocalMomentumX) delete[] SecElecLocalMomentumZ;
178 //
179 // if(cnt && SecElecLocalEnergy) delete[] SecElecLocalEnergy;
180 //
181 // SecElecLocalOriginX = new Float_t[cnt+1];
182 // SecElecLocalOriginY = new Float_t[cnt+1];
183 // SecElecLocalOriginZ = new Float_t[cnt+1];
184 //
185 // SecElecLocalMomentumX = new Float_t[cnt+1];
186 // SecElecLocalMomentumY = new Float_t[cnt+1];
187 // SecElecLocalMomentumZ = new Float_t[cnt+1];
188 //
189 // SecElecLocalEnergy = new Float_t[cnt+1];
190 //
191 // for(Int_t i = 0; i < cnt; i++) {
192 // SecElecLocalOriginX[i] = tmp1X[i];
193 // SecElecLocalOriginY[i] = tmp1Y[i];
194 // SecElecLocalOriginZ[i] = tmp1Z[i];
195 //
196 // SecElecLocalMomentumX[i] = tmp2X[i];
197 // SecElecLocalMomentumY[i] = tmp2Y[i];
198 // SecElecLocalMomentumZ[i] = tmp2Z[i];
199 //
200 // SecElecLocalEnergy[i] = tmp3[i] ;
201 // }
202 
203 // SecElecLocalOriginX.push_back(XO);
204 // SecElecLocalOriginY.push_back(YO);
205 // SecElecLocalOriginZ.push_back(YO);
206 //
207 // SecElecLocalMomentumX.push_back(XM);
208 // SecElecLocalMomentumY.push_back(YM);
209 // SecElecLocalMomentumZ.push_back(ZM);
210 //
211 // SecElecLocalEnergy.push_back(Eng);
212 
213 // if(cnt){
214 // delete[] tmp1X;
215 // delete[] tmp1Y;
216 // delete[] tmp1Z;
217 //
218 // delete[] tmp2X;
219 // delete[] tmp2Y;
220 // delete[] tmp2Z;
221 //
222 // delete[] tmp3;
223 // }
224 //
225 // SecondaryElectronCount++;
226 // }
227 //
228 
229 
230 
231 /////// --------------------------------------------------------------------
232 
233 
234