16 UInt_t verm = ver%100;
22 TString vmcWorkdir = getenv(
"VMCWORKDIR");
25 gSystem->Load(
"libGeoBase");
26 gSystem->Load(
"libParBase");
27 gSystem->Load(
"libBase");
28 gSystem->Load(
"libPndData");
29 gSystem->Load(
"libPassive");
30 gSystem->Load(
"libEve");
45 std::vector<Double_t> nOpt = fGeo->
nOpt();
58 std::vector<Double_t> phDetY = fGeo->
phDetY();
59 std::vector<Double_t> phDetZ = fGeo->
phDetZ();
60 std::vector<Double_t> flatMirrorY = fGeo->
flatMirrorY();
61 std::vector<Double_t> flatMirrorZ = fGeo->
flatMirrorZ();
62 for(
size_t i=0;
i<flatMirrorY.size();
i++)
63 std::cout <<
i <<
" " << flatMirrorY[
i] <<
" " << flatMirrorZ[
i] << std::endl;
64 for(
i=0;
i<phDetY.size();
i++)
65 std::cout <<
i <<
" " << phDetY[
i] <<
" " << phDetZ[
i] << std::endl;
66 for(
i=0;
i<nOpt.size();
i++)
67 std::cout <<
i <<
" " << nOpt[
i] << std::endl;
74 TString fGeoFile= Form(
"../../geometry/rich_v%d_cal.root",ver);
75 TFile*
fi =
new TFile(fGeoFile,
"RECREATE");
76 cout<<
"Output file = "<<fGeoFile<<endl;
78 if (!useBeamPipeHole) {
81 useBeamPipeHole =
true;
83 std::cout << beamPipeHoleX <<
" " << beamPipeHoleY << std::endl;
85 FairGeoLoader*
geoLoad =
new FairGeoLoader(
"TGeo",
"FairGeoLoader");
86 FairGeoInterface *
geoFace = geoLoad->getGeoInterface();
87 geoFace->setMediaFile(
"../../geometry/media_pnd.geo");
91 FairGeoMedia *
Media = geoFace->getMedia();
92 FairGeoBuilder *
geobuild=geoLoad->getGeoBuilder();
94 FairGeoMedium *RichAl = Media->getMedium(
"aluminium");
95 FairGeoMedium *RichAir = Media->getMedium(
"RichAir");
96 FairGeoMedium *RichAerogel = Media->getMedium(
"FusedSil");
97 FairGeoMedium *RichAerogel0 = Media->getMedium(
"RichAerogel0");
98 FairGeoMedium *RichAerogel1 = Media->getMedium(
"RichAerogel1");
99 FairGeoMedium *RichAerogel2 = Media->getMedium(
"RichAerogel2");
100 FairGeoMedium *RichAerogel3 = Media->getMedium(
"RichAerogel3");
101 FairGeoMedium *RichAerogel4 = Media->getMedium(
"RichAerogel4");
102 FairGeoMedium *RichPcbmvd = Media->getMedium(
"pcbmvd");
103 FairGeoMedium *RichPDWindow = Media->getMedium(
"RichPDWindow");
104 FairGeoMedium *RichSilicon = Media->getMedium(
"silicon");
105 FairGeoMedium *RichMirror = Media->getMedium(
"Mirror");
108 nmed=geobuild->createMedium(RichAir);
109 nmed=geobuild->createMedium(RichAl);
110 nmed=geobuild->createMedium(RichAerogel);
111 nmed=geobuild->createMedium(RichAerogel0);
112 nmed=geobuild->createMedium(RichAerogel1);
113 nmed=geobuild->createMedium(RichAerogel2);
114 nmed=geobuild->createMedium(RichAerogel3);
115 nmed=geobuild->createMedium(RichAerogel4);
116 nmed=geobuild->createMedium(RichPcbmvd);
117 nmed=geobuild->createMedium(RichPDWindow);
118 nmed=geobuild->createMedium(RichSilicon);
119 nmed=geobuild->createMedium(RichMirror);
125 TGeoBBox* lRichBox =
new TGeoBBox(
"richBox", alBoxSize.X()/2, alBoxSize.Y()/2, alBoxSize.Z()/2 );
126 TGeoVolume *alRichBox =
new TGeoVolume(
"RichAlBox",lRichBox,
gGeoManager->GetMedium(
"aluminium"));
129 TGeoBBox* lRichBoxAir =
new TGeoBBox(
"richBoxAir",
130 alBoxSize.X()/2 - alBoxWallThickness,
131 alBoxSize.Y()/2 - alBoxWallThickness,
132 alBoxSize.Z()/2 - alBoxWallThickness );
133 TGeoVolume *alRichBoxAir =
new TGeoVolume(
"RichAlBoxAir",lRichBoxAir,
gGeoManager->GetMedium(
"RichAir"));
134 alRichBoxAir->SetLineColor(kGreen);
135 alRichBoxAir->SetTransparency(90);
136 alRichBox->AddNode(alRichBoxAir, 0,
new TGeoCombiTrans( 0, 0, 0,
new TGeoRotation(0) ) );
138 TGeoBBox* lRichBeamPipeHole =
new TGeoBBox(
"richBeamPipeHole",
144 UInt_t numberOfBlocks = nOpt.size();
145 TString aerogelUnity = Form(
"( ");
146 std::vector<TGeoBBox*> lRichAerogel(numberOfBlocks);
147 std::vector<TGeoTranslation*>
trans(numberOfBlocks);
148 std::vector<TGeoCompositeShape*> richAerogelCS(numberOfBlocks);
149 std::vector<TGeoVolume*> richAerogel(numberOfBlocks);
150 Double_t za = aerogelOffset.Z()-alBoxSize.Z()/2;
151 for(UInt_t ia=0; ia<numberOfBlocks; ia++) {
152 Double_t aerogelThickness = aerogelSize.Z()*aerogelLayers[ia];
153 za += aerogelThickness/2;
155 TString richAerogelName = Form(
"richAerogel%d",ia);
156 TString transName = Form(
"trans%d",ia);
157 TString richAerogelMedia = Form(
"RichAerogel%d",ia);
158 TString richAerogelCSName = Form(
"RichAerogelCS%d",ia);
159 TString richAerogelSensorName = Form(
"RichAerogelSensor%d",ia);
162 aerogelUnity =
"( " + richAerogelName +
":" + transName +
" ) - ( richBeamPipeHole ) ";
164 aerogelUnity =
"( " + richAerogelName +
":" + transName +
" ) ";
165 std::cout << aerogelUnity <<
" " << richAerogelMedia <<
" " <<
169 lRichAerogel.at(ia) =
new TGeoBBox(richAerogelName,
172 aerogelThickness/2 );
173 trans.at(ia) =
new TGeoTranslation(transName,
177 trans.at(ia)->RegisterYourself();
178 richAerogelCS.at(ia) =
new TGeoCompositeShape(richAerogelCSName,aerogelUnity);
179 richAerogel.at(ia) =
new TGeoVolume(richAerogelSensorName,
180 richAerogelCS.at(ia),
182 richAerogel.at(ia)->SetLineColor(kCyan);
183 richAerogel.at(ia)->SetTransparency(40);
184 alRichBoxAir->AddNode(richAerogel.at(ia), 0,
new TGeoCombiTrans( 0, 0, 0,
new TGeoRotation(0) ) );
186 za += aerogelThickness/2;
190 Double_t za = richOffset.Z() + aerogelOffset.Z();
195 alpha = alpha < 45 - beta ? alpha : 45 -beta;
200 Double_t alpha1 = 2*(alpha+beta) - ka1*thetaCh;
201 Double_t alpha2 = 2*(alpha-beta) + ka2*thetaCh + theta;
202 Double_t alpham = (alpha1+alpha2)/2;
203 Double_t zm1 = zp1 + yp1/tan(alpha1);
205 Double_t zm2 = (zm1+ya*tan(alpha))/(1-tan(theta+ka2*thetaCh)*tan(alpha));
206 Double_t ym2 = (zm2-zm1)/tan(alpha);
207 Double_t zp2 = ((ym2-yp1+zm2*tan(alpha2))*tan(alpham)+zp1)/(1+tan(alpha2)*tan(alpham));
208 Double_t yp2 = yp1 + (zp2-zp1)/tan(alpham);
212 alpham = atan((zp2-zp1)/(yp2-yp1));
214 Double_t phDetWidth =
sqrt((zp1-zp2)*(zp1-zp2)+(yp1-yp2)*(yp1-yp2));
217 Double_t wm =
sqrt((zm1-zm2)*(zm1-zm2)+(ym1-ym2)*(ym1-ym2));
221 Double_t zm0 = zmc-hm*
cos(alpha)-alBoxSize.Z()/2+aerogelOffset.Z();
223 Double_t theta1 = 360-(alpha+beta)*180/pi;
224 Double_t theta2 = 360-(alpha-beta)*180/pi;
228 TGeoPcon* lRichMirrorUpper =
new TGeoPcon(
"richMirrorUpper", theta1, theta2-theta1, 2);
229 lRichMirrorUpper->DefineSection(0, -mirrorLength/2, rm, rm + mirrorThickness );
230 lRichMirrorUpper->DefineSection(1, +mirrorLength/2, rm, rm + mirrorThickness );
231 TGeoTranslation trans1(0,ym0,zm0);
233 mrot1.SetAngles(90,270,270);
234 TGeoCombiTrans *combi1 =
new TGeoCombiTrans(
"combi1",0,ym0,zm0,&mrot1);
235 combi1->RegisterYourself();
236 TGeoPcon* lRichMirrorLower =
new TGeoPcon(
"richMirrorLower", theta3, theta2-theta1, 2);
237 lRichMirrorLower->DefineSection(0, -mirrorLength/2, rm, rm + mirrorThickness );
238 lRichMirrorLower->DefineSection(1, +mirrorLength/2, rm, rm + mirrorThickness );
239 TGeoTranslation trans2(0,-ym0,zm0);
241 mrot2.SetAngles(90,270,270);
242 TGeoCombiTrans *combi2 =
new TGeoCombiTrans(
"combi2",0,-ym0,zm0,&mrot2);
243 combi2->RegisterYourself();
245 TGeoCompositeShape* richMirrorCS =
new TGeoCompositeShape(
"RichMirrorCS",
246 "( richMirrorUpper:combi1 + richMirrorLower:combi2 ) - ( richBeamPipeHole ) ");
248 TGeoCompositeShape* richMirrorCS =
new TGeoCompositeShape(
"RichMirrorCS",
249 "( richMirrorUpper:combi1 + richMirrorLower:combi2 ) ");
250 TGeoVolume* richMirror =
new TGeoVolume(
"RichMirror",richMirrorCS,
252 richMirror->SetLineColor(kBlue);
253 richMirror->SetTransparency(40);
254 alRichBoxAir->AddNode(richMirror, 0,
new TGeoCombiTrans(0., 0., 0.,
new TGeoRotation (0)));
262 TGeoPcon* lRichMirrorUpper =
new TGeoPcon(
"richMirrorUpper", mirrorThetaMin, mirrorThetaMax-mirrorThetaMin, 2);
263 lRichMirrorUpper->DefineSection(0, -mirrorLength/2, mirrorRadius, mirrorRadius + mirrorThickness );
264 lRichMirrorUpper->DefineSection(1, +mirrorLength/2, mirrorRadius, mirrorRadius + mirrorThickness );
265 Double_t zShift = - alBoxSize.Z()/2 + aerogelOffset.Z();
266 std::cout <<
" " << mirrorAxis.Z() <<
" " << zShift << std::endl;
267 TGeoTranslation trans1(0,mirrorAxis.Y(),mirrorAxis.Z()+zShift);
269 mrot1.SetAngles(90,270,270);
270 TGeoCombiTrans *combi1 =
new TGeoCombiTrans(
"combi1",0,mirrorAxis.Y(),mirrorAxis.Z()+zShift,&mrot1);
271 combi1->RegisterYourself();
272 TGeoPcon* lRichMirrorLower =
new TGeoPcon(
"richMirrorLower", -mirrorThetaMax, mirrorThetaMax-mirrorThetaMin, 2);
273 lRichMirrorLower->DefineSection(0, -mirrorLength/2, mirrorRadius, mirrorRadius + mirrorThickness );
274 lRichMirrorLower->DefineSection(1, +mirrorLength/2, mirrorRadius, mirrorRadius + mirrorThickness );
275 TGeoTranslation trans2(0,-mirrorAxis.Y(),mirrorAxis.Z()+zShift);
277 mrot2.SetAngles(90,270,270);
278 TGeoCombiTrans *combi2 =
new TGeoCombiTrans(
"combi2",0,-mirrorAxis.Y(),mirrorAxis.Z()+zShift,&mrot2);
279 combi2->RegisterYourself();
281 TGeoCompositeShape* richMirrorCS =
new TGeoCompositeShape(
"RichMirrorCS",
282 "( richMirrorUpper:combi1 + richMirrorLower:combi2 ) - ( richBeamPipeHole ) ");
284 TGeoCompositeShape* richMirrorCS =
new TGeoCompositeShape(
"RichMirrorCS",
285 "( richMirrorUpper:combi1 + richMirrorLower:combi2 ) ");
286 TGeoVolume* richMirror =
new TGeoVolume(
"RichMirror",richMirrorCS,
288 richMirror->SetLineColor(kBlue);
289 richMirror->SetTransparency(40);
290 alRichBoxAir->AddNode(richMirror, 0,
new TGeoCombiTrans(0., 0., 0.,
new TGeoRotation (0)));
297 alpham = atan((zp2-zp1)/(yp2-yp1));
298 phDetWidth =
sqrt((zp1-zp2)*(zp1-zp2)+(yp1-yp2)*(yp1-yp2));
302 if (((verm>=11)&&(verm<=19))||((verm>=21)&&(verm<=29))) {
303 UInt_t numberOfSegments = flatMirrorY.size()-1;
304 TString richMirrorCSUnity = Form(
"( ");
307 std::vector<TGeoPcon*> lRichFlatMirrorSag(2*numberOfSegments);
308 std::vector<TGeoBBox*> lRichFlatMirror(2*numberOfSegments);
309 std::vector<TGeoCombiTrans*>
combi(2*numberOfSegments);
310 std::vector<TGeoRotation> mrot(2*numberOfSegments);
311 for(UInt_t
is=0;
is<numberOfSegments;
is++) {
313 TString richFlatMirrorName = Form(
"richFlatMirror%du",
is);
316 richMirrorCSUnity += richFlatMirrorName +
":" + combiName;
317 if (
is<numberOfSegments)
318 richMirrorCSUnity +=
" + ";
324 Double_t alpha = std::atan((z2-z1)/(y2-y1));
327 Double_t yc = (y1+y2)/2 - mirrorThickness/2*
sin(alpha);
328 Double_t zc = (z1+z2)/2 - alBoxSize.Z()/2 + aerogelOffset.Z() + mirrorThickness/2*
cos(alpha);
330 lRichFlatMirror.at(
is) =
new TGeoBBox(richFlatMirrorName,
334 mrot.at(
is).SetAngles(0,-90+alpha*180/pi,0);
335 combi.at(
is) =
new TGeoCombiTrans(combiName,0,yc,zc,&mrot.at(
is));
336 combi.at(
is)->RegisterYourself();
339 Double_t rm = ( 4*sag*sag + 1 )*mirrorWidth/8/sag;
340 Double_t ym = (y1+y2)/2 + (z2-z1)*(rm/mirrorWidth-sag);
341 Double_t zm = (z1+z2)/2 + (y1-y2)*(rm/mirrorWidth-sag);
344 zm += -alBoxSize.Z()/2 + aerogelOffset.Z();
346 lRichFlatMirrorSag.at(
is) =
new TGeoPcon(richFlatMirrorName, theta1, theta2-theta1, 2);
347 lRichFlatMirrorSag.at(
is)->DefineSection(0, -mirrorLength/2, rm, rm + mirrorThickness );
348 lRichFlatMirrorSag.at(
is)->DefineSection(1, +mirrorLength/2, rm, rm + mirrorThickness );
350 mrot.at(
is).SetAngles(90,270,270);
351 combi.at(
is) =
new TGeoCombiTrans(combiName,0,ym,zm,&mrot.at(
is));
352 combi.at(
is)->RegisterYourself();
356 for(UInt_t
is=0;
is<numberOfSegments;
is++) {
358 TString richFlatMirrorName = Form(
"richFlatMirror%dd",
is);
361 richMirrorCSUnity += richFlatMirrorName +
":" + combiName;
362 if (
is<flatMirrorY.size()-2)
363 richMirrorCSUnity +=
" + ";
365 UInt_t iss =
is + numberOfSegments;
371 Double_t alpha = std::atan((z2-z1)/(y2-y1));
374 Double_t yc = (y1+y2)/2 - mirrorThickness/2*
sin(alpha);
375 Double_t zc = (z1+z2)/2 - alBoxSize.Z()/2 + aerogelOffset.Z() + mirrorThickness/2*
cos(alpha);
377 lRichFlatMirror.at(iss) =
new TGeoBBox(richFlatMirrorName,
381 mrot.at(iss).SetAngles(0,-90+alpha*180/pi,0);
382 combi.at(iss) =
new TGeoCombiTrans(combiName,0,yc,zc,&mrot.at(iss));
383 combi.at(iss)->RegisterYourself();
386 Double_t rm = ( 4*sag*sag + 1 )*mirrorWidth/8/sag;
387 Double_t ym = (y1+y2)/2 + (z1-z2)*(rm/mirrorWidth-sag);
388 Double_t zm = (z1+z2)/2 + (y2-y1)*(rm/mirrorWidth-sag);
391 zm += -alBoxSize.Z()/2 + aerogelOffset.Z();
393 lRichFlatMirrorSag.at(iss) =
new TGeoPcon(richFlatMirrorName, theta1, theta2-theta1, 2);
394 lRichFlatMirrorSag.at(iss)->DefineSection(0, -mirrorLength/2, rm, rm + mirrorThickness );
395 lRichFlatMirrorSag.at(iss)->DefineSection(1, +mirrorLength/2, rm, rm + mirrorThickness );
397 mrot.at(iss).SetAngles(90,270,270);
398 combi.at(iss) =
new TGeoCombiTrans(combiName,0,ym,zm,&mrot.at(iss));
399 combi.at(iss)->RegisterYourself();
403 richMirrorCSUnity +=
" ) - ( richBeamPipeHole ) ";
405 richMirrorCSUnity +=
" ) ";
406 std::cout << richMirrorCSUnity << std::endl;
407 TGeoCompositeShape* richMirrorCS =
new TGeoCompositeShape(
"RichMirrorCS",richMirrorCSUnity);
408 TGeoVolume* richMirror =
new TGeoVolume(
"RichMirror",richMirrorCS,
410 richMirror->SetLineColor(kBlue);
411 richMirror->SetTransparency(40);
412 alRichBoxAir->AddNode(richMirror, 0,
new TGeoCombiTrans(0., 0., 0.,
new TGeoRotation (0)));
419 for(UInt_t
is=0;
is<numberOfSegments;
is++)
420 zp2 = zp2>flatMirrorZ[
is] ? zp2 : flatMirrorZ[
is];
421 alpham = atan((zp2-zp1)/(yp2-yp1));
422 phDetWidth =
sqrt((zp1-zp2)*(zp1-zp2)+(yp1-yp2)*(yp1-yp2));
425 if ((verm>=21)&&(verm<=29)) {
428 Double_t x_max = x_min + mirrorThickness;
438 Double_t z_mid = (z_max + z_min)/2 - alBoxSize.Z()/2 + aerogelOffset.Z();
439 TGeoBBox* lRichMirrorLeft =
new TGeoBBox(
"richMirrorLeft",
443 TGeoVolume *richMirrorLeft =
new TGeoVolume(
"RichMirrorLeft",
446 richMirrorLeft->SetLineColor(kBlue);
447 richMirrorLeft->SetTransparency(40);
448 alRichBoxAir->AddNode(richMirrorLeft, 0,
new TGeoCombiTrans(x_mid, y_mid, z_mid,
new TGeoRotation (0)));
451 x_max = -mirrorLength/2;
452 x_min = x_max - mirrorThickness;
453 x_mid = (x_max + x_min)/2;
454 TGeoBBox* lRichMirrorRight =
new TGeoBBox(
"richMirrorRight",
458 TGeoVolume *richMirrorRight =
new TGeoVolume(
"RichMirrorRight",
461 richMirrorRight->SetLineColor(kBlue);
462 richMirrorRight->SetTransparency(40);
463 alRichBoxAir->AddNode(richMirrorRight, 0,
new TGeoCombiTrans(x_mid, y_mid, z_mid,
new TGeoRotation (0)));
475 TGeoBBox* lRichPhDetUpper =
new TGeoBBox(
"richPhDetUpper",
479 TGeoVolume *richPhDetUpper =
new TGeoVolume(
"RichPhDetUpper",
482 richPhDetUpper->SetLineColor(19);
483 richPhDetUpper->SetTransparency(40);
485 prot1.SetAngles(0,-90+alpham*180/pi,0);
486 Double_t ypc = (yp1+yp2)/2+phDetThickness/2*
sin(alpham);
487 Double_t zpc = (zp1+zp2)/2 - alBoxSize.Z()/2 + aerogelOffset.Z() -phDetThickness/2*
cos(alpham);
488 alRichBoxAir->AddNode(richPhDetUpper, 0,
489 new TGeoCombiTrans( 0,
492 new TGeoRotation(prot1) ) );
495 Double_t y_shift = -dir*phDetThickness/2;
498 y_shift += dir*thickness/2;
499 thickness = windowThickness;
500 y_shift += dir*thickness/2;
501 TGeoBBox* lRichPhDetWindowUpper =
new TGeoBBox(
"richPhDetWindowUpper",
505 TGeoVolume *richPhDetWindowUpper =
new TGeoVolume(
"RichPhDetWindowUpper",lRichPhDetWindowUpper,
gGeoManager->GetMedium(
"RichPDWindow"));
506 richPhDetWindowUpper->SetLineColor(kGreen);
507 richPhDetWindowUpper->SetTransparency(40);
508 richPhDetUpper->AddNode(richPhDetWindowUpper, 0,
new TGeoCombiTrans( 0, y_shift, 0,
new TGeoRotation(0) ) );
510 y_shift += dir*thickness/2;
511 thickness = siThickness;
512 y_shift += dir*thickness/2;
513 TGeoBBox* lRichPhDetSiUpper =
new TGeoBBox(
"richPhDetSiUpper",
517 TGeoVolume *richPhDetSiUpper =
new TGeoVolume(
"RichPhDetSiUpperSensor",lRichPhDetSiUpper,
gGeoManager->GetMedium(
"silicon"));
518 richPhDetSiUpper->SetLineColor(kRed);
519 richPhDetSiUpper->SetTransparency(40);
520 richPhDetUpper->AddNode(richPhDetSiUpper, 0,
new TGeoCombiTrans( 0, y_shift, 0,
new TGeoRotation(0) ) );
522 y_shift += dir*thickness/2;
523 thickness = stefThickness;
524 y_shift += dir*thickness/2;
525 TGeoBBox* lRichPhDetSTEFUpper =
new TGeoBBox(
"richPhDetSTEFUpper",
529 TGeoVolume *richPhDetSTEFUpper =
new TGeoVolume(
"RichPhDetSTEFUpper",lRichPhDetSTEFUpper,
gGeoManager->GetMedium(
"pcbmvd"));
530 richPhDetSTEFUpper->SetLineColor(kYellow);
531 richPhDetSTEFUpper->SetTransparency(40);
532 richPhDetUpper->AddNode(richPhDetSTEFUpper, 0,
new TGeoCombiTrans( 0, y_shift, 0,
new TGeoRotation(0) ) );
534 y_shift += dir*(thickness/2+gapThickness);
535 thickness = stef2Thickness;
536 y_shift += dir*thickness/2;
537 TGeoBBox* lRichPhDetSTEF2Upper =
new TGeoBBox(
"richPhDetSTEF2Upper",
541 TGeoVolume *richPhDetSTEF2Upper =
new TGeoVolume(
"RichPhDetSTEF2Upper",lRichPhDetSTEF2Upper,
gGeoManager->GetMedium(
"pcbmvd"));
542 richPhDetSTEF2Upper->SetLineColor(kYellow);
543 richPhDetSTEF2Upper->SetTransparency(40);
544 richPhDetUpper->AddNode(richPhDetSTEF2Upper, 0,
new TGeoCombiTrans( 0, y_shift, 0,
new TGeoRotation(0) ) );
547 TGeoBBox* lRichPhDetLower =
new TGeoBBox(
"richPhDetLower",
551 TGeoVolume *richPhDetLower =
new TGeoVolume(
"RichPhDetLower",
554 richPhDetLower->SetLineColor(19);
555 richPhDetLower->SetTransparency(40);
557 prot2.SetAngles(0,+90-alpham*180/pi,0);
558 alRichBoxAir->AddNode(richPhDetLower, 0,
559 new TGeoCombiTrans( 0,
562 new TGeoRotation(prot2) ) );
565 y_shift = -dir*phDetThickness/2;
568 y_shift += dir*thickness/2;
569 thickness = windowThickness;
570 y_shift += dir*thickness/2;
571 TGeoBBox* lRichPhDetWindowLower =
new TGeoBBox(
"richPhDetWindowLower",
575 TGeoVolume *richPhDetWindowLower =
new TGeoVolume(
"RichPhDetWindowLower",lRichPhDetWindowLower,
gGeoManager->GetMedium(
"RichPDWindow"));
576 richPhDetWindowLower->SetLineColor(kGreen);
577 richPhDetWindowLower->SetTransparency(40);
578 richPhDetLower->AddNode(richPhDetWindowLower, 0,
new TGeoCombiTrans( 0, y_shift, 0,
new TGeoRotation(0) ) );
580 y_shift += dir*thickness/2;
581 thickness = siThickness;
582 y_shift += dir*thickness/2;
583 TGeoBBox* lRichPhDetSiLower =
new TGeoBBox(
"richPhDetSiLower",
587 TGeoVolume *richPhDetSiLower =
new TGeoVolume(
"RichPhDetSiLowerSensor",lRichPhDetSiLower,
gGeoManager->GetMedium(
"silicon"));
588 richPhDetSiLower->SetLineColor(kRed);
589 richPhDetSiLower->SetTransparency(40);
590 richPhDetLower->AddNode(richPhDetSiLower, 0,
new TGeoCombiTrans( 0, y_shift, 0,
new TGeoRotation(0) ) );
592 y_shift += dir*thickness/2;
593 thickness = stefThickness;
594 y_shift += dir*thickness/2;
595 TGeoBBox* lRichPhDetSTEFLower =
new TGeoBBox(
"richPhDetSTEFLower",
599 TGeoVolume *richPhDetSTEFLower =
new TGeoVolume(
"RichPhDetSTEFLower",lRichPhDetSTEFLower,
gGeoManager->GetMedium(
"pcbmvd"));
600 richPhDetSTEFLower->SetLineColor(kYellow);
601 richPhDetSTEFLower->SetTransparency(40);
602 richPhDetLower->AddNode(richPhDetSTEFLower, 0,
new TGeoCombiTrans( 0, y_shift, 0,
new TGeoRotation(0) ) );
604 y_shift += dir*(thickness/2+gapThickness);
605 thickness = stef2Thickness;
606 y_shift += dir*thickness/2;
607 TGeoBBox* lRichPhDetSTEF2Lower =
new TGeoBBox(
"richPhDetSTEF2Lower",
611 TGeoVolume *richPhDetSTEF2Lower =
new TGeoVolume(
"RichPhDetSTEF2Lower",lRichPhDetSTEF2Lower,
gGeoManager->GetMedium(
"pcbmvd"));
612 richPhDetSTEF2Lower->SetLineColor(kYellow);
613 richPhDetSTEF2Lower->SetTransparency(40);
614 richPhDetLower->AddNode(richPhDetSTEF2Lower, 0,
new TGeoCombiTrans( 0, y_shift, 0,
new TGeoRotation(0) ) );
620 TGeoManager*
gGeoMan = (TGeoManager*)gROOT->FindObject(
"FAIRGeom");
622 TGeoBBox* lTop =
new TGeoBBox(500,500,richOffset.Z() + alBoxSize.Z());
623 TGeoVolume*
top =
new TGeoVolume(
"RICH", lTop,
gGeoManager->GetMedium(
"RichAir"));
626 top->AddNode(alRichBox, 0,
627 new TGeoCombiTrans( richOffset.X(),
629 richOffset.Z() + alBoxSize.Z()/2,
630 new TGeoRotation(0) ) );
634 top->CheckOverlaps(0.0001,
"");
644 TObjArray *listOfOverlaps =
gGeoManager->GetListOfOverlaps();
645 cout<<listOfOverlaps->GetEntries()<<endl;
646 listOfOverlaps->Print();
Double_t mirrorCurvature()
friend F32vec4 acos(const F32vec4 &a)
friend F32vec4 cos(const F32vec4 &a)
Double_t mirrorThetaMin()
friend F32vec4 sqrt(const F32vec4 &a)
std::vector< Double_t > phDetZ()
friend F32vec4 sin(const F32vec4 &a)
Double_t angleOfMirrorPosition()
TGeoManager * gGeoManager
std::vector< Double_t > phDetY()
Double_t alBoxWallThickness()
Double_t mirrorThickness()
std::vector< Double_t > aerogelLayers()
FairGeoBuilder * geobuild
Double_t angleExtansionOuter()
friend F32vec4 atan2(const F32vec4 &y, const F32vec4 &x)
Double_t angleExtansionInner()
Double_t phDetThickness()
std::vector< Double_t > flatMirrorY()
FairGeoInterface * geoFace
std::vector< Double_t > nOpt()
Double_t mirrorThetaMax()
std::vector< Double_t > flatMirrorZ()