]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSv11.cxx
Protection against empty hit events
[u/mrichter/AliRoot.git] / ITS / AliITSv11.cxx
CommitLineData
2b680d9b 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
803d1ab0 16/* $Id$ */
2b680d9b 17
18//////////////////////////////////////////////////////////////////////////////
19// //
20// Inner Traking System version 11 //
21// This class contains the base procedures for the Inner Tracking System //
22// //
23// Authors: R. Barbera //
24// version 6. //
25// Created 2000. //
26// //
27// NOTE: THIS IS THE SYMMETRIC PPR geometry of the ITS. //
28// THIS WILL NOT WORK //
29// with the geometry or module classes or any analysis classes. You are //
30// strongly encouraged to uses AliITSv5. //
31// //
32//////////////////////////////////////////////////////////////////////////////
33// See AliITSv11::StepManager().
541f7ba6 34// General C/C++ includes
2b680d9b 35#include <stdio.h>
36#include <stdlib.h>
541f7ba6 37// General Root includes
38#include <Riostream.h>
2b680d9b 39#include <TMath.h>
2b680d9b 40#include <TFile.h> // only required for Tracking function?
2b680d9b 41#include <TObjArray.h>
541f7ba6 42#include <TClonesArray.h>
2b680d9b 43#include <TLorentzVector.h>
44#include <TObjString.h>
541f7ba6 45// Root Geometry includes
46#include <TGeoManager.h>
afac0af7 47#include <TGeoVolume.h>
541f7ba6 48#include <TGeoPcon.h>
afac0af7 49#include <TGeoTube.h> // contaings TGeoTubeSeg
50#include <TGeoArb8.h>
51#include <TGeoCompositeShape.h>
52#include <TGeoMatrix.h>
541f7ba6 53#include <TGeoNode.h>
54#include <TGeoMaterial.h>
afac0af7 55#include <TGeoMedium.h>
541f7ba6 56// General AliRoot includes
2b680d9b 57#include "AliRun.h"
58#include "AliMagF.h"
59#include "AliConst.h"
541f7ba6 60// ITS specific includes
2b680d9b 61#include "AliITShit.h"
2b680d9b 62#include "AliITSgeom.h"
63#include "AliITSgeomSPD.h"
64#include "AliITSgeomSDD.h"
65#include "AliITSgeomSSD.h"
66#include "AliITSDetType.h"
67#include "AliITSresponseSPD.h"
68#include "AliITSresponseSDD.h"
69#include "AliITSresponseSSD.h"
70#include "AliITSsegmentationSPD.h"
71#include "AliITSsegmentationSDD.h"
72#include "AliITSsegmentationSSD.h"
73#include "AliITSsimulationSPD.h"
74#include "AliITSsimulationSDD.h"
75#include "AliITSsimulationSSD.h"
76#include "AliITSClusterFinderSPD.h"
77#include "AliITSClusterFinderSDD.h"
78#include "AliITSClusterFinderSSD.h"
541f7ba6 79#include "AliITSBaseGeometry.h"
80#include "AliITSv11.h"
81
82// Units, Convert from k?? to cm,degree,GeV,seconds,
83const Double_t kmm = 0.10; // Convert mm to TGeom's cm.
84const Double_t kcm = 1.00; // Convert cv to TGeom's cm.
afac0af7 85const Double_t kDegree = 1.0; // Convert degrees to TGeom's degrees
86const Double_t kRadian = TMath::DegToRad(); // conver to Radians
87
88#define SQ(A) ((A)*(A))
2b680d9b 89
fed42993 90#define printArb8(A) \
171f3f35 91 cout << A->GetName() << ":"; \
fed42993 92 for(Int_t iii=0;iii<8;iii+=2){ cout <<"("<<A->GetVertices()[iii]<<"," \
93 <<A->GetVertices()[iii+1]<<","<<-A->GetDz()<<")";}\
94 for(Int_t iii=8;iii<16;iii+=2){ cout <<"("<<A->GetVertices()[iii]<<"," \
95 <<A->GetVertices()[iii+1]<<","<<A->GetDz()<<")";}\
96 cout << endl;
171f3f35 97
98#define printPcon(A) \
99 cout << A->GetName() << ": N=" << A->GetNz() << " Phi1=" << A->GetPhi1() \
100 << ", Dphi=" << A->GetDphi() << endl; \
101 cout << "i\t Z \t Rmin \t Rmax" << endl; \
102 for(Int_t iii=0;iii<A->GetNz();iii++){ \
103 cout << iii << "\t" << A->GetZ(iii) << "\t" << A->GetRmin(iii) \
104 << "\t" << A->GetRmax(iii) << endl; \
105 } // end for iii
106
fed42993 107#define printTube(A) \
171f3f35 108 cout << A->GetName() <<": Rmin="<<A->GetRmin()\
fed42993 109 <<" Rmax=" <<A->GetRmax()<<" Dz="<<A->GetDz()<<endl;
171f3f35 110
fed42993 111#define printTubeSeg(A) \
171f3f35 112 cout << A->GetName() <<": Phi1="<<A->GetPhi1()<< \
fed42993 113 " Phi2="<<A->GetPhi2()<<" Rmin="<<A->GetRmin()\
114 <<" Rmax=" <<A->GetRmax()<<" Dz="<<A->GetDz()<<endl;
171f3f35 115
2b680d9b 116ClassImp(AliITSv11)
117
541f7ba6 118/*
119 Some temparary #define's used untill ROOT has addoppted the proper
120 Getter in it's classes.
121 These Below are for TGeoPcon functions.
122*/
123
2b680d9b 124//______________________________________________________________________
125AliITSv11::AliITSv11() : AliITS() {
aa9bc63b 126 // Standard default constructor for the ITS version 11.
2b680d9b 127 // Inputs:
aa9bc63b 128 // none.
2b680d9b 129 // Outputs:
aa9bc63b 130 // none.
131 // Return
132 // A default constructed AliITSv11 class.
2b680d9b 133
541f7ba6 134 //fITSV = 0;
135 //fcS = 0;
162acd47 136// fcD = 0;
2b680d9b 137}
138//______________________________________________________________________
aa9bc63b 139AliITSv11::AliITSv11(const char *title) : AliITS("ITS", title){
140 // Standard constructor for the ITS version 11.
2b680d9b 141 // Inputs:
162acd47 142 // const char *title The title of for this geometry.
2b680d9b 143 // Outputs:
aa9bc63b 144 // none.
145 // Return
146 // A Standard constructed AliITSv11 class.
2b680d9b 147
541f7ba6 148 //fITSV = 0;
149 //fcS = 0;
162acd47 150// fcD = 0;
2b680d9b 151}
152//______________________________________________________________________
aa9bc63b 153AliITSv11::~AliITSv11() {
154 // Standard destructor for the ITS version 11.
dfefbaec 155 // Inputs:
aa9bc63b 156 // none.
dfefbaec 157 // Outputs:
aa9bc63b 158 // none.
159 // Return
160 // none.
dfefbaec 161
541f7ba6 162// if(fITSV!=0) delete fITSV;
163// if(fcS!=0) delete fcS;
162acd47 164// if(fcD!=0) delete fcD;
165}
166//______________________________________________________________________
541f7ba6 167AliITSv11::AliITSv11(const AliITSv11 &source) : AliITS(source){
162acd47 168 // Copy Constructor for ITS version 11.
169 // Inputs:
170 // AliITSv11 &source class to be copied from.
171 // Outputs:
172 // none.
173 // Return
174 // none.
175
176 if(&source == this) return;
177 Error("Copy Constructor","Not allowed to copy AliITSv11");
178 return;
179}
180//______________________________________________________________________
181AliITSv11& AliITSv11::operator=(const AliITSv11 &source){
182 // Assignment operator for the ITS version 11.
183 // Inputs:
184 // AliITSv11 &source class to be copied from.
185 // Outputs:
186 // none.
187 // Return
188 // none.
189
190 if(&source == this) return *this;
191 Error("= operator","Not allowed to copy AliITSv11");
192 return *this;
dfefbaec 193}
194//______________________________________________________________________
aa9bc63b 195void AliITSv11::BuildGeometry(){
162acd47 196 // This routine defines and Creates the geometry for version 11 of
197 // the ITS for use in the simulation display routines. This is a
198 // very simplified geometry for speed of viewing.
2b680d9b 199 // Inputs:
aa9bc63b 200 // none.
2b680d9b 201 // Outputs:
aa9bc63b 202 // none.
203 // Return
204 // none.
162acd47 205 TVector3 t(0.0,0.0,0.0);
2b680d9b 206
541f7ba6 207 //if(fITSV==0) fITSV = new AliITSGeometryITSV(this,"ALIC");
208 //if(fcS==0) fcS = new AliITSGeometrySSDCone(this,t,"TSV",1);
2b680d9b 209
541f7ba6 210 //fcS->BuildDisplayGeometry();
2b680d9b 211}
212//______________________________________________________________________
aa9bc63b 213void AliITSv11::CreateGeometry(){
162acd47 214 // This routine defines and Creates the geometry for version 11 of
215 // the ITS. The geometry is used by the particle trasport routines,
216 // and therefore, is very detailed.
dfefbaec 217 // Inputs:
aa9bc63b 218 // none.
dfefbaec 219 // Outputs:
aa9bc63b 220 // none.
221 // Return
222 // none.
aa9bc63b 223 TVector3 t(0.0,0.0,0.0);
162acd47 224
541f7ba6 225 TGeoManager *mgr = gGeoManager;
226 TGeoVolume *ALIC = mgr->GetTopVolume();
227
fed42993 228 TGeoPcon *itsv = new TGeoPcon("ITS Top Volume, Daughter of ALIC",
229 0.0,360.0,2);
541f7ba6 230 // DefineSection(section number, Z, Rmin, Rmax).
231 itsv->DefineSection(0,-100.0*kcm,0.01*kcm,50.0*kcm);
232 itsv->DefineSection(1,+100.0*kcm,0.01*kcm,50.0*kcm);
233 TGeoVolume *ITSV = new TGeoVolume("ITSV",itsv,0);
cbd7b929 234 //mgr->AddVolume(ITSV);
235 ITSV->SetVisibility(kFALSE);
541f7ba6 236 ALIC->AddNode(ITSV,1,0);
162acd47 237 //
afac0af7 238 SPDCone(ITSV);
171f3f35 239 SDDCone(ITSV);
240 SSDCone(ITSV);
3717ba94 241}
242//______________________________________________________________________
541f7ba6 243Double_t AliITSv11::RmaxFrom2Points(TGeoPcon *p,Int_t i1,Int_t i2,Double_t z){
244 // functions Require at parts of Volume A to be already defined.
245 // Retruns the value of Rmax corresponding to point z alone the line
246 // defined by the two points p.Rmax(i1),p-GetZ(i1) and p->GetRmax(i2),
247 // p->GetZ(i2).
248
249 return p->GetRmax(i2)+(p->GetRmax(i1)-p->GetRmax(i2))*(z-p->GetZ(i2))/
fed42993 250 (p->GetZ(i1)-p->GetZ(i2));
541f7ba6 251}
252//______________________________________________________________________
253Double_t AliITSv11::RminFrom2Points(TGeoPcon *p,Int_t i1,Int_t i2,Double_t z){
254 // Retruns the value of Rmin corresponding to point z alone the line
fed42993 255 // defined by the two points p->GetRmin(i1),p->GetZ(i1) and
256 // p->GetRmin(i2), p->GetZ(i2).
162acd47 257
541f7ba6 258 return p->GetRmin(i2)+(p->GetRmin(i1)-p->GetRmin(i2))*(z-p->GetZ(i2))/
fed42993 259 (p->GetZ(i1)-p->GetZ(i2));
541f7ba6 260}
261//______________________________________________________________________
fed42993 262Double_t AliITSv11::RFrom2Points(Double_t *p,Double_t *Z,Int_t i1,
263 Int_t i2,Double_t z){
541f7ba6 264 // Retruns the value of Rmin corresponding to point z alone the line
fed42993 265 // defined by the two points p->GetRmin(i1),p->GetZ(i1) and
266 // p->GetRmin(i2), p->GetZ(i2).
162acd47 267
541f7ba6 268 return p[i2]+(p[i1]-p[i2])*(z-Z[i2])/(Z[i1]-Z[i2]);
269}
270//______________________________________________________________________
271Double_t AliITSv11::Zfrom2MinPoints(TGeoPcon *p,Int_t i1,Int_t i2,Double_t r){
272 // Retruns the value of Z corresponding to point R alone the line
273 // defined by the two points p->GetRmin(i1),p->GetZ(i1) and
274 // p->GetRmin(i2),p->GetZ(i2)
162acd47 275
541f7ba6 276 return p->GetZ(i2)+(p->GetZ(i1)-p->GetZ(i2))*(r-p->GetRmin(i2))/
fed42993 277 (p->GetRmin(i1)-p->GetRmin(i2));
541f7ba6 278}
279//______________________________________________________________________
280Double_t AliITSv11::Zfrom2MaxPoints(TGeoPcon *p,Int_t i1,Int_t i2,Double_t r){
281 // Retruns the value of Z corresponding to point R alone the line
282 // defined by the two points p->GetRmax(i1),p->GetZ(i1) and
283 // p->GetRmax(i2),p->GetZ(i2)
162acd47 284
541f7ba6 285 return p->GetZ(i2)+(p->GetZ(i1)-p->GetZ(i2))*(r-p->GetRmax(i2))/
fed42993 286 (p->GetRmax(i1)-p->GetRmax(i2));
541f7ba6 287}
288//______________________________________________________________________
fed42993 289Double_t AliITSv11::Zfrom2Points(Double_t *Z,Double_t *p,Int_t i1,
290 Int_t i2,Double_t r){
541f7ba6 291 // Retruns the value of Z corresponding to point R alone the line
292 // defined by the two points p->GetRmax(i1),p->GetZ(i1) and
293 // p->GetRmax(i2),p->GetZ(i2)
162acd47 294
541f7ba6 295 return Z[i2]+(Z[i1]-Z[i2])*(r-p[i2])/(p[i1]-p[i2]);
296}
297//______________________________________________________________________
fed42993 298Double_t AliITSv11::RmaxFromZpCone(TGeoPcon *p,Double_t tc,Double_t z,
299 Double_t th){
541f7ba6 300 // General SSD Outer Cone surface equation Rmax.
301 Double_t tantc = TMath::Tan(tc*TMath::DegToRad());
302 Double_t costc = TMath::Cos(tc*TMath::DegToRad());
162acd47 303
541f7ba6 304 return -tantc*(z-p->GetZ(4))+p->GetRmax(4)+th/costc;
305}
306//______________________________________________________________________
fed42993 307Double_t AliITSv11::RmaxFromZpCone(Double_t *GetRmax,Double_t *GetZ,
308 Double_t tc,Double_t z,Double_t th){
541f7ba6 309 // General SSD Outer Cone surface equation Rmax.
310 Double_t tantc = TMath::Tan(tc*TMath::DegToRad());
311 Double_t costc = TMath::Cos(tc*TMath::DegToRad());
162acd47 312
541f7ba6 313 return -tantc*(z-GetZ[4])+GetRmax[4]+th/costc;
314}
315//______________________________________________________________________
fed42993 316Double_t AliITSv11::RminFromZpCone(TGeoPcon *p,Double_t tc,Double_t z,
317 Double_t th){
541f7ba6 318 // General SSD Inner Cone surface equation Rmin.
319 Double_t tantc = TMath::Tan(tc*TMath::DegToRad());
320 Double_t costc = TMath::Cos(tc*TMath::DegToRad());
162acd47 321
541f7ba6 322 return -tantc*(z-p->GetZ(3))+p->GetRmin(3)+th/costc;
323}
324//______________________________________________________________________
fed42993 325Double_t AliITSv11::RminFromZpCone(Double_t *GetRmin,Double_t *GetZ,
326 Double_t tc,Double_t z,Double_t th){
541f7ba6 327 // General SSD Inner Cone surface equation Rmin.
328 Double_t tantc = TMath::Tan(tc*TMath::DegToRad());
329 Double_t costc = TMath::Cos(tc*TMath::DegToRad());
162acd47 330
541f7ba6 331 return -tantc*(z-GetZ[3])+GetRmin[3]+th/costc;
332}
333//______________________________________________________________________
fed42993 334Double_t AliITSv11::ZFromRmaxpCone(TGeoPcon *p,Double_t tc,Double_t r,
335 Double_t th){
541f7ba6 336 // General SSD Outer cone Surface equation for z.
337 Double_t tantc = TMath::Tan(tc*TMath::DegToRad());
338 Double_t costc = TMath::Cos(tc*TMath::DegToRad());
162acd47 339
541f7ba6 340 return p->GetZ(4)+(p->GetRmax(4)+th/costc-r)/tantc;
341}
342//______________________________________________________________________
fed42993 343Double_t AliITSv11::ZFromRmaxpCone(Double_t *GetRmax,Double_t *GetZ,
344 Double_t tc,Double_t r,Double_t th){
541f7ba6 345 // General SSD Outer cone Surface equation for z.
346 Double_t tantc = TMath::Tan(tc*TMath::DegToRad());
347 Double_t costc = TMath::Cos(tc*TMath::DegToRad());
162acd47 348
541f7ba6 349 return GetZ[4]+(GetRmax[4]+th/costc-r)/tantc;
350}
351//______________________________________________________________________
fed42993 352Double_t AliITSv11::ZFromRminpCone(TGeoPcon *p,Double_t tc,Double_t r,
353 Double_t th){
541f7ba6 354 // General SSD Inner cone Surface equation for z.
355 Double_t tantc = TMath::Tan(tc*TMath::DegToRad());
356 Double_t costc = TMath::Cos(tc*TMath::DegToRad());
3717ba94 357
541f7ba6 358 return p->GetZ(3)+(p->GetRmin(3)+th/costc-r)/tantc;
359}
360//______________________________________________________________________
361void AliITSv11::RadiusOfCurvature(Double_t rc,Double_t theta0,Double_t z0,
fed42993 362 Double_t r0,Double_t theta1,Double_t &z1,
363 Double_t &r1){
541f7ba6 364 // Given a initial point z0,r0, the initial angle theta0, and the radius
365 // of curvature, returns the point z1, r1 at the angle theta1. Theta
366 // measured from the r axis in the clock wise direction [degrees].
367 Double_t sin0 = TMath::Sin(theta0*TMath::DegToRad());
368 Double_t cos0 = TMath::Cos(theta0*TMath::DegToRad());
369 Double_t sin1 = TMath::Sin(theta1*TMath::DegToRad());
370 Double_t cos1 = TMath::Cos(theta1*TMath::DegToRad());
371
372 z1 = rc*(sin1-sin0)+z0;
373 r1 = rc*(cos1-cos0)+r0;
374 return;
375}
376//______________________________________________________________________
377void AliITSv11::SPDCone(TGeoVolume *Moth){
378 // Define the detail SPD support cone geometry.
379 // Inputs:
380 // none.
381 // Outputs:
382 // none.
383 // Return:
384 // none.
afac0af7 385
386 SPDThermalSheald(Moth);
387}
388//______________________________________________________________________
389void AliITSv11::SPDThermalSheald(TGeoVolume *Moth){
390 // Define the detail SPD Thermal Sheld geometry.
391 // Inputs:
392 // none.
393 // Outputs:
394 // none.
395 // Return:
396 // none.
397 // From ALICE-Thermal Screen (SPD) "Cylinder" file thermal-screen2_a3.ps
398 // Volumes A1,A2,A2,Ah1,Ah2,Ah3, and B1,B2,B3,Bh1,Bh2,Bh3;
399 // "CONE TRANSITION" file thermal-screen1_a3.ps Volumes C1,C2,C3,Ch1,Ch2,
400 // Ch3; "FLANGE" file thermal-screen4_a3.ps Volumes D,Ds,Dw,Dws; and
401 // "HALF ASSEMBLY" file thermal-screen3_a3.ps. This object, both halfs,
402 // are incased inside of a single minimum sized mother volume called M,
403 // which is a union of two parts M1 and 4 copies of M2.
404 const Double_t TSCarbonFiberThA = 0.03*kmm; //
fed42993 405 //const Double_t TSCarbonFiberThB = 0.10*kmm; //
afac0af7 406 const Double_t TSCLengthB = 50.0*kmm; //
407 const Double_t TSCLengthA = 900.0*kmm-2.0*TSCLengthB; //
fed42993 408 const Double_t TSCLengthC = 290.0*kmm; //
afac0af7 409 const Double_t TSCLengthD = 15.0*kmm; //
410 const Double_t TSCAngle = 36.0*kDegree;//Rep. angle of cent. accordin
411 const Double_t TSCRoutA = 99.255*kmm; // Outer radii
412 const Double_t TSCRinA = 81.475*kmm; // Iner radii
413 const Double_t TSCRoutB = 99.955*kmm; // Outer radii
414 const Double_t TSCRinB = 80.775*kmm; // Iner radii
415 const Double_t TSCRoutCp = 390.0*kmm; // Outer radii
416 const Double_t TSCRinCp = 373.0*kmm; // Iner radii
417 Double_t TSCRoutC,TSCRinC; // values need to be calculated
418 const Double_t TSCRwingD = 492.5*kmm; // Outer radii
419 const Double_t TSCRoutD = 0.5*840.*kmm;// Outer radii
420 const Double_t TSCRinD = 373.0*kmm; // Iner radii
fed42993 421 const Double_t TSCAngleDD = 60.*kmm/TSCRwingD/kRadian;//angular wing width
afac0af7 422 //angular wing width of fill material
fed42993 423 const Double_t TSCAngleDDs = (60.*kmm-2.*TSCarbonFiberThA)/TSCRwingD/kRadian;
afac0af7 424 const Double_t TSCAngleD0 = 45.*kDegree;//Strting angle of wing
425 const Double_t TSCoutSA = 24.372*kmm; // The other one Calculated
426 const Double_t TSCinLA = 31.674*kmm; // The ohter one Calculated
427 const Double_t TSCoutSB = 24.596*kmm; // The other one Calculated
428 const Double_t TSCinLB = 31.453*kmm; // The ohter one Calculated
429 const Double_t TSCoutSC = 148.831*kmm;// The other one Calculated
430 const Double_t TSCinLC = 90.915*kmm; // The ohter one Calculated
431 Int_t i,k;
fed42993 432 Double_t th;
afac0af7 433 Double_t xo[7],yo[7],xi[7],yi[7];
434 Double_t xbo[7],ybo[7],xbi[7],ybi[7];
435 Double_t xco[7],yco[7],xci[7],yci[7];
436 TGeoArb8 *A1,*A2,*A3,*Ah1,*Ah2,*Ah3,*B1,*B2,*B3,*Bh1,*Bh2,*Bh3;
437 TGeoArb8 *C1,*C2,*C3,*Ch1,*Ch2,*Ch3;
438 TGeoTube *D,*Ds;
439 TGeoTubeSeg *Dw,*Dws,*M2;
440 TGeoPcon *M1;
441 TGeoCompositeShape *M;
fed42993 442 TGeoRotation *rot;
443 TGeoTranslation *tranb,*tranbm,*tranc;
444 TGeoTranslation *tranITSspdShealdVVt0;
445 TGeoCombiTrans *rotITSspdShealdVVt1,*rotITSspdShealdVVt2;
446 TGeoCombiTrans *rotITSspdShealdVVt3;
afac0af7 447 TGeoMedium *SPDcf = 0; // SPD support cone Carbon Fiber materal number.
448 TGeoMedium *SPDfs = 0; // SPD support cone inserto stesalite 4411w.
449 TGeoMedium *SPDfo = 0; // SPD support cone foam, Rohacell 50A.
450 TGeoMedium *SPDss = 0; // SPD support cone screw material,Stainless steal
451 TGeoMedium *SPDair = 0; // SPD support cone Air
452 //TGeoMedium *SPDal = 0; // SPD support cone SDD mounting bracket Al
453
fed42993 454 TSCRoutC = TMath::Sqrt(TSCRoutCp*TSCRoutCp-0.25*TSCoutSC*TSCoutSC);
455 TSCRinC = TMath::Sqrt(TSCRinCp *TSCRinCp -0.25*TSCinLC *TSCinLC );
afac0af7 456 A1 = new TGeoArb8("ITS SPD Therm Screen Clyinder A1",0.5*TSCLengthA);
457 A2 = new TGeoArb8("ITS SPD Therm Screen Clyinder A2",0.5*TSCLengthA);
458 A3 = new TGeoArb8("ITS SPD Therm Screen Clyinder A3",0.5*TSCLengthA);
459 Ah1 = new TGeoArb8("ITS SPD Therm Screen Cylinder Ah1",0.5*TSCLengthA);
460 Ah2 = new TGeoArb8("ITS SPD Therm Screen Cylinder Ah2",0.5*TSCLengthA);
461 Ah3 = new TGeoArb8("ITS SPD Therm Screen Cylinder Ah3",0.5*TSCLengthA);
462 B1 = new TGeoArb8("ITS SPD Therm Screen Clyinder B1",0.5*TSCLengthB);
463 B2 = new TGeoArb8("ITS SPD Therm Screen Clyinder B2",0.5*TSCLengthB);
464 B3 = new TGeoArb8("ITS SPD Therm Screen Clyinder B3",0.5*TSCLengthB);
465 Bh1 = new TGeoArb8("ITS SPD Therm Screen Cylinder Bh1",0.5*TSCLengthB);
466 Bh2 = new TGeoArb8("ITS SPD Therm Screen Cylinder Bh2",0.5*TSCLengthB);
467 Bh3 = new TGeoArb8("ITS SPD Therm Screen Cylinder Bh3",0.5*TSCLengthB);
468 C1 = new TGeoArb8("ITS SPD Therm Screen Clyinder C1",0.5*TSCLengthC);
fed42993 469 C2 = new TGeoArb8("ITS SPD Therm Screen Clyinder C2",0.5*TSCLengthC);
afac0af7 470 C3 = new TGeoArb8("ITS SPD Therm Screen Clyinder C3",0.5*TSCLengthC);
471 Ch1 = new TGeoArb8("ITS SPD Therm Screen Cylinder Ch1",0.5*TSCLengthC);
472 Ch2 = new TGeoArb8("ITS SPD Therm Screen Cylinder Ch2",0.5*TSCLengthC);
473 Ch3 = new TGeoArb8("ITS SPD Therm Screen Cylinder Ch3",0.5*TSCLengthC);
474 D = new TGeoTube("ITS SPD Therm Screen Flange D",TSCRinD,TSCRoutD,
fed42993 475 0.5*TSCLengthD);
afac0af7 476 Ds = new TGeoTube("ITS SPD Therm Screen Flange fill Ds",
fed42993 477 TSCRinD+TSCarbonFiberThA,TSCRoutD-TSCarbonFiberThA,
478 0.5*TSCLengthD);
171f3f35 479 //printTube(D);
480 //printTube(Ds);
afac0af7 481 Dw = new TGeoTubeSeg("ITS SPD Therm Screen Flange Wing Dw",
fed42993 482 TSCRoutD,TSCRwingD ,0.5*TSCLengthD,
483 TSCAngleD0-0.5*TSCAngleDD,TSCAngleD0+0.5*TSCAngleDD);
afac0af7 484 Dws = new TGeoTubeSeg("ITS SPD Therm Screen Flange Wing Fill Ds",
fed42993 485 TSCRoutD,TSCRwingD-TSCarbonFiberThA,
486 0.5*TSCLengthD,TSCAngleD0-0.5*TSCAngleDDs,
487 TSCAngleD0+0.5*TSCAngleDDs);
171f3f35 488 //printTubeSeg(Dw);
489 //printTubeSeg(Dws);
afac0af7 490 k = 0;
491 for(i=-1;i<2;i++){
fed42993 492 th = ((Double_t)(i+1))*TSCAngle*kRadian;
493 xo[k] = TSCRoutA*TMath::Sin(th) - 0.5*TSCoutSA*TMath::Cos(th);
494 yo[k] = TSCRoutA*TMath::Cos(th) + 0.5*TSCoutSA*TMath::Sin(th);
495 xi[k] = TSCRinA *TMath::Sin(th) - 0.5*TSCinLA *TMath::Cos(th);
496 yi[k] = TSCRinA *TMath::Cos(th) + 0.5*TSCinLA *TMath::Sin(th);
497 xbo[k] = TSCRoutB*TMath::Sin(th) - 0.5*TSCoutSB*TMath::Cos(th);
498 ybo[k] = TSCRoutB*TMath::Cos(th) + 0.5*TSCoutSB*TMath::Sin(th);
499 xbi[k] = TSCRinB *TMath::Sin(th) - 0.5*TSCinLB *TMath::Cos(th);
500 ybi[k] = TSCRinB *TMath::Cos(th) + 0.5*TSCinLB *TMath::Sin(th);
501 xco[k] = TSCRoutC*TMath::Sin(th) - 0.5*TSCoutSC*TMath::Cos(th);
502 yco[k] = TSCRoutC*TMath::Cos(th) + 0.5*TSCoutSC*TMath::Sin(th);
503 xci[k] = TSCRinC *TMath::Sin(th) - 0.5*TSCinLC *TMath::Cos(th);
504 yci[k] = TSCRinC *TMath::Cos(th) + 0.5*TSCinLC *TMath::Sin(th);
505 k++;
506 xo[k] = TSCRoutA*TMath::Sin(th) + 0.5*TSCoutSA*TMath::Cos(th);
507 yo[k] = TSCRoutA*TMath::Cos(th) - 0.5*TSCoutSA*TMath::Sin(th);
508 xi[k] = TSCRinA *TMath::Sin(th) + 0.5*TSCinLA *TMath::Cos(th);
509 yi[k] = TSCRinA *TMath::Cos(th) - 0.5*TSCinLA *TMath::Sin(th);
510 xbo[k] = TSCRoutB*TMath::Sin(th) + 0.5*TSCoutSB*TMath::Cos(th);
511 ybo[k] = TSCRoutB*TMath::Cos(th) - 0.5*TSCoutSB*TMath::Sin(th);
512 xbi[k] = TSCRinB *TMath::Sin(th) + 0.5*TSCinLB *TMath::Cos(th);
513 ybi[k] = TSCRinB *TMath::Cos(th) - 0.5*TSCinLB *TMath::Sin(th);
514 xco[k] = TSCRoutC*TMath::Sin(th) + 0.5*TSCoutSC*TMath::Cos(th);
515 yco[k] = TSCRoutC*TMath::Cos(th) - 0.5*TSCoutSC*TMath::Sin(th);
516 xci[k] = TSCRinC *TMath::Sin(th) + 0.5*TSCinLC *TMath::Cos(th);
517 yci[k] = TSCRinC *TMath::Cos(th) - 0.5*TSCinLC *TMath::Sin(th);
518 k++;
afac0af7 519 } // end for i
520 xo[6] = xo[5];
521 yo[6] = 0.0;
522 xi[6] = xi[5];
523 yi[6] = 0.0;
524 xbo[6] = xbo[5];
525 ybo[6] = 0.0;
526 xbi[6] = xbi[5];
527 ybi[6] = 0.0;
528 xco[6] = xco[5];
529 yco[6] = 0.0;
530 xci[6] = xci[5];
fed42993 531 yci[6] = 0.0;/*
532 cout.precision(4);
533 cout.width(7);
534 cout <<"i \t xo yo \t xi yi \t xbo ybo \t xbi ybi \t xco yco \t xci yxi"<<endl;
535 for(i=0;i<7;i++){
536 cout << i <<"\t"<<xo[i]<<","<<yo[i];
537 cout <<"\t"<<xi[i]<<","<<yi[i];
538 cout <<"\t"<<xbo[i]<<","<<ybo[i];
539 cout <<"\t"<<xbi[i]<<","<<ybi[i];
540 cout <<"\t"<<xco[i]<<","<<yco[i];
541 cout <<"\t"<<xci[i]<<","<<yci[i];
542 cout<<endl;} */
afac0af7 543 //+++++++++++++++++++++++++
544 A1->SetVertex(0,xo[0],yo[0]);
545 A1->SetVertex(1,xo[1],yo[1]);
546 A1->SetVertex(2,xi[1],yi[1]);
547 A1->SetVertex(3,xi[0],yi[0]);
548 //
549 A2->SetVertex(0,xo[1],yo[1]);
550 A2->SetVertex(1,xo[2],yo[2]);
551 A2->SetVertex(2,xi[2],yi[2]);
552 A2->SetVertex(3,xi[1],yi[1]);
553 //
554 A3->SetVertex(0,xo[5],yo[5]);
555 A3->SetVertex(1,xo[6],yo[6]);
556 A3->SetVertex(2,xi[6],yi[6]);
557 A3->SetVertex(3,xi[5],yi[5]);
558 //--------------------------
559 B1->SetVertex(0,xbo[0],ybo[0]);
560 B1->SetVertex(1,xbo[1],ybo[1]);
561 B1->SetVertex(2,xbi[1],ybi[1]);
562 B1->SetVertex(3,xbi[0],ybi[0]);
563 //
564 B2->SetVertex(0,xbo[1],ybo[1]);
565 B2->SetVertex(1,xbo[2],ybo[2]);
566 B2->SetVertex(2,xbi[2],ybi[2]);
567 B2->SetVertex(3,xbi[1],ybi[1]);
568 //
569 B3->SetVertex(0,xbo[5],ybo[5]);
570 B3->SetVertex(1,xbo[6],ybo[6]);
571 B3->SetVertex(2,xbi[6],ybi[6]);
572 B3->SetVertex(3,xbi[5],ybi[5]);
573 //--------------------------
574 C1->SetVertex(0,xco[0],yco[0]);
575 C1->SetVertex(1,xco[1],yco[1]);
576 C1->SetVertex(2,xci[1],yci[1]);
577 C1->SetVertex(3,xci[0],yci[0]);
578 //
579 C2->SetVertex(0,xco[1],yco[1]);
580 C2->SetVertex(1,xco[2],yco[2]);
581 C2->SetVertex(2,xci[2],yci[2]);
582 C2->SetVertex(3,xci[1],yci[1]);
583 //
584 C3->SetVertex(0,xco[5],yco[5]);
585 C3->SetVertex(1,xco[6],yco[6]);
586 C3->SetVertex(2,xci[6],yci[6]);
587 C3->SetVertex(3,xci[5],yci[5]);
588 // Defining the hole, filled with air
589 Double_t p1,c1,x,y;
590 p1 = (xo[0]-xi[0])/(yo[0]-yi[0]);
591 c1 = xo[0]+0.5*TSCarbonFiberThA*TMath::Sqrt(SQ(xo[0]-xi[0])+
fed42993 592 SQ(yo[0]-yi[0]))/(xo[0]-xi[0]);
afac0af7 593 y = TSCRoutA-2.*TSCarbonFiberThA;
594 x = p1*(y-yo[0])+c1;
595 Ah1->SetVertex(0,x,y);
596 Bh1->SetVertex(0,x,y);
597 Ch1->SetVertex(0,x,y);
598 y = TSCRinA+TSCarbonFiberThA;
599 x = p1*(y-yo[0])+c1;
600 Ah1->SetVertex(3,x,y);
601 Bh1->SetVertex(3,x,y);
602 Ch1->SetVertex(3,x,y);
603 p1 = (xo[1]-xi[1])/(yo[1]-yi[1]);
604 c1 = xo[1]-0.5*TSCarbonFiberThA*TMath::Sqrt(SQ(xo[1]-xi[1])+
fed42993 605 SQ(yo[1]-yi[1]))/(xo[1]-xi[1]);
afac0af7 606 y = TSCRoutA-2.*TSCarbonFiberThA;
607 x = p1*(y-yo[1])+c1;
608 Ah1->SetVertex(1,x,y);
609 Bh1->SetVertex(1,x,y);
610 Ch1->SetVertex(1,x,y);
611 y = TSCRinA+TSCarbonFiberThA;
612 x = p1*(y-yo[1])+c1;
613 Ah1->SetVertex(2,x,y);
614 Bh1->SetVertex(2,x,y);
615 Ch1->SetVertex(2,x,y);
616 //
617 // The easist way to get the points for the hole in volume A2 is to
618 // rotate it to the Y axis where the y coordinates are easier to know
619 // and then rotate it back.
620 Double_t xp,yp,xa,ya,xb,yb;
621 th = 0.5*TSCAngle*kRadian;
622 xa = TMath::Cos(th)*xo[1]-TMath::Sin(th)*yo[1];
623 ya = TMath::Sin(th)*xo[1]+TMath::Cos(th)*yo[1];
624 xb = TMath::Cos(th)*xi[1]-TMath::Sin(th)*yi[1];
625 yb = TMath::Sin(th)*xi[1]+TMath::Cos(th)*yi[1];
626 p1 = (xa-xb)/(ya-yb);
627 c1 = xa+0.5*TSCarbonFiberThA*TMath::Sqrt(SQ(xa-xb)+SQ(ya-yb))/(xa-xb);
628 y = ya-TSCarbonFiberThA;
629 x = p1*(y-ya)+c1;
630 xp = TMath::Cos(-th)*x-TMath::Sin(-th)*y;
631 yp = TMath::Sin(-th)*x+TMath::Cos(-th)*y;
632 Ah2->SetVertex(0,xp,yp);
633 Bh2->SetVertex(0,xp,yp);
634 Ch2->SetVertex(0,xp,yp);
635 y = yb+2.0*TSCarbonFiberThA;
636 x = p1*(y-ya)+c1;
637 xp = TMath::Cos(-th)*x-TMath::Sin(-th)*y;
638 yp = TMath::Sin(-th)*x+TMath::Cos(-th)*y;
639 Ah2->SetVertex(3,xp,yp);
640 Bh2->SetVertex(3,xp,yp);
641 Ch2->SetVertex(3,xp,yp);
fed42993 642 xa = TMath::Cos(th)*xo[2]-TMath::Sin(th)*yo[2];
643 ya = TMath::Sin(th)*xo[2]+TMath::Cos(th)*yo[2];
644 xb = TMath::Cos(th)*xi[2]-TMath::Sin(th)*yi[2];
645 yb = TMath::Sin(th)*xi[2]+TMath::Cos(th)*yi[2];
afac0af7 646 p1 = (xa-xb)/(ya-yb);
647 c1 = xa-0.5*TSCarbonFiberThA*TMath::Sqrt(SQ(xa-xb)+SQ(ya-yb))/(xa-xb);
648 y = ya-TSCarbonFiberThA;
649 x = p1*(y-ya)+c1;
650 xp = TMath::Cos(-th)*x-TMath::Sin(-th)*y;
651 yp = TMath::Sin(-th)*x+TMath::Cos(-th)*y;
652 Ah2->SetVertex(1,xp,yp);
653 Bh2->SetVertex(1,xp,yp);
654 Ch2->SetVertex(1,xp,yp);
655 y = yb+2.0*TSCarbonFiberThA;
656 x = p1*(y-ya)+c1;
657 xp = TMath::Cos(-th)*x-TMath::Sin(-th)*y;
658 yp = TMath::Sin(-th)*x+TMath::Cos(-th)*y;
659 Ah2->SetVertex(2,xp,yp);
660 Bh2->SetVertex(2,xp,yp);
661 Ch2->SetVertex(2,xp,yp);
662 //
663 p1 = (yo[5]-yi[5])/(xo[5]-xi[5]);
664 c1 = yo[5]+0.5*TSCarbonFiberThA*TMath::Sqrt(SQ(yo[5]-yi[5])+
fed42993 665 SQ(xo[5]-xi[5]))/(yo[5]-yi[5]);
afac0af7 666 x = xo[5]-TSCarbonFiberThA;
667 y = p1*(x-xo[5])+c1;
668 Ah3->SetVertex(0,x,y);
669 Bh3->SetVertex(0,x,y);
670 Ch3->SetVertex(0,x,y);
671 x = xi[5]+2.0*TSCarbonFiberThA;
672 y = p1*(x-xo[5])+c1;
673 Ah3->SetVertex(3,x,y);
674 Bh3->SetVertex(3,x,y);
675 Ch3->SetVertex(3,x,y);
676 y = 2.0*TSCarbonFiberThA;
677 x = xo[5]-TSCarbonFiberThA;
678 Ah3->SetVertex(1,x,y);
679 Bh3->SetVertex(1,x,y);
680 y = 2.0*TSCarbonFiberThA;
681 x = xi[5]+2.0*TSCarbonFiberThA;
682 Ah3->SetVertex(2,x,y);
683 Bh3->SetVertex(2,x,y);
684 Ch3->SetVertex(2,x,y);
685 //
686 for(i=0;i<4;i++){ // define points at +dz
fed42993 687 A1->SetVertex(i+4,(A1->GetVertices())[2*i],(A1->GetVertices())[1+2*i]);
688 A2->SetVertex(i+4,(A2->GetVertices())[2*i],(A2->GetVertices())[1+2*i]);
689 A3->SetVertex(i+4,(A3->GetVertices())[2*i],(A3->GetVertices())[1+2*i]);
690 //
691 B1->SetVertex(i+4,(B1->GetVertices())[2*i],(B1->GetVertices())[1+2*i]);
692 B2->SetVertex(i+4,(B2->GetVertices())[2*i],(B2->GetVertices())[1+2*i]);
693 B3->SetVertex(i+4,(B3->GetVertices())[2*i],(B3->GetVertices())[1+2*i]);
694 // C's are a cone which must match up with B's.
695 C1->SetVertex(i+4,(B1->GetVertices())[2*i],(B1->GetVertices())[1+2*i]);
696 C2->SetVertex(i+4,(B2->GetVertices())[2*i],(B2->GetVertices())[1+2*i]);
697 C3->SetVertex(i+4,(B3->GetVertices())[2*i],(B3->GetVertices())[1+2*i]);
698 //
699 Ah1->SetVertex(i+4,(Ah1->GetVertices())[2*i],
700 (Ah1->GetVertices())[1+2*i]);
701 Ah2->SetVertex(i+4,(Ah2->GetVertices())[2*i],
702 (Ah2->GetVertices())[1+2*i]);
703 Ah3->SetVertex(i+4,(Ah3->GetVertices())[2*i],
704 (Ah3->GetVertices())[1+2*i]);
705 //
706 Bh1->SetVertex(i+4,(Bh1->GetVertices())[2*i],
707 (Bh1->GetVertices())[1+2*i]);
708 Bh2->SetVertex(i+4,(Bh2->GetVertices())[2*i],
709 (Bh2->GetVertices())[1+2*i]);
710 Bh3->SetVertex(i+4,(Bh3->GetVertices())[2*i],
711 (Bh3->GetVertices())[1+2*i]);
afac0af7 712 } // end for
171f3f35 713 //printArb8(A1);
714 //printArb8(Ah1);
715 //printArb8(A2);
716 //printArb8(Ah2);
717 //printArb8(A3);
718 //printArb8(Ah3);
719 //printArb8(B1);
720 //printArb8(Bh1);
721 //printArb8(B2);
722 //printArb8(Bh2);
723 //printArb8(B3);
724 //printArb8(Bh3);
afac0af7 725 //
726 p1 = (xco[0]-xci[0])/(yco[0]-yci[0]);
727 c1 = xco[0]+0.5*TSCarbonFiberThA*TMath::Sqrt(SQ(xco[0]-xci[0])+
fed42993 728 SQ(yco[0]-yci[0]))/(xco[0]-xci[0]);
afac0af7 729 y = TSCRoutC-2.*TSCarbonFiberThA;
730 x = p1*(y-yco[0])+c1;
731 Ch1->SetVertex(4,x,y);
732 y = TSCRinC+TSCarbonFiberThA;
733 x = p1*(y-yci[0])+c1;
734 Ch1->SetVertex(6,x,y);
735 p1 = (xco[1]-xci[1])/(yco[1]-yci[1]);
736 c1 = xco[1]-0.5*TSCarbonFiberThA*TMath::Sqrt(SQ(xco[1]-xci[1])+
fed42993 737 SQ(yco[1]-yci[1]))/(xco[1]-xci[1]);
afac0af7 738 y = TSCRoutC-2.*TSCarbonFiberThA;
739 x = p1*(y-yco[1])+c1;
740 Ch1->SetVertex(5,x,y);
741 y = TSCRinC+TSCarbonFiberThA;
742 x = p1*(y-yci[1])+c1;
743 Ch1->SetVertex(7,x,y);
744 //
745 th = 0.5*TSCAngle*kRadian;
746 xa = TMath::Cos(th)*xco[1]-TMath::Sin(th)*yco[1];
747 ya = TMath::Sin(th)*xco[1]+TMath::Cos(th)*yco[1];
748 xb = TMath::Cos(th)*xci[1]-TMath::Sin(th)*yci[1];
749 yb = TMath::Sin(th)*xci[1]+TMath::Cos(th)*yci[1];
750 p1 = (xa-xb)/(ya-yb);
751 c1 = xa+0.5*TSCarbonFiberThA*TMath::Sqrt(SQ(xa-xb)+SQ(ya-yb))/(xa-xb);
752 y = ya-TSCarbonFiberThA;
753 x = p1*(y-ya)+c1;
754 xp = TMath::Cos(-th)*x-TMath::Sin(-th)*y;
755 yp = TMath::Sin(-th)*x+TMath::Cos(-th)*y;
756 yp = ya-TSCarbonFiberThA;
757 xp = p1*(y-ya)+c1;
758 Ch2->SetVertex(4,xp,yp);
759 y = yb+2.0*TSCarbonFiberThA;
760 x = p1*(y-ya)+c1;
761 xp = TMath::Cos(-th)*x-TMath::Sin(-th)*y;
762 yp = TMath::Sin(-th)*x+TMath::Cos(-th)*y;
763 Ch2->SetVertex(6,xp,yp);
764 xa = TMath::Cos(th)*xco[2]-TMath::Sin(th)*yco[2];
765 ya = TMath::Sin(th)*xco[2]+TMath::Cos(th)*yco[2];
766 xb = TMath::Cos(th)*xci[2]-TMath::Sin(th)*yci[2];
767 yb = TMath::Sin(th)*xci[2]+TMath::Cos(th)*yci[2];
768 p1 = (xa-xb)/(ya-yb);
769 c1 = xa-0.5*TSCarbonFiberThA*TMath::Sqrt(SQ(xa-xb)+SQ(ya-yb))/(xa-xb);
770 y = ya-TSCarbonFiberThA;
771 x = p1*(y-ya)+c1;
772 xp = TMath::Cos(-th)*x-TMath::Sin(-th)*y;
773 yp = TMath::Sin(-th)*x+TMath::Cos(-th)*y;
774 Ch2->SetVertex(5,xp,yp);
775 y = yb+2.0*TSCarbonFiberThA;
776 x = p1*(y-ya)+c1;
777 xp = TMath::Cos(-th)*x-TMath::Sin(-th)*y;
778 yp = TMath::Sin(-th)*x+TMath::Cos(-th)*y;
779 Ch2->SetVertex(7,xp,yp);
780 //
781 p1 = (yco[5]-yci[5])/(xco[5]-xci[5]);
782 c1 = yco[5]+0.5*TSCarbonFiberThA*TMath::Sqrt(SQ(yco[5]-yci[5])+
fed42993 783 SQ(xco[5]-xci[5]))/(yco[5]-yci[5]);
afac0af7 784 x = xco[5]-TSCarbonFiberThA;
785 y = p1*(x-xco[5])+c1;
786 Ch3->SetVertex(4,x,y);
787 x = xci[5]+2.0*TSCarbonFiberThA;
788 y = p1*(x-xci[5])+c1;
789 Ch3->SetVertex(6,x,y);
790 y = 2.0*TSCarbonFiberThA;
791 x = xco[5]-TSCarbonFiberThA;
792 Ch3->SetVertex(5,x,y);
793 y = 2.0*TSCarbonFiberThA;
794 x = xci[5]+2.0*TSCarbonFiberThA;
795 Ch3->SetVertex(7,x,y);
171f3f35 796 //printArb8(C1);
797 //printArb8(Ch1);
798 //printArb8(C2);
799 //printArb8(Ch2);
800 //printArb8(C3);
801 //printArb8(Ch3);
afac0af7 802 //
803 // Define Minimal volume to inclose this SPD Thermal Sheald.
804 M1 = new TGeoPcon("ITSspdShealdVV",0.0,360.0,9);
805 M1->Z(0) = 0.5*TSCLengthA+TSCLengthB;
806 M1->Rmin(0) = TSCRinB;
807 x = B1->GetVertices()[0]; // [0][0]
808 y = B1->GetVertices()[1]; // [0][1]
809 M1->Rmax(0) = TMath::Sqrt(x*x+y*y);
810 M1->Z(1) = M1->GetZ(0)-TSCLengthB;
811 M1->Rmin(1) = M1->GetRmin(0);
812 M1->Rmax(1) = M1->GetRmax(0);
fed42993 813 M1->Z(2) = M1->GetZ(1);
afac0af7 814 M1->Rmin(2) = TSCRinA;
815 x = A1->GetVertices()[0]; // [0]0]
816 y = A1->GetVertices()[1]; // [0][1]
817 M1->Rmax(2) = TMath::Sqrt(x*x+y*y);
818 M1->Z(3) = -(M1->GetZ(0)-TSCLengthB);
819 M1->Rmin(3) = M1->GetRmin(2);
820 M1->Rmax(3) = M1->GetRmax(2);
fed42993 821 M1->Z(4) = M1->GetZ(3);
afac0af7 822 M1->Rmin(4) = M1->GetRmin(1);
823 M1->Rmax(4) = M1->GetRmax(1);
824 M1->Z(5) = -(M1->GetZ(0));
825 M1->Rmin(5) = M1->GetRmin(0);
826 M1->Rmax(5) = M1->GetRmax(0);
fed42993 827 M1->Z(6) = M1->GetZ(5) - TSCLengthC;
afac0af7 828 M1->Rmin(6) = TSCRinC;
829 x = C1->GetVertices()[0]; // [0][0]
830 y = C1->GetVertices()[1]; // [0][1]
831 M1->Rmax(6) = TMath::Sqrt(x*x+y*y);
fed42993 832 M1->Z(7) = M1->GetZ(6);
afac0af7 833 M1->Rmin(7) = D->GetRmin();
834 M1->Rmax(7) = D->GetRmax();
fed42993 835 M1->Z(8) = M1->Z(7) - TSCLengthD;
afac0af7 836 M1->Rmin(8) = M1->GetRmin(7);
837 M1->Rmax(8) = M1->GetRmax(7);
838 M2 = new TGeoTubeSeg("ITSspdShealdWingVV",
fed42993 839 M1->GetRmax(8),Dw->GetRmax(),Dw->GetDz(),Dw->GetPhi1(),Dw->GetPhi2());
171f3f35 840 //printTubeSeg(M2);
afac0af7 841 //
fed42993 842 x = 0.5*(M1->GetZ(8) + M1->GetZ(7));
843 tranITSspdShealdVVt0 = new TGeoTranslation("ITSspdShealdVVt0",0.0,0.0,x);
844 tranITSspdShealdVVt0->RegisterYourself();
845 TGeoRotation rotz90("",0.0,0.0,90.0); // never registered.
846 rotITSspdShealdVVt1 = new TGeoCombiTrans(*tranITSspdShealdVVt0,rotz90);
847 rotITSspdShealdVVt1->SetName("ITSspdShealdVVt1");
848 rotITSspdShealdVVt1->RegisterYourself();
849 TGeoRotation rotz180("",0.0,0.0,180.0); // never registered
850 rotITSspdShealdVVt2 = new TGeoCombiTrans(*tranITSspdShealdVVt0,rotz180);
851 rotITSspdShealdVVt2->SetName("ITSspdShealdVVt2");
852 rotITSspdShealdVVt2->RegisterYourself();
853 TGeoRotation rotz270("",0.0,0.0,270.0); // never registered
854 rotITSspdShealdVVt3 = new TGeoCombiTrans(*tranITSspdShealdVVt0,rotz270);
855 rotITSspdShealdVVt3->SetName("ITSspdShealdVVt3");
856 rotITSspdShealdVVt3->RegisterYourself();
afac0af7 857 M = new TGeoCompositeShape("ITS SPD Thermal sheald volume",
fed42993 858 "ITSspdShealdVV+"
859 "ITSspdShealdWingVV:ITSspdShealdVVt0+"
860 "ITSspdShealdWingVV:ITSspdShealdVVt1+"
861 "ITSspdShealdWingVV:ITSspdShealdVVt2+"
862 "ITSspdShealdWingVV:ITSspdShealdVVt3");
afac0af7 863 //
864 TGeoManager *mgr = gGeoManager;
865 SPDcf = mgr->GetMedium("ITSspdCarbonFiber");
866 SPDfs = mgr->GetMedium("ITSspdStaselite4411w");
867 SPDfo = mgr->GetMedium("ITSspdRohacell50A");
868 SPDss = mgr->GetMedium("ITSspdStainlessSteal");
869 SPDair= mgr->GetMedium("ITSspdAir");
870 TGeoVolume *A1v,*A2v,*A3v,*Ah1v,*Ah2v,*Ah3v;
871 TGeoVolume *B1v,*B2v,*B3v,*Bh1v,*Bh2v,*Bh3v;
872 TGeoVolume *C1v,*C2v,*C3v,*Ch1v,*Ch2v,*Ch3v;
873 TGeoVolume *Dv,*Dsv,*Dwv,*Dwsv,*Mv;
874 Mv = new TGeoVolume("ITSspdThermalSheald",M,SPDair);
fed42993 875 Mv->SetVisibility(kTRUE);
876 Mv->SetLineColor(7); // light Blue
877 Mv->SetLineWidth(1);
878 Mv->SetFillColor(Mv->GetLineColor());
879 Mv->SetFillStyle(4090); // 90% transparent
afac0af7 880 Moth->AddNode(Mv,1,0); ///////////////////// Virtual Volume ////////
881 A1v = new TGeoVolume("ITSspdCentCylA1CF",A1,SPDcf);
882 A1v->SetVisibility(kTRUE);
fed42993 883 A1v->SetLineColor(4);
afac0af7 884 A1v->SetLineWidth(1);
885 A2v = new TGeoVolume("ITSspdCentCylA2CF",A2,SPDcf);
886 A2v->SetVisibility(kTRUE);
fed42993 887 A2v->SetLineColor(4);
afac0af7 888 A2v->SetLineWidth(1);
889 A3v = new TGeoVolume("ITSspdCentCylA3CF",A3,SPDcf);
890 A3v->SetVisibility(kTRUE);
fed42993 891 A3v->SetLineColor(4);
afac0af7 892 A3v->SetLineWidth(1);
893 B1v = new TGeoVolume("ITSspdCentCylB1CF",B1,SPDcf);
894 B1v->SetVisibility(kTRUE);
fed42993 895 B1v->SetLineColor(4);
afac0af7 896 B1v->SetLineWidth(1);
897 B2v = new TGeoVolume("ITSspdCentCylB2CF",B2,SPDcf);
898 B2v->SetVisibility(kTRUE);
fed42993 899 B2v->SetLineColor(4);
afac0af7 900 B2v->SetLineWidth(1);
901 B3v = new TGeoVolume("ITSspdCentCylB3CF",B3,SPDcf);
902 B3v->SetVisibility(kTRUE);
fed42993 903 B3v->SetLineColor(4);
afac0af7 904 B3v->SetLineWidth(1);
905 C1v = new TGeoVolume("ITSspdCentCylC1CF",C1,SPDcf);
906 C1v->SetVisibility(kTRUE);
fed42993 907 C1v->SetLineColor(4);
afac0af7 908 C1v->SetLineWidth(1);
909 C2v = new TGeoVolume("ITSspdCentCylC2CF",C2,SPDcf);
910 C2v->SetVisibility(kTRUE);
fed42993 911 C2v->SetLineColor(4);
afac0af7 912 C2v->SetLineWidth(1);
913 C3v = new TGeoVolume("ITSspdCentCylC3CF",C3,SPDcf);
914 C3v->SetVisibility(kTRUE);
fed42993 915 C3v->SetLineColor(4);
afac0af7 916 C3v->SetLineWidth(1);
917 Ah1v = new TGeoVolume("ITSspdCentCylA1AirA",Ah1,SPDair);
fed42993 918 Ah1v->SetVisibility(kTRUE);
919 Ah1v->SetLineColor(5); // Yellow
920 Ah1v->SetFillColor(Ah1v->GetLineColor());
921 Ah1v->SetFillStyle(4090); // 90% transparent
afac0af7 922 Ah2v = new TGeoVolume("ITSspdCentCylA2AirA",Ah2,SPDair);
fed42993 923 Ah2v->SetVisibility(kTRUE);
924 Ah2v->SetLineColor(5); // Yellow
925 Ah2v->SetFillColor(Ah2v->GetLineColor());
926 Ah2v->SetFillStyle(4090); // 90% transparent
afac0af7 927 Ah3v = new TGeoVolume("ITSspdCentCylA3AirA",Ah3,SPDair);
fed42993 928 Ah3v->SetVisibility(kTRUE);
929 Ah3v->SetLineColor(5); // Yellow
930 Ah3v->SetFillColor(Ah3v->GetLineColor());
931 Ah3v->SetFillStyle(4090); // 90% transparent
afac0af7 932 Bh1v = new TGeoVolume("ITSspdCentCylA1AirB",Bh1,SPDair);
fed42993 933 Bh1v->SetVisibility(kTRUE);
934 Bh1v->SetLineColor(5); // Yellow
935 Bh1v->SetFillColor(Bh1v->GetLineColor());
936 Bh1v->SetFillStyle(4090); // 90% transparent
afac0af7 937 Bh2v = new TGeoVolume("ITSspdCentCylA2AirB",Bh2,SPDair);
fed42993 938 Bh2v->SetVisibility(kTRUE);
939 Bh2v->SetLineColor(5); // Yellow
940 Bh2v->SetFillColor(Bh2v->GetLineColor());
941 Bh2v->SetFillStyle(4090); // 90% transparent
afac0af7 942 Bh3v = new TGeoVolume("ITSspdCentCylA3AirB",Bh3,SPDair);
fed42993 943 Bh3v->SetVisibility(kTRUE);
944 Bh3v->SetLineColor(5); // Yellow
945 Bh3v->SetFillColor(Bh3v->GetLineColor());
946 Bh3v->SetFillStyle(4090); // 90% transparent
afac0af7 947 Ch1v = new TGeoVolume("ITSspdCentCylA1AirC",Ch1,SPDair);
fed42993 948 Ch1v->SetVisibility(kTRUE);
949 Ch1v->SetLineColor(5); // Yellow
950 Ch1v->SetFillColor(Ch1v->GetLineColor());
951 Ch1v->SetFillStyle(4090); // 90% transparent
afac0af7 952 Ch2v = new TGeoVolume("ITSspdCentCylA2AirC",Ch2,SPDair);
fed42993 953 Ch2v->SetVisibility(kTRUE);
954 Ch2v->SetLineColor(5); // Yellow
955 Ch2v->SetFillColor(Ch2v->GetLineColor());
956 Ch2v->SetFillStyle(4090); // 90% transparent
afac0af7 957 Ch3v = new TGeoVolume("ITSspdCentCylA3AirC",Ch3,SPDair);
fed42993 958 Ch3v->SetVisibility(kTRUE);
959 Ch3v->SetLineColor(5); // Yellow
960 Ch3v->SetFillColor(Ch3v->GetLineColor());
961 Ch3v->SetFillStyle(4090); // 90% transparent
afac0af7 962 Dv = new TGeoVolume("ITSspdCentCylA1CD",D,SPDcf);
963 Dv->SetVisibility(kTRUE);
fed42993 964 Dv->SetLineColor(4);
afac0af7 965 Dv->SetLineWidth(1);
966 Dwv = new TGeoVolume("ITSspdCentCylA1CDw",Dw,SPDcf);
967 Dwv->SetVisibility(kTRUE);
fed42993 968 Dwv->SetLineColor(4);
afac0af7 969 Dwv->SetLineWidth(1);
970 Dsv = new TGeoVolume("ITSspdCentCylA1Dfill",Ds,SPDfs);
fed42993 971 Dsv->SetVisibility(kTRUE);
972 Dsv->SetLineColor(3); // Green
973 Dsv->SetFillColor(Dsv->GetLineColor());
974 Dsv->SetFillStyle(4010); // 10% transparent
afac0af7 975 Dwsv = new TGeoVolume("ITSspdCentCylA1DwingFill",Dws,SPDfs);
fed42993 976 Dwsv->SetVisibility(kTRUE);
977 Dwsv->SetLineColor(3); // Green
978 Dwsv->SetFillColor(Dwsv->GetLineColor());
979 Dwsv->SetFillStyle(4010); // 10% transparent
afac0af7 980 //
981 A1v->AddNode(Ah1v,1,0);
982 A2v->AddNode(Ah2v,1,0);
983 A3v->AddNode(Ah3v,1,0);
984 B1v->AddNode(Bh1v,1,0);
985 B2v->AddNode(Bh2v,1,0);
986 B3v->AddNode(Bh3v,1,0);
987 C1v->AddNode(Ch1v,1,0);
988 C2v->AddNode(Ch2v,1,0);
989 C3v->AddNode(Ch3v,1,0);
990 Dv ->AddNode(Dsv ,1,0);
991 Dwv->AddNode(Dwsv,1,0);
992 //
993 Mv->AddNode(A1v,1,0);
994 Mv->AddNode(A2v,1,0);
995 Mv->AddNode(A3v,1,0);
fed42993 996 tranb = new TGeoTranslation("",0.0,0.0,0.5*(TSCLengthA+TSCLengthB));
997 tranbm = new TGeoTranslation("",0.0,0.0,0.5*(-TSCLengthA-TSCLengthB));
afac0af7 998 Mv->AddNode(B1v,1,tranb);
999 Mv->AddNode(B2v,1,tranb);
1000 Mv->AddNode(B3v,1,tranb);
1001 Mv->AddNode(B1v,2,tranbm);
1002 Mv->AddNode(B2v,2,tranbm);
1003 Mv->AddNode(B3v,2,tranbm);
1004 // Muon side (rb26) is at -Z.
fed42993 1005 tranc = new TGeoTranslation("",0.0,0.0,
1006 0.5*(-TSCLengthA-TSCLengthB-TSCLengthC));
afac0af7 1007 Mv->AddNode(C1v,1,tranc);
1008 Mv->AddNode(C2v,1,tranc);
1009 Mv->AddNode(C3v,1,tranc);
fed42993 1010 Mv->AddNode(Dv,1,tranITSspdShealdVVt0);
1011 Mv->AddNode(Dwv,1,tranITSspdShealdVVt0);
1012 Mv->AddNode(Dwv,2,rotITSspdShealdVVt1);
1013 Mv->AddNode(Dwv,3,rotITSspdShealdVVt2);
1014 Mv->AddNode(Dwv,4,rotITSspdShealdVVt3);
1015 k=2;
afac0af7 1016 for(i=1;i<10;i++) {
fed42993 1017 th = ((Double_t)i)*TSCAngle*kDegree;
1018 rot = new TGeoRotation("",0.0,0.0,th);
1019 Mv->AddNode(A1v,i+1,rot);
1020 Mv->AddNode(B1v,i+2,new TGeoCombiTrans(*tranb,*rot));
1021 Mv->AddNode(B1v,i+12,new TGeoCombiTrans(*tranbm,*rot));
1022 Mv->AddNode(C1v,i+1,new TGeoCombiTrans(*tranc,*rot));
1023 if(i!=0||i!=2||i!=7){
1024 Mv->AddNode(A2v,k++,rot);
1025 Mv->AddNode(B2v,k++,new TGeoCombiTrans(*tranb,*rot));
1026 Mv->AddNode(B2v,k++,new TGeoCombiTrans(*tranbm,*rot));
1027 Mv->AddNode(C2v,k++,new TGeoCombiTrans(*tranc,*rot));
1028 } // end if
1029 if(i==5) {
1030 Mv->AddNode(A3v,2,rot);
1031 Mv->AddNode(B3v,3,new TGeoCombiTrans(*tranb,*rot));
1032 Mv->AddNode(B3v,4,new TGeoCombiTrans(*tranbm,*rot));
1033 Mv->AddNode(C3v,2,new TGeoCombiTrans(*tranc,*rot));
1034 } // end if
afac0af7 1035 } // end for i
1036 rot = new TGeoRotation("",180.,0.0,0.0);
1037 Mv->AddNode(A3v,3,rot);
fed42993 1038 Mv->AddNode(B3v,5,new TGeoCombiTrans(*tranb,*rot));
1039 Mv->AddNode(B3v,6,new TGeoCombiTrans(*tranbm,*rot));
1040 Mv->AddNode(C3v,3,new TGeoCombiTrans(*tranc,*rot));
afac0af7 1041 rot = new TGeoRotation("",180.,0.0,180.0);
1042 Mv->AddNode(A3v,4,rot);
fed42993 1043 Mv->AddNode(B3v,7,new TGeoCombiTrans(*tranb,*rot));
1044 Mv->AddNode(B3v,8,new TGeoCombiTrans(*tranbm,*rot));
1045 Mv->AddNode(C3v,4,new TGeoCombiTrans(*tranc,*rot));
541f7ba6 1046}
1047//______________________________________________________________________
1048void AliITSv11::SDDCone(TGeoVolume *Moth){
1049 // Define the detail SDD support cone geometry.
1050 // Inputs:
1051 // none.
1052 // Outputs:
1053 // none.
1054 // Return:
1055 // none.
afac0af7 1056 //
1057 // From Cilindro Centrale - Lavorazioni, ALR 0816/1 04/08/03 File
1058 // name SDD/Cilindro.hpgl
1059 const Double_t TSLength = 790.0*kmm; // Thermal Sheeld length
1060 const Double_t TSInsertoLength= 15.0*kmm; // ????
171f3f35 1061 const Double_t TSOuterR = 0.5*(220.+10.)*kmm; // ????
1062 const Double_t TSInnerR = 0.5*(220.-10.)*kmm; // ????
afac0af7 1063 const Double_t TSCarbonFiberth= 0.02*kmm; // ????
1064 const Double_t TSBoltDiameter = 6.0*kmm; // M6 screw
1065 const Double_t TSBoltDepth = 6.0*kmm; // in volume C
1066 const Double_t TSBoltRadius = 0.5*220.*kmm; // Radius in volume C
1067 const Double_t TSBoltAngle0 = 0.0*kDegree; // Angle in volume C
1068 const Double_t TSBoltdAngle = 30.0*kDegree; // Angle in Volume C
1069 Double_t x,y,z,t;
171f3f35 1070 Int_t i,n;
afac0af7 1071 TGeoTube *A,*B,*C,*D;
1072 TGeoTranslation *tran;
1073 TGeoRotation *rot;
1074 TGeoCombiTrans *rotran;
1075 TGeoMedium *SDDcf,*SDDfs,*SDDfo,*SDDss;
1076
1077 A = new TGeoTube("ITS SDD Central Cylinder",TSInnerR,TSOuterR,.5*TSLength);
1078 B = new TGeoTube("ITS SDD CC Foam",TSInnerR+TSCarbonFiberth,
fed42993 1079 TSOuterR-TSCarbonFiberth,
1080 0.5*(TSLength-2.0*TSInsertoLength));
afac0af7 1081 C = new TGeoTube("ITS SDD CC Inserto",TSInnerR+TSCarbonFiberth,
171f3f35 1082 TSOuterR-TSCarbonFiberth,0.5*TSLength);
afac0af7 1083 D = new TGeoTube("ITS SDD CC M6 bolt end",0.0,0.5*TSBoltDiameter,
fed42993 1084 0.5*TSBoltDepth);
171f3f35 1085 printTube(A);
1086 printTube(B);
1087 printTube(C);
1088 printTube(D);
afac0af7 1089 //
1090 TGeoManager *mgr = gGeoManager;
1091 SDDcf = mgr->GetMedium("ITSssdCarbonFiber");
1092 SDDfs = mgr->GetMedium("ITSssdStaselite4411w");
1093 SDDfo = mgr->GetMedium("ITSssdRohacell50A");
1094 SDDss = mgr->GetMedium("ITSssdStainlessSteal");
1095 TGeoVolume *Av,*Bv,*Cv,*Dv;
1096 Av = new TGeoVolume("ITSsddCentCylCF",A,SDDcf);
1097 Av->SetVisibility(kTRUE);
171f3f35 1098 Av->SetLineColor(4);
afac0af7 1099 Av->SetLineWidth(1);
171f3f35 1100 Av->SetFillColor(Av->GetLineColor());
1101 Av->SetFillStyle(4000); // 0% transparent
afac0af7 1102 Bv = new TGeoVolume("ITSsddCentCylF",B,SDDfo);
171f3f35 1103 Bv->SetVisibility(kTRUE);
1104 Bv->SetLineColor(3);
1105 Bv->SetLineWidth(1);
1106 Bv->SetFillColor(Bv->GetLineColor());
1107 Bv->SetFillStyle(4000); // 0% transparent
1108 Cv = new TGeoVolume("ITSsddCentCylSt",C,SDDfs);
1109 Cv->SetVisibility(kTRUE);
1110 Cv->SetLineColor(2);
1111 Cv->SetLineWidth(1);
1112 Cv->SetFillColor(Cv->GetLineColor());
1113 Cv->SetFillStyle(4000); // 0% transparent
1114 Dv = new TGeoVolume("ITSsddCentCylSS",D,SDDss);
1115 Dv->SetVisibility(kTRUE);
1116 Dv->SetLineColor(1);
1117 Dv->SetLineWidth(1);
1118 Dv->SetFillColor(Dv->GetLineColor());
1119 Dv->SetFillStyle(4000); // 0% transparent
afac0af7 1120 //
1121 Moth->AddNode(Av,1,0);
171f3f35 1122 Av->AddNode(Cv,1,0);
1123 Cv->AddNode(Bv,1,0);
1124 n = (Int_t)((360.*kDegree)/TSBoltdAngle);
1125 for(i=0;i<n;i++){
fed42993 1126 t = TSBoltAngle0+((Double_t)i)*TSBoltdAngle;
1127 x = TSBoltRadius*TMath::Cos(t*kRadian);
1128 y = TSBoltRadius*TMath::Sin(t*kRadian);
171f3f35 1129 z = 0.5*(TSLength-TSBoltDepth);
fed42993 1130 tran = new TGeoTranslation("",x,y,z);
1131 Cv->AddNode(Dv,i+1,tran);
171f3f35 1132 tran = new TGeoTranslation("",x,y,-z);
1133 Cv->AddNode(Dv,i+n+1,tran);
afac0af7 1134 } // end for i
171f3f35 1135 // SDD Suport Cone
1136 //
1137 //
1138 const Double_t Thickness = 10.5*kmm; // Thickness of Rohacell+carbon fiber
1139 const Double_t Cthick = 1.5*kmm; // Carbon finber thickness
1140 const Double_t Rcurv = 15.0*kmm; // Radius of curvature.
1141 const Double_t Tc = 45.0; // angle of SSD cone [degrees].
1142 const Double_t Sintc = TMath::Sin(Tc*TMath::DegToRad());
1143 const Double_t Costc = TMath::Cos(Tc*TMath::DegToRad());
1144 const Double_t Tantc = TMath::Tan(Tc*TMath::DegToRad());
1145 const Double_t ZouterMilled = 23.0*kmm;
1146 const Double_t Zcylinder = 186.0*kmm;
1147 const Double_t Z0 = Zcylinder + 0.5*TSLength;
1148 //const Int_t Nspoaks = 12;
1149 //const Int_t Nmounts = 4;
1150 //const Double_t DmountAngle = 9.0; // degrees
1151 const Double_t RoutMax = 0.5*560.0*kmm;
1152 //const Double_t RoutHole = 0.5*965.0*kmm;
1153 const Double_t RoutMin = 0.5*539.0*kmm;
1154 const Double_t RholeMaxOut = 214.5*kmm;
1155 const Double_t RholeMaxIn = 115.5*kmm;
1156 //const Double_t RholeMin = 0.5*740.0*kmm;
1157 //const Double_t RpostMin = 316.0*kmm;
1158 const Int_t NpostsOut = 6;
1159 const Int_t NpostsIn = 3;
1160 const Double_t Phi0PostOut = 0.0; // degree
1161 const Double_t Phi0PostIn = 0.0; // degree
1162 const Double_t dRpostOut = 16.0*kmm;
1163 const Double_t dRpostIn = 16.0*kmm;
1164 const Double_t ZpostMaxOut = 116.0*kmm;
1165 const Double_t ZpostMaxIn = 190.0*kmm;
1166 const Double_t RinMax = 0.5*216*kmm;
1167 const Double_t RinCylinder = 0.5*231.0*kmm;
1168 const Double_t RinHole = 0.5*220.0*kmm;
1169 const Double_t RinMin = 0.5*210.0*kmm;
1170 const Double_t dZin = 15.0*kmm; // ???
1171 //
1172 Double_t dza = Thickness/Sintc-(RoutMax-RoutMin)/Tantc;
1173 Double_t Z,Rmin,Rmax; // Temp variables.
1174 if(dza<=0){ // The number or order of the points are in error for a proper
1175 // call to pcons!
1176 Error("SDDcone","The definition of the points for a call to PCONS is"
1177 " in error. abort.");
1178 return;
1179 } // end if
1180 TGeoPcon *E = new TGeoPcon("ITS SDD Suport cone Carbon Fiber Surface outer",
1181 0.0,360.0,12);
1182 E->Z(0) = 0.0;
1183 E->Rmin(0) = RoutMin;
1184 E->Rmax(0) = RoutMax;
1185 E->Z(1) = ZouterMilled - dza;
1186 E->Rmin(1) = E->GetRmin(0);
1187 E->Rmax(1) = E->GetRmax(0);
1188 E->Z(2) = ZouterMilled;
1189 E->Rmax(2) = E->GetRmax(0);
1190 RadiusOfCurvature(Rcurv,0.,E->GetZ(1),E->GetRmin(1),Tc,Z,Rmin);
1191 E->Z(3) = Z;
1192 E->Rmin(3) = Rmin;
1193 E->Rmin(2) = RminFrom2Points(E,3,1,E->GetZ(2));
1194 RadiusOfCurvature(Rcurv,0.,E->GetZ(2),E->GetRmax(2),Tc,Z,Rmax);
1195 E->Z(4) = Z;
1196 E->Rmax(4) = Rmax;
1197 E->Rmin(4) = RminFromZpCone(E,Tc,E->GetZ(4),0.0);
1198 E->Rmax(3) = RmaxFrom2Points(E,4,2,E->GetZ(3));
1199 E->Rmin(7) = RinMin;
1200 E->Rmin(8) = RinMin;
1201 RadiusOfCurvature(Rcurv,90.0,0.0,RinMax,90.0-Tc,Z,Rmax);
1202 E->Rmax(8) = Rmax;
1203 E->Z(8) = ZFromRmaxpCone(E,Tc,E->GetRmax(8));
1204 E->Z(9) = Zcylinder;
1205 E->Rmin(9) = RinMin;
1206 E->Z(10) = E->GetZ(9);
1207 E->Rmin(10) = RinCylinder;
1208 E->Rmin(11) = RinCylinder;
1209 E->Rmax(11) = E->GetRmin(11);
1210 Rmin = E->GetRmin(8);
1211 RadiusOfCurvature(Rcurv,90.0-Tc,E->GetZ(8),E->GetRmax(8),90.0,Z,Rmax);
1212 Rmax = RinMax;
1213 E->Z(11) = Z+(E->GetZ(8)-Z)*(E->GetRmax(11)-Rmax)/(E->GetRmax(8)-Rmax);
1214 E->Rmax(9) = RmaxFrom2Points(E,11,8,E->GetZ(9));
1215 E->Rmax(10) = E->GetRmax(9);
1216 E->Z(6) = Z-dZin;
1217 E->Z(7) = E->GetZ(6);
1218 E->Rmax(6) = RmaxFromZpCone(E,Tc,E->GetZ(6));
1219 E->Rmax(7) = E->GetRmax(6);
1220 RadiusOfCurvature(Rcurv,90.,E->GetZ(6),0.0,90.0-Tc,Z,Rmin);
1221 E->Z(5) = Z;
1222 E->Rmin(5) = RminFromZpCone(E,Tc,Z);
1223 E->Rmax(5) = RmaxFromZpCone(E,Tc,Z);
1224 RadiusOfCurvature(Rcurv,90.-Tc,0.0,E->Rmin(5),90.0,Z,Rmin);
1225 E->Rmin(6) = Rmin;
1226 printPcon(E);
1227 // Inner Core, Inserto material
1228 TGeoPcon *F = new TGeoPcon("ITS SDD Suport cone Inserto Stesalite",
1229 0.0,360.0,9);
1230 F->Z(0) = E->GetZ(0);
1231 F->Rmin(0) = E->GetRmin(0)+Cthick;
1232 F->Rmax(0) = E->GetRmax(0)-Cthick;
1233 F->Z(1) = E->GetZ(1);
1234 F->Rmin(1) = F->GetRmin(0);
1235 F->Rmax(1) = F->GetRmax(0);
1236 F->Z(2) = E->GetZ(2);
1237 F->Rmax(2) = F->GetRmax(1);
1238 RadiusOfCurvature(Rcurv-Cthick,0.,F->GetZ(1),F->GetRmax(1),Tc,Z,Rmin);
1239 F->Z(3) = Z;
1240 F->Rmin(3) = Rmin;
1241 F->Rmin(2) = RminFrom2Points(F,3,1,F->GetZ(2));
1242 RadiusOfCurvature(Rcurv+Cthick,0.,F->GetZ(2),F->GetRmax(2),Tc,Z,Rmax);
1243 F->Z(4) = Z;
1244 F->Rmax(4) = Rmax;
1245 F->Rmin(4) = RmaxFromZpCone(E,Tc,F->GetZ(4),-Cthick);
1246 F->Rmax(3) = RmaxFrom2Points(F,4,2,F->GetZ(3));
1247 F->Rmin(7) = E->GetRmin(7);
1248 F->Rmin(8) = E->GetRmin(8);
1249 F->Z(6) = E->GetZ(6)+Cthick;
1250 F->Rmin(6) = E->GetRmin(6);
1251 F->Z(7) = F->GetZ(6);
1252 F->Rmax(8) = E->GetRmax(8)-Cthick*Sintc;
1253 RadiusOfCurvature(Rcurv+Cthick,90.,F->GetZ(6),F->GetRmin(6),90.-Tc,Z,Rmin);
1254 F->Z(5) = Z;
1255 F->Rmin(5) = Rmin;
1256 F->Rmax(5) = RmaxFromZpCone(F,Tc,Z);
1257 F->Rmax(6) = RmaxFromZpCone(F,Tc,F->GetZ(6));
1258 F->Rmax(7) = F->GetRmax(6);
1259 F->Z(8) = ZFromRmaxpCone(F,Tc,F->GetRmax(8),-Cthick);
1260 //F->Rmin(9) = F->Rmin(7);
1261 //F->Z(9) = F->GetZ(9);
1262 //F->Rmax(9) = (E->GetRmax(8)-E->GetRmax(11))/(E->GetZ(8)-E->GetZ(11))*
1263 // (F->GetZ(9)-F->GetZ(8))+F->GetRmax(8);
1264 printPcon(F);
1265 // Inner Core, Inserto material
1266 TGeoPcon *G = new TGeoPcon("ITS SDD Suport cone Foam core",
1267 0.0,360.0,4);
1268 RadiusOfCurvature(Rcurv+Cthick,0.0,F->GetZ(1),F->GetRmin(1),Tc,Z,Rmin);
1269 G->Z(0) = Z;
1270 G->Rmin(0) = Rmin;
1271 G->Rmax(0) = G->GetRmin(0);
1272 G->Z(1) = G->GetZ(0)+(Thickness-2.0*Cthick)/Sintc;;
1273 G->Rmin(1) = RminFromZpCone(F,Tc,G->GetZ(1));
1274 G->Rmax(1) = RmaxFromZpCone(F,Tc,G->GetZ(1));
1275 G->Z(2) = E->GetZ(5)-Cthick;
1276 G->Rmin(2) = RminFromZpCone(F,Tc,G->GetZ(2));
1277 G->Rmax(2) = RmaxFromZpCone(F,Tc,G->GetZ(2));
1278 G->Z(3) = F->GetZ(5)+(Thickness-2.0*Cthick)*Costc;
1279 G->Rmax(3) = RmaxFromZpCone(F,Tc,G->GetZ(3));
1280 G->Rmin(3) = G->GetRmax(3);
1281 printPcon(G);
1282 //
1283 TGeoVolume *Ev,*Fv,*Gv;
1284 Ev = new TGeoVolume("ITSsddConeE",E,SDDcf);
1285 Ev->SetVisibility(kTRUE);
1286 Ev->SetLineColor(4);
1287 Ev->SetLineWidth(1);
1288 Ev->SetFillColor(Ev->GetLineColor());
1289 Ev->SetFillStyle(4000); // 0% transparent
1290 Fv = new TGeoVolume("ITSsddConeF",F,SDDfs);
1291 Fv->SetVisibility(kTRUE);
1292 Fv->SetLineColor(2);
1293 Fv->SetLineWidth(1);
1294 Fv->SetFillColor(Fv->GetLineColor());
1295 Fv->SetFillStyle(4010); // 10% transparent
1296 Gv = new TGeoVolume("ITSsddConeG",G,SDDfo);
1297 Gv->SetVisibility(kTRUE);
1298 Gv->SetLineColor(7);
1299 Gv->SetLineWidth(1);
1300 Gv->SetFillColor(Gv->GetLineColor());
1301 Gv->SetFillStyle(4050); // 50% transparent
1302 //
1303 Fv->AddNode(Gv,1,0);
1304 Ev->AddNode(Fv,1,0);
1305 tran = new TGeoTranslation("",0.0,0.0,-Z0);
1306 Moth->AddNode(Ev,1,tran);
1307 rot = new TGeoRotation("",0.0,180.0*kDegree,0.0);
1308 rotran = new TGeoCombiTrans("",0.0,0.0,Z0,rot);
1309 Moth->AddNode(Ev,2,rotran);
afac0af7 1310}
541f7ba6 1311//______________________________________________________________________
1312void AliITSv11::SSDCone(TGeoVolume *Moth){
1313 // Define the detail SSD support cone geometry.
1314 // Inputs:
1315 // none.
1316 // Outputs:
1317 // none.
1318 // Return:
1319 // none.
171f3f35 1320 const Double_t ZThCylinder = 1140.0*kmm;//
1321 //
541f7ba6 1322 const Double_t Thickness = 13.0*kmm; // Thickness of Rohacell+carbon fiber
1323 const Double_t Cthick = 1.5*kmm; // Carbon finber thickness
1324 const Double_t Rcurv = 15.0*kmm; // Radius of curvature.
1325 const Double_t Tc = 51.0; // angle of SSD cone [degrees].
1326 const Double_t Sintc = TMath::Sin(Tc*TMath::DegToRad());
1327 const Double_t Costc = TMath::Cos(Tc*TMath::DegToRad());
1328 const Double_t Tantc = TMath::Tan(Tc*TMath::DegToRad());
1329 const Double_t ZouterMilled = (13.5-5.0)*kmm;
1330 const Double_t Zcylinder = 170.0*kmm;
171f3f35 1331 const Double_t Z0 = Zcylinder + 0.5*ZThCylinder;
541f7ba6 1332 const Int_t Nspoaks = 12;
1333 const Int_t Nmounts = 4;
1334 const Double_t DmountAngle = 9.0; // degrees
1335 const Double_t RoutMax = 0.5*985.0*kmm;
1336 const Double_t RoutHole = 0.5*965.0*kmm;
1337 const Double_t RoutMin = 0.5*945.0*kmm;
1338 const Double_t RholeMax = 0.5*890.0*kmm;
1339 const Double_t RholeMin = 0.5*740.0*kmm;
1340 const Double_t RpostMin = 316.0*kmm;
1341 const Double_t ZpostMax = 196.0*kmm;
1342 const Int_t Nposts = 6;
1343 const Double_t Phi0Post = 0.0; // degree
1344 const Double_t dRpost = 23.0*kmm;
1345 const Double_t RinMax = 0.5*590.0*kmm;
1346 const Double_t RinCylinder = 0.5*597.0*kmm;
1347 const Double_t RinHole = 0.5*575.0*kmm;
1348 const Double_t RinMin = 0.5*562.0*kmm;
1349 const Double_t dZin = 15.0*kmm;
1350 // SSD-SDD Thermal/Mechanical cylinder mounts
1351 const Int_t NinScrews = 40;
1352 const Double_t Phi0Screws = 0.5*360.0/((const Double_t)NinScrews);//d
1353 const Double_t RcylinderScrews = 0.5*570.0*kmm;//from older drawing????
1354 const Double_t DscrewHead = 8.0*kmm;
1355 const Double_t DscrewShaft = 4.6*kmm;
1356 const Double_t ThScrewHeadHole = 8.5*kmm;
1357 // SDD mounting bracket, SSD part
1358 const Double_t NssdSupports = 3;// mounting of U and T
1359 const Double_t DssdsddBracketAngle = 9.0; // degrees
1360 const Double_t Phi0SDDsupports = 0.0; // degree
1361 const Double_t RsddSupportPlate = 0.5*585.0*kmm;
1362 const Double_t ThSDDsupportPlate = 4.0*kmm;
1363 const Double_t WsddSupportPlate = 70.0*kmm;
1364 TGeoMedium *SSDcf = 0; // SSD support cone Carbon Fiber materal number.
1365 TGeoMedium *SSDfs = 0; // SSD support cone inserto stesalite 4411w.
1366 TGeoMedium *SSDfo = 0; // SSD support cone foam, Rohacell 50A.
1367 TGeoMedium *SSDss = 0; // SSD support cone screw material,Stainless steal
1368 TGeoMedium *SSDair = 0; // SSD support cone Air
1369 TGeoMedium *SSDal = 0; // SSD support cone SDD mounting bracket Al
1370
1371 // Lets start with the upper left outer carbon fiber surface.
1372 // Between za[2],rmaxa[2] and za[4],rmaxa[4] there is a curved section
1373 // given by rmaxa = rmaxa[2]-r*Sind(t) for 0<=t<=Tc and
1374 // za = za[2] + r*Cosd(t) for 0<=t<=Tc. Simularly between za[1],rmina[1
1375 // and za[3],rmina[3] there is a curve section given by
1376 // rmina = rmina[1]-r*Sind(t) for 0<=t<=Tc and za = za[1]+r&Sind(t)
1377 // for t<=0<=Tc. These curves have been replaced by straight lines
1378 // between the equivelent points for simplicity.
1379 Double_t dza = Thickness/Sintc-(RoutMax-RoutMin)/Tantc;
1380 Int_t i,j;
171f3f35 1381 Double_t x,y,z[9],rn[9],rx[9],phi,dphi;
541f7ba6 1382 Double_t t,t0,Z,Rmin,Rmax; // Temp variables.
1383 if(dza<=0){ // The number or order of the points are in error for a proper
fed42993 1384 // call to pcons!
1385 Error("SSDcone","The definition of the points for a call to PCONS is"
1386 " in error. abort.");
1387 return;
541f7ba6 1388 } // end if
1389 // Poly-cone Volume A. Top part of SSD cone Carbon Fiber.
1390 phi = 0.0;
1391 dphi = 360.0;
1392 z[0] = 0.0;
1393 rn[0] = RoutMin;
1394 rx[0] = RoutMax;
1395 z[1] = z[0]+ZouterMilled - dza; // za[2] - dza.
1396 rn[1] = rn[0];
1397 rx[1] = rx[0];
1398 z[2] = z[0]+ZouterMilled;//From Drawing ALR-0767 and ALR-0767/3
1399 rx[2] = rx[0];
1400 RadiusOfCurvature(Rcurv,0.,z[1],rn[1],Tc,z[3],rn[3]);
1401 rn[2] = RFrom2Points(rn,z,3,1,z[2]);
1402 RadiusOfCurvature(Rcurv,0.,z[2],rx[2],Tc,z[4],rx[4]);
1403 rn[4] = RminFromZpCone(rn,z,Tc,z[4]);
1404 rx[3] = RFrom2Points(rx,z,4,2,z[3]);
1405 rn[5] = RholeMax;
1406 z[5] = Zfrom2Points(z,rn,4,3,rn[5]);
1407 rx[5] = RmaxFromZpCone(rx,z,Tc,z[5]);
1408 rn[6] = RholeMax;
1409 rx[6] = rn[6];
cbd7b929 1410 z[6] = ZFromRmaxpCone(rx,z,Tc,rx[6]);
541f7ba6 1411 TGeoPcon *A = new TGeoPcon("ITS SSD Suport cone Carbon Fiber "
fed42993 1412 "Surface outer left",phi,dphi,7);
541f7ba6 1413 for(i=0;i<A->GetNz();i++){
fed42993 1414 //if(fDebug) cout<<i<<"A: z="<<z[i]<<" Rmin="<<rn[i]<<" Rmax="<<rx[i]<<endl;
1415 A->DefineSection(i,z[i],rn[i],rx[i]);
541f7ba6 1416 } // end for i
1417 //
1418 // Poly-cone Volume B. Stesalite inside volume A.
1419 // Now lets define the Inserto Stesalite 4411w material volume.
1420 phi = 0.0;
1421 dphi = 360.0;
1422 z[0] = A->GetZ(0);
1423 rn[0] = A->GetRmin(0)+Cthick;
1424 rx[0] = A->GetRmax(0)-Cthick;
1425 z[1] = A->GetZ(1);
1426 rn[1] = rn[0];
1427 rx[1] = rx[0];
1428 z[2] = A->GetZ(2);
1429 rx[2] = rx[1];
1430 RadiusOfCurvature(Rcurv-Cthick,0.,z[2],rx[2],Tc,z[3],rx[3]);
1431 RadiusOfCurvature(Rcurv+Cthick,0.,z[1],rn[1],Tc,z[4],rn[4]);
1432 rn[2] = RFrom2Points(rn,z,4,1,z[2]);
1433 rn[3] = RFrom2Points(rn,z,4,1,z[3]);
1434 z[5] = z[4]+(Thickness-2.0*Cthick)/Sintc;
1435 rn[5] = RmaxFromZpCone(A,Tc,z[5],-Cthick);
1436 rx[5] = rn[5];
1437 rx[4] = RFrom2Points(rx,z,5,3,z[4]);
1438 TGeoPcon *B = new TGeoPcon("ITS SSD Suport cone Inserto Stesalite "
fed42993 1439 "left edge",phi,dphi,6);
541f7ba6 1440 for(i=0;i<B->GetNz();i++){
fed42993 1441 //if(fDebug) cout<<i<<"B: z="<<z[i]<<" Rmin="<<rn[i]<<" Rmax="<<rx[i]<<endl;
1442 B->DefineSection(i,z[i],rn[i],rx[i]);
541f7ba6 1443 } // end for i
1444 //
1445 // Poly-cone Volume C. Foam inside volume A.
1446 // Now lets define the Rohacell foam material volume.
1447 phi = 0.0;
1448 dphi = 360.0;
1449 z[0] = B->GetZ(4);
1450 rn[0] = B->GetRmin(4);
1451 rx[0] = rn[0];
1452 z[1] = B->GetZ(5);
1453 rx[1] = B->GetRmin(5);
1454 rn[2] = A->GetRmin(5)+Cthick;//space for carbon fiber covering hole
1455 z[2] = ZFromRminpCone(A,Tc,rn[2],+Cthick);
1456 rn[1] = RFrom2Points(rn,z,2,0,z[1]);
1457 rx[3] = A->GetRmin(6)+Cthick;
1458 rn[3] = rx[3];
1459 z[3] = ZFromRmaxpCone(A,Tc,rx[3],-Cthick);
1460 rx[2] = RFrom2Points(rx,z,3,1,z[2]);
1461 TGeoPcon *C = new TGeoPcon("ITS SSD Suport cone Rohacell foam "
fed42993 1462 "left edge",phi,dphi,4);
541f7ba6 1463 for(i=0;i<C->GetNz();i++){
fed42993 1464 //if(fDebug) cout<<i<<"C: z="<<z[i]<<" Rmin="<<rn[i]<<" Rmax="<<rx[i]<<endl;
1465 C->DefineSection(i,z[i],rn[i],rx[i]);
541f7ba6 1466 } // end for i
1467 //
1468 // In volume SCB, th Inserto Stesalite 4411w material volume, there
1469 // are a number of Stainless steel screw and pin studs which will be
1470 // filled with screws/studs.
cbd7b929 1471 rn[0] = 0.0*kmm,rx[0] = 6.0*kmm,z[0] = 0.5*10.0*kmm; // mm
541f7ba6 1472 TGeoTube *D = new TGeoTube("ITS Screw+stud used to mount things to "
fed42993 1473 "the SSD support cone",rn[0],rx[0],z[0]);
cbd7b929 1474 rn[0] = 0.0*kmm;rx[0] = 6.0*kmm;z[0] = 0.5*12.0*kmm; // mm
541f7ba6 1475 TGeoTube *E = new TGeoTube("ITS pin used to mount things to the "
fed42993 1476 "SSD support cone",rn[0],rx[0],z[0]);
541f7ba6 1477 //
1478 // Poly-cone Volume F. Foam in spoak reagion, inside volume A.
1479 // There is no carbon fiber between this upper left section and the
1480 // SSD spoaks. We remove it by replacing it with Rohacell foam.
1481 t = Cthick/(0.5*(RholeMax+RholeMin));// It is not posible to get
1482 // the carbon fiber thickness uniform in this phi direction. We can only
1483 // make it a fixed angular thickness.
1484 t *= 180.0/TMath::Pi();
1485 phi = 12.5+t; // degrees see drawing ALR-0767.
1486 dphi = 5.0 - 2.0*t; // degrees
1487 z[0] = C->GetZ(2);
1488 rn[0] = C->GetRmin(3);
1489 rx[0] = rn[0];
1490 rn[1] = A->GetRmin(5);
1491 rx[1] = rn[0];
1492 z[1] = ZFromRminpCone(A,Tc,rn[1],+Cthick);
1493 z[2] = C->GetZ(3);
1494 rn[2] = rn[1];
1495 rx[2] = rx[1];
1496 rn[3] = A->GetRmin(6);
1497 rx[3] = rn[3];
1498 z[3] = ZFromRmaxpCone(A,Tc,rx[3],-Cthick);
1499 TGeoPcon *F = new TGeoPcon("ITS SSD Top Suport cone Rohacell foam "
fed42993 1500 "Spoak",phi,dphi,4);
541f7ba6 1501 for(i=0;i<F->GetNz();i++){
fed42993 1502 //if(fDebug) cout<<i<<"F: z="<<z[i]<<" Rmin="<<rn[i]<<" Rmax="<<rx[i]<<endl;
1503 F->DefineSection(i,z[i],rn[i],rx[i]);
541f7ba6 1504 } // end for i
1505 //=================================================================
1506 // Poly-cone Volume G.
1507 // Now for the spoak part of the SSD cone.
1508 // It is not posible to inclue the radius of curvature between
1509 // the spoak part and the upper left part of the SSD cone or lowwer right
1510 // part. This would be discribed by the following curves.
1511 // R = Rmax - (5mm)*Sin(t) phi = phi0+(5mm*180/(Pi*RoutHole))*Sin(t)
1512 // where 0<=t<=90 For the inner curve a simular equiation holds.
1513 phi = 12.5; // degrees see drawing ALR-0767.
1514 dphi = 5.0; // degrees
1515 z[0] = A->GetZ(5);
1516 rn[0] = A->GetRmin(5);
1517 rx[0] = rn[0];
1518 z[1] = A->GetZ(6);
1519 rn[1] = RminFromZpCone(A,Tc,z[1]);
1520 rx[1] = rx[0];
1521 rn[2] = RholeMin;
1522 z[2] = ZFromRminpCone(A,Tc,rn[2]);
1523 rx[2] = RmaxFromZpCone(A,Tc,z[2]);
1524 rn[3] = rn[2];
1525 rx[3] = rn[3];
1526 z[3] = ZFromRmaxpCone(A,Tc,rx[3]);
1527 TGeoPcon *G = new TGeoPcon("ITS SSD spoak carbon fiber surfaces",
fed42993 1528 phi,dphi,4);
541f7ba6 1529 for(i=0;i<G->GetNz();i++){
fed42993 1530 //if(fDebug) cout<<i<<"G: z="<<z[i]<<" Rmin="<<rn[i]<<" Rmax="<<rx[i]<<endl;
1531 G->DefineSection(i,z[i],rn[i],rx[i]);
541f7ba6 1532 } // end for i
1533 // For the foam core.
1534 // Poly-cone Volume H.
1535 t = Cthick/(0.5*(RholeMax+RholeMin));// It is not posible to get the
1536 // carbon fiber thickness uniform in this phi direction. We can only
1537 // make it a fixed angular thickness.
1538 t *= 180.0/TMath::Pi();
1539 phi = 12.5+t; // degrees
1540 dphi = 5.0 - 2.0*t; // degrees see drawing ALR-0767.
1541 z[0] = F->GetZ(1);
1542 rn[0] = G->GetRmin(0);
1543 rx[0] = rn[0];
1544 z[1] = F->GetZ(3);
1545 rn[1] = RminFromZpCone(A,Tc,z[1],+Cthick);
1546 rx[1] = rx[0];
1547 z[2] = ZFromRminpCone(A,Tc,G->GetRmin(2),+Cthick);
1548 rn[2] = G->GetRmin(2);
1549 rx[2] = RmaxFromZpCone(A,Tc,z[2],-Cthick);
1550 z[3] = ZFromRmaxpCone(A,Tc,G->GetRmin(3),-Cthick);
1551 rn[3] = G->GetRmin(3);
1552 rx[3] = rn[3];
1553 TGeoPcon *H = new TGeoPcon("ITS SSD support cone Rohacell foam Spoak",
fed42993 1554 phi,dphi,4);
541f7ba6 1555 for(i=0;i<H->GetNz();i++){
fed42993 1556 //if(fDebug) cout<<i<<"H: z="<<z[i]<<" Rmin="<<rn[i]<<" Rmax="<<rx[i]<<endl;
1557 H->DefineSection(i,z[i],rn[i],rx[i]);
541f7ba6 1558 } // end for i
1559 //
1560 //==================================================================
1561 // Now for the Inner most part of the SSD cone.
1562 //Poly-cone Volume I.
1563 phi = 0.0;
1564 dphi = 360.0;
1565 z[0] = G->GetZ(2);
1566 rn[0] = G->GetRmin(2);
1567 rx[0] = rn[0];
1568 z[1] = G->GetZ(3);
1569 rn[1] = RminFromZpCone(A,Tc,z[1]);
1570 rx[1] = rx[0];
1571 rn[4] = RinMin;
1572 rn[5] = RinMin;
1573 RadiusOfCurvature(Rcurv,90.0,0.0,RinMax,90.0-Tc,Z,rx[5]); // z dummy
1574 z[5] = ZFromRmaxpCone(A,Tc,rx[5]);
1575 z[6] = Zcylinder;
1576 rn[6] = RinMin;
1577 z[7] = z[6];
1578 rn[7] = RinCylinder;
1579 rn[8] = RinCylinder;
1580 rx[8] = rn[8];
1581 Rmin = rn[5];
1582 RadiusOfCurvature(Rcurv,90.0-Tc,z[5],rx[5],90.0,Z,Rmax);
1583 Rmax = RinMax;
1584 z[8] = Z+(z[5]-Z)*(rx[8]-Rmax)/(rx[5]-Rmax);
1585 rx[6] = RFrom2Points(rx,z,8,5,z[6]);
1586 rx[7] = rx[6];
1587 z[3] = Z-dZin;
1588 z[4] = z[3];
1589 rx[3] = RmaxFromZpCone(A,Tc,z[3]);
1590 rx[4] = rx[3];
1591 //rmin dummy
1592 RadiusOfCurvature(Rcurv,90.,z[3],0.,90.-Tc,z[2],Rmin);
1593 rn[2] = RminFromZpCone(A,Tc,z[2]);
1594 rx[2] = RmaxFromZpCone(A,Tc,z[2]);
1595 // z dummy
1596 RadiusOfCurvature(Rcurv,90.-Tc,0.0,rn[2],90.0,Z,rn[3]);
1597 TGeoPcon *I = new TGeoPcon("ITS SSD lower/inner right part of SSD "
fed42993 1598 "cone",phi,dphi,9);
541f7ba6 1599 for(i=0;i<I->GetNz();i++){
fed42993 1600 //if(fDebug) cout<<i<<"I: z="<<z[i]<<" Rmin="<<rn[i]<<" Rmax="<<rx[i]<<endl;
1601 I->DefineSection(i,z[i],rn[i],rx[i]);
541f7ba6 1602 } // end for i
1603 // Now for Inserto volume at the inner most radius.
1604 // Poly-cone Volume K.
1605 phi = 0.0;
1606 dphi = 360.0;
1607 z[1] = I->GetZ(3)+Cthick;
1608 rn[1] = I->GetRmin(3);
1609 z[2] = z[1];
1610 rn[2] = I->GetRmin(4);
1611 rn[3] = rn[2];
1612 rn[4] = rn[2];
1613 rx[4] = I->GetRmax(5)-Cthick*Sintc;
1614 RadiusOfCurvature(Rcurv+Cthick,90.0,z[1],rn[1],90.0-Tc,z[0],rn[0]);
1615 rx[0] = rn[0];
1616 z[3] = z[0]+(Thickness-2.0*Cthick)*Costc;;
1617 rx[3] = rx[0]+(Thickness-2.0*Cthick)*Sintc;
1618 rx[1] = RFrom2Points(rx,z,3,0,z[1]);
1619 rx[2] = rx[1];
1620 z[4] = ZFromRmaxpCone(A,Tc,rx[4],-Cthick);
1621 rn[5] = rn[2];
1622 z[5] = I->GetZ(6);
1623 rx[5] = (I->GetRmax(5)-I->GetRmax(8))/(I->GetZ(5)-I->GetZ(8))*(z[5]-z[4])+
fed42993 1624 rx[4];
541f7ba6 1625 TGeoPcon *K = new TGeoPcon("ITS SSD inner most inserto material",
fed42993 1626 phi,dphi,6);
541f7ba6 1627 for(i=0;i<K->GetNz();i++){
fed42993 1628 //if(fDebug) cout<<i<<"K: z="<<z[i]<<" Rmin="<<rn[i]<<" Rmax="<<rx[i]<<endl;
1629 K->DefineSection(i,z[i],rn[i],rx[i]);
541f7ba6 1630 } // end for i
1631 // Now for foam core at the inner most radius.
1632 // Poly-cone Volume J.
1633 phi = 0.0;
1634 dphi = 360.0;
1635 rn[0] = I->GetRmin(0)-Cthick;
1636 z[0] = ZFromRminpCone(A,Tc,rn[0],+Cthick);
1637 rx[0] = rn[0];
1638 rx[1] = rx[0];
1639 z[1] = ZFromRmaxpCone(A,Tc,rx[1],-Cthick);
1640 rn[1] = RminFromZpCone(A,Tc,z[1],+Cthick);
1641 z[2] = K->GetZ(0);
1642 rn[2] = K->GetRmin(0);
1643 rx[2] = RmaxFromZpCone(A,Tc,z[2],-Cthick);
1644 z[3] = K->GetZ(3);
1645 rn[3] = K->GetRmax(3);
1646 rx[3] = rn[3];
1647 TGeoPcon *J = new TGeoPcon("ITS SSD inner most foam core",phi,dphi,4);
1648 for(i=0;i<J->GetNz();i++){
fed42993 1649 //if(fDebug) cout<<i<<"J: z="<<z[i]<<" Rmin="<<rn[i]<<" Rmax="<<rx[i]<<endl;
1650 J->DefineSection(i,z[i],rn[i],rx[i]);
541f7ba6 1651 } // end for i
1652 // Now for foam core at the top of the inner most radius where
1653 // the spoaks are.
1654 t = Cthick/(0.5*(RholeMax+RholeMin));// It is not posible to get the
1655 // carbon fiber thickness uniform in this phi direction. We can only
1656 // make it a fixed angular thickness.
1657 // Poly-cone Volume L.
1658 t *= 180.0/TMath::Pi();
1659 phi = 12.5+t; // degrees
1660 dphi = 5.0 - 2.0*t; // degrees see drawing ALR-0767.
1661 z[0] = H->GetZ(2);
1662 rn[0] = H->GetRmin(2);
1663 rx[0] = rn[0];
1664 z[1] = J->GetZ(0);
1665 rn[1] = J->GetRmin(0);
1666 rx[1] = I->GetRmax(1);
1667 z[2] = H->GetZ(3);
1668 rn[2] = rn[1];
1669 rx[2] = rx[1];
1670 z[3] = J->GetZ(1);
1671 rn[3] = rn[2];
1672 rx[3] = rn[3];
1673 TGeoPcon *L = new TGeoPcon("ITS SSD Bottom cone Rohacell foam Spoak",
fed42993 1674 phi,dphi,4);
541f7ba6 1675 for(i=0;i<L->GetNz();i++){
fed42993 1676 //if(fDebug) cout<<i<<"L: z="<<z[i]<<" Rmin="<<rn[i]<<" Rmax="<<rx[i]<<endl;
1677 L->DefineSection(i,z[i],rn[i],rx[i]);
541f7ba6 1678 } // end for i
1679 // Now for the SSD mounting posts
1680 // Poly-cone Volume O.
1681 dphi = 180.0*dRpost/(RpostMin+0.5*dRpost)/TMath::Pi(); //
1682 phi = Phi0Post-0.5*dphi; // degrees
1683 rn[0] = RpostMin+dRpost;
1684 rx[0] = rn[0];
1685 z[0] = ZFromRmaxpCone(A,Tc,rx[0]);
1686 rn[1] = RpostMin;
1687 z[1] = ZFromRmaxpCone(A,Tc,rn[1]);
1688 rx[1] = rx[0];
1689 z[2] = ZpostMax;
1690 rn[2] = RpostMin;
1691 rx[2] = rn[2]+dRpost;
1692 TGeoPcon *O = new TGeoPcon("ITS SSD mounting post, carbon fiber",
fed42993 1693 phi,dphi,3);
541f7ba6 1694 for(i=0;i<O->GetNz();i++){
fed42993 1695 //if(fDebug) cout<<i<<"O: z="<<z[i]<<" Rmin="<<rn[i]<<" Rmax="<<rx[i]<<endl;
1696 O->DefineSection(i,z[i],rn[i],rx[i]);
541f7ba6 1697 } // end for i
1698 // Now for the SSD mounting posts
1699 // Poly-cone Volume P.
1700 t = 180.0*Cthick/(RpostMin+0.5*dRpost)/TMath::Pi();
1701 dphi = O->GetDphi()-2.0*t; // degrees
1702 phi = O->GetPhi1()+t; //
1703 rn[0] = O->GetRmin(0)-Cthick;
1704 rx[0] = rn[0];
1705 z[0] = ZFromRmaxpCone(A,Tc,rx[0]);
1706 rn[1] = O->GetRmin(1)+Cthick;
1707 rx[1] = O->GetRmin(0)-Cthick;
1708 z[1] = ZFromRmaxpCone(A,Tc,rn[1]);
1709 rn[2] = rn[1];
1710 rx[2] = rx[1];
1711 z[2] = ZpostMax;
1712 TGeoPcon *P = new TGeoPcon("ITS SSD mounting post, Inserto",
fed42993 1713 phi,dphi,3);
541f7ba6 1714 for(i=0;i<P->GetNz();i++){
fed42993 1715 //if(fDebug) cout<<i<<"P: z="<<z[i]<<" Rmin="<<rn[i]<<" Rmax="<<rx[i]<<endl;
1716 P->DefineSection(i,z[i],rn[i],rx[i]);
541f7ba6 1717 } // end for i
1718 // This insrto continues into the SSD cone displacing the foam
1719 // and the carbon fiber surface at those points where the posts are.
1720 //Poly-cone Vol. M
1721 phi = P->GetPhi1();
1722 dphi = P->GetDphi();
1723 rn[0] = RpostMin+dRpost-Cthick;
1724 rx[0] = rn[0];
1725 z[0] = ZFromRminpCone(A,Tc,rn[0],+Cthick);
1726 rx[1] = rx[0];
1727 z[1] = ZFromRmaxpCone(A,Tc,rx[1],-Cthick);
1728 rn[1] = RminFromZpCone(A,Tc,z[1],+Cthick);
1729 rn[2] = RpostMin+Cthick;
1730 z[2] = ZFromRminpCone(A,Tc,rn[2],+Cthick);
1731 rx[2] = RmaxFromZpCone(A,Tc,z[2],-Cthick);
1732 rn[3] = rn[2];
1733 rx[3] = rn[3];
1734 z[3] = ZFromRmaxpCone(A,Tc,rx[3],-Cthick);
1735 TGeoPcon *M = new TGeoPcon("ITS SSD mounting post foam substitute, "
fed42993 1736 "Inserto",phi,dphi,4);
541f7ba6 1737 for(i=0;i<M->GetNz();i++){
fed42993 1738 //if(fDebug) cout<<i<<"M: z="<<z[i]<<" Rmin="<<rn[i]<<" Rmax="<<rx[i]<<endl;
1739 M->DefineSection(i,z[i],rn[i],rx[i]);
541f7ba6 1740 } // end for i
1741 //
1742 //Poly-cone Vol. N
1743 phi = P->GetPhi1();
1744 dphi = P->GetDphi();
1745 z[0] = M->GetZ(1);
1746 rn[0] = M->GetRmax(1);
1747 rx[0] = rn[0];
1748 rx[1] = rx[0];
1749 z[1] = ZFromRmaxpCone(A,Tc,rx[1]);
1750 rn[1] = RmaxFromZpCone(A,Tc,z[1],-Cthick);
1751 z[2] = M->GetZ(3);
1752 rn[2] = M->GetRmin(3);
1753 rx[2] = RmaxFromZpCone(A,Tc,z[2]);
1754 rn[3] = rn[2];
1755 rx[3] = rn[3];
1756 z[3] = ZFromRmaxpCone(A,Tc,rx[3]);
1757 TGeoPcon *N = new TGeoPcon("ITS SSD mounting post CF subsititute, "
fed42993 1758 "Inserto",phi,dphi,4);
541f7ba6 1759 for(i=0;i<N->GetNz();i++){
fed42993 1760 //if(fDebug) cout<<i<<"N: z="<<z[i]<<" Rmin="<<rn[i]<<" Rmax="<<rx[i]<<endl;
1761 N->DefineSection(i,z[i],rn[i],rx[i]);
541f7ba6 1762 } // end for i
1763 // Bolt heads holding the SSD-SDD tube to the SSD cone.
1764 // Bolt -- PolyCone
1765 //Poly-cone Volume Q.
1766 phi = 0.0;
1767 dphi = 360.0;
171f3f35 1768 z[0] = I->GetZ(4)+ThSDDsupportPlate;
541f7ba6 1769 rn[0] = 0.0;
1770 rx[0] = 0.5*DscrewHead;
171f3f35 1771 z[1] = I->GetZ(4)+ThScrewHeadHole;
541f7ba6 1772 rn[1] = 0.0;
1773 rx[1] = 0.5*DscrewHead;
1774 z[2] = z[1];
1775 rn[2] = 0.0;
1776 rx[2] = 0.5*DscrewShaft;
171f3f35 1777 z[3] = I->GetZ(6);
541f7ba6 1778 rn[3] = 0.0;
1779 rx[3] = rx[2];
1780 TGeoPcon *Q = new TGeoPcon("ITS SSD Thermal sheal stainless steel "
fed42993 1781 "bolts",phi,dphi,4);
541f7ba6 1782 for(i=0;i<Q->GetNz();i++){
fed42993 1783 //if(fDebug) cout<<i<<"Q: z="<<z[i]<<" Rmin="<<rn[i]<<" Rmax="<<rx[i]<<endl;
1784 Q->DefineSection(i,z[i],rn[i],rx[i]);
541f7ba6 1785 } // end for i
1786 // air infront of bolt (stasolit Volume K) -- Tube
171f3f35 1787 z[0] = 0.5*(ThSDDsupportPlate-Cthick);
cbd7b929 1788 rn[0] = 0.0*kmm;
541f7ba6 1789 rx[0] = 0.5*DscrewHead;
1790 TGeoTube *R = new TGeoTube("ITS Air in front of bolt (in stasolit)",
fed42993 1791 rn[0],rx[0],z[0]);
541f7ba6 1792 // air infront of bolt (carbon fiber volume I) -- Tube
171f3f35 1793 z[0] = 0.5*Cthick;
cbd7b929 1794 rn[0] = 0.0*kmm;
541f7ba6 1795 rx[0] = R->GetRmax();
1796 TGeoTube *S = new TGeoTube("ITS Air in front of Stainless Steal "
fed42993 1797 "Screw end, N6",rn[0],rx[0],z[0]);
541f7ba6 1798 // SDD support plate, SSD side.
1799 //Poly-cone Volume T.
cbd7b929 1800 dphi = TMath::RadToDeg()*TMath::ATan2(0.5*WsddSupportPlate,RsddSupportPlate);
541f7ba6 1801 phi = Phi0SDDsupports-0.5*dphi;
1802 z[0] = K->GetZ(2);
1803 rn[0] = I->GetRmin(4);
1804 rx[0] = RsddSupportPlate;
1805 z[1] = I->GetZ(4) - ThSDDsupportPlate;
1806 rn[1] = rn[0];
1807 rx[1] = rx[0];
1808 TGeoPcon *T = new TGeoPcon("ITS SSD-SDD mounting bracket Inserto->Al.",
fed42993 1809 phi,dphi,2);
541f7ba6 1810 for(i=0;i<T->GetNz();i++){
fed42993 1811 //if(fDebug) cout<<i<<"T: z="<<z[i]<<" Rmin="<<rn[i]<<" Rmax="<<rx[i]<<endl;
1812 T->DefineSection(i,z[i],rn[i],rx[i]);
541f7ba6 1813 } // end for i
1814 //
1815 // Poly-cone Volume U.
1816 TGeoPcon *U;
1817 if(I->GetRmin(3)<T->GetRmax(0)){
fed42993 1818 dphi = T->GetDphi();
1819 phi = T->GetPhi1();
1820 z[2] = I->GetZ(4);
1821 rn[2] = T->GetRmin(0);
1822 rx[2] = T->GetRmax(0);
1823 z[3] = K->GetZ(2);
1824 rn[3] = rn[2];
1825 rx[3] = rx[2];
1826 z[1] = z[2];
1827 rn[1] = I->GetRmin(3);
1828 rx[1] = rx[3];
1829 rx[0] = T->GetRmax(0);
1830 rn[0] = rx[0];
1831 z[0] = Zfrom2MinPoints(I,2,3,rn[0]);
1832 U = new TGeoPcon("ITS SSD-SDD mounting bracket CF->Al.",phi,dphi,4);
541f7ba6 1833 }else{
fed42993 1834 dphi = T->GetDphi();
1835 phi = T->GetPhi1();
1836 z[0] = I->GetZ(4);
1837 rn[0] = T->GetRmin(0);
1838 rx[0] = T->GetRmax(0);
1839 z[1] = K->GetZ(2);
1840 rn[1] = rn[0];
1841 rx[1] = rx[0];
1842 U = new TGeoPcon("ITS SSD-SDD mounting bracket CF->Al.",phi,dphi,2);
541f7ba6 1843 }// end if
1844 for(i=0;i<U->GetNz();i++){
fed42993 1845 //if(fDebug) cout<<i<<"U: z="<<z[i]<<" Rmin="<<rn[i]<<" Rmax="<<rx[i]<<endl;
1846 U->DefineSection(i,z[i],rn[i],rx[i]);
541f7ba6 1847 } // end for i
1848 //
1849 TGeoManager *mgr = gGeoManager;
1850 SSDcf = mgr->GetMedium("ITSssdCarbonFiber");
1851 SSDfs = mgr->GetMedium("ITSssdStaselite4411w");
1852 SSDfo = mgr->GetMedium("ITSssdRohacell50A");
1853 SSDss = mgr->GetMedium("ITSssdStainlessSteal");
1854 SSDair= mgr->GetMedium("ITSssdAir");
1855 SSDal = mgr->GetMedium("ITSssdAl");
1856 TGeoVolume *Av,*Bv,*Cv,*Dv,*Ev,*Fv,*Gv,*Hv,*Iv,*Jv,*Kv,*Lv,*Mv,*Nv,
fed42993 1857 *Ov,*Pv,*Qv,*Rv,*Sv,*Tv,*Uv;
541f7ba6 1858 Av = new TGeoVolume("ITSssdConeA",A,SSDcf);
cbd7b929 1859 Av->SetVisibility(kTRUE);
171f3f35 1860 Av->SetLineColor(4); // blue
541f7ba6 1861 Av->SetLineWidth(1);
171f3f35 1862 Av->SetFillColor(Av->GetLineColor());
1863 Av->SetFillStyle(4010); // 10% transparent
541f7ba6 1864 Bv = new TGeoVolume("ITSssdConeB",B,SSDfs);
cbd7b929 1865 Bv->SetVisibility(kTRUE);
171f3f35 1866 Bv->SetLineColor(2); // red
1867 Bv->SetLineWidth(1);
1868 Bv->SetFillColor(Bv->GetLineColor());
1869 Bv->SetFillStyle(4010); // 10% transparent
541f7ba6 1870 Cv = new TGeoVolume("ITSssdConeC",C,SSDfo);
cbd7b929 1871 Cv->SetVisibility(kTRUE);
171f3f35 1872 Cv->SetLineColor(3); // green
1873 Cv->SetLineWidth(1);
1874 Cv->SetFillColor(Cv->GetLineColor());
1875 Cv->SetFillStyle(4010); // 10% transparent
541f7ba6 1876 Dv = new TGeoVolume("ITSssdConeD",D,SSDss);
cbd7b929 1877 Dv->SetVisibility(kTRUE);
171f3f35 1878 Dv->SetLineColor(1); // black
1879 Dv->SetLineWidth(1);
1880 Dv->SetFillColor(Dv->GetLineColor());
1881 Dv->SetFillStyle(4010); // 10% transparent
541f7ba6 1882 Ev = new TGeoVolume("ITSssdConeE",E,SSDss);
cbd7b929 1883 Ev->SetVisibility(kTRUE);
171f3f35 1884 Ev->SetLineColor(1); // black
1885 Ev->SetLineWidth(1);
1886 Ev->SetFillColor(Ev->GetLineColor());
1887 Ev->SetFillStyle(4010); // 10% transparent
541f7ba6 1888 Fv = new TGeoVolume("ITSssdConeF",F,SSDfo);
cbd7b929 1889 Fv->SetVisibility(kTRUE);
171f3f35 1890 Fv->SetLineColor(3); // green
1891 Fv->SetLineWidth(1);
1892 Fv->SetFillColor(Fv->GetLineColor());
1893 Fv->SetFillStyle(4010); // 10% transparent
541f7ba6 1894 Gv = new TGeoVolume("ITSssdConeG",G,SSDcf);
cbd7b929 1895 Gv->SetVisibility(kTRUE);
171f3f35 1896 Gv->SetLineColor(4); // blue
541f7ba6 1897 Gv->SetLineWidth(2);
171f3f35 1898 Gv->SetFillColor(Gv->GetLineColor());
1899 Gv->SetFillStyle(4010); // 10% transparent
541f7ba6 1900 Hv = new TGeoVolume("ITSssdConeH",H,SSDfo);
cbd7b929 1901 Hv->SetVisibility(kTRUE);
171f3f35 1902 Hv->SetLineColor(3); // green
1903 Hv->SetLineWidth(1);
1904 Hv->SetFillColor(Hv->GetLineColor());
1905 Hv->SetFillStyle(4010); // 10% transparent
541f7ba6 1906 Iv = new TGeoVolume("ITSssdConeI",I,SSDcf);
cbd7b929 1907 Iv->SetVisibility(kTRUE);
171f3f35 1908 Iv->SetLineColor(4); // blue
1909 Iv->SetLineWidth(1);
1910 Iv->SetFillColor(Iv->GetLineColor());
1911 Iv->SetFillStyle(4010); // 10% transparent
541f7ba6 1912 Jv = new TGeoVolume("ITSssdConeJ",J,SSDfo);
cbd7b929 1913 Jv->SetVisibility(kTRUE);
171f3f35 1914 Jv->SetLineColor(3); // green
1915 Jv->SetLineWidth(3);
1916 Jv->SetFillColor(Jv->GetLineColor());
1917 Jv->SetFillStyle(4010); // 10% transparent
541f7ba6 1918 Kv = new TGeoVolume("ITSssdConeK",K,SSDfs);
cbd7b929 1919 Kv->SetVisibility(kTRUE);
171f3f35 1920 Kv->SetLineColor(2); // red
1921 Kv->SetLineWidth(1);
1922 Kv->SetFillColor(Kv->GetLineColor());
1923 Kv->SetFillStyle(4010); // 10% transparent
541f7ba6 1924 Lv = new TGeoVolume("ITSssdConeL",L,SSDfo);
cbd7b929 1925 Lv->SetVisibility(kTRUE);
171f3f35 1926 Lv->SetLineColor(3); // green
1927 Lv->SetLineWidth(3);
1928 Lv->SetFillColor(Lv->GetLineColor());
1929 Lv->SetFillStyle(4010); // 10% transparent
541f7ba6 1930 Mv = new TGeoVolume("ITSssdConeM",M,SSDfs);
cbd7b929 1931 Mv->SetVisibility(kTRUE);
171f3f35 1932 Mv->SetLineColor(2); // red
1933 Mv->SetLineWidth(1);
1934 Mv->SetFillColor(Mv->GetLineColor());
1935 Mv->SetFillStyle(4010); // 10% transparent
541f7ba6 1936 Nv = new TGeoVolume("ITSssdConeN",N,SSDfs);
cbd7b929 1937 Nv->SetVisibility(kTRUE);
171f3f35 1938 Nv->SetLineColor(2); // red
1939 Nv->SetLineWidth(1);
1940 Nv->SetFillColor(Nv->GetLineColor());
1941 Nv->SetFillStyle(4010); // 10% transparent
541f7ba6 1942 Ov = new TGeoVolume("ITSssdConeO",O,SSDcf);
cbd7b929 1943 Ov->SetVisibility(kTRUE);
171f3f35 1944 Ov->SetLineColor(4); // blue
1945 Ov->SetLineWidth(1);
1946 Ov->SetFillColor(Iv->GetLineColor());
1947 Ov->SetFillStyle(4010); // 10% transparent
541f7ba6 1948 Pv = new TGeoVolume("ITSssdConeP",P,SSDfs);
cbd7b929 1949 Pv->SetVisibility(kTRUE);
171f3f35 1950 Pv->SetLineColor(2); // red
1951 Pv->SetLineWidth(1);
1952 Pv->SetFillColor(Pv->GetLineColor());
1953 Pv->SetFillStyle(4010); // 10% transparent
541f7ba6 1954 Qv = new TGeoVolume("ITSssdConeQ",Q,SSDss);
cbd7b929 1955 Qv->SetVisibility(kTRUE);
171f3f35 1956 Qv->SetLineColor(1); // black
1957 Qv->SetLineWidth(1);
1958 Qv->SetFillColor(Qv->GetLineColor());
1959 Qv->SetFillStyle(4010); // 10% transparent
541f7ba6 1960 Rv = new TGeoVolume("ITSssdConeR",R,SSDair);
cbd7b929 1961 Rv->SetVisibility(kTRUE);
171f3f35 1962 Rv->SetLineColor(5); // yellow
1963 Rv->SetLineWidth(1);
1964 Rv->SetFillColor(Rv->GetLineColor());
1965 Rv->SetFillStyle(4010); // 10% transparent
541f7ba6 1966 Sv = new TGeoVolume("ITSssdConeS",S,SSDair);
cbd7b929 1967 Sv->SetVisibility(kTRUE);
171f3f35 1968 Sv->SetLineColor(5); // yellow
1969 Sv->SetLineWidth(1);
1970 Sv->SetFillColor(Sv->GetLineColor());
1971 Sv->SetFillStyle(4010); // 10% transparent
541f7ba6 1972 Tv = new TGeoVolume("ITSssdConeT",T,SSDal);
cbd7b929 1973 Tv->SetVisibility(kTRUE);
171f3f35 1974 Tv->SetLineColor(17); // gray
1975 Tv->SetLineWidth(1);
1976 Tv->SetFillColor(Tv->GetLineColor());
1977 Tv->SetFillStyle(4010); // 10% transparent
541f7ba6 1978 Uv = new TGeoVolume("ITSssdConeU",U,SSDal);
cbd7b929 1979 Uv->SetVisibility(kTRUE);
171f3f35 1980 Uv->SetLineColor(17); // gray
1981 Uv->SetLineWidth(1);
1982 Uv->SetFillColor(Uv->GetLineColor());
1983 Uv->SetFillStyle(4010); // 10% transparent
541f7ba6 1984 //
1985 TGeoTranslation *tran = new TGeoTranslation("ITSssdConeTrans",0.0,0.0,-Z0);
1986 TGeoRotation *rot180 = new TGeoRotation("ITSssdConeRot180",0.0,180.0,0.0);
1987 TGeoCombiTrans *flip = new TGeoCombiTrans("ITSssdConeFlip",0.0,0.0,Z0,rot180);
1988 TGeoTranslation *tranR,*tranS;
1989 TGeoCombiTrans *fliptran,*rottran;
1990 TGeoRotation *rot,*zspoaks,*zspoaks180;
171f3f35 1991 Int_t NcD=1,NcE=1,NcQ=1,NcR=1,NcS=1,NcT=1,NcU=1;
541f7ba6 1992 Av->AddNode(Bv,1,0);
1993 Av->AddNode(Cv,1,0);
1994 Moth->AddNode(Av,1,tran); // RB24 side
1995 Moth->AddNode(Av,2,flip); // RB26 side (Absorber)
1996 Moth->AddNode(Iv,1,tran); // RB24 side
1997 Moth->AddNode(Iv,2,flip); // RB26 side (Absorber)
1998 Gv->AddNode(Hv,1,0);
1999 for(i=0;i<Nspoaks;i++){ // SSD Cone Spoaks
fed42993 2000 zspoaks = new TGeoRotation("",0.0,0.0,
2001 ((Double_t)i*360.)/((Double_t)Nspoaks));
2002 rottran = new TGeoCombiTrans("",0.0,0.0,-Z0,zspoaks);
2003 Moth->AddNode(Gv,i+1,rottran); // RB24 side
2004 Av->AddNode(Fv,i+1,zspoaks);
2005 Iv->AddNode(Lv,i+1,zspoaks);
2006 zspoaks180 = new TGeoRotation("",0.0,180.0,
2007 ((Double_t)i*360.)/((Double_t)Nspoaks));
2008 fliptran = new TGeoCombiTrans("",0.0,0.0,Z0,zspoaks180);
2009 Moth->AddNode(Gv,Nspoaks+i+1,fliptran); // RB26 side
541f7ba6 2010 } // end for i
2011 Iv->AddNode(Jv,1,0);
2012 Iv->AddNode(Kv,1,0);
2013 Ov->AddNode(Pv,1,0);
171f3f35 2014 t0 = (P->GetPhi1()+0.5*P->GetDphi())*kRadian;
2015 t = (0.25* P->GetDphi())*kRadian;
2016 z[0] = 0.5*(P->GetRmin(2)+P->GetRmax(2))+0.25*(P->GetRmax(2)-P->GetRmin(2));
2017 x = z[0]*TMath::Cos(t0+t);
2018 y = z[0]*TMath::Sin(t0+t);
2019 tran = new TGeoTranslation("",x,y,P->GetZ(2)-Q->GetZ(3));
2020 Pv->AddNode(Qv,NcQ++,tran); // Screw head
2021 z[0] = 0.5*(P->GetRmin(2)+P->GetRmax(2))-0.25*(P->GetRmax(2)-P->GetRmin(2));
2022 x = z[0]*TMath::Cos(t0-t);
2023 y = z[0]*TMath::Sin(t0-t);
2024 tran = new TGeoTranslation("",x,y,P->GetZ(2)-Q->GetZ(3));
2025 Pv->AddNode(Qv,NcQ++,tran); // Screw head
541f7ba6 2026 //Pv->AddNode(Vv,1,?); // Air hole in Posts
2027 //Pv->AddNode(Vv,2,?); // Air hole in Posts
2028 //Mv->AddNode(Wv,1,?); // Air hole in Posts
2029 //Mv->AddNode(Wv,2,?); // Air hole in Posts
2030 //Nv->AddNode(Xv,1,?); // Air hole in Posts
2031 //Nv->AddNode(Xv,2,?); // Air hole in Posts
2032 TGeoRotation *zposts,*zposts180;
2033 for(i=0;i<Nposts;i++){ // SSD Cone mounting posts
171f3f35 2034 zposts = new TGeoRotation("",0.0,0.0,
2035 ((Double_t)i*360.)/((Double_t)Nposts));
2036 rottran = new TGeoCombiTrans("",0.0,0.0,-Z0,zposts);
2037 Moth->AddNode(Ov,i+1,rottran); // RB24 side
2038 Jv->AddNode(Mv,i+1,zposts);
2039 Iv->AddNode(Nv,i+1,zposts);
2040 //Jv->AddNode(Xv,2*i+3,?); // Air hole in Posts
2041 //Jv->AddNode(Xv,2*i+4,?); // Air hole in Posts
2042 zposts180 = new TGeoRotation("",0.0,180.0,
2043 ((Double_t)i*360.)/((Double_t)Nposts));
2044 fliptran = new TGeoCombiTrans("",0.0,0.0,Z0,zposts180);
2045 Moth->AddNode(Ov,Nposts+i+1,fliptran); // RB26 side
541f7ba6 2046 } // end for i
2047 //
2048 for(i=0;i<NinScrews;i++){
171f3f35 2049 t = (Phi0Screws+360.*((Double_t)i)/((Double_t)NinScrews))*kRadian;
2050 tran= new TGeoTranslation("",RcylinderScrews*TMath::Cos(t),
2051 RcylinderScrews*TMath::Sin(t),0.0);
2052 Kv->AddNode(Qv,NcQ++,tran);
2053 if(/*not where volumes U and T are*/kTRUE){
2054 tranR = new TGeoTranslation("",RcylinderScrews*TMath::Cos(t),
2055 RcylinderScrews*TMath::Sin(t),
2056 K->GetZ(2)+R->GetDz());
2057 tranS = new TGeoTranslation("",RcylinderScrews*TMath::Cos(t),
2058 RcylinderScrews*TMath::Sin(t),
2059 I->GetZ(4)+S->GetDz());
2060 Kv->AddNode(Rv,NcR++,tranR);
2061 Iv->AddNode(Sv,NcS++,tranS);
2062 } // end if
541f7ba6 2063 } // end for i
541f7ba6 2064 const Int_t Nbscrew=2,Nbpins=3,Nrailsc=4,Nrailp=2;
2065 Double_t da[] = {-3.5,-1.5,1.5,3.5};
2066 for(i=0;i<2;i++){ // Mounting for ITS-TPC bracket or ITS-Rails
171f3f35 2067 t0 = 180.*((Double_t)i)*kRadian;
2068 for(j=-Nbscrew/2;j<=Nbscrew/2;j++)if(j!=0){//screws per ITS-TPC bracket
2069 t = t0 + 5.0*((Double_t)j)*kRadian;
2070 tran = new TGeoTranslation("",RoutHole*TMath::Cos(t),
2071 RoutHole*TMath::Sin(t),
2072 B->GetZ(0)+D->GetDz());
2073 Bv->AddNode(Dv,NcD++,tran);
2074 //if(fDebug) cout << "D: NcD="<<NcD<<endl;
2075 } // end or j
2076 for(j=-Nbpins/2;j<=Nbpins/2;j++){ // pins per ITS-TPC bracket
2077 t = t0 + 3.0*((Double_t)j)*kRadian;
2078 tran = new TGeoTranslation("",RoutHole*TMath::Cos(t),
2079 RoutHole*TMath::Sin(t),
2080 B->GetZ(0)+D->GetDz());
2081 Bv->AddNode(Ev,NcE++,tran);
2082 //if(fDebug) cout << "E: NcE="<<NcE<<endl;
2083 } // end or j
2084 t0 = (96.5+187.*((Double_t)i))*kRadian;
2085 for(j=0;j<Nrailsc;j++){ // screws per ITS-rail bracket
2086 t = t0+da[j]*kRadian;
2087 tran = new TGeoTranslation("",RoutHole*TMath::Cos(t),
2088 RoutHole*TMath::Sin(t),
2089 B->GetZ(0)+D->GetDz());
2090 Bv->AddNode(Dv,NcD++,tran);
2091 //if(fDebug) cout << "D2: NcD="<<NcD<<endl;
2092 } // end or j
2093 t0 = (91.5+184.*((Double_t)i))*kRadian;
2094 for(j=-Nrailp/2;j<=Nrailp/2;j++)if(j!=0){ // pins per ITS-rail bracket
2095 t = t0+(7.0*((Double_t)j))*kRadian;
2096 tran = new TGeoTranslation("",RoutHole*TMath::Cos(t),
2097 RoutHole*TMath::Sin(t),
2098 B->GetZ(0)+D->GetDz());
2099 Bv->AddNode(Ev,NcE++,tran);
2100 //if(fDebug) cout << "E2: NcE="<<NcE<<endl;
2101 } // end or j
541f7ba6 2102 } // end for i
2103 for(i=0;i<Nmounts;i++){ // mounting points for SPD-cone+Beam-pipe support
171f3f35 2104 t0 = (45.0+((Double_t)i)*360./((Double_t)Nmounts))*kRadian;
2105 for(j=-1;j<=1;j++)if(j!=0){ // 2 screws per bracket
2106 t = t0+((Double_t)j)*0.5*DmountAngle*kRadian;
2107 tran = new TGeoTranslation("",RoutHole*TMath::Cos(t),
2108 RoutHole*TMath::Sin(t),
2109 B->GetZ(0)+D->GetDz());
2110 Bv->AddNode(Dv,NcD++,tran);
2111 //if(fDebug) cout << "D3: NcD="<<NcD<<endl;
2112 } // end for j
2113 for(j=0;j<1;j++){ // 1 pin per bracket
2114 t = t0;
2115 tran = new TGeoTranslation("",RoutHole*TMath::Cos(t),
2116 RoutHole*TMath::Sin(t),
2117 B->GetZ(0)+D->GetDz());
2118 Bv->AddNode(Ev,NcE++,tran);
2119 //if(fDebug) cout << "E3: NcE="<<NcE<<endl;
2120 } // end for j
541f7ba6 2121 } // end for i
171f3f35 2122 t = (T->GetPhi1()+0.5*T->GetDphi())*kRadian;
2123 tran = new TGeoTranslation("",RinHole*TMath::Cos(t),RinHole*TMath::Sin(t),
2124 T->GetZ(T->GetNz()-1)+R->GetDz());
541f7ba6 2125 Tv->AddNode(Rv,NcR++,tran);
171f3f35 2126 t = (U->GetPhi1()+0.5*U->GetDphi())*kRadian;
2127 tran = new TGeoTranslation("",RinHole*TMath::Cos(t),RinHole*TMath::Sin(t),
2128 U->GetZ(U->GetNz()-1)+S->GetDz());
541f7ba6 2129 Uv->AddNode(Sv,NcS++,tran);
2130 for(i=0;i<NssdSupports;i++){ // mounting braclets for SSD/SDD
171f3f35 2131 t0 = ((Double_t)i*360./((Double_t)NssdSupports));
2132 rot = new TGeoRotation("",0.0,0.0,t0);
2133 Kv->AddNode(Tv,NcT++,rot);
2134 Iv->AddNode(Uv,NcU++,rot);
2135 //if(fDebug) cout << "T/U: copy number="<<i+1<<endl;
2136 //for(j=0;j<1;j++){ // 1 screws per bracket
2137 // t = t0;
2138 //} // end for j
2139 for(j=0;j<2;j++)if(j!=0){ // 2 pin per bracket
2140 t = t0 + ((Double_t)j)*0.5*DssdsddBracketAngle;
2141 tran = new TGeoTranslation("",RinHole*TMath::Cos(t),
2142 RinHole*TMath::Sin(t),
2143 T->GetZ(T->GetNz()-1)-E->GetDz());
2144 Kv->AddNode(Ev,NcE++,tran);
2145 } // end for j
541f7ba6 2146 } // end for i
2147}
2148//______________________________________________________________________
2149void AliITSv11::CreateMaterials(){
2150 // Create ITS materials
2151 // This function defines the default materials used in the Geant
2152 // Monte Carlo simulations for the geometries AliITSv11.
2153 // In general it is automatically replaced by
2154 // Inputs:
2155 // none.
2156 // Outputs:
2157 // none.
2158 // Return
2159 // none.
aa9bc63b 2160
541f7ba6 2161 //TGeoMaterial *C = new TGeoMaterial("ITSCarbon",12.0,6.0,2.265);
2162 TGeoMaterial *Al = new TGeoMaterial("ITSAluminum",26.981539,13.0,2.07);
2163 TGeoMixture *Cfiber = new TGeoMixture("ITSCarbonFiber",6,1.930);
2164 TGeoMixture *Rohacell = new TGeoMixture("ITSRohacell",6,1.930);
2165 TGeoMixture *Staselite = new TGeoMixture("ITSStaselite4411w",6,1.930);
2166 TGeoMixture *Air = new TGeoMixture("ITSAir",6,1.205*1.E-3);
2167 TGeoMixture *Stainless = new TGeoMixture("ITSStainless",6,1.930);
2168 //
afac0af7 2169 Double_t SPDcone[20];
2170 SPDcone[0] = 1.0; // imat
2171 SPDcone[1] = 0.0; // isvol
2172 SPDcone[2] = gAlice->Field()->Integ(); // ifield
2173 SPDcone[3] = gAlice->Field()->Max(); // fieldm
2174 SPDcone[4] = 1.0; // tmaxfd [degrees]
2175 SPDcone[5] = 1.0; // stemax [cm]
2176 SPDcone[6] = 0.5; // deemax [fraction]
2177 SPDcone[7] = 1.0E-3; // epsil [cm]
2178 SPDcone[8] = 0.0; // stmin [cm]
2179 new TGeoMedium("ITSspdCarbonFiber",1,Cfiber,SPDcone);
2180 SPDcone[0] += 1.0;
2181 new TGeoMedium("ITSspdStaselite4411w",2,Staselite,SPDcone);
2182 SPDcone[0] += 1.0;
2183 new TGeoMedium("ITSspdRohacell50A",3,Rohacell,SPDcone);
2184 SPDcone[0] += 1.0;
2185 new TGeoMedium("ITSspdStainlesSteal",4,Stainless,SPDcone);
2186 SPDcone[0] += 1.0;
2187 new TGeoMedium("ITSspdAir",5,Air,SPDcone);
2188 SPDcone[0] += 1.0;
2189 new TGeoMedium("ITSspdAl",6,Al,SPDcone);
2190 //
541f7ba6 2191 Double_t SSDcone[20];
2192 SSDcone[0] = 1.0; // imat
2193 SSDcone[1] = 0.0; // isvol
2194 SSDcone[2] = gAlice->Field()->Integ(); // ifield
2195 SSDcone[3] = gAlice->Field()->Max(); // fieldm
2196 SSDcone[4] = 1.0; // tmaxfd [degrees]
2197 SSDcone[5] = 1.0; // stemax [cm]
2198 SSDcone[6] = 0.5; // deemax [fraction]
2199 SSDcone[7] = 1.0E-3; // epsil [cm]
2200 SSDcone[8] = 0.0; // stmin [cm]
2201 new TGeoMedium("ITSssdCarbonFiber",1,Cfiber,SSDcone);
2202 SSDcone[0] += 1.0;
2203 new TGeoMedium("ITSssdStaselite4411w",2,Staselite,SSDcone);
2204 SSDcone[0] += 1.0;
2205 new TGeoMedium("ITSssdRohacell50A",3,Rohacell,SSDcone);
2206 SSDcone[0] += 1.0;
2207 new TGeoMedium("ITSssdStainlesSteal",4,Stainless,SSDcone);
2208 SSDcone[0] += 1.0;
2209 new TGeoMedium("ITSssdAir",5,Air,SSDcone);
2210 SSDcone[0] += 1.0;
2211 new TGeoMedium("ITSssdAl",6,Al,SSDcone);
dfefbaec 2212}
2213//______________________________________________________________________
2214void AliITSv11::InitAliITSgeom(){
aa9bc63b 2215 // Based on the geometry tree defined in Geant 3.21, this
162acd47 2216 // routine initilizes the Class AliITSgeom from the Geant 3.21 ITS
2217 // geometry sturture.
aa9bc63b 2218 // Inputs:
2219 // none.
2220 // Outputs:
2221 // none.
2222 // Return
2223 // none.
dfefbaec 2224}
dfefbaec 2225//______________________________________________________________________
2226void AliITSv11::Init(){
aa9bc63b 2227 // Initialise the ITS after it has been created.
2228 // Inputs:
2229 // none.
2230 // Outputs:
2231 // none.
2232 // Return
2233 // none.
dfefbaec 2234}
2235//______________________________________________________________________
2236void AliITSv11::SetDefaults(){
162acd47 2237 // Sets the default segmentation, response, digit and raw cluster
2238 // classes to be used. These defaults can be overwritten in the
2239 // macros that do these later steps. Defaults are give hear for the
2240 // general user.
aa9bc63b 2241 // Inputs:
2242 // none.
2243 // Outputs:
2244 // none.
2245 // Return
2246 // none.
dfefbaec 2247}
2248//______________________________________________________________________
2249void AliITSv11::DrawModule(){
162acd47 2250 // Draw a standard set of shaded view of the ITS version 11.
aa9bc63b 2251 // Inputs:
2252 // none.
2253 // Outputs:
2254 // none.
2255 // Return
2256 // none.
dfefbaec 2257}
2258//______________________________________________________________________
2259void AliITSv11::StepManager(){
aa9bc63b 2260 // Called for every step in the ITS, then calles the AliITShit class
dfefbaec 2261 // creator with the information to be recoreded about that hit.
aa9bc63b 2262 // The value of the macro ALIITSPRINTGEOM if set to 1 will allow the
dfefbaec 2263 // printing of information to a file which can be used to create a .det
2264 // file read in by the routine CreateGeometry(). If set to 0 or any other
2265 // value except 1, the default behavior, then no such file is created nor
162acd47 2266 // is the extra variables and the like used in the printing allocated.
2b680d9b 2267}
dfefbaec 2268