SND@LHC Software
Loading...
Searching...
No Matches
veto.cxx
Go to the documentation of this file.
1#include "veto.h"
2#include <math.h>
3#include "vetoPoint.h"
4
5#include "FairLogger.h" // for FairLogger, MESSAGE_ORIGIN
6#include "FairVolume.h"
7#include "FairGeoVolume.h"
8#include "FairGeoNode.h"
9#include "FairRootManager.h"
10#include "FairGeoLoader.h"
11#include "FairGeoInterface.h"
12#include "FairGeoMedia.h"
13#include "FairGeoBuilder.h"
14#include "FairRun.h"
15#include "FairRuntimeDb.h"
16#include "ShipDetectorList.h"
17#include "ShipStack.h"
18
19#include "TClonesArray.h"
20#include "TVirtualMC.h"
21#include "TGeoManager.h"
22#include "TGeoBBox.h"
23#include "TGeoEltu.h"
24#include "TGeoSphere.h"
25#include "TGeoBoolNode.h"
26#include "TGeoCompositeShape.h"
27#include "TGeoShapeAssembly.h"
28#include "TGeoTube.h"
29#include "TGeoArb8.h"
30#include "TGeoCone.h"
31#include "TGeoMaterial.h"
32#include "TParticle.h"
33#include "TMath.h"
34
35
36#include <iostream>
37#include <vector>
38using std::cout;
39using std::endl;
40
41Double_t cm = 1; // cm
42Double_t m = 100*cm; // m
43Double_t mm = 0.1*cm; // mm
44
46 : FairDetector("veto", kTRUE, kVETO),
47 fTrackID(-1),
48 fVolumeID(-1),
49 fPos(),
50 fMom(),
51 fTime(-1.),
52 fLength(-1.),
53 fELoss(-1),
54 fvetoPointCollection(new TClonesArray("vetoPoint"))
55{
59}
60
61veto::veto(const char* name, Bool_t active)
62 : FairDetector(name, active, kVETO),
63 fTrackID(-1),
64 fVolumeID(-1),
65 fPos(),
66 fMom(),
67 fTime(-1.),
68 fLength(-1.),
69 fELoss(-1),
70 fFastMuon(kFALSE),
71 fFollowMuon(kFALSE),
72 fT0z(-2390.),
73 fT1z(1510.),
74 fT2z(1710.),
75 fT3z(2150.),
76 fT4z(2370.),
77 f_InnerSupportThickness(3.*cm),
78 f_OuterSupportThickness(8.*mm),
79 f_LidThickness(80.*mm),
80 f_PhiRibsThickness(15.*mm),
81 f_VetoThickness(0.3*m),
82 zFocusX(-80*m),
83 zFocusY(-80*m),
84 ws(0.5*m),
85 fXstart(1.5*m),
86 fYstart(1.5*m),
87 fvetoPointCollection(new TClonesArray("vetoPoint")),
88 vetoMed_name("Scintillator"), // for liquid scintillator
89 supportMedIn_name("steel"), // for vacuum option
90 supportMedOut_name("Aluminum"), // for vacuum option
91 f_RibThickness(3.*cm),
92 decayVolumeMed_name("vacuums") // for vacuum option
93{
97}
98
100{
102 fvetoPointCollection->Delete();
104 }
105}
106
108{
109 FairDetector::Initialize();
110// FairRuntimeDb* rtdb= FairRun::Instance()->GetRuntimeDb();
111// vetoGeoPar* par=(vetoGeoPar*)(rtdb->getContainer("vetoGeoPar"));
112}
113
114TGeoVolume* veto::GeoTrapezoid(TString xname,Double_t wz,
115 Double_t wX_start,Double_t wX_end,
116 Double_t wY_start,Double_t wY_end,
117 Int_t color,TGeoMedium *material,Bool_t sens=kFALSE)
118{
119
120
121 Double_t dz=wz/2;
122 Double_t tdx1 = wX_start/2-1.E-6;
123 Double_t tdx2 = wX_end/2-1.E-6;
124 Double_t tdy1 = wY_start/2-1.E-6;
125 Double_t tdy2 = wY_end/2-1.E-6;
126 TGeoArb8 *T1 = new TGeoArb8("T1"+xname,dz+1.E-6);
127 T1->SetVertex(0,-tdx1,-tdy1); T1->SetVertex(1,-tdx1,tdy1); T1->SetVertex(2,tdx1,tdy1); T1->SetVertex(3,tdx1,-tdy1);
128 T1->SetVertex(4,-tdx2,-tdy2); T1->SetVertex(5,-tdx2,tdy2); T1->SetVertex(6,tdx2,tdy2); T1->SetVertex(7,tdx2,-tdy2);
129
130
131// TGeoCompositeShape *T321 = new TGeoCompositeShape("T3"+nm,"T2"+nm+"-T1"+nm);
132 TGeoVolume *T = new TGeoVolume(xname, T1, material);
133 T->SetLineColor(color);
134 //and make the volunes sensitive..
135 if (sens) {AddSensitiveVolume(T);}
136 return T;
137}
138
139TGeoVolume* veto::GeoTrapezoidNew(TString xname,Double_t thick,Double_t wz,
140 Double_t wX_start,Double_t wX_end,
141 Double_t wY_start,Double_t wY_end,
142 Int_t color,TGeoMedium *material,Bool_t sens=kFALSE)
143{
144
145
146
147 Double_t dx_start=wX_start/2;
148 Double_t dy_start=wY_start/2;
149 Double_t dx_end=wX_end/2;
150 Double_t dy_end=wY_end/2;
151 Double_t dz=wz/2;
152
153
154 TString nm = xname.ReplaceAll("-",""); //otherwise it will try to subtract "-" in TGeoComposteShape
155 Double_t dx1 = dx_start+thick;
156 Double_t dx2 = dx_end+thick;
157 Double_t dy1 = dy_start+thick;
158 Double_t dy2 = dy_end+thick;
159
160 TGeoArb8 *T2 = new TGeoArb8("T2"+nm,dz);
161 T2->SetVertex(0,-dx1,-dy1); T2->SetVertex(1,-dx1,dy1); T2->SetVertex(2,dx1,dy1); T2->SetVertex(3,dx1,-dy1);
162 T2->SetVertex(4,-dx2,-dy2); T2->SetVertex(5,-dx2,dy2); T2->SetVertex(6,dx2,dy2); T2->SetVertex(7,dx2,-dy2);
163
164 Double_t tdx1 = dx_start;
165 Double_t tdx2 = dx_end;
166 Double_t tdy1 = dy_start;
167 Double_t tdy2 = dy_end;
168 TGeoArb8 *T1 = new TGeoArb8("T1"+nm,dz+1.E-6);
169 T1->SetVertex(0,-tdx1,-tdy1); T1->SetVertex(1,-tdx1,tdy1); T1->SetVertex(2,tdx1,tdy1); T1->SetVertex(3,tdx1,-tdy1);
170 T1->SetVertex(4,-tdx2,-tdy2); T1->SetVertex(5,-tdx2,tdy2); T1->SetVertex(6,tdx2,tdy2); T1->SetVertex(7,tdx2,-tdy2);
171
172
173 TGeoCompositeShape *T321 = new TGeoCompositeShape("T3"+nm,"T2"+nm+"-T1"+nm);
174 TGeoVolume *T = new TGeoVolume(xname, T321, material);
175 T->SetLineColor(color);
176 //and make the volunes sensitive..
177 if (sens) {AddSensitiveVolume(T);}
178 return T;
179}
180
181
182
183
184double wx(double z){
185
186 double wx1=1520*mm;
187 double wx2=2522*mm;
188 double z1=0*m;
189 double z2=14.4*m;
190 if(z>14.4*m){
191 z1=14.4*m;
192 z2=15.2*m;
193 wx1=2522*mm;
194 wx2=2578*mm;
195 if(z>15.2*m){
196 z1=15.2*m;
197 z2=24.0*m;
198 wx1=2578*mm;
199 wx2=3190*mm;
200 if(z>24.0*m){
201 z1=24.0*m;
202 z2=33.6*m;
203 wx1=3190*mm;
204 wx2=3859*mm;
205 if(z>33.6*m){
206 z1=33.6*m;
207 z2=50.0*m;
208 wx1=3859*mm;
209 wx2=5000*mm;
210 }
211 }
212 }
213 }
214
215 return wx1+(z-z1)*(wx2-wx1)/(z2-z1);
216}
217
218double wy(double z){
219
220 double wy1=4320*mm;
221 double wy2=6244*mm;
222 double z1=0*m;
223 double z2=14.4*m;
224 if(z>14.4*m){
225 z1=14.4*m;
226 z2=15.2*m;
227 wy1=6244*mm;
228 wy2=6350*mm;
229 if(z>15.2*m){
230 z1=15.2*m;
231 z2=24.0*m;
232 wy1=6350*mm;
233 wy2=7526*mm;
234 if(z>24.0*m){
235 z1=24.0*m;
236 z2=33.6*m;
237 wy1=7526*mm;
238 wy2=8809*mm;
239 if(z>33.6*m){
240 z1=33.6*m;
241 z2=50.0*m;
242 wy1=8809*mm;
243 wy2=11000*mm;
244 }
245 }
246 }
247 }
248
249 return wy1+(z-z1)*(wy2-wy1)/(z2-z1);
250}
251
252
253TGeoVolume* veto::GeoSideObj(TString xname, double dz,
254 double a1, double b1,double a2, double b2,double dA, double dB,
255 Int_t color, TGeoMedium *material, Bool_t sens=kFALSE){
256
257 //a1- width in X, at the beginning
258 //b1- width in Y, at the beginning
259 //a2- width in X, at the end
260 //b2- width in Y, at the end
261
262 TGeoArb8 *T1 = new TGeoArb8(dz);
263 T1->SetVertex(0,0,0);
264 T1->SetVertex(1,0,b1);
265 T1->SetVertex(2,a1,b1);
266 T1->SetVertex(3,a1,0);
267
268 T1->SetVertex(4,dA,dB);
269 T1->SetVertex(5,dA,dB+b2);
270 T1->SetVertex(6,dA+a2,dB+b2);
271 T1->SetVertex(7,dA+a2,dB);
272
273
274
275 TGeoVolume *T = new TGeoVolume(xname, T1, material);
276 T->SetLineColor(color);
277 //and make the volunes sensitive..
278 if (sens) {AddSensitiveVolume(T);}
279 return T;
280}
281
282
283TGeoVolume* veto::GeoCornerLiSc1(TString xname, double dz,bool isClockwise,
284 double a, double b1,double b2, double dA, double dB,
285 Int_t color, TGeoMedium *material, Bool_t sens=kFALSE){
286
287 TGeoArb8 *T1 = new TGeoArb8(dz);
288
289 if(isClockwise){
290 T1->SetVertex(0,0,0);
291 T1->SetVertex(1,0,b1);
292 T1->SetVertex(2,a+b1,b1);
293 T1->SetVertex(3,a,0);
294
295 T1->SetVertex(4,dA,dB);
296 T1->SetVertex(5,dA,dB+b2);
297 T1->SetVertex(6,dA+a+b2,dB+b2);
298 T1->SetVertex(7,dA+a,dB);
299 }
300 else{
301 T1->SetVertex(0,0,0);
302 T1->SetVertex(1,-a,0);
303 T1->SetVertex(2,-a-b1,b1);
304 T1->SetVertex(3,0,b1);
305
306 T1->SetVertex(4,-dA,dB);
307 T1->SetVertex(5,-dA-a,dB);
308 T1->SetVertex(6,-dA-a-b2,dB+b2);
309 T1->SetVertex(7,-dA,dB+b2);
310 }
311
312
313 TGeoVolume *T = new TGeoVolume(xname, T1, material);
314 T->SetLineColor(color);
315 //and make the volunes sensitive..
316 if (sens) {AddSensitiveVolume(T);}
317 return T;
318}
319
320TGeoVolume* veto::GeoCornerLiSc2(TString xname, double dz,bool isClockwise,
321 double a, double b1,double b2, double dA, double dB,
322 Int_t color, TGeoMedium *material, Bool_t sens=kFALSE){
323
324 TGeoArb8 *T1 = new TGeoArb8(dz);
325
326 if(isClockwise){
327 T1->SetVertex(0,0,0);
328 T1->SetVertex(1,0,a);
329 T1->SetVertex(2,b1,a+b1);
330 T1->SetVertex(3,b1,0);
331
332 T1->SetVertex(4,dA,dB);
333 T1->SetVertex(5,dA,dB+a);
334 T1->SetVertex(6,dA+b2,dB+a+b2);
335 T1->SetVertex(7,dA+b2,dB);
336 }
337 else{
338 T1->SetVertex(0,0,0);
339 T1->SetVertex(1,b1,0);
340 T1->SetVertex(2,b1,-a-b1);
341 T1->SetVertex(3,0,-a);
342
343 T1->SetVertex(4,dA,-dB);
344 T1->SetVertex(5,dA+b2,-dB);
345 T1->SetVertex(6,dA+b2,-dB-a-b2);
346 T1->SetVertex(7,dA,-dB-a);
347 }
348
349
350 TGeoVolume *T = new TGeoVolume(xname, T1, material);
351 T->SetLineColor(color);
352 //and make the volunes sensitive..
353 if (sens) {AddSensitiveVolume(T);}
354 return T;
355}
356
357
358TGeoVolumeAssembly* veto::GeoCornerRib(TString xname, double ribThick, double lt1,double lt2, double dz, double slopeX, double slopeY,
359 Int_t color, TGeoMedium *material, Bool_t sens=kFALSE){
360
361 Double_t wz=dz*2;
362 double d=ribThick*sqrt(2)/2;
363 double dx=slopeX*wz;
364 double dy=slopeY*wz;
365
366 TGeoArb8 *T1 = new TGeoArb8(dz);
367 T1->SetVertex(0,lt1,lt1-d);
368 T1->SetVertex(1,0,-d);
369 T1->SetVertex(2,0,0);
370 T1->SetVertex(3,lt1,lt1);
371
372 T1->SetVertex(4,dx+lt2,dy+lt2-d);
373 T1->SetVertex(5,dx,dy-d);
374 T1->SetVertex(6,dx,dy);
375 T1->SetVertex(7,dx+lt2,dy+lt2);
376
377 TGeoArb8 *T2 = new TGeoArb8(dz);
378 T2->SetVertex(0,lt1-d,lt1);
379 T2->SetVertex(1,lt1,lt1);
380 T2->SetVertex(2,0,0);
381 T2->SetVertex(3,-d,0);
382
383 T2->SetVertex(4,dx+lt2-d,dy+lt2);
384 T2->SetVertex(5,dx+lt2,dy+lt2);
385 T2->SetVertex(6,dx,dy);
386 T2->SetVertex(7,dx-d,dy);
387
388
389
390 TGeoVolume *T1v = new TGeoVolume("part", T1, material);
391 TGeoVolume *T2v = new TGeoVolume("part", T2, material);
392 T1v->SetLineColor(color);
393 T2v->SetLineColor(color);
394 if (sens) {AddSensitiveVolume(T1v);}
395 if (sens) {AddSensitiveVolume(T2v);}
396
397
398
399 TGeoVolumeAssembly *T = new TGeoVolumeAssembly(xname);
400 T->AddNode(T1v,1, new TGeoTranslation(0, 0,0));
401 T->AddNode(T2v,2, new TGeoTranslation(0, 0,0));
402 return T;
403}
404
405
406int veto::makeId(double z,double x, double y){
407 double Z=z/10;
408 double r=sqrt(x*x+y*y);
409 double phi=999;
410 if(y>=0)phi=acos(x/r);
411 else phi=-acos(x/r)+2*TMath::Pi();
412
413 phi=phi*180/TMath::Pi();
414 return (int)Z*1000000 + (int)r*1000 + (int)phi;
415}
416
417int veto::liscId(TString ShapeTypeName,int blockNr ,int Zlayer,int number, int position){
418 //LiScX - ShapeType 1
419 int id = 999999;
420 int ShapeType = -1;
421
422 if(ShapeTypeName == "LiScX")ShapeType=1;
423 else if(ShapeTypeName == "LiScY")ShapeType=2;
424 else if(ShapeTypeName == "LiSc_L1")ShapeType=3;
425 else if(ShapeTypeName == "LiSc_R1")ShapeType=4;
426 else if(ShapeTypeName == "LiSc_L2")ShapeType=5;
427 else if(ShapeTypeName == "LiSc_R2")ShapeType=6;
428
429 if(ShapeType<0) id = 999999;
430 else id = ShapeType*100000 + blockNr*10000 + Zlayer*100 + number*10 + position;
431 return id;
432}
433
434
435void veto::AddBlock(TGeoVolumeAssembly *tInnerWall,TGeoVolumeAssembly *tDecayVacuum,TGeoVolumeAssembly *tOuterWall,TGeoVolumeAssembly *tLongitRib,TGeoVolumeAssembly *tVerticalRib,TGeoVolumeAssembly *ttLiSc, int& liScCounter,
436 int blockNr , int nx, int ny,
437 double z1, double z2 , double Zshift, double dist, double distC,
438 double wallThick, double liscThick1, double liscThick2,double ribThick ){
439
440 TString blockName = "block";
441 blockName+=blockNr;
442
443 int ribColor=15;
444
445 double wz=(z2-z1);
446 double slX=(wx(z2)-wx(z1))/2/wz;
447 double slY=(wy(z2)-wy(z1))/2/wz;
448
449 double dZ = (dist-ribThick)/2; //half space between ribs
450
451
452 double tX=0;
453 double tY=0;
454 double tZ=0;
455 TString name("");
456
457 double idX=0;
458 double idY=0;
459 double idZ=0;
460
461
462 //inner wall
463 TString nameInnerWall = (TString)tInnerWall->GetName()+"_"+blockName;
464 TGeoVolume* TIW = GeoTrapezoidNew(nameInnerWall,wallThick,wz,wx(z1),wx(z2),wy(z1),wy(z2),ribColor,supportMedIn);
465 tInnerWall->AddNode(TIW,0, new TGeoTranslation(0, 0,Zshift ));
466
467 //decay vacuum
468 TString nameDecayVacuum = (TString)tDecayVacuum->GetName()+"_"+blockName;
469 TGeoVolume* TDV = GeoTrapezoid(nameDecayVacuum,wz,wx(z1),wx(z2),wy(z1),wy(z2),1,decayVolumeMed);
470 TDV->SetVisibility(kFALSE);
471 tDecayVacuum->AddNode(TDV,0, new TGeoTranslation(0, 0,Zshift ));
472
473
474 //outer wall
475 TString nameOuterWall = (TString)tOuterWall->GetName()+"_"+blockName;
476 TGeoVolume* TOW = GeoTrapezoidNew(nameOuterWall,wallThick,wz,
477 wx(z1)+2*(wallThick+liscThick1),wx(z2)+2*(wallThick+liscThick2),wy(z1)+2*(wallThick+liscThick1),wy(z2)+2*(wallThick+liscThick2),ribColor,supportMedIn);
478 tOuterWall->AddNode(TOW, 0 , new TGeoTranslation(0, 0,Zshift));
479
480
481 //vertical ribs, longitudinal, and lisc:
482 //corner ribs
483 name="CornerRib_L_"+blockName+"_id";
484 TGeoVolumeAssembly* CornerRib_L = GeoCornerRib(name,ribThick, liscThick1,liscThick2,dZ, slX,slY, ribColor ,supportMedIn);
485 name="CornerRib_R_"+blockName+"_id";
486 TGeoVolumeAssembly* CornerRib_R = GeoCornerRib(name,ribThick, liscThick1,liscThick2,dZ, slY,slX, ribColor ,supportMedIn);
487
488 std::vector<TGeoVolume*> vLongitRibX(nx);
489 std::vector<TGeoVolume*> vLongitRibY(ny);
490 double xStep1=(wx(z1+ribThick)+2*wallThick-2*distC)/(nx-1);//rib thiknes + lisc size
491 double xStep2=(wx(z1+dist)+2*wallThick-2*distC)/(nx-1);
492 double yStep1=(wy(z1+ribThick)+2*wallThick-2*distC)/(ny-1);
493 double yStep2=(wy(z1+dist)+2*wallThick-2*distC)/(ny-1);
494 for(int i=0;i<nx;i++){
495 double xpos1=wx(z1+ribThick)/2+wallThick-distC-ribThick/2-i*xStep1;
496 double xpos2=wx(z1+dist)/2+wallThick-distC-ribThick/2-i*xStep2;
497 double ypos1=wy(z1+ribThick)/2+wallThick;
498 double ypos2=wy(z1+dist)/2+wallThick;
499 name=""; name.Form("vLongitRibX_%s_phi%d",blockName.Data(),makeId(0,xpos1,ypos1));
500 vLongitRibX.at(i) = GeoSideObj(name, dZ,ribThick, liscThick1,ribThick, liscThick2,xpos2-xpos1, ypos2-ypos1,ribColor, supportMedIn);
501 }
502 for(int i=0;i<ny;i++){
503 double xpos1=wx(z1+ribThick)/2+wallThick;
504 double xpos2=wx(z1+dist)/2+wallThick;
505 double ypos1=wy(z1+ribThick)/2+wallThick-distC-ribThick/2-i*yStep1;
506 double ypos2=wy(z1+dist)/2+wallThick-distC-ribThick/2-i*yStep2;
507 name=""; name.Form("vLongitRibX_%s_phi%d",blockName.Data(),makeId(0,xpos1,ypos1));
508 vLongitRibY.at(i) = GeoSideObj(name, dZ, liscThick1,ribThick, liscThick2,ribThick, xpos2-xpos1, ypos2-ypos1,ribColor, supportMedIn);
509 }
510
511 //corners lisc
512 double xPos1=wx(z1+ribThick)/2+wallThick-distC+ribThick/2;
513 double xPos2=wx(z1+dist)/2+wallThick-distC+ribThick/2;
514 double yPos1=wy(z1+ribThick)/2+wallThick;
515 double yPos2=wy(z1+dist)/2+wallThick;
516 name=""; name.Form("LiSc_L1_%d",liscId("LiSc_L1",blockNr,0,0,0));
517 TGeoVolume* LiSc_L1 = GeoCornerLiSc1(name,dZ,1,distC-ribThick/sqrt(2)-ribThick/2, liscThick1,liscThick2, xPos2-xPos1, yPos2-yPos1, kMagenta-10 ,vetoMed,true);
518 name=""; name.Form("LiSc_R1_%d",liscId("LiSc_R1",blockNr,0,0,0));
519 TGeoVolume* LiSc_R1 = GeoCornerLiSc1(name,dZ,0,distC-ribThick/sqrt(2)-ribThick/2, liscThick1,liscThick2, xPos2-xPos1, yPos2-yPos1, kMagenta-10 ,vetoMed,true);
520 xPos1=wx(z1+ribThick)/2+wallThick;
521 xPos2=wx(z1+dist)/2+wallThick;
522 yPos1=wy(z1+ribThick)/2+wallThick-distC+ribThick/2;
523 yPos2=wy(z1+dist)/2+wallThick-distC+ribThick/2;
524 name=""; name.Form("LiSc_L2_%d",liscId("LiSc_L2",blockNr,0,0,0));
525 TGeoVolume* LiSc_L2 = GeoCornerLiSc2(name,dZ,1,distC-ribThick/sqrt(2)-ribThick/2, liscThick1,liscThick2, xPos2-xPos1, yPos2-yPos1, kMagenta-10 ,vetoMed,true);
526 name=""; name.Form("LiSc_R2_%d",liscId("LiSc_R2",blockNr,0,0,0));
527 TGeoVolume* LiSc_R2 = GeoCornerLiSc2(name,dZ,0,distC-ribThick/sqrt(2)-ribThick/2, liscThick1,liscThick2, xPos2-xPos1, yPos2-yPos1, kMagenta-10 ,vetoMed,true);
528
529 for(double pos=z1;pos<z2;pos+=dist){
530 int Zlayer = (int)pos/dist+1;
531
532 //place vertical ribs
533 TString nameVR(""); nameVR.Form("VetoVerticalRib_z%d",(int)pos);
534 TGeoVolume* TVR = GeoTrapezoidNew(nameVR,liscThick1,
535 ribThick,wx(pos)+2*wallThick,wx(pos+ribThick)+2*wallThick,wy(pos)+2*wallThick,wy(pos+ribThick)+2*wallThick,ribColor,supportMedIn);
536 tZ=Zshift-wz/2+pos-z1+ribThick/2;
537 tVerticalRib->AddNode(TVR,0, new TGeoTranslation(0, 0,tZ ));
538 if(z2-pos<dist)continue;
539
540 //place longitudinal ribs in the corners
541 tX=wx(pos+ribThick)/2+wallThick;
542 tY=wy(pos+ribThick)/2+wallThick ;
543 tZ=tZ+ribThick/2+(dist-ribThick)/2;
544 tLongitRib->AddNode(CornerRib_L, makeId(pos,tX,tY) , new TGeoCombiTrans(tX,tY,tZ,new TGeoRotation("r",0,0,0)));
545 tLongitRib->AddNode(CornerRib_L, makeId(pos,-tX,-tY) , new TGeoCombiTrans(-tX,-tY,tZ,new TGeoRotation("r",0,0,180)));
546 tLongitRib->AddNode(CornerRib_R, makeId(pos,-tX,tY) , new TGeoCombiTrans(-tX,tY,tZ,new TGeoRotation("r",0,0,90)));
547 tLongitRib->AddNode(CornerRib_R, makeId(pos,tX,-tY) , new TGeoCombiTrans(tX,-tY,tZ,new TGeoRotation("r",0,0,270)));
548
549 //place longitudinal ribs and lisc on the sides
550 idZ = pos+ribThick/2+dist/2;
551
552 //x side
553 double xStepZ1=(wx(pos+ribThick)+2*wallThick-2*distC)/(nx-1);
554 double xStepZ2=(wx(pos+dist)+2*wallThick-2*distC)/(nx-1);
555 for(int i=0;i<nx;i++){
556
557 double xpos1=wx(pos+ribThick)/2+wallThick-distC-ribThick/2-i*xStepZ1;
558 double ypos1=wy(pos+ribThick)/2+wallThick;
559 tLongitRib->AddNode(vLongitRibX.at(i), makeId(pos,xpos1,ypos1) , new TGeoCombiTrans(xpos1,ypos1,tZ,new TGeoRotation("r",0,0,0)));
560 tLongitRib->AddNode(vLongitRibX.at(i), makeId(pos,-xpos1,-ypos1) , new TGeoCombiTrans(-xpos1,-ypos1,tZ,new TGeoRotation("r",0,0,180)));
561 //lisc
562 if(i<nx-1){
563 double xpos2=wx(pos+dist)/2+wallThick-distC-ribThick/2-i*xStepZ2;
564 double ypos2=wy(pos+dist)/2+wallThick;
565 name=""; name.Form("LiScX_%d",liscId("LiScX",blockNr,Zlayer,i,0));
566 TGeoVolume* LiScX = GeoSideObj(name, dZ,xStepZ1-ribThick, liscThick1,xStepZ2-ribThick, liscThick2,
567 (xpos2-xStepZ2)-(xpos1-xStepZ1), ypos2-ypos1,kMagenta-10,vetoMed,true);
568
569 ttLiSc->AddNode(LiScX, liscId("LiScX",blockNr,Zlayer,i,1) , new TGeoCombiTrans(xpos1-xStepZ1+ribThick,ypos1,tZ,new TGeoRotation("r",0,0,0)));
570 ttLiSc->AddNode(LiScX, liscId("LiScX",blockNr,Zlayer,i,2) , new TGeoCombiTrans(-(xpos1-xStepZ1+ribThick),-ypos1,tZ,new TGeoRotation("r",0,0,180)));
571 }
572 }
573
574
575 //y side
576 double yStepZ1=(wy(pos+ribThick)+2*wallThick-2*distC)/(ny-1);
577 double yStepZ2=(wy(pos+dist)+2*wallThick-2*distC)/(ny-1);
578 for(int i=0;i<ny;i++){
579 double xpos1=wx(pos+ribThick)/2+wallThick;
580 double ypos1=wy(pos+ribThick)/2+wallThick-distC-ribThick/2-i*yStepZ1;
581 tLongitRib->AddNode(vLongitRibY.at(i), makeId(pos,xpos1,ypos1) , new TGeoCombiTrans(xpos1,ypos1,tZ,new TGeoRotation("r",0,0,0)));
582 tLongitRib->AddNode(vLongitRibY.at(i), makeId(pos,-xpos1,-ypos1) , new TGeoCombiTrans(-xpos1,-ypos1,tZ,new TGeoRotation("r",0,0,180)));
583 //lisc
584 if(i<ny-1){
585 double xpos2=wx(pos+dist)/2+wallThick;
586 double ypos2=wy(pos+dist)/2+wallThick-distC-ribThick/2-i*yStepZ2;
587 name=""; name.Form("LiScY_%d",liscId("LiScY",blockNr,Zlayer,i,0));
588 TGeoVolume* LiScY = GeoSideObj(name, dZ,liscThick1, yStepZ1-ribThick, liscThick2, yStepZ2-ribThick,
589 xpos2-xpos1, (ypos2-yStepZ2)-(ypos1-yStepZ1), kMagenta-10,vetoMed,true);
590
591
592 ttLiSc->AddNode(LiScY, liscId("LiScY",blockNr,Zlayer,i,1), new TGeoCombiTrans( xpos1, ypos1-yStepZ1+ribThick,tZ,new TGeoRotation("r",0,0,0)));
593 ttLiSc->AddNode(LiScY, liscId("LiScY",blockNr,Zlayer,i,2), new TGeoCombiTrans(-xpos1,-(ypos1-yStepZ1+ribThick),tZ,new TGeoRotation("r",0,0,180)));
594 }
595
596 }
597
598
599 //place lisc in the corners
600 double xP1=wx(pos+ribThick)/2+wallThick-distC+ribThick/2;
601 double yP1=wy(pos+ribThick)/2+wallThick;
602
603 ttLiSc->AddNode(LiSc_L1, liscId("LiSc_L1",blockNr,Zlayer,0,1) , new TGeoCombiTrans(xP1,yP1,tZ,new TGeoRotation("r",0,0,0)));
604 ttLiSc->AddNode(LiSc_L1, liscId("LiSc_L1",blockNr,Zlayer,0,2) , new TGeoCombiTrans(-xP1,-yP1,tZ,new TGeoRotation("r",0,0,180)));
605
606 ttLiSc->AddNode(LiSc_R1, liscId("LiSc_R1",blockNr,Zlayer,0,1) , new TGeoCombiTrans(-xP1,yP1,tZ,new TGeoRotation("r",0,0,0)));
607 ttLiSc->AddNode(LiSc_R1, liscId("LiSc_R1",blockNr,Zlayer,0,2) , new TGeoCombiTrans(xP1,-yP1,tZ,new TGeoRotation("r",0,0,180)));
608
609 xP1=wx(pos+ribThick)/2+wallThick;
610 yP1=wy(pos+ribThick)/2+wallThick-distC+ribThick/2;
611 ttLiSc->AddNode(LiSc_L2, liscId("LiSc_L2",blockNr,Zlayer,0,1) , new TGeoCombiTrans(xP1,yP1,tZ,new TGeoRotation("r",0,0,0)));
612 ttLiSc->AddNode(LiSc_L2, liscId("LiSc_L2",blockNr,Zlayer,0,2) , new TGeoCombiTrans(-xP1,-yP1,tZ,new TGeoRotation("r",0,0,180)));
613
614 ttLiSc->AddNode(LiSc_R2, liscId("LiSc_R2",blockNr,Zlayer,0,1) , new TGeoCombiTrans(xP1,-yP1,tZ,new TGeoRotation("r",0,0,0)));
615 ttLiSc->AddNode(LiSc_R2, liscId("LiSc_R2",blockNr,Zlayer,0,2) , new TGeoCombiTrans(-xP1,yP1,tZ,new TGeoRotation("r",0,0,180)));
616
617 }
618
619
620}
621
622
623TGeoVolume* veto::MakeMagnetSegment(Int_t seg){
624 TString nm;
625 nm = "T"; nm += seg;
626 TGeoVolumeAssembly *tMagVol = new TGeoVolumeAssembly(nm);
627
628 bool isVert = 1;
629 bool isLongOutCover = 1;
630
631 double dzMagnetPart = 238.1*cm ; //from Piets Wertelaers drawings
632 double thiknes = 12*mm;
633 double xPos=0;
634 double yPos=0;
635 double zPos=0;
636
637 //make walls inside magnet area
638 double dx=5*cm;//from Piets Wertelaers drawings
639 double dy=500*cm;//from Piets Wertelaers drawings
640 double dz=dzMagnetPart;
641 TGeoVolume* InnerMagWall_Y = gGeoManager->MakeBox("InnerMagWall_Y", supportMedIn, dx, dy, dz);
642 InnerMagWall_Y->SetLineColor(15);
643 tMagVol->AddNode(InnerMagWall_Y, 1 , new TGeoCombiTrans(255*cm,0,0,new TGeoRotation("r",0,0,0)));
644 tMagVol->AddNode(InnerMagWall_Y, 2 , new TGeoCombiTrans(-255*cm,0,0,new TGeoRotation("r",0,0,0)));
645
646 dx=260*cm;//from Piets Wertelaers drawings
647 dy=5*cm;//from Piets Wertelaers drawings
648 dz=dzMagnetPart;
649 TGeoVolume* InnerMagWall_X = gGeoManager->MakeBox("InnerMagWall_X", supportMedIn, dx, dy, dz);
650 InnerMagWall_X->SetLineColor(15);
651 tMagVol->AddNode(InnerMagWall_X, 1 , new TGeoCombiTrans(0,505*cm,0,new TGeoRotation("r",0,0,0)));
652 tMagVol->AddNode(InnerMagWall_X, 2 , new TGeoCombiTrans(0,-505*cm,0,new TGeoRotation("r",0,0,0)));
653
654
655
656 xPos=(-358.2*cm-250.4*cm)/2;
657 yPos=602.4*cm-(602.4-500.4)*cm/2;
658 zPos=dzMagnetPart+thiknes/2;
659
660 dx=(358.2-250.4)*cm/2;
661 dy=604.4*cm;
662 dz=thiknes/2;
663 TGeoVolume* VertMagCover_Y = gGeoManager->MakeBox("VertMagCover_Y", supportMedIn, dx, dy, dz);
664 dx=250.4*cm;
665 dy=(602.4-500.4)*cm/2;
666 TGeoVolume* VertMagCover_X = gGeoManager->MakeBox("VertMagCover_X", supportMedIn, dx, dy, dz);
667 VertMagCover_Y->SetLineColor(15);
668 VertMagCover_X->SetLineColor(15);
669
670 if(isVert)tMagVol->AddNode(VertMagCover_Y, 1 , new TGeoCombiTrans(xPos,0,zPos,new TGeoRotation("r",0,0,0)));
671 if(isVert)tMagVol->AddNode(VertMagCover_Y, 2 , new TGeoCombiTrans(-xPos,0,zPos,new TGeoRotation("r",0,0,0)));
672 if(isVert)tMagVol->AddNode(VertMagCover_Y, 3 , new TGeoCombiTrans(xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
673 if(isVert)tMagVol->AddNode(VertMagCover_Y, 4 , new TGeoCombiTrans(-xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
674
675 if(isVert)tMagVol->AddNode(VertMagCover_X, 1 , new TGeoCombiTrans(0,yPos,zPos,new TGeoRotation("r",0,0,0)));
676 if(isVert)tMagVol->AddNode(VertMagCover_X, 2 , new TGeoCombiTrans(0,-yPos,zPos,new TGeoRotation("r",0,0,0)));
677 if(isVert)tMagVol->AddNode(VertMagCover_X, 3 , new TGeoCombiTrans(0,yPos,-zPos,new TGeoRotation("r",0,0,0)));
678 if(isVert)tMagVol->AddNode(VertMagCover_X, 4 , new TGeoCombiTrans(0,-yPos,-zPos,new TGeoRotation("r",0,0,0)));
679
680
681 double dxOoutCover=thiknes/2;
682 double dyOoutCover=604.4*cm;
683 double dzOoutCover=56.0*cm/2;
684 double xPosOutetCover = xPos-(358.2-250.4)*cm/2;
685 double yPosOutetCover = 602.4*cm;
686 double zPosOutetCover = zPos-dzOoutCover-thiknes/2;
687
688 TGeoVolume* LongOutCover_Y1 = gGeoManager->MakeBox("LongOutCover_Y1", supportMedIn, dxOoutCover, dyOoutCover, dzOoutCover);
689 dxOoutCover=fabs(xPosOutetCover)-thiknes;
690 dyOoutCover=thiknes/2;
691 TGeoVolume* LongOutCover_X1 = gGeoManager->MakeBox("LongOutCover_X1", supportMedIn, dxOoutCover, dyOoutCover, dzOoutCover);
692
693 LongOutCover_Y1->SetLineColor(15);
694 LongOutCover_X1->SetLineColor(15);
695
696 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y1, 1 , new TGeoCombiTrans(xPosOutetCover,0,zPosOutetCover,new TGeoRotation("r",0,0,0)));
697 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y1, 2 , new TGeoCombiTrans(-xPosOutetCover,0,zPosOutetCover,new TGeoRotation("r",0,0,0)));
698 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y1, 3 , new TGeoCombiTrans(xPosOutetCover,0,-zPosOutetCover,new TGeoRotation("r",0,0,0)));
699 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y1, 4 , new TGeoCombiTrans(-xPosOutetCover,0,-zPosOutetCover,new TGeoRotation("r",0,0,0)));
700
701
702 if(isLongOutCover)tMagVol->AddNode(LongOutCover_X1, 1 , new TGeoCombiTrans(0,yPosOutetCover,zPosOutetCover,new TGeoRotation("r",0,0,0)));
703 if(isLongOutCover)tMagVol->AddNode(LongOutCover_X1, 2 , new TGeoCombiTrans(0,-yPosOutetCover,zPosOutetCover,new TGeoRotation("r",0,0,0)));
704 if(isLongOutCover)tMagVol->AddNode(LongOutCover_X1, 3 , new TGeoCombiTrans(0,yPosOutetCover,-zPosOutetCover,new TGeoRotation("r",0,0,0)));
705 if(isLongOutCover)tMagVol->AddNode(LongOutCover_X1, 4 , new TGeoCombiTrans(0,-yPosOutetCover,-zPosOutetCover,new TGeoRotation("r",0,0,0)));
706
707
708 zPos=328.5*cm;
709 if(isVert)tMagVol->AddNode(VertMagCover_Y, 5 , new TGeoCombiTrans(xPos,0,zPos,new TGeoRotation("r",0,0,0)));
710 if(isVert)tMagVol->AddNode(VertMagCover_Y, 6 , new TGeoCombiTrans(-xPos,0,zPos,new TGeoRotation("r",0,0,0)));
711 if(isVert)tMagVol->AddNode(VertMagCover_Y, 7 , new TGeoCombiTrans(xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
712 if(isVert)tMagVol->AddNode(VertMagCover_Y, 8 , new TGeoCombiTrans(-xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
713
714 if(isVert)tMagVol->AddNode(VertMagCover_X, 5 , new TGeoCombiTrans(0,yPos,zPos,new TGeoRotation("r",0,0,0)));
715 if(isVert)tMagVol->AddNode(VertMagCover_X, 6 , new TGeoCombiTrans(0,-yPos,zPos,new TGeoRotation("r",0,0,0)));
716 if(isVert)tMagVol->AddNode(VertMagCover_X, 7 , new TGeoCombiTrans(0,yPos,-zPos,new TGeoRotation("r",0,0,0)));
717 if(isVert)tMagVol->AddNode(VertMagCover_X, 8 , new TGeoCombiTrans(0,-yPos,-zPos,new TGeoRotation("r",0,0,0)));
718
719 zPos=442.3*cm;
720 if(isVert)tMagVol->AddNode(VertMagCover_Y, 9 , new TGeoCombiTrans(xPos,0,zPos,new TGeoRotation("r",0,0,0)));
721 if(isVert)tMagVol->AddNode(VertMagCover_Y, 10 , new TGeoCombiTrans(-xPos,0,zPos,new TGeoRotation("r",0,0,0)));
722 if(isVert)tMagVol->AddNode(VertMagCover_Y, 11 , new TGeoCombiTrans(xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
723 if(isVert)tMagVol->AddNode(VertMagCover_Y, 12 , new TGeoCombiTrans(-xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
724
725 if(isVert)tMagVol->AddNode(VertMagCover_X, 9 , new TGeoCombiTrans(0,yPos,zPos,new TGeoRotation("r",0,0,0)));
726 if(isVert)tMagVol->AddNode(VertMagCover_X, 10 , new TGeoCombiTrans(0,-yPos,zPos,new TGeoRotation("r",0,0,0)));
727 if(isVert)tMagVol->AddNode(VertMagCover_X, 11 , new TGeoCombiTrans(0,yPos,-zPos,new TGeoRotation("r",0,0,0)));
728 if(isVert)tMagVol->AddNode(VertMagCover_X, 12 , new TGeoCombiTrans(0,-yPos,-zPos,new TGeoRotation("r",0,0,0)));
729
730
731 zPos=532.1*cm;
732 if(isVert)tMagVol->AddNode(VertMagCover_Y, 10 , new TGeoCombiTrans(xPos,0,zPos,new TGeoRotation("r",0,0,0)));
733 if(isVert)tMagVol->AddNode(VertMagCover_Y, 11 , new TGeoCombiTrans(-xPos,0,zPos,new TGeoRotation("r",0,0,0)));
734 if(isVert)tMagVol->AddNode(VertMagCover_Y, 12 , new TGeoCombiTrans(xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
735 if(isVert)tMagVol->AddNode(VertMagCover_Y, 13 , new TGeoCombiTrans(-xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
736
737 if(isVert)tMagVol->AddNode(VertMagCover_X, 10 , new TGeoCombiTrans(0,yPos,zPos,new TGeoRotation("r",0,0,0)));
738 if(isVert)tMagVol->AddNode(VertMagCover_X, 11 , new TGeoCombiTrans(0,-yPos,zPos,new TGeoRotation("r",0,0,0)));
739 if(isVert)tMagVol->AddNode(VertMagCover_X, 12 , new TGeoCombiTrans(0,yPos,-zPos,new TGeoRotation("r",0,0,0)));
740 if(isVert)tMagVol->AddNode(VertMagCover_X, 13 , new TGeoCombiTrans(0,-yPos,-zPos,new TGeoRotation("r",0,0,0)));
741
742 zPos=589.3*cm;
743 if(isVert)tMagVol->AddNode(VertMagCover_X, 14 , new TGeoCombiTrans(0,yPos,zPos,new TGeoRotation("r",0,0,0)));
744 if(isVert)tMagVol->AddNode(VertMagCover_X, 15 , new TGeoCombiTrans(0,-yPos,zPos,new TGeoRotation("r",0,0,0)));
745 if(isVert)tMagVol->AddNode(VertMagCover_X, 16 , new TGeoCombiTrans(0,yPos,-zPos,new TGeoRotation("r",0,0,0)));
746 if(isVert)tMagVol->AddNode(VertMagCover_X, 17 , new TGeoCombiTrans(0,-yPos,-zPos,new TGeoRotation("r",0,0,0)));
747
748 dx=(358.2-250.4)*cm/2-37.0*cm/2;
749 dy=604.4*cm;
750 dz=thiknes/2;
751 xPos+=37.0*cm/2;
752 TGeoVolume* VertMagCover_y = gGeoManager->MakeBox("VertMagCover_y", supportMedIn, dx, dy, dz);
753 VertMagCover_y->SetLineColor(15);
754 if(isVert)tMagVol->AddNode(VertMagCover_y, 1 , new TGeoCombiTrans(xPos,0,zPos,new TGeoRotation("r",0,0,0)));
755 if(isVert)tMagVol->AddNode(VertMagCover_y, 2 , new TGeoCombiTrans(-xPos,0,zPos,new TGeoRotation("r",0,0,0)));
756 if(isVert)tMagVol->AddNode(VertMagCover_y, 3 , new TGeoCombiTrans(xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
757 if(isVert)tMagVol->AddNode(VertMagCover_y, 4 , new TGeoCombiTrans(-xPos,0,-zPos,new TGeoRotation("r",0,0,0)));
758
759
760 dx=thiknes/2;
761 dy=604.4*cm;
762 dz=88.5*cm/2;
763 TGeoVolume* LongOutCover_Y2 = gGeoManager->MakeBox("LongOutCover_Y2", supportMedIn, dx, dy, dz);
764 LongOutCover_Y2->SetLineColor(15);
765
766 xPos = xPosOutetCover;
767 yPos = 0*cm;
768 zPos = 283.65*cm;
769
770 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 1 , new TGeoTranslation(xPos,yPos,zPos));
771 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 2 , new TGeoTranslation(xPos,yPos,-zPos));
772 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 3 , new TGeoTranslation(-xPos,yPos,zPos));
773 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 4 , new TGeoTranslation(-xPos,yPos,-zPos));
774
775 xPos=-323.0*cm;
776 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 5 , new TGeoTranslation(xPos,yPos,zPos));
777 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 6 , new TGeoTranslation(xPos,yPos,-zPos));
778 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 7 , new TGeoTranslation(-xPos,yPos,zPos));
779 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 8 , new TGeoTranslation(-xPos,yPos,-zPos));
780
781 xPos = xPosOutetCover;
782 zPos = 487.2*cm;
783 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 9 , new TGeoTranslation(xPos,yPos,zPos));
784 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 10 , new TGeoTranslation(xPos,yPos,-zPos));
785 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 11 , new TGeoTranslation(-xPos,yPos,zPos));
786 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 12 , new TGeoTranslation(-xPos,yPos,-zPos));
787
788 xPos=-323.0*cm;
789 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 13 , new TGeoTranslation(xPos,yPos,zPos));
790 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 14 , new TGeoTranslation(xPos,yPos,-zPos));
791 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 16 , new TGeoTranslation(-xPos,yPos,zPos));
792 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y2, 17 , new TGeoTranslation(-xPos,yPos,-zPos));
793
794
795 dz=112.6*cm/2;
796 TGeoVolume* LongOutCover_Y3 = gGeoManager->MakeBox("LongOutCover_Y3", supportMedIn, dx, dy, dz);
797 LongOutCover_Y3->SetLineColor(15);
798 xPos = xPosOutetCover;
799 zPos = 385.4*cm;
800
801 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y3, 1 , new TGeoTranslation(xPos,yPos,zPos));
802 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y3, 2 , new TGeoTranslation(xPos,yPos,-zPos));
803 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y3, 3 , new TGeoTranslation(-xPos,yPos,zPos));
804 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y3, 4 , new TGeoTranslation(-xPos,yPos,-zPos));
805
806
807 dy-=(358.2-250.4)*cm;
808 TGeoVolume* LongOutCover_Y4 = gGeoManager->MakeBox("LongOutCover_Y4", supportMedIn, dx, dy, dz);
809 LongOutCover_Y4->SetLineColor(2);
810
811 xPos=-255.0*cm;
812 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y4, 1 , new TGeoTranslation(xPos,yPos,zPos));
813 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y4, 2 , new TGeoTranslation(xPos,yPos,-zPos));
814 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y4, 3 , new TGeoTranslation(-xPos,yPos,zPos));
815 if(isLongOutCover)tMagVol->AddNode(LongOutCover_Y4, 4 , new TGeoTranslation(-xPos,yPos,-zPos));
816
817
818 /*
819 dxOoutCover=fabs(xPosOutetCover)-thiknes;
820 dyOoutCover=thiknes/2;
821 TGeoVolume* LongOutCover_X2 = gGeoManager->MakeBox("LongOutCover_X1", supportMedIn, dxOoutCover, dyOoutCover, dzOoutCover);
822
823 LongOutCover_X2->SetLineColor(15);
824 */
825
826
827 return tMagVol;
828
829
830}
831
832
833TGeoVolume* veto::MakeSegments(Double_t dz,Double_t dx_start,Double_t dy_start,Double_t slopeX,Double_t slopeY,Double_t floorHeight)
834{
835 TGeoVolumeAssembly *tTankVol = new TGeoVolumeAssembly("T2");
836 Double_t dist = 0.8*m; //with Napoli design: 0.8 m
837
838
839 int isInnerWall=1;
840 int isDecayVacuum=1;
841 int isOuterWall=1;
842 int isVerticalRib=1;
843 int isLongitRib=1;
844 int isLiSc=1;
845
846
847 //assembly for innerwall
848 TString nameInnerWall = "VetoInnerWall";
849 TGeoVolumeAssembly *tInnerWall = new TGeoVolumeAssembly(nameInnerWall);
850 //assembly for decay volume
851 TString nameDecayVacuum = "DecayVacuum";
852 TGeoVolumeAssembly *tDecayVacuum = new TGeoVolumeAssembly(nameDecayVacuum);
853 //assembly for outerwall
854 TString nameOuterWall = "VetoOuterWall";
855 TGeoVolumeAssembly *tOuterWall = new TGeoVolumeAssembly(nameOuterWall);
856 //assembly for longitudinal rib
857 TString nameLongitRib = "VetoLongitRib";
858 TGeoVolumeAssembly *tLongitRib = new TGeoVolumeAssembly(nameLongitRib);
859 //assembly for vertical ribs
860 TString nameVerticalRib = "VetoVerticalRib";
861 TGeoVolumeAssembly *tVerticalRib = new TGeoVolumeAssembly(nameVerticalRib);
862 //assembly for liqued scintilator
863 TString nameLiSc = "VetoLiSc";
864 TGeoVolumeAssembly *ttLiSc = new TGeoVolumeAssembly(nameLiSc);
865 int liScCounter=0;
866
867 //******************************** Block1: *************************************************************
868 double z1=0*m;
869 double z2=14.4*m;
870 double wz=(z2-z1);//to delete
871 double slX=(wx(z2)-wx(z1))/2/wz;//to delete
872 double slY=(wy(z2)-wy(z1))/2/wz;//to delete
873
874 double wallThick= 20*mm;//wall thiknes
875 double liscThick1= 300*mm;
876 double liscThick2= 300*mm;
877 double ribThick = 10*mm;
878
879 double Zshift=-dz + wz/2;//calibration of Z position
880 double shiftPlot=0;//calibration of Z position
881
882 int nx=4; // number of Longitudinal ribs on X
883 int ny=6; // number of Longitudinal ribs on Y
884
885 double distC = 150*mm; //rib distance from corner
886
887
888
889 AddBlock(tInnerWall,tDecayVacuum,tOuterWall,tLongitRib,tVerticalRib,ttLiSc, liScCounter,
890 1, nx, ny, z1,z2,Zshift,dist,distC,
891 wallThick,liscThick1,liscThick2,ribThick);
892
893
894
895
896
897// //******************************** Block2: p1 *************************************************************
898 Zshift+=wz/2;
899 z1=14.4*m;
900 z2=15.2*m;
901 wz=(z2-z1);
902 Zshift+=wz/2;
903 liscThick2=410*mm;
904//
905// Zshift+=shiftPlot;
906//
907 AddBlock(tInnerWall,tDecayVacuum,tOuterWall,tLongitRib,tVerticalRib,ttLiSc, liScCounter,
908 2, nx, ny, z1,z2,Zshift,dist,distC,
909 wallThick,liscThick1,liscThick2,ribThick);
910
911 //******************************** Block3: p2 *************************************************************
912 Zshift+=wz/2;
913 z1=15.2*m;
914 z2=24.0*m;
915 wz=z2-z1;
916 Zshift+=wz/2;
917//
918// Zshift+=shiftPlot;
919//
920 liscThick1=410*mm;
921 AddBlock(tInnerWall,tDecayVacuum,tOuterWall,tLongitRib,tVerticalRib,ttLiSc, liScCounter,
922 3, nx, ny, z1,z2,Zshift,dist,distC,
923 wallThick,liscThick1,liscThick2,ribThick);
924
925//
926// //******************************** Block4: p3 *************************************************************
927 Zshift+=wz/2;
928 z1=24.0*m;
929 z2=33.6*m;
930 wz=z2-z1;
931 Zshift+=wz/2;
932
933// Zshift+=shiftPlot;
934//
935 nx=7;//number of Longitudinal ribs on X
936 ny=11;//number of Longitudinal ribs on Y
937
938 AddBlock(tInnerWall,tDecayVacuum,tOuterWall,tLongitRib,tVerticalRib,ttLiSc, liScCounter,
939 4, nx, ny, z1,z2,Zshift,dist,distC,
940 wallThick,liscThick1,liscThick2,ribThick);
941
942//
943 //******************************** Block5: *************************************************************
944 Zshift+=wz/2;
945 z1=33.6*m;
946 z2=50.0*m;
947 wz=z2-z1;
948 Zshift+=wz/2;
949
950 wallThick= 30*mm;
951 liscThick1=390*mm;
952 liscThick2=390*mm;
953
954// Zshift+=shiftPlot;
955//
956 AddBlock(tInnerWall,tDecayVacuum,tOuterWall,tLongitRib,tVerticalRib,ttLiSc, liScCounter,
957 5, nx, ny, z1,z2,Zshift,dist,distC,
958 wallThick,liscThick1,liscThick2,ribThick);
959
960
961
962 if(isInnerWall)tTankVol->AddNode(tInnerWall,0, new TGeoTranslation(0, 0,0 ));
963 if(isDecayVacuum)tTankVol->AddNode(tDecayVacuum,0, new TGeoTranslation(0, 0,0 ));
964 if(isOuterWall)tTankVol->AddNode(tOuterWall,0, new TGeoTranslation(0, 0,0 ));
965 if(isVerticalRib)tTankVol->AddNode(tVerticalRib,0, new TGeoTranslation(0, 0,0 ));
966 if(isLongitRib)tTankVol->AddNode(tLongitRib,0, new TGeoTranslation(0, 0,0 ));
967 if(isLiSc)tTankVol->AddNode(ttLiSc,0, new TGeoTranslation(0, 0,0 ));
968
969 return tTankVol;
970}
971
972TGeoVolume* veto::MakeLidSegments(Int_t seg,Double_t dx,Double_t dy)
973{
974 // dz is the half-length, dx1 half-width x at start, dx2 half-width at end
975 TString nm;
976 nm = "T"; nm += seg;
977 nm+= "Lid";
978 TGeoVolumeAssembly *tDecayVol = new TGeoVolumeAssembly(nm);
979 //Assume ~1 m between ribs, calculate number of ribs
980 Double_t dist = 0.8*m; //with Napoli design: 0.8 m
981 Int_t nribs = 2+dx*2./dist ;
982 Double_t ribspacing = (dx*2.-nribs*f_InnerSupportThickness)/(nribs-1)+f_InnerSupportThickness;
983
984 Double_t hwidth=15.*cm; //half-width of a H-bar
985 Double_t ribwidth=f_VetoThickness; //( but should become it owns indepent dimension )
986
987 //place lid
988 //TGeoVolume *T1Lid = gGeoManager->MakeBox("T1Lidbox",supportMedIn,dx+f_InnerSupportThickness/2,dy,f_InnerSupportThickness/2.);
989 //make it out of 8 mm of Al.
990 TGeoVolume *T1Lid = gGeoManager->MakeBox("T1Lidbox",supportMedOut,dx+f_InnerSupportThickness/2,dy,f_LidThickness/2.);
991 T1Lid->SetLineColor(18);
992 tDecayVol->AddNode(T1Lid, 1, new TGeoTranslation(0, 0, 0));
993
994
995 //Do not place H-bar ribs anymore..
996 if (1==0){
997 //now place ribs
998 nm = "T"; nm += seg;
999 nm+= "LidRib";
1000 for (Int_t nr=0; nr<nribs; nr++) {
1001 Double_t xrib = -dx +f_RibThickness/2. +nr*ribspacing;
1002 TGeoVolume* T = gGeoManager->MakeBox(nm,supportMedIn,f_InnerSupportThickness/2.,dy,ribwidth/2.);
1003 T->SetLineColor(14);
1004 tDecayVol->AddNode(T, nr, new TGeoTranslation(xrib, 0,-ribwidth/2.-f_InnerSupportThickness/2.));
1005 }
1006
1007 //add H-bars in the front
1008 nm = "T"; nm += seg;
1009 nm+= "LidH";
1010 for (Int_t nr=0; nr<nribs; nr++) {
1011 Double_t xrib = -dx +f_RibThickness/2. +nr*ribspacing;
1012 TGeoVolume* T = gGeoManager->MakeBox(nm,supportMedIn,hwidth,dy,f_InnerSupportThickness/2.);
1013 T->SetLineColor(14);
1014 tDecayVol->AddNode(T, nr, new TGeoTranslation(xrib, 0,-ribwidth-f_InnerSupportThickness));
1015 }
1016 }
1017 return tDecayVol;
1018}
1019
1020// ----- Private method InitMedium
1021Int_t veto::InitMedium(const char* name)
1022{
1023 static FairGeoLoader *geoLoad=FairGeoLoader::Instance();
1024 static FairGeoInterface *geoFace=geoLoad->getGeoInterface();
1025 static FairGeoMedia *media=geoFace->getMedia();
1026 static FairGeoBuilder *geoBuild=geoLoad->getGeoBuilder();
1027
1028 FairGeoMedium *ShipMedium=media->getMedium(name);
1029
1030 if (!ShipMedium)
1031 {
1032 Fatal("InitMedium","Material %s not defined in media file.", name);
1033 return -1111;
1034 }
1035 TGeoMedium* medium=gGeoManager->GetMedium(name);
1036 if (medium!=NULL)
1037 return ShipMedium->getMediumIndex();
1038
1039 return geoBuild->createMedium(ShipMedium);
1040}
1041// -------------------------------------------------------------------------
1042void veto::SetTubZpositions(Float_t z1, Float_t z2, Float_t z3, Float_t z4, Float_t z5, Float_t z6)
1043{
1044 fTub1z = z1;
1045 fTub2z = z2;
1046 fTub3z = z3;
1047 fTub4z = z4;
1048 fTub5z = z5;
1049 fTub6z = z6;
1050}
1051
1052void veto::SetTublengths(Float_t l1, Float_t l2, Float_t l3, Float_t l6)
1053{
1054 fTub1length = l1;
1055 fTub2length = l2;
1056 fTub3length = l3;
1057 fTub6length = l6;
1058}
1059
1060// -------------------------------------------------------------------------
1061
1062Bool_t veto::ProcessHits(FairVolume* vol)
1063{
1065 //Set parameters at entrance of volume. Reset ELoss.
1066 if ( gMC->IsTrackEntering() ) {
1067 fELoss = 0.;
1068 fTime = gMC->TrackTime() * 1.0e09;
1069 fLength = gMC->TrackLength();
1070 gMC->TrackPosition(fPos);
1071 gMC->TrackMomentum(fMom);
1072 }
1073 // Sum energy loss for all steps in the active volume
1074 fELoss += gMC->Edep();
1075
1076 // Create vetoPoint at exit of active volume
1077 if ( gMC->IsTrackExiting() ||
1078 gMC->IsTrackStop() ||
1079 gMC->IsTrackDisappeared() ) {
1080 if (fELoss == 0. ) { return kFALSE; }
1081
1082 fTrackID = gMC->GetStack()->GetCurrentTrackNumber();
1083
1084 Int_t veto_uniqueId;
1085 gMC->CurrentVolID(veto_uniqueId);
1086
1087 //cout << "in veto.cxx (ProcessHits): veto_uniqueId: " << veto_uniqueId << endl;
1088
1089 TParticle* p=gMC->GetStack()->GetCurrentTrack();
1090 Int_t pdgCode = p->GetPdgCode();
1091 TLorentzVector Pos;
1092 gMC->TrackPosition(Pos);
1093 TLorentzVector Mom;
1094 gMC->TrackMomentum(Mom);
1095 Double_t xmean = (fPos.X()+Pos.X())/2. ;
1096 Double_t ymean = (fPos.Y()+Pos.Y())/2. ;
1097 Double_t zmean = (fPos.Z()+Pos.Z())/2. ;
1098// cout << veto_uniqueId << " :(" << xmean << ", " << ymean << ", " << zmean << "): " << gMC->CurrentVolName() << endl;
1099 AddHit(fTrackID, veto_uniqueId, TVector3(xmean, ymean, zmean),
1100 TVector3(fMom.Px(), fMom.Py(), fMom.Pz()), fTime, fLength,
1101 fELoss,pdgCode,TVector3(Pos.X(), Pos.Y(), Pos.Z()),TVector3(Mom.Px(), Mom.Py(), Mom.Pz()) );
1102
1103 // Increment number of veto det points in TParticle
1104 ShipStack* stack = (ShipStack*) gMC->GetStack();
1105 stack->AddPoint(kVETO);
1106 }
1107
1108 return kTRUE;
1109}
1110
1112{
1113
1114 fvetoPointCollection->Clear();
1115
1116}
1117
1119 if (!fFastMuon){return;}
1120 if (TMath::Abs(gMC->TrackPid())!=13){
1121 gMC->StopTrack();
1122 }
1123}
1125{
1126
1133 FairRootManager::Instance()->Register("vetoPoint", "veto",
1134 fvetoPointCollection, kTRUE);
1135
1136}
1137
1138
1139TClonesArray* veto::GetCollection(Int_t iColl) const
1140{
1141 if (iColl == 0) { return fvetoPointCollection; }
1142 else { return NULL; }
1143}
1144
1146{
1147 fvetoPointCollection->Clear();
1148}
1149void veto::SetZpositions(Float_t z0, Float_t z1, Float_t z2, Float_t z3, Float_t z4, Int_t c)
1150{
1151 fT0z = z0;
1152 fT1z = z1;
1153 fT2z = z2;
1154 fT3z = z3;
1155 fT4z = z4;
1156 fDesign = c;
1157}
1158
1160{
1161 /* decay tube, veto detectors and tracking detectors are closely related
1162 therefore, incorporate here the previously external defined ShipChamber
1163 and make the walls sensitive
1164 */
1166
1167 TGeoVolume *top=gGeoManager->GetTopVolume();
1168 InitMedium("Concrete");
1169 TGeoMedium *concrete =gGeoManager->GetMedium("Concrete");
1170 InitMedium("steel");
1171 TGeoMedium *polypropylene = gGeoManager->GetMedium("polypropylene");
1172 InitMedium("polypropylene");
1173 TGeoMedium *St =gGeoManager->GetMedium("steel");
1174 InitMedium("vacuums");
1175 TGeoMedium *vac =gGeoManager->GetMedium("vacuums");
1176 InitMedium("Aluminum");
1177 TGeoMedium *Al =gGeoManager->GetMedium("Aluminum");
1178 InitMedium("ShipSens");
1179 TGeoMedium *Sens =gGeoManager->GetMedium("ShipSens");
1180 InitMedium("Scintillator");
1181 TGeoMedium *Se =gGeoManager->GetMedium("Scintillator");
1182 gGeoManager->SetNsegments(100);
1183 vetoMed = gGeoManager->GetMedium(vetoMed_name);
1184 supportMedIn = gGeoManager->GetMedium(supportMedIn_name);
1185 supportMedOut = gGeoManager->GetMedium(supportMedOut_name);
1186 decayVolumeMed = gGeoManager->GetMedium(decayVolumeMed_name); // decay volume, air/helium/vacuum
1187 // put everything in an assembly
1188 TGeoVolume *tDecayVol = new TGeoVolumeAssembly("DecayVolume");
1189 TGeoVolume *tMaGVol = new TGeoVolumeAssembly("MagVolume");
1190 Double_t zStartDecayVol = fTub1z-fTub1length-f_InnerSupportThickness;
1191 Double_t zStartMagVol = fTub3z+fTub3length-f_InnerSupportThickness; //? is this needed, -f_InnerSupportThickness
1192
1194 Double_t slopex = (2.5*m + d)/(fTub6z-fTub6length - zFocusX);
1195 Double_t slopey = (fBtube + d) /(fTub6z-fTub6length - zFocusY);
1196 Double_t zpos = fTub1z -fTub1length -f_LidThickness;
1197 Double_t dx1 = slopex*(zpos - zFocusX);
1198 Double_t dy = slopey*(zpos - zFocusY);
1199 // make the entrance window
1200 // add floor:
1201 Double_t Length = zStartMagVol - zStartDecayVol - 2.2*m;
1202 TGeoBBox *box = new TGeoBBox("box1", 10 * m, floorHeightA/2., Length/2.);
1203 TGeoVolume *floor = new TGeoVolume("floor1",box,concrete);
1204 floor->SetLineColor(11);
1205 tDecayVol->AddNode(floor, 0, new TGeoTranslation(0, -10*m+floorHeightA/2.,Length/2.));
1206 //entrance lid
1207 TGeoVolume* T1Lid = MakeLidSegments(1,dx1,dy);
1208 tDecayVol->AddNode(T1Lid, 1, new TGeoTranslation(0, 0, zpos - zStartDecayVol+f_LidThickness/2.1));
1209
1210 //without segment1, recalculate the z and (half)length of segment 2:
1211 //Take into account to remove the between seg1 and seg2 due to straw-veto station.
1212 //and add this gap to the total length.
1213 Double_t tgap=fTub2z-fTub1z-fTub2length-fTub1length;
1214 fTub2z=fTub1z+fTub2length+tgap/2.;
1216 TGeoVolume* seg2 = MakeSegments(fTub2length,dx1,dy,slopex,slopey,floorHeightA);
1217 tDecayVol->AddNode(seg2, 1, new TGeoTranslation(0, 0, fTub2z-zStartDecayVol));
1219 Length = fTub6length+fTub2length+3*m; // extend under ecal and muon detectors
1220 box = new TGeoBBox("box2", 10 * m, floorHeightB/2., Length/2.);
1221 floor = new TGeoVolume("floor2",box,concrete);
1222 floor->SetLineColor(11);
1223 tMaGVol->AddNode(floor, 0, new TGeoTranslation(0, -10*m+floorHeightB/2., Length/2.-2*fTub3length - 0.5*m));
1224
1225 //TGeoVolume* magnetInnerWalls = MakeMagnetSegment(3);
1226 //tMaGVol->AddNode(magnetInnerWalls, 1, new TGeoTranslation(0, 0, fTub4z - zStartMagVol));
1227
1228
1229 // make the exit window
1230 Double_t dx2 = slopex*(fTub6z +fTub6length - zFocusX);
1231 TGeoVolume *T6Lid = gGeoManager->MakeBox("T6Lid",supportMedOut,dx2,dy,f_LidThickness/2.);
1232 T6Lid->SetLineColor(18);
1233 T6Lid->SetLineColor(2);
1234 T6Lid->SetFillColor(2);
1235 tMaGVol->AddNode(T6Lid, 1, new TGeoTranslation(0, 0,fTub6z+fTub6length+f_LidThickness/2.+0.1*cm - zStartMagVol));
1236 //finisMakeSegments assembly and position
1237 top->AddNode(tDecayVol, 1, new TGeoTranslation(0, 0,zStartDecayVol));
1238 top->AddNode(tMaGVol, 1, new TGeoTranslation(0, 0,zStartMagVol));
1239
1240
1241// only for fastMuon simulation, otherwise output becomes too big
1242 if (fFastMuon && fFollowMuon){
1243 const char* Vol = "TGeoVolume";
1244 const char* Mag = "Mag";
1245 const char* Rock = "rock";
1246 const char* Ain = "AbsorberAdd";
1247 const char* Aout = "AbsorberAddCore";
1248 TObjArray* volumelist = gGeoManager->GetListOfVolumes();
1249 int lastvolume = volumelist->GetLast();
1250 int volumeiterator=0;
1251 while ( volumeiterator<=lastvolume ) {
1252 const char* volumename = volumelist->At(volumeiterator)->GetName();
1253 const char* classname = volumelist->At(volumeiterator)->ClassName();
1254 if (strstr(classname,Vol)){
1255 if (strstr(volumename,Mag) || strstr(volumename,Rock)|| strstr(volumename,Ain) || strstr(volumename,Aout)){
1256 AddSensitiveVolume(gGeoManager->GetVolume(volumename));
1257 cout << "veto: made sensitive for following muons: "<< volumename <<endl;
1258 }
1259 }
1260 volumeiterator++;
1261 }
1262 }
1263
1264}
1265
1266vetoPoint* veto::AddHit(Int_t trackID, Int_t detID,
1267 TVector3 pos, TVector3 mom,
1268 Double_t time, Double_t length,
1269 Double_t eLoss, Int_t pdgCode,TVector3 Lpos, TVector3 Lmom)
1270{
1271 TClonesArray& clref = *fvetoPointCollection;
1272 Int_t size = clref.GetEntriesFast();
1273 // cout << "veto hit called "<< pos.z()<<endl;
1274 return new(clref[size]) vetoPoint(trackID, detID, pos, mom,
1275 time, length, eLoss, pdgCode,Lpos,Lmom);
1276}
1277
1278void veto::InnerAddToMap(Int_t ncpy, Double_t x, Double_t y, Double_t z, Double_t dx, Double_t dy, Double_t dz)
1279{
1280 if (fCenters.find(ncpy)!=fCenters.end())
1281 {
1282 cout << ncpy << " is already in the map" << endl;
1283 return;
1284 }
1285 fCenters[ncpy]=TVector3(x, y, z);
1286}
1287
Double_t cm
Double_t m
Double_t mm
@ kVETO
Definition veto.h:16
TGeoVolume * GeoCornerLiSc2(TString xname, double dz, bool isClockwise, double a, double b1, double b2, double dA, double dB, Int_t color, TGeoMedium *material, Bool_t sens)
Definition veto.cxx:320
Float_t floorHeightA
Definition veto.h:149
TClonesArray * fvetoPointCollection
Definition veto.h:155
TString supportMedIn_name
medium of veto counter, liquid or plastic scintillator
Definition veto.h:139
Float_t fT4z
z-position of tracking station 3
Definition veto.h:113
int liscId(TString ShapeTypeName, int blockNr, int Zlayer, int number, int position)
Definition veto.cxx:417
virtual Bool_t ProcessHits(FairVolume *v=0)
Definition veto.cxx:1062
TString decayVolumeMed_name
medium of support structure, aluminium, balloon
Definition veto.h:141
TGeoVolume * GeoTrapezoidNew(TString xname, Double_t thick, Double_t wz, Double_t wX_start, Double_t wX_end, Double_t wY_start, Double_t wY_end, Int_t color, TGeoMedium *material, Bool_t sens)
Definition veto.cxx:139
Int_t fUseSupport
Definition veto.h:151
virtual ~veto()
Definition veto.cxx:99
int makeId(double z, double x, double y)
Definition veto.cxx:406
virtual void Reset()
Definition veto.cxx:1145
Bool_t fFollowMuon
Definition veto.h:119
void SetTubZpositions(Float_t z1, Float_t z2, Float_t z3, Float_t z4, Float_t z5, Float_t z6)
Definition veto.cxx:1042
TGeoVolume * GeoCornerLiSc1(TString xname, double dz, bool isClockwise, double a, double b1, double b2, double dA, double dB, Int_t color, TGeoMedium *material, Bool_t sens)
Definition veto.cxx:283
Float_t fTub6z
Definition veto.h:125
Float_t zFocusX
Definition veto.h:148
Float_t fTub3z
Definition veto.h:122
TGeoVolume * MakeMagnetSegment(Int_t seg)
Definition veto.cxx:623
TGeoMedium * vetoMed
medium of decay volume, vacuum/air/helium
Definition veto.h:142
TGeoMedium * supportMedOut
Definition veto.h:144
Float_t fT0z
energy loss
Definition veto.h:109
Float_t fTime
momentum at entrance
Definition veto.h:106
TGeoMedium * decayVolumeMed
Definition veto.h:145
TLorentzVector fMom
position at entrance
Definition veto.h:105
Float_t f_LidThickness
Definition veto.h:133
Float_t fTub2z
Definition veto.h:121
std::map< Int_t, TVector3 > fCenters
Definition veto.h:190
TGeoVolume * GeoSideObj(TString xname, double dz, double a1, double b1, double a2, double b2, double dA, double dB, Int_t color, TGeoMedium *material, Bool_t sens)
Definition veto.cxx:253
TGeoVolumeAssembly * GeoCornerRib(TString xname, double ribThick, double lt1, double lt2, double dz, double slopeX, double slopeY, Int_t color, TGeoMedium *material, Bool_t sens)
Definition veto.cxx:358
Float_t floorHeightB
Definition veto.h:149
Float_t f_OuterSupportThickness
Definition veto.h:132
Float_t fT3z
z-position of tracking station 2
Definition veto.h:112
Float_t f_VetoThickness
Definition veto.h:134
TGeoVolume * MakeLidSegments(Int_t seg, Double_t dx, Double_t dy)
Definition veto.cxx:972
Float_t zFocusY
Definition veto.h:148
Int_t fTrackID
Definition veto.h:102
Float_t fBtube
Definition veto.h:136
Int_t fDesign
z-position of tracking station 4
Definition veto.h:114
Float_t fELoss
length
Definition veto.h:108
void InnerAddToMap(Int_t ncpy, Double_t x, Double_t y, Double_t z, Double_t dx=-1111, Double_t dy=-1111, Double_t dz=-1111)
Definition veto.cxx:1278
Float_t fTub2length
Definition veto.h:127
virtual void PreTrack()
Definition veto.cxx:1118
TGeoMedium * supportMedIn
Definition veto.h:143
TString supportMedOut_name
medium of support structure, iron, balloon
Definition veto.h:140
Bool_t fFastMuon
1: cylindrical with basic tracking chambers,
Definition veto.h:119
Float_t fTub3length
Definition veto.h:128
void SetZpositions(Float_t z0, Float_t z1, Float_t z2, Float_t z3, Float_t z4, Int_t c)
Definition veto.cxx:1149
void ConstructGeometry()
Definition veto.cxx:1159
void SetTublengths(Float_t l1, Float_t l2, Float_t l3, Float_t l6)
Definition veto.cxx:1052
TGeoVolume * MakeSegments(Double_t dz, Double_t dx_start, Double_t dy, Double_t slopex, Double_t slopey, Double_t floorHeight)
Definition veto.cxx:833
Float_t fTub5z
Definition veto.h:124
void AddBlock(TGeoVolumeAssembly *tInnerWall, TGeoVolumeAssembly *tDecayVacuum, TGeoVolumeAssembly *tOuterWall, TGeoVolumeAssembly *tLongitRib, TGeoVolumeAssembly *tVerticalRib, TGeoVolumeAssembly *ttLiSc, int &liScCounter, int blockNr, int nx, int ny, double z1, double z2, double Zshift, double dist, double distC, double wallThick, double liscThick1, double liscThick2, double ribThick)
Definition veto.cxx:435
Float_t f_InnerSupportThickness
Definition veto.h:130
TGeoVolume * GeoTrapezoid(TString xname, Double_t wz, Double_t wX_start, Double_t wX_end, Double_t wY_start, Double_t wY_end, Int_t color, TGeoMedium *material, Bool_t sens)
Definition veto.cxx:114
TString vetoMed_name
Definition veto.h:138
TLorentzVector fPos
volume id
Definition veto.h:104
Float_t f_RibThickness
Definition veto.h:135
veto()
Definition veto.cxx:45
Float_t fLength
time
Definition veto.h:107
Float_t fT2z
z-position of tracking station 1
Definition veto.h:111
Int_t InitMedium(const char *name)
Definition veto.cxx:1021
Int_t fPlasticVeto
Definition veto.h:152
virtual void EndOfEvent()
Definition veto.cxx:1111
virtual TClonesArray * GetCollection(Int_t iColl) const
Definition veto.cxx:1139
Float_t fT1z
z-position of veto station
Definition veto.h:110
Float_t fTub1length
Definition veto.h:126
Float_t fTub4z
Definition veto.h:123
Float_t fTub6length
Definition veto.h:129
virtual void Register()
Definition veto.cxx:1124
vetoPoint * AddHit(Int_t trackID, Int_t detID, TVector3 pos, TVector3 mom, Double_t time, Double_t length, Double_t eLoss, Int_t pdgcode, TVector3 Lpos, TVector3 Lmom)
Definition veto.cxx:1266
Int_t fLiquidVeto
Definition veto.h:153
virtual void Initialize()
Definition veto.cxx:107
Float_t fTub1z
Definition veto.h:120
ClassImp(ecalContFact) ecalContFact
Double_t cm
Definition veto.cxx:41
Double_t m
Definition veto.cxx:42
double wx(double z)
Definition veto.cxx:184
double wy(double z)
Definition veto.cxx:218
Double_t mm
Definition veto.cxx:43