CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
KalFitReadGdml.cxx
Go to the documentation of this file.
1#include "G4Geo/MdcG4Geo.h"
2#include "G4Geo/BesG4Geo.h"
3#include "G4Geo/CgemG4Geo.h"
4#include "KalFitAlg/KalFitAlg.h"
5#include "KalFitAlg/KalFitTrack.h"
6#include "G4Material.hh"
7#include "G4Tubs.hh"
8#include "GDMLProcessor.hh"
9#include "G4NistManager.hh"
10#include "math.h"
11
13
14 int i(0);
15 double Z(0.),A(0.),Ionization(0.),Density(0.),Radlen(0.);
16
17 G4LogicalVolume *logicalMdc = 0;
18 MdcG4Geo* aMdcG4Geo = new MdcG4Geo();
19 logicalMdc = aMdcG4Geo->GetTopVolume();
20
21 ///--- mdcgas
22 G4Material* mdcMaterial = logicalMdc->GetMaterial();
23 for(i=0; i<mdcMaterial->GetElementVector()->size(); i++){
24 Z += (mdcMaterial->GetElement(i)->GetZ())*
25 (mdcMaterial->GetFractionVector()[i]);
26 A += (mdcMaterial->GetElement(i)->GetA())*
27 (mdcMaterial->GetFractionVector()[i]);
28 }
29 Ionization = mdcMaterial->GetIonisation()->GetMeanExcitationEnergy();
30 Density = mdcMaterial->GetDensity()/(g/cm3);
31 Radlen = mdcMaterial->GetRadlen();
32 cout<<"mdcgas: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
33 KalFitMaterial FitMdcMaterial(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
34 _BesKalmanFitMaterials.push_back(FitMdcMaterial);
35 KalFitTrack::mdcGasRadlen_ = Radlen/10.;
36 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
37 /*
38 ///--- inner wall shield fiml1 Al by wangll 2012-09-07
39 G4LogicalVolume* innerWallFilm1Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume("LogicalMdcInnerFilm1"));
40 G4Material* innerWallFilm1Material = innerWallFilm1Volume->GetMaterial();
41 G4Tubs* innerwallFilm1Tub = dynamic_cast<G4Tubs*>(innerWallFilm1Volume->GetSolid());
42
43 Z = 0.;
44 A = 0.;
45 for(i=0; i<innerWallFilm1Material->GetElementVector()->size(); i++){
46 Z += (innerWallFilm1Material->GetElement(i)->GetZ())*
47 (innerWallFilm1Material->GetFractionVector()[i]);
48 A += (innerWallFilm1Material->GetElement(i)->GetA())*
49 (innerWallFilm1Material->GetFractionVector()[i]);
50 }
51
52 Ionization = innerWallFilm1Material->GetIonisation()->GetMeanExcitationEnergy();
53 Density = innerWallFilm1Material->GetDensity()/(g/cm3);
54 Radlen = innerWallFilm1Material->GetRadlen();
55 std::cout<<"Mdc innerwall Film1, Al: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<std::endl;
56 KalFitMaterial FitInnerwallFilm1Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
57 _BesKalmanFitMaterials.push_back(FitInnerwallFilm1Material);
58
59
60 ///--- inner wall CarbonFiber by wll 2012-09-06
61 G4LogicalVolume* innerwallVolume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume("logicalMdcSegment2"));
62 G4Material* innerwallMaterial = innerwallVolume->GetMaterial();
63 G4Tubs* innerwallTub = dynamic_cast<G4Tubs*>(innerwallVolume->GetSolid());
64
65 Z = 0.;
66 A = 0.;
67 for(i=0; i<innerwallMaterial->GetElementVector()->size(); i++){
68 Z += (innerwallMaterial->GetElement(i)->GetZ())*
69 (innerwallMaterial->GetFractionVector()[i]);
70 A += (innerwallMaterial->GetElement(i)->GetA())*
71 (innerwallMaterial->GetFractionVector()[i]);
72 }
73
74 Ionization = innerwallMaterial->GetIonisation()->GetMeanExcitationEnergy();
75 Density = innerwallMaterial->GetDensity()/(g/cm3);
76 Radlen = innerwallMaterial->GetRadlen();
77 cout<<"Mdc innerwall, Al: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
78 KalFitMaterial FitInnerwallMaterial(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
79 _BesKalmanFitMaterials.push_back(FitInnerwallMaterial);
80
81 ///--- inner wall shield film0 Al by wangll 2012-09-07
82 G4LogicalVolume* innerWallFilm0Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume("LogicalMdcInnerFilm0"));
83 G4Material* innerWallFilm0Material = innerWallFilm0Volume->GetMaterial();
84 G4Tubs* innerwallFilm0Tub = dynamic_cast<G4Tubs*>(innerWallFilm0Volume->GetSolid());
85
86 Z = 0.;
87 A = 0.;
88 for(i=0; i<innerWallFilm0Material->GetElementVector()->size(); i++){
89 Z += (innerWallFilm0Material->GetElement(i)->GetZ())*
90 (innerWallFilm0Material->GetFractionVector()[i]);
91 A += (innerWallFilm0Material->GetElement(i)->GetA())*
92 (innerWallFilm0Material->GetFractionVector()[i]);
93 }
94
95 Ionization = innerWallFilm0Material->GetIonisation()->GetMeanExcitationEnergy();
96 Density = innerWallFilm0Material->GetDensity()/(g/cm3);
97 Radlen = innerWallFilm0Material->GetRadlen();
98 std::cout<<"Mdc innerwall Film0, Al: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<std::endl;
99 KalFitMaterial FitInnerwallFilm0Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
100 _BesKalmanFitMaterials.push_back(FitInnerwallFilm0Material);
101
102*/
103 //////////////////////////////////////////////////////////////////////////////////////////////////
104 G4LogicalVolume *logicalCgem = 0;
105 CgemG4Geo* aCgemG4Geo = new CgemG4Geo();
106 logicalCgem = aCgemG4Geo->GetTopVolume();
107
108 ///--- CarbonFiber, Separator between ODC and Cgem
109 G4LogicalVolume* SeparatorVolume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume("Separator_logic"));
110 G4Material* SeparatorMaterial = SeparatorVolume->GetMaterial();
111 G4Tubs* SeparatorTub = dynamic_cast<G4Tubs*>(SeparatorVolume->GetSolid());
112
113 Z = 0.;
114 A = 0.;
115 for(i=0; i<SeparatorMaterial->GetElementVector()->size(); i++){
116 Z += (SeparatorMaterial->GetElement(i)->GetZ())*
117 (SeparatorMaterial->GetFractionVector()[i]);
118 A += (SeparatorMaterial->GetElement(i)->GetA())*
119 (SeparatorMaterial->GetFractionVector()[i]);
120 }
121
122 Ionization = SeparatorMaterial->GetIonisation()->GetMeanExcitationEnergy();
123 Density = SeparatorMaterial->GetDensity()/(g/cm3);
124 Radlen = SeparatorMaterial->GetRadlen();
125 cout<<"Separator: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
126 KalFitMaterial FitSeparatorMaterial(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
127 _BesKalmanFitMaterials.push_back(FitSeparatorMaterial);
128 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
129
130 int nCgemLayer = 3;
131 //G4Tubs* SK2Tub[3];
132 //G4Tubs* HCTub[3];
133 //G4Tubs* SK1Tub[3];
134 //G4Tubs* AA2Tub[3];
135 G4Tubs* AK4Tub[3];
136 G4Tubs* AC3Tub[3];
137 G4Tubs* AE5Tub[3];
138 G4Tubs* AR2Tub[3];
139 G4Tubs* AE4Tub[3];
140 G4Tubs* AK3Tub[3];
141 G4Tubs* AE3Tub[3];
142 G4Tubs* AR1Tub[3];
143 G4Tubs* AE2Tub[3];
144 G4Tubs* AK2Tub[3];
145 G4Tubs* AE1Tub[3];
146 G4Tubs* AC2Tub[3];
147 G4Tubs* AK1Tub[3];
148 G4Tubs* AC1Tub[3];
149 //G4Tubs* AA1Tub[3];
150
151 G4Tubs* GAPITub[3];
152
153 G4Tubs* FC22Tub[3];
154 G4Tubs* FK2Tub[3];
155 G4Tubs* FC12Tub[3];
156
157 G4Tubs* GAPT2Tub[3];
158
159 G4Tubs* FC21Tub[3];
160 G4Tubs* FK1Tub[3];
161 G4Tubs* FC11Tub[3];
162
163 G4Tubs* GAPT1Tub[3];
164
165 G4Tubs* FC20Tub[3];
166 G4Tubs* FK0Tub[3];
167 G4Tubs* FC10Tub[3];
168
169 G4Tubs* GAPDTub[3];
170
171 //G4Tubs* C2Tub[3];
172 G4Tubs* CCuTub[3];
173 G4Tubs* CK3Tub[3];
174 G4Tubs* CE4Tub[3];
175 G4Tubs* CR2Tub[3];
176 G4Tubs* CE3Tub[3];
177 G4Tubs* CK2Tub[3];
178 G4Tubs* CE2Tub[3];
179 G4Tubs* CR1Tub[3];
180 G4Tubs* CE1Tub[3];
181 //G4Tubs* CHTub[3];
182 //G4Tubs* CC1Tub[3];
183 G4Tubs* CK1Tub[3];
184
185 stringstream ss;
186 string s;
187 for(int j=2;j>=0;j--){
188 /*
189 ///--- shield kapton2
190 ss.str("");
191 ss << "Shield_Kapton2_logic" << j ;
192 s = ss.str();
193 G4LogicalVolume* logicalSK2Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
194 G4Material* SK2Material = logicalSK2Volume->GetMaterial();
195 SK2Tub[j] = dynamic_cast<G4Tubs*>(logicalSK2Volume->GetSolid());
196 cout << logicalSK2Volume->GetSolid()->GetName() << endl;
197 Z = 0.;
198 A = 0.;
199 for(i=0; i<SK2Material->GetElementVector()->size(); i++){
200 Z += (SK2Material->GetElement(i)->GetZ())*
201 (SK2Material->GetFractionVector()[i]);
202 A += (SK2Material->GetElement(i)->GetA())*
203 (SK2Material->GetFractionVector()[i]);
204 }
205 Ionization = SK2Material->GetIonisation()->GetMeanExcitationEnergy();
206 Density = SK2Material->GetDensity()/(g/cm3);
207 Radlen = SK2Material->GetRadlen();
208 cout<<"SK2: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
209
210 KalFitMaterial FitSK2Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
211
212 _BesKalmanFitMaterials.push_back(FitSK2Material);
213 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
214 */
215 /*
216 ///--- shield honeycomb
217 ss.str("");
218 ss << "Shield_Honeycomb_logic" << j ;
219 s = ss.str();
220 cout << s << endl;
221 G4LogicalVolume* logicalHCVolume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
222 G4Material* HCMaterial = logicalHCVolume->GetMaterial();
223 HCTub[j] = dynamic_cast<G4Tubs*>(logicalHCVolume->GetSolid());
224 cout << logicalHCVolume->GetSolid()->GetName() << endl;
225 Z = 0.;
226 A = 0.;
227 for(i=0; i<HCMaterial->GetElementVector()->size(); i++){
228 Z += (HCMaterial->GetElement(i)->GetZ())*
229 (HCMaterial->GetFractionVector()[i]);
230 A += (HCMaterial->GetElement(i)->GetA())*
231 (HCMaterial->GetFractionVector()[i]);
232 }
233 Ionization = HCMaterial->GetIonisation()->GetMeanExcitationEnergy();
234 Density = HCMaterial->GetDensity()/(g/cm3);
235 Radlen = HCMaterial->GetRadlen();
236 cout<<"HC: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
237 KalFitMaterial FitHCMaterial(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
238 _BesKalmanFitMaterials.push_back(FitHCMaterial);
239 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
240 */
241 /*
242 ///--- shield kapton1
243 ss.str("");
244 ss << "Shield_Kapton1_logic" << j ;
245 s = ss.str();
246 G4LogicalVolume* logicalSK1Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
247 G4Material* SK1Material = logicalSK1Volume->GetMaterial();
248 SK1Tub[j] = dynamic_cast<G4Tubs*>(logicalSK1Volume->GetSolid());
249 cout << logicalSK1Volume->GetSolid()->GetName() << endl;
250
251 Z = 0.;
252 A = 0.;
253 for(i=0; i<SK1Material->GetElementVector()->size(); i++){
254 Z += (SK1Material->GetElement(i)->GetZ())*
255 (SK1Material->GetFractionVector()[i]);
256 A += (SK1Material->GetElement(i)->GetA())*
257 (SK1Material->GetFractionVector()[i]);
258 }
259 Ionization = SK1Material->GetIonisation()->GetMeanExcitationEnergy();
260 Density = SK1Material->GetDensity()/(g/cm3);
261 Radlen = SK1Material->GetRadlen();
262 cout<<"SK1: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
263 KalFitMaterial FitSK1Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
264 _BesKalmanFitMaterials.push_back(FitSK1Material);
265 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
266 */
267 ///--- Anode Kapton4
268 ss.str("");
269 ss << "Anode_Kapton4_logic" << j ;
270 s = ss.str();
271 G4LogicalVolume* logicalAK4Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
272 G4Material* AK4Material = logicalAK4Volume->GetMaterial();
273 AK4Tub[j] = dynamic_cast<G4Tubs*>(logicalAK4Volume->GetSolid());
274 //cout << logicalAK4Volume->GetSolid()->GetName() << endl;
275
276 Z = 0.;
277 A = 0.;
278 for(i=0; i<AK4Material->GetElementVector()->size(); i++){
279 Z += (AK4Material->GetElement(i)->GetZ())*
280 (AK4Material->GetFractionVector()[i]);
281 A += (AK4Material->GetElement(i)->GetA())*
282 (AK4Material->GetFractionVector()[i]);
283 }
284 Ionization = AK4Material->GetIonisation()->GetMeanExcitationEnergy();
285 Density = AK4Material->GetDensity()/(g/cm3);
286 Radlen = AK4Material->GetRadlen();
287 cout<<"AK4: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
288 KalFitMaterial FitAK4Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
289 _BesKalmanFitMaterials.push_back(FitAK4Material);
290 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
291 /*
292 ///--- Anode Au2
293 ss.str("");
294 ss << "Anode_Au2_logic" << j ;
295 s = ss.str();
296 G4LogicalVolume* logicalAA2Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
297 G4Material* AA2Material = logicalAA2Volume->GetMaterial();
298 AA2Tub[j] = dynamic_cast<G4Tubs*>(logicalAA2Volume->GetSolid());
299 Z = 0.;
300 A = 0.;
301 for(i=0; i<AA2Material->GetElementVector()->size(); i++){
302 Z += (AA2Material->GetElement(i)->GetZ())*
303 (AA2Material->GetFractionVector()[i]);
304 A += (AA2Material->GetElement(i)->GetA())*
305 (AA2Material->GetFractionVector()[i]);
306 }
307 Ionization = AA2Material->GetIonisation()->GetMeanExcitationEnergy();
308 Density = AA2Material->GetDensity()/(g/cm3);
309 Radlen = AA2Material->GetRadlen();
310 cout<<"AA2: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
311 KalFitMaterial FitAA2Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
312 _BesKalmanFitMaterials.push_back(FitAA2Material);
313 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
314 */
315 ///--- Anode Cu3
316 ss.str("");
317 ss << "Anode_Cu3_logic" << j ;
318 s = ss.str();
319 G4LogicalVolume* logicalAC3Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
320 G4Material* AC3Material = logicalAC3Volume->GetMaterial();
321 AC3Tub[j] = dynamic_cast<G4Tubs*>(logicalAC3Volume->GetSolid());
322 Z = 0.;
323 A = 0.;
324 for(i=0; i<AC3Material->GetElementVector()->size(); i++){
325 Z += (AC3Material->GetElement(i)->GetZ())*
326 (AC3Material->GetFractionVector()[i]);
327 A += (AC3Material->GetElement(i)->GetA())*
328 (AC3Material->GetFractionVector()[i]);
329 }
330 Ionization = AC3Material->GetIonisation()->GetMeanExcitationEnergy();
331 Density = AC3Material->GetDensity()/(g/cm3);
332 Radlen = AC3Material->GetRadlen();
333 cout<<"AC3: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
334 KalFitMaterial FitAC3Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
335 _BesKalmanFitMaterials.push_back(FitAC3Material);
336 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
337
338 ///--- Anode Epoxy5
339 ss.str("");
340 ss << "Anode_Epoxy5_logic" << j ;
341 s = ss.str();
342 G4LogicalVolume* logicalAE5Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
343 G4Material* AE5Material = logicalAE5Volume->GetMaterial();
344 AE5Tub[j] = dynamic_cast<G4Tubs*>(logicalAE5Volume->GetSolid());
345 Z = 0.;
346 A = 0.;
347 for(i=0; i<AE5Material->GetElementVector()->size(); i++){
348 Z += (AE5Material->GetElement(i)->GetZ())*
349 (AE5Material->GetFractionVector()[i]);
350 A += (AE5Material->GetElement(i)->GetA())*
351 (AE5Material->GetFractionVector()[i]);
352 }
353 Ionization = AE5Material->GetIonisation()->GetMeanExcitationEnergy();
354 Density = AE5Material->GetDensity()/(g/cm3);
355 Radlen = AE5Material->GetRadlen();
356 cout<<"AE5: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
357 KalFitMaterial FitAE5Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
358 _BesKalmanFitMaterials.push_back(FitAE5Material);
359 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
360
361 ///--- Anode Rohacell2
362 ss.str("");
363 ss << "Anode_Rohacell2_logic" << j ;
364 s = ss.str();
365 G4LogicalVolume* logicalAR2Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
366 G4Material* AR2Material = logicalAR2Volume->GetMaterial();
367 AR2Tub[j] = dynamic_cast<G4Tubs*>(logicalAR2Volume->GetSolid());
368 Z = 0.;
369 A = 0.;
370 for(i=0; i<AR2Material->GetElementVector()->size(); i++){
371 Z += (AR2Material->GetElement(i)->GetZ())*
372 (AR2Material->GetFractionVector()[i]);
373 A += (AR2Material->GetElement(i)->GetA())*
374 (AR2Material->GetFractionVector()[i]);
375 }
376 Ionization = AR2Material->GetIonisation()->GetMeanExcitationEnergy();
377 Density = AR2Material->GetDensity()/(g/cm3);
378 Radlen = AR2Material->GetRadlen();
379 cout<<"AR2: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
380 KalFitMaterial FitAR2Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
381 _BesKalmanFitMaterials.push_back(FitAR2Material);
382 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
383
384 ///--- Anode Epoxy4
385 ss.str("");
386 ss << "Anode_Epoxy4_logic" << j ;
387 s = ss.str();
388 G4LogicalVolume* logicalAE4Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
389 G4Material* AE4Material = logicalAE4Volume->GetMaterial();
390 AE4Tub[j] = dynamic_cast<G4Tubs*>(logicalAE4Volume->GetSolid());
391 Z = 0.;
392 A = 0.;
393 for(i=0; i<AE4Material->GetElementVector()->size(); i++){
394 Z += (AE4Material->GetElement(i)->GetZ())*
395 (AE4Material->GetFractionVector()[i]);
396 A += (AE4Material->GetElement(i)->GetA())*
397 (AE4Material->GetFractionVector()[i]);
398 }
399 Ionization = AE4Material->GetIonisation()->GetMeanExcitationEnergy();
400 Density = AE4Material->GetDensity()/(g/cm3);
401 Radlen = AE4Material->GetRadlen();
402 cout<<"AE4: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
403 KalFitMaterial FitAE4Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
404 _BesKalmanFitMaterials.push_back(FitAE4Material);
405 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
406
407 ///--- Anode Kapton3
408 ss.str("");
409 ss << "Anode_Kapton3_logic" << j ;
410 s = ss.str();
411 G4LogicalVolume* logicalAK3Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
412 G4Material* AK3Material = logicalAK3Volume->GetMaterial();
413 AK3Tub[j] = dynamic_cast<G4Tubs*>(logicalAK3Volume->GetSolid());
414 Z = 0.;
415 A = 0.;
416 for(i=0; i<AK3Material->GetElementVector()->size(); i++){
417 Z += (AK3Material->GetElement(i)->GetZ())*
418 (AK3Material->GetFractionVector()[i]);
419 A += (AK3Material->GetElement(i)->GetA())*
420 (AK3Material->GetFractionVector()[i]);
421 }
422 Ionization = AK3Material->GetIonisation()->GetMeanExcitationEnergy();
423 Density = AK3Material->GetDensity()/(g/cm3);
424 Radlen = AK3Material->GetRadlen();
425 cout<<"AK3: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
426 KalFitMaterial FitAK3Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
427 _BesKalmanFitMaterials.push_back(FitAK3Material);
428 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
429
430 ///--- Anode Epoxy3
431 ss.str("");
432 ss << "Anode_Epoxy3_logic" << j ;
433 s = ss.str();
434 G4LogicalVolume* logicalAE3Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
435 G4Material* AE3Material = logicalAE3Volume->GetMaterial();
436 AE3Tub[j] = dynamic_cast<G4Tubs*>(logicalAE3Volume->GetSolid());
437 Z = 0.;
438 A = 0.;
439 for(i=0; i<AE3Material->GetElementVector()->size(); i++){
440 Z += (AE3Material->GetElement(i)->GetZ())*
441 (AE3Material->GetFractionVector()[i]);
442 A += (AE3Material->GetElement(i)->GetA())*
443 (AE3Material->GetFractionVector()[i]);
444 }
445 Ionization = AE3Material->GetIonisation()->GetMeanExcitationEnergy();
446 Density = AE3Material->GetDensity()/(g/cm3);
447 Radlen = AE3Material->GetRadlen();
448 cout<<"AE3: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
449 KalFitMaterial FitAE3Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
450 _BesKalmanFitMaterials.push_back(FitAE3Material);
451 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
452
453 ///--- Anode Rohacell1
454 ss.str("");
455 ss << "Anode_Rohacell1_logic" << j ;
456 s = ss.str();
457 G4LogicalVolume* logicalAR1Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
458 G4Material* AR1Material = logicalAR1Volume->GetMaterial();
459 AR1Tub[j] = dynamic_cast<G4Tubs*>(logicalAR1Volume->GetSolid());
460 Z = 0.;
461 A = 0.;
462 for(i=0; i<AR1Material->GetElementVector()->size(); i++){
463 Z += (AR1Material->GetElement(i)->GetZ())*
464 (AR1Material->GetFractionVector()[i]);
465 A += (AR1Material->GetElement(i)->GetA())*
466 (AR1Material->GetFractionVector()[i]);
467 }
468 Ionization = AR1Material->GetIonisation()->GetMeanExcitationEnergy();
469 Density = AR1Material->GetDensity()/(g/cm3);
470 Radlen = AR1Material->GetRadlen();
471 cout<<"AR1: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
472 KalFitMaterial FitAR1Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
473 _BesKalmanFitMaterials.push_back(FitAR1Material);
474 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
475
476 ///--- Anode Epoxy2
477 ss.str("");
478 ss << "Anode_Epoxy2_logic" << j ;
479 s = ss.str();
480 G4LogicalVolume* logicalAE2Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
481 G4Material* AE2Material = logicalAE2Volume->GetMaterial();
482 AE2Tub[j] = dynamic_cast<G4Tubs*>(logicalAE2Volume->GetSolid());
483 Z = 0.;
484 A = 0.;
485 for(i=0; i<AE2Material->GetElementVector()->size(); i++){
486 Z += (AE2Material->GetElement(i)->GetZ())*
487 (AE2Material->GetFractionVector()[i]);
488 A += (AE2Material->GetElement(i)->GetA())*
489 (AE2Material->GetFractionVector()[i]);
490 }
491 Ionization = AE2Material->GetIonisation()->GetMeanExcitationEnergy();
492 Density = AE2Material->GetDensity()/(g/cm3);
493 Radlen = AE2Material->GetRadlen();
494 cout<<"AE2: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
495 KalFitMaterial FitAE2Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
496 _BesKalmanFitMaterials.push_back(FitAE2Material);
497 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
498
499 ///--- Anode Kapton2
500 ss.str("");
501 ss << "Anode_Kapton2_logic" << j ;
502 s = ss.str();
503 G4LogicalVolume* logicalAK2Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
504 G4Material* AK2Material = logicalAK2Volume->GetMaterial();
505 AK2Tub[j] = dynamic_cast<G4Tubs*>(logicalAK2Volume->GetSolid());
506 Z = 0.;
507 A = 0.;
508 for(i=0; i<AK2Material->GetElementVector()->size(); i++){
509 Z += (AK2Material->GetElement(i)->GetZ())*
510 (AK2Material->GetFractionVector()[i]);
511 A += (AK2Material->GetElement(i)->GetA())*
512 (AK2Material->GetFractionVector()[i]);
513 }
514 Ionization = AK2Material->GetIonisation()->GetMeanExcitationEnergy();
515 Density = AK2Material->GetDensity()/(g/cm3);
516 Radlen = AK2Material->GetRadlen();
517 cout<<"AK2: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
518 KalFitMaterial FitAK2Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
519 _BesKalmanFitMaterials.push_back(FitAK2Material);
520 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
521
522 ///---Anode Epoxy1
523 ss.str("");
524 ss << "Anode_Epoxy1_logic" << j ;
525 s = ss.str();
526 G4LogicalVolume* logicalAE1Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
527 G4Material* AE1Material = logicalAE1Volume->GetMaterial();
528 AE1Tub[j] = dynamic_cast<G4Tubs*>(logicalAE1Volume->GetSolid());
529 Z = 0.;
530 A = 0.;
531 for(i=0; i<AE1Material->GetElementVector()->size(); i++){
532 Z += (AE1Material->GetElement(i)->GetZ())*
533 (AE1Material->GetFractionVector()[i]);
534 A += (AE1Material->GetElement(i)->GetA())*
535 (AE1Material->GetFractionVector()[i]);
536 }
537 Ionization = AE1Material->GetIonisation()->GetMeanExcitationEnergy();
538 Density = AE1Material->GetDensity()/(g/cm3);
539 Radlen = AE1Material->GetRadlen();
540 cout<<"AE1: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
541 KalFitMaterial FitAE1Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
542 _BesKalmanFitMaterials.push_back(FitAE1Material);
543 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
544
545 ///--- Anode Cu2
546 ss.str("");
547 ss << "Anode_Cu2_logic" << j ;
548 s = ss.str();
549 G4LogicalVolume* logicalAC2Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
550 G4Material* AC2Material = logicalAC2Volume->GetMaterial();
551 AC2Tub[j] = dynamic_cast<G4Tubs*>(logicalAC2Volume->GetSolid());
552 Z = 0.;
553 A = 0.;
554 for(i=0; i<AC2Material->GetElementVector()->size(); i++){
555 Z += (AC2Material->GetElement(i)->GetZ())*
556 (AC2Material->GetFractionVector()[i]);
557 A += (AC2Material->GetElement(i)->GetA())*
558 (AC2Material->GetFractionVector()[i]);
559 }
560 Ionization = AC2Material->GetIonisation()->GetMeanExcitationEnergy();
561 Density = AC2Material->GetDensity()/(g/cm3);
562 Radlen = AC2Material->GetRadlen();
563 cout<<"AC2: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
564 KalFitMaterial FitAC2Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
565 _BesKalmanFitMaterials.push_back(FitAC2Material);
566 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
567
568 ///--- Anode Kapton1
569 ss.str("");
570 ss << "Anode_Kapton1_logic" << j ;
571 s = ss.str();
572 G4LogicalVolume* logicalAK1Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
573 G4Material* AK1Material = logicalAK1Volume->GetMaterial();
574 AK1Tub[j] = dynamic_cast<G4Tubs*>(logicalAK1Volume->GetSolid());
575 Z = 0.;
576 A = 0.;
577 for(i=0; i<AK1Material->GetElementVector()->size(); i++){
578 Z += (AK1Material->GetElement(i)->GetZ())*
579 (AK1Material->GetFractionVector()[i]);
580 A += (AK1Material->GetElement(i)->GetA())*
581 (AK1Material->GetFractionVector()[i]);
582 }
583 Ionization = AK1Material->GetIonisation()->GetMeanExcitationEnergy();
584 Density = AK1Material->GetDensity()/(g/cm3);
585 Radlen = AK1Material->GetRadlen();
586 cout<<"AK1: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
587 KalFitMaterial FitAK1Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
588 _BesKalmanFitMaterials.push_back(FitAK1Material);
589 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
590
591 ///--- Anode Cu1
592 ss.str("");
593 ss << "Anode_Cu1_logic" << j ;
594 s = ss.str();
595 G4LogicalVolume* logicalAC1Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
596 G4Material* AC1Material = logicalAC1Volume->GetMaterial();
597 AC1Tub[j] = dynamic_cast<G4Tubs*>(logicalAC1Volume->GetSolid());
598 Z = 0.;
599 A = 0.;
600 for(i=0; i<AC1Material->GetElementVector()->size(); i++){
601 Z += (AC1Material->GetElement(i)->GetZ())*
602 (AC1Material->GetFractionVector()[i]);
603 A += (AC1Material->GetElement(i)->GetA())*
604 (AC1Material->GetFractionVector()[i]);
605 }
606 Ionization = AC1Material->GetIonisation()->GetMeanExcitationEnergy();
607 Density = AC1Material->GetDensity()/(g/cm3);
608 Radlen = AC1Material->GetRadlen();
609 cout<<"AC1: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
610 KalFitMaterial FitAC1Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
611 _BesKalmanFitMaterials.push_back(FitAC1Material);
612 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
613 /*
614 ///--- Anode Au1
615 ss.str("");
616 ss << "Anode_Au1_logic" << j ;
617 s = ss.str();
618 G4LogicalVolume* logicalAA1Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
619 G4Material* AA1Material = logicalAA1Volume->GetMaterial();
620 AA1Tub[j] = dynamic_cast<G4Tubs*>(logicalAA1Volume->GetSolid());
621 Z = 0.;
622 A = 0.;
623 for(i=0; i<AA1Material->GetElementVector()->size(); i++){
624 Z += (AA1Material->GetElement(i)->GetZ())*
625 (AA1Material->GetFractionVector()[i]);
626 A += (AA1Material->GetElement(i)->GetA())*
627 (AA1Material->GetFractionVector()[i]);
628 }
629 Ionization = AA1Material->GetIonisation()->GetMeanExcitationEnergy();
630 Density = AA1Material->GetDensity()/(g/cm3);
631 Radlen = AA1Material->GetRadlen();
632 cout<<"AA1: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
633 KalFitMaterial FitAA1Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
634 _BesKalmanFitMaterials.push_back(FitAA1Material);
635 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
636 */
637 ///--- Gap I
638 ss.str("");
639 ss << "Gap_I_logic" << j;
640 s = ss.str();
641 G4LogicalVolume* logicalGAPIVolume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
642 G4Material* GAPIMaterial = logicalGAPIVolume->GetMaterial();
643 GAPITub[j] = dynamic_cast<G4Tubs*>(logicalGAPIVolume->GetSolid());
644 Z = 0.;
645 A = 0.;
646 for(i=0; i<GAPIMaterial->GetElementVector()->size(); i++){
647 Z += (GAPIMaterial->GetElement(i)->GetZ())*
648 (GAPIMaterial->GetFractionVector()[i]);
649 A += (GAPIMaterial->GetElement(i)->GetA())*
650 (GAPIMaterial->GetFractionVector()[i]);
651 }
652 Ionization = GAPIMaterial->GetIonisation()->GetMeanExcitationEnergy();
653 Density = GAPIMaterial->GetDensity()/(g/cm3);
654 Radlen = GAPIMaterial->GetRadlen();
655 cout<<"GAPI: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
656 KalFitMaterial FitGAPIMaterial(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
657 _BesKalmanFitMaterials.push_back(FitGAPIMaterial);
658 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
659
660 ///============================ Gem Foil2============================
661
662 ///--- Foil Cu2
663 ss.str("");
664 ss << "GemFoil_Cu2_logic" << j << "foil2" ;
665 s = ss.str();
666 G4LogicalVolume* logicalFC22Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
667 G4Material* FC22Material = logicalFC22Volume->GetMaterial();
668 FC22Tub[j] = dynamic_cast<G4Tubs*>(logicalFC22Volume->GetSolid());
669 Z = 0.;
670 A = 0.;
671 for(i=0; i<FC22Material->GetElementVector()->size(); i++){
672 Z += (FC22Material->GetElement(i)->GetZ())*
673 (FC22Material->GetFractionVector()[i]);
674 A += (FC22Material->GetElement(i)->GetA())*
675 (FC22Material->GetFractionVector()[i]);
676 }
677 Ionization = FC22Material->GetIonisation()->GetMeanExcitationEnergy();
678 Density = FC22Material->GetDensity()/(g/cm3);
679 Radlen = FC22Material->GetRadlen();
680 cout<<"FC22: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
681 KalFitMaterial FitFC22Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
682 _BesKalmanFitMaterials.push_back(FitFC22Material);
683 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
684
685 ///--- Foil Kapton
686 ss.str("");
687 ss << "GemFoil_Kapton_logic" << j << "foil2" ;
688 s = ss.str();
689 G4LogicalVolume* logicalFK2Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
690 G4Material* FK2Material = logicalFK2Volume->GetMaterial();
691 FK2Tub[j] = dynamic_cast<G4Tubs*>(logicalFK2Volume->GetSolid());
692 Z = 0.;
693 A = 0.;
694 for(i=0; i<FK2Material->GetElementVector()->size(); i++){
695 Z += (FK2Material->GetElement(i)->GetZ())*
696 (FK2Material->GetFractionVector()[i]);
697 A += (FK2Material->GetElement(i)->GetA())*
698 (FK2Material->GetFractionVector()[i]);
699 }
700 Ionization = FK2Material->GetIonisation()->GetMeanExcitationEnergy();
701 Density = FK2Material->GetDensity()/(g/cm3);
702 Radlen = FK2Material->GetRadlen();
703 cout<<"FK2: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
704 KalFitMaterial FitFK2Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
705 _BesKalmanFitMaterials.push_back(FitFK2Material);
706 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
707
708 ///--- Foil Cu1
709 ss.str("");
710 ss << "GemFoil_Cu1_logic" << j << "foil2" ;
711 s = ss.str();
712 G4LogicalVolume* logicalFC12Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
713 G4Material* FC12Material = logicalFC12Volume->GetMaterial();
714 FC12Tub[j] = dynamic_cast<G4Tubs*>(logicalFC12Volume->GetSolid());
715 Z = 0.;
716 A = 0.;
717 for(i=0; i<FC12Material->GetElementVector()->size(); i++){
718 Z += (FC12Material->GetElement(i)->GetZ())*
719 (FC12Material->GetFractionVector()[i]);
720 A += (FC12Material->GetElement(i)->GetA())*
721 (FC12Material->GetFractionVector()[i]);
722 }
723 Ionization = FC12Material->GetIonisation()->GetMeanExcitationEnergy();
724 Density = FC12Material->GetDensity()/(g/cm3);
725 Radlen = FC12Material->GetRadlen();
726 cout<<"FC12: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
727 KalFitMaterial FitFC12Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
728 _BesKalmanFitMaterials.push_back(FitFC12Material);
729 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
730
731 ///--- Gap T2
732 ss.str("");
733 ss << "Gap_T2_logic" << j ;
734 s = ss.str();
735 G4LogicalVolume* logicalGAPT2Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
736 G4Material* GAPT2Material = logicalGAPT2Volume->GetMaterial();
737 GAPT2Tub[j] = dynamic_cast<G4Tubs*>(logicalGAPT2Volume->GetSolid());
738 Z = 0.;
739 A = 0.;
740 for(i=0; i<GAPT2Material->GetElementVector()->size(); i++){
741 Z += (GAPT2Material->GetElement(i)->GetZ())*
742 (GAPT2Material->GetFractionVector()[i]);
743 A += (GAPT2Material->GetElement(i)->GetA())*
744 (GAPT2Material->GetFractionVector()[i]);
745 }
746 Ionization = GAPT2Material->GetIonisation()->GetMeanExcitationEnergy();
747 Density = GAPT2Material->GetDensity()/(g/cm3);
748 Radlen = GAPT2Material->GetRadlen();
749 cout<<"GAPT2: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
750 KalFitMaterial FitGAPT2Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
751 _BesKalmanFitMaterials.push_back(FitGAPT2Material);
752 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
753
754 //======================================== Gem Foil1=========================================
755 ///--- Foil Cu2
756 ss.str("");
757 ss << "GemFoil_Cu2_logic" << j << "foil1" ;
758 s = ss.str();
759 G4LogicalVolume* logicalFC21Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
760 G4Material* FC21Material = logicalFC21Volume->GetMaterial();
761 FC21Tub[j] = dynamic_cast<G4Tubs*>(logicalFC21Volume->GetSolid());
762 Z = 0.;
763 A = 0.;
764 for(i=0; i<FC21Material->GetElementVector()->size(); i++){
765 Z += (FC21Material->GetElement(i)->GetZ())*
766 (FC21Material->GetFractionVector()[i]);
767 A += (FC21Material->GetElement(i)->GetA())*
768 (FC21Material->GetFractionVector()[i]);
769 }
770 Ionization = FC21Material->GetIonisation()->GetMeanExcitationEnergy();
771 Density = FC21Material->GetDensity()/(g/cm3);
772 Radlen = FC21Material->GetRadlen();
773 cout<<"FC21: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
774 KalFitMaterial FitFC21Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
775 _BesKalmanFitMaterials.push_back(FitFC21Material);
776 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
777
778 ///--- Foil Kapton
779 ss.str("");
780 ss << "GemFoil_Kapton_logic" << j << "foil1" ;
781 s = ss.str();
782 G4LogicalVolume* logicalFK1Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
783 G4Material* FK1Material = logicalFK1Volume->GetMaterial();
784 FK1Tub[j] = dynamic_cast<G4Tubs*>(logicalFK1Volume->GetSolid());
785 Z = 0.;
786 A = 0.;
787 for(i=0; i<FK1Material->GetElementVector()->size(); i++){
788 Z += (FK1Material->GetElement(i)->GetZ())*
789 (FK1Material->GetFractionVector()[i]);
790 A += (FK1Material->GetElement(i)->GetA())*
791 (FK1Material->GetFractionVector()[i]);
792 }
793 Ionization = FK1Material->GetIonisation()->GetMeanExcitationEnergy();
794 Density = FK1Material->GetDensity()/(g/cm3);
795 Radlen = FK1Material->GetRadlen();
796 cout<<"FK1: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
797 KalFitMaterial FitFK1Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
798 _BesKalmanFitMaterials.push_back(FitFK1Material);
799 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
800
801 ///--- Foil Cu1
802 ss.str("");
803 ss << "GemFoil_Cu1_logic" << j << "foil1" ;
804 s = ss.str();
805 G4LogicalVolume* logicalFC11Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
806 G4Material* FC11Material = logicalFC11Volume->GetMaterial();
807 FC11Tub[j] = dynamic_cast<G4Tubs*>(logicalFC11Volume->GetSolid());
808 Z = 0.;
809 A = 0.;
810 for(i=0; i<FC11Material->GetElementVector()->size(); i++){
811 Z += (FC11Material->GetElement(i)->GetZ())*
812 (FC11Material->GetFractionVector()[i]);
813 A += (FC11Material->GetElement(i)->GetA())*
814 (FC11Material->GetFractionVector()[i]);
815 }
816 Ionization = FC11Material->GetIonisation()->GetMeanExcitationEnergy();
817 Density = FC11Material->GetDensity()/(g/cm3);
818 Radlen = FC11Material->GetRadlen();
819 cout<<"FC11: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
820 KalFitMaterial FitFC11Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
821 _BesKalmanFitMaterials.push_back(FitFC11Material);
822 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
823
824 ///--- Gap T1
825 ss.str("");
826 ss << "Gap_T1_logic" << j ;
827 s = ss.str();
828 G4LogicalVolume* logicalGAPT1Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
829 G4Material* GAPT1Material = logicalGAPT1Volume->GetMaterial();
830 GAPT1Tub[j] = dynamic_cast<G4Tubs*>(logicalGAPT1Volume->GetSolid());
831 Z = 0.;
832 A = 0.;
833 for(i=0; i<GAPT1Material->GetElementVector()->size(); i++){
834 Z += (GAPT1Material->GetElement(i)->GetZ())*
835 (GAPT1Material->GetFractionVector()[i]);
836 A += (GAPT1Material->GetElement(i)->GetA())*
837 (GAPT1Material->GetFractionVector()[i]);
838 }
839 Ionization = GAPT1Material->GetIonisation()->GetMeanExcitationEnergy();
840 Density = GAPT1Material->GetDensity()/(g/cm3);
841 Radlen = GAPT1Material->GetRadlen();
842 cout<<"GAPT1: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
843 KalFitMaterial FitGAPT1Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
844 _BesKalmanFitMaterials.push_back(FitGAPT1Material);
845 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
846
847 //============================ Gem Foil0================================
848 ///--- Foil Cu2
849 ss.str("");
850 ss << "GemFoil_Cu2_logic" << j << "foil0" ;
851 s = ss.str();
852 G4LogicalVolume* logicalFC20Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
853 G4Material* FC20Material = logicalFC20Volume->GetMaterial();
854 FC20Tub[j] = dynamic_cast<G4Tubs*>(logicalFC20Volume->GetSolid());
855 Z = 0.;
856 A = 0.;
857 for(i=0; i<FC20Material->GetElementVector()->size(); i++){
858 Z += (FC20Material->GetElement(i)->GetZ())*
859 (FC20Material->GetFractionVector()[i]);
860 A += (FC20Material->GetElement(i)->GetA())*
861 (FC20Material->GetFractionVector()[i]);
862 }
863 Ionization = FC20Material->GetIonisation()->GetMeanExcitationEnergy();
864 Density = FC20Material->GetDensity()/(g/cm3);
865 Radlen = FC20Material->GetRadlen();
866 cout<<"FC20: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
867 KalFitMaterial FitFC20Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
868 _BesKalmanFitMaterials.push_back(FitFC20Material);
869 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
870
871 ///--- Foil Kapton
872 ss.str("");
873 ss << "GemFoil_Kapton_logic" << j << "foil0" ;
874 s = ss.str();
875 G4LogicalVolume* logicalFK0Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
876 G4Material* FK0Material = logicalFK0Volume->GetMaterial();
877 FK0Tub[j] = dynamic_cast<G4Tubs*>(logicalFK0Volume->GetSolid());
878 Z = 0.;
879 A = 0.;
880 for(i=0; i<FK0Material->GetElementVector()->size(); i++){
881 Z += (FK0Material->GetElement(i)->GetZ())*
882 (FK0Material->GetFractionVector()[i]);
883 A += (FK0Material->GetElement(i)->GetA())*
884 (FK0Material->GetFractionVector()[i]);
885 }
886 Ionization = FK0Material->GetIonisation()->GetMeanExcitationEnergy();
887 Density = FK0Material->GetDensity()/(g/cm3);
888 Radlen = FK0Material->GetRadlen();
889 cout<<"FK0: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
890 KalFitMaterial FitFK0Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
891 _BesKalmanFitMaterials.push_back(FitFK0Material);
892 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
893
894 ///--- Foil Cu1
895 ss.str("");
896 ss << "GemFoil_Cu1_logic" << j<< "foil0" ;
897 s = ss.str();
898 G4LogicalVolume* logicalFC10Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
899 G4Material* FC10Material = logicalFC10Volume->GetMaterial();
900 FC10Tub[j] = dynamic_cast<G4Tubs*>(logicalFC10Volume->GetSolid());
901 Z = 0.;
902 A = 0.;
903 for(i=0; i<FC10Material->GetElementVector()->size(); i++){
904 Z += (FC10Material->GetElement(i)->GetZ())*
905 (FC10Material->GetFractionVector()[i]);
906 A += (FC10Material->GetElement(i)->GetA())*
907 (FC10Material->GetFractionVector()[i]);
908 }
909 Ionization = FC10Material->GetIonisation()->GetMeanExcitationEnergy();
910 Density = FC10Material->GetDensity()/(g/cm3);
911 Radlen = FC10Material->GetRadlen();
912 cout<<"FC10: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
913 KalFitMaterial FitFC10Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
914 _BesKalmanFitMaterials.push_back(FitFC10Material);
915 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
916
917 ///--- Gap D
918 ss.str("");
919 ss << "Gap_D_logic" << j ;
920 s = ss.str();
921 G4LogicalVolume* logicalGAPDVolume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
922 G4Material* GAPDMaterial = logicalGAPDVolume->GetMaterial();
923 GAPDTub[j] = dynamic_cast<G4Tubs*>(logicalGAPDVolume->GetSolid());
924 Z = 0.;
925 A = 0.;
926 for(i=0; i<GAPDMaterial->GetElementVector()->size(); i++){
927 Z += (GAPDMaterial->GetElement(i)->GetZ())*
928 (GAPDMaterial->GetFractionVector()[i]);
929 A += (GAPDMaterial->GetElement(i)->GetA())*
930 (GAPDMaterial->GetFractionVector()[i]);
931 }
932 Ionization = GAPDMaterial->GetIonisation()->GetMeanExcitationEnergy();
933 Density = GAPDMaterial->GetDensity()/(g/cm3);
934 Radlen = GAPDMaterial->GetRadlen();
935 cout<<"GAPD: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
936 KalFitMaterial FitGAPDMaterial(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
937 _BesKalmanFitMaterials.push_back(FitGAPDMaterial);
938 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
939 ///--- Cathode
940 /*ss.str("");
941 ss << "Cathode_logic" << j;
942 s = ss.str();
943 G4LogicalVolume* logicalC2Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
944 G4Material* C2Material = logicalC2Volume->GetMaterial();
945 C2Tub[j] = dynamic_cast<G4Tubs*>(logicalC2Volume->GetSolid());
946 Z = 0.;
947 A = 0.;
948 for(i=0; i<C2Material->GetElementVector()->size(); i++){
949 Z += (C2Material->GetElement(i)->GetZ())*
950 (C2Material->GetFractionVector()[i]);
951 A += (C2Material->GetElement(i)->GetA())*
952 (C2Material->GetFractionVector()[i]);
953 }
954 Ionization = C2Material->GetIonisation()->GetMeanExcitationEnergy();
955 Density = C2Material->GetDensity()/(g/cm3);
956 Radlen = C2Material->GetRadlen();
957 cout<<"C2: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
958 KalFitMaterial FitC2Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
959 _BesKalmanFitMaterials.push_back(FitC2Material);
960 */
961
962 ///--- Cathode Cu
963 ss.str("");
964 ss << "Cathode_Cu_logic" << j ;
965 s = ss.str();
966 G4LogicalVolume* logicalCCuVolume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
967 G4Material* CCuMaterial = logicalCCuVolume->GetMaterial();
968 CCuTub[j] = dynamic_cast<G4Tubs*>(logicalCCuVolume->GetSolid());
969 Z = 0.;
970 A = 0.;
971 for(i=0; i<CCuMaterial->GetElementVector()->size(); i++){
972 Z += (CCuMaterial->GetElement(i)->GetZ())*
973 (CCuMaterial->GetFractionVector()[i]);
974 A += (CCuMaterial->GetElement(i)->GetA())*
975 (CCuMaterial->GetFractionVector()[i]);
976 }
977 Ionization = CCuMaterial->GetIonisation()->GetMeanExcitationEnergy();
978 Density = CCuMaterial->GetDensity()/(g/cm3);
979 Radlen = CCuMaterial->GetRadlen();
980 cout<<"CCu: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
981 KalFitMaterial FitCCuMaterial(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
982 _BesKalmanFitMaterials.push_back(FitCCuMaterial);
983 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
984
985 ///--- Cathode Kapton3
986 ss.str("");
987 ss << "Cathode_Kapton3_logic" << j ;
988 s = ss.str();
989 G4LogicalVolume* logicalCK3Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
990 G4Material* CK3Material = logicalCK3Volume->GetMaterial();
991 CK3Tub[j] = dynamic_cast<G4Tubs*>(logicalCK3Volume->GetSolid());
992 Z = 0.;
993 A = 0.;
994 for(i=0; i<CK3Material->GetElementVector()->size(); i++){
995 Z += (CK3Material->GetElement(i)->GetZ())*
996 (CK3Material->GetFractionVector()[i]);
997 A += (CK3Material->GetElement(i)->GetA())*
998 (CK3Material->GetFractionVector()[i]);
999 }
1000 Ionization = CK3Material->GetIonisation()->GetMeanExcitationEnergy();
1001 Density = CK3Material->GetDensity()/(g/cm3);
1002 Radlen = CK3Material->GetRadlen();
1003 cout<<"CK3: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
1004 KalFitMaterial FitCK3Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
1005 _BesKalmanFitMaterials.push_back(FitCK3Material);
1006 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
1007
1008 ///--- Cathode Epoxy4
1009 ss.str("");
1010 ss << "Cathode_Epoxy4_logic" << j ;
1011 s = ss.str();
1012 G4LogicalVolume* logicalCE4Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
1013 G4Material* CE4Material = logicalCE4Volume->GetMaterial();
1014 CE4Tub[j] = dynamic_cast<G4Tubs*>(logicalCE4Volume->GetSolid());
1015 Z = 0.;
1016 A = 0.;
1017 for(i=0; i<CE4Material->GetElementVector()->size(); i++){
1018 Z += (CE4Material->GetElement(i)->GetZ())*
1019 (CE4Material->GetFractionVector()[i]);
1020 A += (CE4Material->GetElement(i)->GetA())*
1021 (CE4Material->GetFractionVector()[i]);
1022 }
1023 Ionization = CE4Material->GetIonisation()->GetMeanExcitationEnergy();
1024 Density = CE4Material->GetDensity()/(g/cm3);
1025 Radlen = CE4Material->GetRadlen();
1026 cout<<"CE4: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
1027 KalFitMaterial FitCE4Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
1028 _BesKalmanFitMaterials.push_back(FitCE4Material);
1029 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
1030
1031
1032 ///--- Cathode Rohacell2
1033 ss.str("");
1034 ss << "Cathode_Rohacell2_logic" << j ;
1035 s = ss.str();
1036 G4LogicalVolume* logicalCR2Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
1037 G4Material* CR2Material = logicalCR2Volume->GetMaterial();
1038 CR2Tub[j] = dynamic_cast<G4Tubs*>(logicalCR2Volume->GetSolid());
1039 Z = 0.;
1040 A = 0.;
1041 for(i=0; i<CR2Material->GetElementVector()->size(); i++){
1042 Z += (CR2Material->GetElement(i)->GetZ())*
1043 (CR2Material->GetFractionVector()[i]);
1044 A += (CR2Material->GetElement(i)->GetA())*
1045 (CR2Material->GetFractionVector()[i]);
1046 }
1047 Ionization = CR2Material->GetIonisation()->GetMeanExcitationEnergy();
1048 Density = CR2Material->GetDensity()/(g/cm3);
1049 Radlen = CR2Material->GetRadlen();
1050 cout<<"CR2: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
1051 KalFitMaterial FitCR2Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
1052 _BesKalmanFitMaterials.push_back(FitCR2Material);
1053 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
1054
1055 ///--- Cathode Epoxy3
1056 ss.str("");
1057 ss << "Cathode_Epoxy3_logic" << j ;
1058 s = ss.str();
1059 G4LogicalVolume* logicalCE3Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
1060 G4Material* CE3Material = logicalCE3Volume->GetMaterial();
1061 CE3Tub[j] = dynamic_cast<G4Tubs*>(logicalCE3Volume->GetSolid());
1062 Z = 0.;
1063 A = 0.;
1064 for(i=0; i<CE3Material->GetElementVector()->size(); i++){
1065 Z += (CE3Material->GetElement(i)->GetZ())*
1066 (CE3Material->GetFractionVector()[i]);
1067 A += (CE3Material->GetElement(i)->GetA())*
1068 (CE3Material->GetFractionVector()[i]);
1069 }
1070 Ionization = CE3Material->GetIonisation()->GetMeanExcitationEnergy();
1071 Density = CE3Material->GetDensity()/(g/cm3);
1072 Radlen = CE3Material->GetRadlen();
1073 cout<<"CE3: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
1074 KalFitMaterial FitCE3Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
1075 _BesKalmanFitMaterials.push_back(FitCE3Material);
1076 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
1077
1078 ///---Cathode Kapton2
1079 ss.str("");
1080 ss << "Cathode_Kapton2_logic" << j ;
1081 s = ss.str();
1082 G4LogicalVolume* logicalCK2Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
1083 G4Material* CK2Material = logicalCK2Volume->GetMaterial();
1084 CK2Tub[j] = dynamic_cast<G4Tubs*>(logicalCK2Volume->GetSolid());
1085 Z = 0.;
1086 A = 0.;
1087 for(i=0; i<CK2Material->GetElementVector()->size(); i++){
1088 Z += (CK2Material->GetElement(i)->GetZ())*
1089 (CK2Material->GetFractionVector()[i]);
1090 A += (CK2Material->GetElement(i)->GetA())*
1091 (CK2Material->GetFractionVector()[i]);
1092 }
1093 Ionization = CK2Material->GetIonisation()->GetMeanExcitationEnergy();
1094 Density = CK2Material->GetDensity()/(g/cm3);
1095 Radlen = CK2Material->GetRadlen();
1096 cout<<"CK2: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
1097 KalFitMaterial FitCK2Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
1098 _BesKalmanFitMaterials.push_back(FitCK2Material);
1099 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
1100
1101 ///--- Cathode Epoxy2
1102 ss.str("");
1103 ss << "Cathode_Epoxy2_logic" << j ;
1104 s = ss.str();
1105 G4LogicalVolume* logicalCE2Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
1106 G4Material* CE2Material = logicalCE2Volume->GetMaterial();
1107 CE2Tub[j] = dynamic_cast<G4Tubs*>(logicalCE2Volume->GetSolid());
1108 Z = 0.;
1109 A = 0.;
1110 for(i=0; i<CE2Material->GetElementVector()->size(); i++){
1111 Z += (CE2Material->GetElement(i)->GetZ())*
1112 (CE2Material->GetFractionVector()[i]);
1113 A += (CE2Material->GetElement(i)->GetA())*
1114 (CE2Material->GetFractionVector()[i]);
1115 }
1116 Ionization = CE2Material->GetIonisation()->GetMeanExcitationEnergy();
1117 Density = CE2Material->GetDensity()/(g/cm3);
1118 Radlen = CE2Material->GetRadlen();
1119 cout<<"CE2: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
1120 KalFitMaterial FitCE2Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
1121 _BesKalmanFitMaterials.push_back(FitCE2Material);
1122 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
1123
1124 ///--- Cathode Rohacell1
1125 ss.str("");
1126 ss << "Cathode_Rohacell1_logic" << j ;
1127 s = ss.str();
1128 G4LogicalVolume* logicalCR1Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
1129 G4Material* CR1Material = logicalCR1Volume->GetMaterial();
1130 CR1Tub[j] = dynamic_cast<G4Tubs*>(logicalCR1Volume->GetSolid());
1131 Z = 0.;
1132 A = 0.;
1133 for(i=0; i<CR1Material->GetElementVector()->size(); i++){
1134 Z += (CR1Material->GetElement(i)->GetZ())*
1135 (CR1Material->GetFractionVector()[i]);
1136 A += (CR1Material->GetElement(i)->GetA())*
1137 (CR1Material->GetFractionVector()[i]);
1138 }
1139 Ionization = CR1Material->GetIonisation()->GetMeanExcitationEnergy();
1140 Density = CR1Material->GetDensity()/(g/cm3);
1141 Radlen = CR1Material->GetRadlen();
1142 cout<<"CR1: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
1143 KalFitMaterial FitCR1Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
1144 _BesKalmanFitMaterials.push_back(FitCR1Material);
1145 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
1146
1147 ///--- Cathode Epoxy1
1148 ss.str("");
1149 ss << "Cathode_Epoxy1_logic" << j ;
1150 s = ss.str();
1151 G4LogicalVolume* logicalCE1Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
1152 G4Material* CE1Material = logicalCE1Volume->GetMaterial();
1153 CE1Tub[j] = dynamic_cast<G4Tubs*>(logicalCE1Volume->GetSolid());
1154 Z = 0.;
1155 A = 0.;
1156 for(i=0; i<CE1Material->GetElementVector()->size(); i++){
1157 Z += (CE1Material->GetElement(i)->GetZ())*
1158 (CE1Material->GetFractionVector()[i]);
1159 A += (CE1Material->GetElement(i)->GetA())*
1160 (CE1Material->GetFractionVector()[i]);
1161 }
1162 Ionization = CE1Material->GetIonisation()->GetMeanExcitationEnergy();
1163 Density = CE1Material->GetDensity()/(g/cm3);
1164 Radlen = CE1Material->GetRadlen();
1165 cout<<"CE1: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
1166 KalFitMaterial FitCE1Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
1167 _BesKalmanFitMaterials.push_back(FitCE1Material);
1168 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
1169 /*
1170 ///--- Cathode Honeycomb
1171 ss.str("");
1172 ss << "Cathode_Honeycomb_logic" << j ;
1173 s = ss.str();
1174 G4LogicalVolume* logicalCHVolume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
1175 G4Material* CHMaterial = logicalCHVolume->GetMaterial();
1176 CHTub[j] = dynamic_cast<G4Tubs*>(logicalCHVolume->GetSolid());
1177 Z = 0.;
1178 A = 0.;
1179 for(i=0; i<CHMaterial->GetElementVector()->size(); i++){
1180 Z += (CHMaterial->GetElement(i)->GetZ())*
1181 (CHMaterial->GetFractionVector()[i]);
1182 A += (CHMaterial->GetElement(i)->GetA())*
1183 (CHMaterial->GetFractionVector()[i]);
1184 }
1185 Ionization = CHMaterial->GetIonisation()->GetMeanExcitationEnergy();
1186 Density = CHMaterial->GetDensity()/(g/cm3);
1187 Radlen = CHMaterial->GetRadlen();
1188 cout<<"CH: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
1189 KalFitMaterial FitCHMaterial(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
1190 _BesKalmanFitMaterials.push_back(FitCHMaterial);
1191 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
1192 */
1193 ///--- Cathode Kapton1
1194 ss.str("");
1195 ss << "Cathode_Kapton1_logic" << j ;
1196 s = ss.str();
1197 G4LogicalVolume* logicalCK1Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
1198 G4Material* CK1Material = logicalCK1Volume->GetMaterial();
1199 CK1Tub[j] = dynamic_cast<G4Tubs*>(logicalCK1Volume->GetSolid());
1200 Z = 0.;
1201 A = 0.;
1202 for(i=0; i<CK1Material->GetElementVector()->size(); i++){
1203 Z += (CK1Material->GetElement(i)->GetZ())*
1204 (CK1Material->GetFractionVector()[i]);
1205 A += (CK1Material->GetElement(i)->GetA())*
1206 (CK1Material->GetFractionVector()[i]);
1207 }
1208 Ionization = CK1Material->GetIonisation()->GetMeanExcitationEnergy();
1209 Density = CK1Material->GetDensity()/(g/cm3);
1210 Radlen = CK1Material->GetRadlen();
1211 cout<<"CK1: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
1212 KalFitMaterial FitCK1Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
1213 _BesKalmanFitMaterials.push_back(FitCK1Material);
1214 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
1215 /*
1216 ///--- Cathode Cu1
1217 ss.str("");
1218 ss << "Cathode_Cu1_logic" << j ;
1219 s = ss.str();
1220 G4LogicalVolume* logicalCC1Volume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
1221 G4Material* CC1Material = logicalCC1Volume->GetMaterial();
1222 CC1Tub[j] = dynamic_cast<G4Tubs*>(logicalCC1Volume->GetSolid());
1223 Z = 0.;
1224 A = 0.;
1225 for(i=0; i<CC1Material->GetElementVector()->size(); i++){
1226 Z += (CC1Material->GetElement(i)->GetZ())*
1227 (CC1Material->GetFractionVector()[i]);
1228 A += (CC1Material->GetElement(i)->GetA())*
1229 (CC1Material->GetFractionVector()[i]);
1230 }
1231 Ionization = CC1Material->GetIonisation()->GetMeanExcitationEnergy();
1232 Density = CC1Material->GetDensity()/(g/cm3);
1233 Radlen = CC1Material->GetRadlen();
1234 cout<<"CC1: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
1235 KalFitMaterial FitCC1Material(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
1236 _BesKalmanFitMaterials.push_back(FitCC1Material);
1237 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
1238 */
1239 ///---air
1240 if(j>0){
1241 ss.str("");
1242 ss << "CgemLayer_logic" << j ;
1243// ss << "Cgem_logic" ;
1244 s = ss.str();
1245 G4LogicalVolume* logicalCLayerVolume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume(s));
1246 G4Material* CLayerMaterial = logicalCLayerVolume->GetMaterial();
1247 Z = 0.;
1248 A = 0.;
1249 for(i=0; i<CLayerMaterial->GetElementVector()->size(); i++){
1250 Z += (CLayerMaterial->GetElement(i)->GetZ())*
1251 (CLayerMaterial->GetFractionVector()[i]);
1252 A += (CLayerMaterial->GetElement(i)->GetA())*
1253 (CLayerMaterial->GetFractionVector()[i]);
1254 }
1255 Ionization = CLayerMaterial->GetIonisation()->GetMeanExcitationEnergy();
1256 Density = CLayerMaterial->GetDensity()/(g/cm3);
1257 Radlen = CLayerMaterial->GetRadlen();
1258 cout<<"CLayer: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
1259 KalFitMaterial FitCLayerMaterial(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
1260 _BesKalmanFitMaterials.push_back(FitCLayerMaterial);
1261 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
1262 }
1263
1264 }
1265
1266 ///////////////////////////////////////////////////////////////////////////////////////////////////
1267 G4LogicalVolume *logicalBes = 0;
1268 BesG4Geo* aBesG4Geo = new BesG4Geo();
1269 logicalBes = aBesG4Geo->GetTopVolume();
1270
1271 /// air
1272 G4LogicalVolume* logicalAirVolume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume("logicalWorld"));
1273 G4Material* airMaterial = logicalAirVolume->GetMaterial();
1274 Z = 0.;
1275 A = 0.;
1276 for(i=0; i<airMaterial->GetElementVector()->size(); i++){
1277 Z += (airMaterial->GetElement(i)->GetZ())*
1278 (airMaterial->GetFractionVector()[i]);
1279 A += (airMaterial->GetElement(i)->GetA())*
1280 (airMaterial->GetFractionVector()[i]);
1281 }
1282
1283 Ionization = airMaterial->GetIonisation()->GetMeanExcitationEnergy();
1284 Density = airMaterial->GetDensity()/(g/cm3);
1285 Radlen = airMaterial->GetRadlen();
1286 cout<<"air: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
1287 KalFitMaterial FitAirMaterial(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
1288 _BesKalmanFitMaterials.push_back(FitAirMaterial);
1289 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
1290
1291 /// outer beryllium pipe
1292 G4LogicalVolume* logicalOuterBeVolume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume("logicalouterBe"));
1293 G4Material* outerBeMaterial = logicalOuterBeVolume->GetMaterial();
1294
1295 G4Tubs* outerBeTub = dynamic_cast<G4Tubs*>(logicalOuterBeVolume->GetSolid());
1296 Z = 0.;
1297 A = 0.;
1298 for(i=0; i<outerBeMaterial->GetElementVector()->size(); i++){
1299 Z += (outerBeMaterial->GetElement(i)->GetZ())*
1300 (outerBeMaterial->GetFractionVector()[i]);
1301 A += (outerBeMaterial->GetElement(i)->GetA())*
1302 (outerBeMaterial->GetFractionVector()[i]);
1303 }
1304 Ionization = outerBeMaterial->GetIonisation()->GetMeanExcitationEnergy();
1305 Density = outerBeMaterial->GetDensity()/(g/cm3);
1306 Radlen = outerBeMaterial->GetRadlen();
1307 cout<<"outer beryllium: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
1308 KalFitMaterial FitOuterBeMaterial(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
1309 _BesKalmanFitMaterials.push_back(FitOuterBeMaterial);
1310 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
1311
1312
1313 /// cooling oil
1314 G4LogicalVolume* logicalOilLayerVolume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume("logicaloilLayer"));
1315 G4Material* oilLayerMaterial = logicalOilLayerVolume->GetMaterial();
1316 G4Tubs* oilLayerTub = dynamic_cast<G4Tubs*>(logicalOilLayerVolume->GetSolid());
1317
1318 Z = 0.;
1319 A = 0.;
1320 for(i=0; i<oilLayerMaterial->GetElementVector()->size(); i++){
1321 Z += (oilLayerMaterial->GetElement(i)->GetZ())*
1322 (oilLayerMaterial->GetFractionVector()[i]);
1323 A += (oilLayerMaterial->GetElement(i)->GetA())*
1324 (oilLayerMaterial->GetFractionVector()[i]);
1325 }
1326 Ionization = oilLayerMaterial->GetIonisation()->GetMeanExcitationEnergy();
1327 Density = oilLayerMaterial->GetDensity()/(g/cm3);
1328 Radlen = oilLayerMaterial->GetRadlen();
1329 cout<<"cooling oil: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
1330 KalFitMaterial FitOilLayerMaterial(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
1331 _BesKalmanFitMaterials.push_back(FitOilLayerMaterial);
1332 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
1333
1334
1335 /// inner beryllium pipe
1336 G4LogicalVolume* logicalInnerBeVolume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume("logicalinnerBe"));
1337 G4Material* innerBeMaterial = logicalInnerBeVolume->GetMaterial();
1338 G4Tubs* innerBeTub = dynamic_cast<G4Tubs*>(logicalInnerBeVolume->GetSolid());
1339 Z = 0.;
1340 A = 0.;
1341 for(i=0; i<innerBeMaterial->GetElementVector()->size(); i++){
1342 Z += (innerBeMaterial->GetElement(i)->GetZ())*
1343 (innerBeMaterial->GetFractionVector()[i]);
1344 A += (innerBeMaterial->GetElement(i)->GetA())*
1345 (innerBeMaterial->GetFractionVector()[i]);
1346 }
1347
1348 Ionization = innerBeMaterial->GetIonisation()->GetMeanExcitationEnergy();
1349 Density = innerBeMaterial->GetDensity()/(g/cm3);
1350 Radlen = innerBeMaterial->GetRadlen();
1351 cout<<"inner beryllium: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
1352 KalFitMaterial FitInnerBeMaterial(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
1353 _BesKalmanFitMaterials.push_back(FitInnerBeMaterial);
1354 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
1355
1356
1357 /// gold
1358 G4LogicalVolume* logicalGoldLayerVolume = const_cast<G4LogicalVolume*>(GDMLProcessor::GetInstance()->GetLogicalVolume("logicalgoldLayer"));
1359 G4Material* goldLayerMaterial = logicalGoldLayerVolume->GetMaterial();
1360 G4Tubs* goldLayerTub = dynamic_cast<G4Tubs*>(logicalGoldLayerVolume->GetSolid());
1361
1362 Z = 0.;
1363 A = 0.;
1364 for(i=0; i<goldLayerMaterial->GetElementVector()->size(); i++){
1365 Z += (goldLayerMaterial->GetElement(i)->GetZ())*
1366 (goldLayerMaterial->GetFractionVector()[i]);
1367 A += (goldLayerMaterial->GetElement(i)->GetA())*
1368 (goldLayerMaterial->GetFractionVector()[i]);
1369 }
1370 Ionization = goldLayerMaterial->GetIonisation()->GetMeanExcitationEnergy();
1371 Density = goldLayerMaterial->GetDensity()/(g/cm3);
1372 Radlen = goldLayerMaterial->GetRadlen();
1373 cout<<"gold layer: Z: "<<Z<<" A: "<<(A/(g/mole))<<" Ionization: "<<(Ionization/eV)<<" Density: "<<Density<<" Radlen: "<<Radlen<<endl;
1374 KalFitMaterial FitGoldLayerMaterial(Z,A/g/mole,Ionization/eV,Density,Radlen/10.);
1375 _BesKalmanFitMaterials.push_back(FitGoldLayerMaterial);
1376 cout << "@@@@" << _BesKalmanFitMaterials.size() << endl;
1377
1378
1379 /// now construct the cylinders
1380 double radius, thick, length , z0;
1381 int k=0;
1382
1383 /*
1384 /// film1 of the innerwall of inner drift chamber
1385 radius = innerwallFilm1Tub->GetInnerRadius()/(cm);
1386 thick = innerwallFilm1Tub->GetOuterRadius()/(cm) - innerwallFilm1Tub->GetInnerRadius()/(cm);
1387 length = 2.0*innerwallFilm1Tub->GetZHalfLength()/(cm);
1388 z0 = 0.0;
1389 std::cout<<"innerwallFilm1: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1390 KalFitCylinder innerwallFilm1Cylinder(&_BesKalmanFitMaterials[1], radius, thick, length , z0);
1391 _BesKalmanFitWalls.push_back(innerwallFilm1Cylinder);
1392
1393
1394 /// innerwall of inner drift chamber
1395 radius = innerwallTub->GetInnerRadius()/(cm);
1396 thick = innerwallTub->GetOuterRadius()/(cm) - innerwallTub->GetInnerRadius()/(cm);
1397 length = 2.0*innerwallTub->GetZHalfLength()/(cm);
1398 z0 = 0.0;
1399 cout<<"innerwall: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<endl;
1400 KalFitCylinder innerwallCylinder(&_BesKalmanFitMaterials[2], radius, thick, length , z0);
1401 _BesKalmanFitWalls.push_back(innerwallCylinder);
1402
1403 /// film0 of the innerwall of inner drift chamber
1404 radius = innerwallFilm0Tub->GetInnerRadius()/(cm);
1405 thick = innerwallFilm0Tub->GetOuterRadius()/(cm) - innerwallFilm0Tub->GetInnerRadius()/(cm);
1406 length = 2.0*innerwallFilm0Tub->GetZHalfLength()/(cm);
1407 z0 = 0.0;
1408 std::cout<<"innerwallFilm0: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1409 KalFitCylinder innerwallFilm0Cylinder(&_BesKalmanFitMaterials[3], radius, thick, length , z0);
1410 _BesKalmanFitWalls.push_back(innerwallFilm0Cylinder);
1411
1412 */
1413 /// Separator
1414 radius = SeparatorTub->GetInnerRadius()/(cm);
1415 thick = SeparatorTub->GetOuterRadius()/(cm) - SeparatorTub->GetInnerRadius()/(cm);
1416 length = 2.0*SeparatorTub->GetZHalfLength()/(cm);
1417 z0 = 0.0;
1418 std::cout<<"Separator: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1419 KalFitCylinder SeparatorCylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1420 _BesKalmanFitWalls.push_back(SeparatorCylinder);
1421 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1422 for(int i=2;i>=0;i--){
1423
1424 /// shield kapton2
1425 /*
1426 radius = SK2Tub[i]->GetInnerRadius()/(cm);
1427 thick = SK2Tub[i]->GetOuterRadius()/(cm) - SK2Tub[i]->GetInnerRadius()/(cm);
1428 length = 2.0*SK2Tub[i]->GetZHalfLength()/(cm);
1429 z0 = 0.0;
1430 std::cout<<"SK2: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1431 KalFitCylinder SK2Cylinder(&_BesKalmanFitMaterials[1+i*32], radius, thick, length , z0);
1432 _BesKalmanFitWalls.push_back(SK2Cylinder);
1433 */
1434
1435 /// shield honeycomb
1436 /*
1437 radius = HCTub[i]->GetInnerRadius()/(cm);
1438 thick = HCTub[i]->GetOuterRadius()/(cm) - HCTub[i]->GetInnerRadius()/(cm);
1439 length = 2.0*HCTub[i]->GetZHalfLength()/(cm);
1440 z0 = 0.0;
1441 std::cout<<"HC: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1442 KalFitCylinder HCCylinder(&_BesKalmanFitMaterials[2+i*32], radius, thick, length , z0);
1443 _BesKalmanFitWalls.push_back(HCCylinder);
1444 */
1445
1446 /// shield kapton1
1447 /*
1448 radius = SK1Tub[i]->GetInnerRadius()/(cm);
1449 thick = SK1Tub[i]->GetOuterRadius()/(cm) - SK1Tub[i]->GetInnerRadius()/(cm);
1450 length = 2.0*SK1Tub[i]->GetZHalfLength()/(cm);
1451 z0 = 0.0;
1452 std::cout<<"SK1: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1453 KalFitCylinder SK1Cylinder(&_BesKalmanFitMaterials[3+i*32], radius, thick, length , z0);
1454 _BesKalmanFitWalls.push_back(SK1Cylinder);
1455 */
1456
1457 /// Anode Kapton4
1458 radius = AK4Tub[i]->GetInnerRadius()/(cm);
1459 thick = AK4Tub[i]->GetOuterRadius()/(cm) - AK4Tub[i]->GetInnerRadius()/(cm);
1460 length = 2.0*AK4Tub[i]->GetZHalfLength()/(cm);
1461 z0 = 0.0;
1462 std::cout<<"AK4: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1463 KalFitCylinder AK4Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1464 _BesKalmanFitWalls.push_back(AK4Cylinder);
1465 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1466
1467 /// Anode Au2
1468 /*
1469 radius = AA2Tub[i]->GetInnerRadius()/(cm);
1470 thick = AA2Tub[i]->GetOuterRadius()/(cm) - AA2Tub[i]->GetInnerRadius()/(cm);
1471 length = 2.0*AA2Tub[i]->GetZHalfLength()/(cm);
1472 z0 = 0.0;
1473 std::cout<<"AA2: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1474 KalFitCylinder AA2Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1475 _BesKalmanFitWalls.push_back(AA2Cylinder);
1476 */
1477
1478 /// Anode Cu3
1479 radius = AC3Tub[i]->GetInnerRadius()/(cm);
1480 thick = AC3Tub[i]->GetOuterRadius()/(cm) - AC3Tub[i]->GetInnerRadius()/(cm);
1481 length = 2.0*AC3Tub[i]->GetZHalfLength()/(cm);
1482 z0 = 0.0;
1483 std::cout<<"AC3: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1484 KalFitCylinder AC3Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1485 _BesKalmanFitWalls.push_back(AC3Cylinder);
1486 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1487
1488 /// Anode Epoxy5
1489 radius = AE5Tub[i]->GetInnerRadius()/(cm);
1490 thick = AE5Tub[i]->GetOuterRadius()/(cm) - AE5Tub[i]->GetInnerRadius()/(cm);
1491 length = 2.0*AE5Tub[i]->GetZHalfLength()/(cm);
1492 z0 = 0.0;
1493 std::cout<<"AE5: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1494 KalFitCylinder AE5Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1495 _BesKalmanFitWalls.push_back(AE5Cylinder);
1496 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1497
1498 /// Anode Rohacell2
1499 radius = AR2Tub[i]->GetInnerRadius()/(cm);
1500 thick = AR2Tub[i]->GetOuterRadius()/(cm) - AR2Tub[i]->GetInnerRadius()/(cm);
1501 length = 2.0*AR2Tub[i]->GetZHalfLength()/(cm);
1502 z0 = 0.0;
1503 std::cout<<"AR2: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1504 KalFitCylinder AR2Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1505 _BesKalmanFitWalls.push_back(AR2Cylinder);
1506 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1507
1508 /// Anode Epoxy4
1509 radius = AE4Tub[i]->GetInnerRadius()/(cm);
1510 thick = AE4Tub[i]->GetOuterRadius()/(cm) - AE4Tub[i]->GetInnerRadius()/(cm);
1511 length = 2.0*AE4Tub[i]->GetZHalfLength()/(cm);
1512 z0 = 0.0;
1513 std::cout<<"AE4: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1514 KalFitCylinder AE4Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1515 _BesKalmanFitWalls.push_back(AE4Cylinder);
1516 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1517
1518 /// Anode Kapton3
1519 radius = AK3Tub[i]->GetInnerRadius()/(cm);
1520 thick = AK3Tub[i]->GetOuterRadius()/(cm) - AK3Tub[i]->GetInnerRadius()/(cm);
1521 length = 2.0*AK3Tub[i]->GetZHalfLength()/(cm);
1522 z0 = 0.0;
1523 std::cout<<"AK3: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1524 KalFitCylinder AK3Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1525 _BesKalmanFitWalls.push_back(AK3Cylinder);
1526 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1527
1528 /// Anode Epoxy3
1529 radius = AE3Tub[i]->GetInnerRadius()/(cm);
1530 thick = AE3Tub[i]->GetOuterRadius()/(cm) - AE3Tub[i]->GetInnerRadius()/(cm);
1531 length = 2.0*AE3Tub[i]->GetZHalfLength()/(cm);
1532 z0 = 0.0;
1533 std::cout<<"AE3: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1534 KalFitCylinder AE3Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1535 _BesKalmanFitWalls.push_back(AE3Cylinder);
1536 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1537
1538 /// Anode Rohacell1
1539 radius = AR1Tub[i]->GetInnerRadius()/(cm);
1540 thick = AR1Tub[i]->GetOuterRadius()/(cm) - AR1Tub[i]->GetInnerRadius()/(cm);
1541 length = 2.0*AR1Tub[i]->GetZHalfLength()/(cm);
1542 z0 = 0.0;
1543 std::cout<<"AR1: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1544 KalFitCylinder AR1Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1545 _BesKalmanFitWalls.push_back(AR1Cylinder);
1546 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1547
1548 /// Anode Epoxy2
1549 radius = AE2Tub[i]->GetInnerRadius()/(cm);
1550 thick = AE2Tub[i]->GetOuterRadius()/(cm) - AE2Tub[i]->GetInnerRadius()/(cm);
1551 length = 2.0*AE2Tub[i]->GetZHalfLength()/(cm);
1552 z0 = 0.0;
1553 std::cout<<"AE2: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1554 KalFitCylinder AE2Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1555 _BesKalmanFitWalls.push_back(AE2Cylinder);
1556 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1557
1558 /// Anode Kapton2
1559 radius = AK2Tub[i]->GetInnerRadius()/(cm);
1560 thick = AK2Tub[i]->GetOuterRadius()/(cm) - AK2Tub[i]->GetInnerRadius()/(cm);
1561 length = 2.0*AK2Tub[i]->GetZHalfLength()/(cm);
1562 z0 = 0.0;
1563 std::cout<<"AK2: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1564 KalFitCylinder AK2Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1565 _BesKalmanFitWalls.push_back(AK2Cylinder);
1566 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1567
1568 /// Anode Epoxy1
1569 radius = AE1Tub[i]->GetInnerRadius()/(cm);
1570 thick = AE1Tub[i]->GetOuterRadius()/(cm) - AE1Tub[i]->GetInnerRadius()/(cm);
1571 length = 2.0*AE1Tub[i]->GetZHalfLength()/(cm);
1572 z0 = 0.0;
1573 std::cout<<"AE1: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1574 KalFitCylinder AE1Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1575 _BesKalmanFitWalls.push_back(AE1Cylinder);
1576 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1577
1578 /// Anode Cu2
1579 radius = AC2Tub[i]->GetInnerRadius()/(cm);
1580 thick = AC2Tub[i]->GetOuterRadius()/(cm) - AC2Tub[i]->GetInnerRadius()/(cm);
1581 length = 2.0*AC2Tub[i]->GetZHalfLength()/(cm);
1582 z0 = 0.0;
1583 std::cout<<"AC2: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1584 KalFitCylinder AC2Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1585 _BesKalmanFitWalls.push_back(AC2Cylinder);
1586 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1587
1588 // Anode Kapton1
1589 radius = AK1Tub[i]->GetInnerRadius()/(cm);
1590 thick = AK1Tub[i]->GetOuterRadius()/(cm) - AK1Tub[i]->GetInnerRadius()/(cm);
1591 length = 2.0*AK1Tub[i]->GetZHalfLength()/(cm);
1592 z0 = 0.0;
1593 std::cout<<"AK1: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1594 KalFitCylinder AK1Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1595 _BesKalmanFitWalls.push_back(AK1Cylinder);
1596 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1597
1598 /// Anode Cu1
1599 radius = AC1Tub[i]->GetInnerRadius()/(cm);
1600 thick = AC1Tub[i]->GetOuterRadius()/(cm) - AC1Tub[i]->GetInnerRadius()/(cm);
1601 length = 2.0*AC1Tub[i]->GetZHalfLength()/(cm);
1602 z0 = 0.0;
1603 std::cout<<"AC1: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1604 KalFitCylinder AC1Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1605 _BesKalmanFitWalls.push_back(AC1Cylinder);
1606 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1607
1608 /// Anode Au1
1609 /*
1610 radius = AA1Tub[i]->GetInnerRadius()/(cm);
1611 thick = AA1Tub[i]->GetOuterRadius()/(cm) - AA1Tub[i]->GetInnerRadius()/(cm);
1612 length = 2.0*AA1Tub[i]->GetZHalfLength()/(cm);
1613 z0 = 0.0;
1614 std::cout<<"AA1: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1615 KalFitCylinder AA1Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1616 _BesKalmanFitWalls.push_back(AA1Cylinder);
1617 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1618 */
1619
1620 /// GAP I
1621 radius = GAPITub[i]->GetInnerRadius()/(cm);
1622 thick = GAPITub[i]->GetOuterRadius()/(cm) - GAPITub[i]->GetInnerRadius()/(cm);
1623 length = 2.0*GAPITub[i]->GetZHalfLength()/(cm);
1624 z0 = 0.0;
1625 std::cout<<"GAPI: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1626 KalFitCylinder GAPICylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1627 _BesKalmanFitWalls.push_back(GAPICylinder);
1628 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1629
1630 /// Foil Gem2
1631 /// Cu2
1632 radius = FC22Tub[i]->GetInnerRadius()/(cm);
1633 thick = FC22Tub[i]->GetOuterRadius()/(cm) - FC22Tub[i]->GetInnerRadius()/(cm);
1634 length = 2.0*FC22Tub[i]->GetZHalfLength()/(cm);
1635 z0 = 0.0;
1636 std::cout<<"FC22: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1637 KalFitCylinder FC22Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1638 _BesKalmanFitWalls.push_back(FC22Cylinder);
1639 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1640
1641 /// Kapton
1642 radius = FK2Tub[i]->GetInnerRadius()/(cm);
1643 thick = FK2Tub[i]->GetOuterRadius()/(cm) - FK2Tub[i]->GetInnerRadius()/(cm);
1644 length = 2.0*FK2Tub[i]->GetZHalfLength()/(cm);
1645 z0 = 0.0;
1646 std::cout<<"FK2: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1647 KalFitCylinder FK2Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1648 _BesKalmanFitWalls.push_back(FK2Cylinder);
1649 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1650
1651 /// Cu1
1652 radius = FC12Tub[i]->GetInnerRadius()/(cm);
1653 thick = FC12Tub[i]->GetOuterRadius()/(cm) - FC12Tub[i]->GetInnerRadius()/(cm);
1654 length = 2.0*FC12Tub[i]->GetZHalfLength()/(cm);
1655 z0 = 0.0;
1656 std::cout<<"FC12: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1657 KalFitCylinder FC12Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1658 _BesKalmanFitWalls.push_back(FC12Cylinder);
1659 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1660
1661 ///Gap T2
1662 radius = GAPT2Tub[i]->GetInnerRadius()/(cm);
1663 thick = GAPT2Tub[i]->GetOuterRadius()/(cm) - GAPT2Tub[i]->GetInnerRadius()/(cm);
1664 length = 2.0*GAPT2Tub[i]->GetZHalfLength()/(cm);
1665 z0 = 0.0;
1666 std::cout<<"GAPT2: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1667 KalFitCylinder GAPT2Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1668 _BesKalmanFitWalls.push_back(GAPT2Cylinder);
1669 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1670
1671 //Gem Foil1
1672 //Cu2
1673 radius = FC21Tub[i]->GetInnerRadius()/(cm);
1674 thick = FC21Tub[i]->GetOuterRadius()/(cm) - FC21Tub[i]->GetInnerRadius()/(cm);
1675 length = 2.0*FC21Tub[i]->GetZHalfLength()/(cm);
1676 z0 = 0.0;
1677 std::cout<<"FC21: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1678 KalFitCylinder FC21Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1679 _BesKalmanFitWalls.push_back(FC21Cylinder);
1680 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1681
1682 // Kapton
1683 radius = FK1Tub[i]->GetInnerRadius()/(cm);
1684 thick = FK1Tub[i]->GetOuterRadius()/(cm) - FK1Tub[i]->GetInnerRadius()/(cm);
1685 length = 2.0*FK1Tub[i]->GetZHalfLength()/(cm);
1686 z0 = 0.0;
1687 std::cout<<"FK1: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1688 KalFitCylinder FK1Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1689 _BesKalmanFitWalls.push_back(FK1Cylinder);
1690 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1691
1692 // Cu1
1693 radius = FC11Tub[i]->GetInnerRadius()/(cm);
1694 thick = FC11Tub[i]->GetOuterRadius()/(cm) - FC11Tub[i]->GetInnerRadius()/(cm);
1695 length = 2.0*FC11Tub[i]->GetZHalfLength()/(cm);
1696 z0 = 0.0;
1697 std::cout<<"FC11: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1698 KalFitCylinder FC11Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1699 _BesKalmanFitWalls.push_back(FC11Cylinder);
1700 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1701
1702 // Gap T1
1703 radius = GAPT1Tub[i]->GetInnerRadius()/(cm);
1704 thick = GAPT1Tub[i]->GetOuterRadius()/(cm) - GAPT1Tub[i]->GetInnerRadius()/(cm);
1705 length = 2.0*GAPT1Tub[i]->GetZHalfLength()/(cm);
1706 z0 = 0.0;
1707 std::cout<<"GAPT1: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1708 KalFitCylinder GAPT1Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1709 _BesKalmanFitWalls.push_back(GAPT1Cylinder);
1710 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1711
1712 // Gem Foil0
1713 // Cu2
1714 radius = FC20Tub[i]->GetInnerRadius()/(cm);
1715 thick = FC20Tub[i]->GetOuterRadius()/(cm) - FC20Tub[i]->GetInnerRadius()/(cm);
1716 length = 2.0*FC20Tub[i]->GetZHalfLength()/(cm);
1717 z0 = 0.0;
1718 std::cout<<"FC20: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1719 KalFitCylinder FC20Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1720 _BesKalmanFitWalls.push_back(FC20Cylinder);
1721 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1722
1723 // Kapton
1724 radius = FK0Tub[i]->GetInnerRadius()/(cm);
1725 thick = FK0Tub[i]->GetOuterRadius()/(cm) - FK0Tub[i]->GetInnerRadius()/(cm);
1726 length = 2.0*FK0Tub[i]->GetZHalfLength()/(cm);
1727 z0 = 0.0;
1728 std::cout<<"FK0: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1729 KalFitCylinder FK0Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1730 _BesKalmanFitWalls.push_back(FK0Cylinder);
1731 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1732
1733 // Cu1
1734 radius = FC10Tub[i]->GetInnerRadius()/(cm);
1735 //thick = 0.0002;//FC10Tub[i]->GetOuterRadius()/(cm) - FC10Tub[i]->GetInnerRadius()/(cm);
1736 thick = FC10Tub[i]->GetOuterRadius()/(cm) - FC10Tub[i]->GetInnerRadius()/(cm);
1737 length = 2.0*FC10Tub[i]->GetZHalfLength()/(cm);
1738 z0 = 0.0;
1739 std::cout<<"FC10: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1740 KalFitCylinder FC10Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1741 _BesKalmanFitWalls.push_back(FC10Cylinder);
1742 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1743
1744 // Gap D
1745 radius = GAPDTub[i]->GetInnerRadius()/(cm);
1746 thick = GAPDTub[i]->GetOuterRadius()/(cm) - GAPDTub[i]->GetInnerRadius()/(cm);
1747 length = 2.0*GAPDTub[i]->GetZHalfLength()/(cm);
1748 z0 = 0.0;
1749 std::cout<<"GAPD: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1750 KalFitCylinder GAPDCylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1751 _BesKalmanFitWalls.push_back(GAPDCylinder);
1752 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1753
1754 // Cathode Cu
1755 radius = CCuTub[i]->GetInnerRadius()/(cm);
1756 thick = CCuTub[i]->GetOuterRadius()/(cm) - CCuTub[i]->GetInnerRadius()/(cm);
1757 length = 2.0*CCuTub[i]->GetZHalfLength()/(cm);
1758 z0 = 0.0;
1759 std::cout<<"CCu: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1760 KalFitCylinder CCuCylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1761 _BesKalmanFitWalls.push_back(CCuCylinder);
1762 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1763
1764 // Cathode Kapton3
1765 radius = CK3Tub[i]->GetInnerRadius()/(cm);
1766 thick = CK3Tub[i]->GetOuterRadius()/(cm) - CK3Tub[i]->GetInnerRadius()/(cm);
1767 length = 2.0*CK3Tub[i]->GetZHalfLength()/(cm);
1768 z0 = 0.0;
1769 std::cout<<"CK3: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1770 KalFitCylinder CK3Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1771 _BesKalmanFitWalls.push_back(CK3Cylinder);
1772 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1773
1774 // Cathode Epoxy4
1775 radius = CE4Tub[i]->GetInnerRadius()/(cm);
1776 thick = CE4Tub[i]->GetOuterRadius()/(cm) - CE4Tub[i]->GetInnerRadius()/(cm);
1777 length = 2.0*CE4Tub[i]->GetZHalfLength()/(cm);
1778 z0 = 0.0;
1779 std::cout<<"CE4: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1780 KalFitCylinder CE4Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1781 _BesKalmanFitWalls.push_back(CE4Cylinder);
1782 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1783
1784 // Cathode Rohacell2
1785 radius = CR2Tub[i]->GetInnerRadius()/(cm);
1786 thick = CR2Tub[i]->GetOuterRadius()/(cm) - CR2Tub[i]->GetInnerRadius()/(cm);
1787 length = 2.0*CR2Tub[i]->GetZHalfLength()/(cm);
1788 z0 = 0.0;
1789 std::cout<<"CR2: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1790 KalFitCylinder CR2Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1791 _BesKalmanFitWalls.push_back(CR2Cylinder);
1792 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1793
1794 // Cathode Epoxy3
1795 radius = CE3Tub[i]->GetInnerRadius()/(cm);
1796 thick = CE3Tub[i]->GetOuterRadius()/(cm) - CE3Tub[i]->GetInnerRadius()/(cm);
1797 length = 2.0*CE3Tub[i]->GetZHalfLength()/(cm);
1798 z0 = 0.0;
1799 std::cout<<"CE3: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1800 KalFitCylinder CE3Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1801 _BesKalmanFitWalls.push_back(CE3Cylinder);
1802 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1803
1804 // Cathode Kapton2
1805 radius = CK2Tub[i]->GetInnerRadius()/(cm);
1806 thick = CK2Tub[i]->GetOuterRadius()/(cm) - CK2Tub[i]->GetInnerRadius()/(cm);
1807 length = 2.0*CK2Tub[i]->GetZHalfLength()/(cm);
1808 z0 = 0.0;
1809 std::cout<<"CK2: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1810 KalFitCylinder CK2Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1811 _BesKalmanFitWalls.push_back(CK2Cylinder);
1812 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1813
1814 // Cathode Epoxy2
1815 radius = CE2Tub[i]->GetInnerRadius()/(cm);
1816 thick = CE2Tub[i]->GetOuterRadius()/(cm) - CE2Tub[i]->GetInnerRadius()/(cm);
1817 length = 2.0*CE2Tub[i]->GetZHalfLength()/(cm);
1818 z0 = 0.0;
1819 std::cout<<"CE2: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1820 KalFitCylinder CE2Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1821 _BesKalmanFitWalls.push_back(CE2Cylinder);
1822 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1823
1824 // Cathode Rohacell1
1825 radius = CR1Tub[i]->GetInnerRadius()/(cm);
1826 thick = CR1Tub[i]->GetOuterRadius()/(cm) - CR1Tub[i]->GetInnerRadius()/(cm);
1827 length = 2.0*CR1Tub[i]->GetZHalfLength()/(cm);
1828 z0 = 0.0;
1829 std::cout<<"CR1: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1830 KalFitCylinder CR1Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1831 _BesKalmanFitWalls.push_back(CR1Cylinder);
1832 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1833
1834 // Cathode Epoxy1
1835 radius = CE1Tub[i]->GetInnerRadius()/(cm);
1836 thick = CE1Tub[i]->GetOuterRadius()/(cm) - CE1Tub[i]->GetInnerRadius()/(cm);
1837 length = 2.0*CE1Tub[i]->GetZHalfLength()/(cm);
1838 z0 = 0.0;
1839 std::cout<<"CE1: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1840 KalFitCylinder CE1Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1841 _BesKalmanFitWalls.push_back(CE1Cylinder);
1842 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1843
1844 //Cathode Honeycomb
1845 /*
1846 radius = CHTub[i]->GetInnerRadius()/(cm);
1847 thick = CHTub[i]->GetOuterRadius()/(cm) - CHTub[i]->GetInnerRadius()/(cm);
1848 length = 2.0*CHTub[i]->GetZHalfLength()/(cm);
1849 z0 = 0.0;
1850 std::cout<<"CH: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1851 KalFitCylinder CHCylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1852 _BesKalmanFitWalls.push_back(CHCylinder);
1853 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1854 */
1855
1856 //Cathode Kapton1
1857 radius = CK1Tub[i]->GetInnerRadius()/(cm);
1858 thick = CK1Tub[i]->GetOuterRadius()/(cm) - CK1Tub[i]->GetInnerRadius()/(cm);
1859 length = 2.0*CK1Tub[i]->GetZHalfLength()/(cm);
1860 z0 = 0.0;
1861 std::cout<<"CK1: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1862 KalFitCylinder CK1Cylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1863 _BesKalmanFitWalls.push_back(CK1Cylinder);
1864 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1865
1866 // Cathode Cu1
1867 /*
1868 radius = CC1Tub[i]->GetInnerRadius()/(cm);
1869 thick = CC1Tub[i]->GetOuterRadius()/(cm) - CC1Tub[i]->GetInnerRadius()/(cm);
1870 length = 2.0*CC1Tub[i]->GetZHalfLength()/(cm);
1871 z0 = 0.0;
1872 std::cout<<"CC1: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1873 KalFitCylinder CC1Cylinder(&_BesKalmanFitMaterials[31+i*32], radius, thick, length , z0);
1874 _BesKalmanFitWalls.push_back(CC1Cylinder);
1875 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1876 */
1877
1878 //air between different CgemLayer
1879 if(i>=1){
1880 radius = AK4Tub[i-1]->GetOuterRadius()/(cm);
1881 thick = CK1Tub[i]->GetInnerRadius()/(cm) - AK4Tub[i-1]->GetOuterRadius()/(cm);
1882 length = 2.0*CK1Tub[i]->GetZHalfLength()/(cm);
1883 z0 = 0.0;
1884 std::cout<<"air between layer: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<std::endl;
1885 KalFitCylinder AirBCylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1886 _BesKalmanFitWalls.push_back(AirBCylinder);
1887 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1888 }
1889 }
1890
1891 /// outer air, be attention the calculation of the radius and thick of the air cylinder is special
1892 radius = outerBeTub->GetOuterRadius()/(cm);
1893 thick = CK1Tub[0]->GetInnerRadius()/(cm) - outerBeTub->GetOuterRadius()/(cm);
1894 length = 2.0*CK1Tub[0]->GetZHalfLength()/(cm);
1895 z0 = 0.0;
1896 cout<<"outer air: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<endl;
1897 KalFitCylinder outerAirCylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1898 _BesKalmanFitWalls.push_back(outerAirCylinder);
1899 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1900
1901 /// outer Beryllium layer
1902 radius = outerBeTub->GetInnerRadius()/(cm);
1903 thick = outerBeTub->GetOuterRadius()/(cm) - outerBeTub->GetInnerRadius()/(cm);
1904 length = 2.0*outerBeTub->GetZHalfLength()/(cm);
1905 z0 = 0.0;
1906 cout<<"outer Be: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<endl;
1907 KalFitCylinder outerBeCylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1908 _BesKalmanFitWalls.push_back(outerBeCylinder);
1909 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1910
1911 /// oil layer
1912 radius = oilLayerTub->GetInnerRadius()/(cm);
1913 thick = oilLayerTub->GetOuterRadius()/(cm) - oilLayerTub->GetInnerRadius()/(cm);
1914 length = 2.0*oilLayerTub->GetZHalfLength()/(cm);
1915 z0 = 0.0;
1916 cout<<"oil layer: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<endl;
1917 KalFitCylinder oilLayerCylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1918 _BesKalmanFitWalls.push_back(oilLayerCylinder);
1919 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1920
1921 /// inner Beryllium layer
1922 radius = innerBeTub->GetInnerRadius()/(cm);
1923 thick = innerBeTub->GetOuterRadius()/(cm) - innerBeTub->GetInnerRadius()/(cm);
1924 length = 2.0*innerBeTub->GetZHalfLength()/(cm);
1925 z0 = 0.0;
1926 cout<<"inner Be: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<endl;
1927 KalFitCylinder innerBeCylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1928 _BesKalmanFitWalls.push_back(innerBeCylinder);
1929 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1930
1931 /// gold layer
1932 radius = goldLayerTub->GetInnerRadius()/(cm);
1933 thick = goldLayerTub->GetOuterRadius()/(cm) - goldLayerTub->GetInnerRadius()/(cm);
1934 length = 2.0*goldLayerTub->GetZHalfLength()/(cm);
1935 z0 = 0.0;
1936 cout<<"gold layer: "<<" radius: "<<radius<<" thick:"<<thick<<" length: "<<length<<endl;
1937 KalFitCylinder goldLayerCylinder(&_BesKalmanFitMaterials[++k], radius, thick, length , z0);
1938 _BesKalmanFitWalls.push_back(goldLayerCylinder);
1939 cout<<"wall: "<<k<<" Z: "<<_BesKalmanFitMaterials[k].Z()<<endl;
1940
1941
1942 // --- GEM
1943 //double rGem[4]={7.7,10.7,13.7,16.7}; //cm
1944 //double LGem[4]={774,798,828,858};//cm
1945 //radius=
1946 //_BesGemWalls.push_back();
1947}//end of setBesFromGdml
XmlRpcServer s
Definition: HelloServer.cpp:11
void setBesFromGdml(void)
Cylinder is an Element whose shape is a cylinder.
G4LogicalVolume * GetTopVolume()
Get the top(world) volume;.