]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSv11.cxx
Updated for a new name of MUON St1 response class
[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
16/*
17$Log$
dfefbaec 18Revision 1.1 2003/01/20 23:32:49 nilsen
19New ITS geometry. Only a Skeleton for now.
20
2b680d9b 21$Id$
22*/
23
24//////////////////////////////////////////////////////////////////////////////
25// //
26// Inner Traking System version 11 //
27// This class contains the base procedures for the Inner Tracking System //
28// //
29// Authors: R. Barbera //
30// version 6. //
31// Created 2000. //
32// //
33// NOTE: THIS IS THE SYMMETRIC PPR geometry of the ITS. //
34// THIS WILL NOT WORK //
35// with the geometry or module classes or any analysis classes. You are //
36// strongly encouraged to uses AliITSv5. //
37// //
38//////////////////////////////////////////////////////////////////////////////
39// See AliITSv11::StepManager().
40#include <Riostream.h>
41#include <stdio.h>
42#include <stdlib.h>
43#include <TMath.h>
44#include <TGeometry.h>
45#include <TNode.h>
46#include <TTUBE.h>
47#include <TTUBS.h>
48#include <TPCON.h>
49#include <TFile.h> // only required for Tracking function?
50#include <TCanvas.h>
51#include <TObjArray.h>
52#include <TLorentzVector.h>
53#include <TObjString.h>
54#include <TClonesArray.h>
55#include <TBRIK.h>
56#include <TSystem.h>
57
58
59#include "AliRun.h"
60#include "AliMagF.h"
61#include "AliConst.h"
62#include "AliITSGeant3Geometry.h"
63#include "AliITShit.h"
64#include "AliITS.h"
65#include "AliITSv11.h"
66#include "AliITSgeom.h"
67#include "AliITSgeomSPD.h"
68#include "AliITSgeomSDD.h"
69#include "AliITSgeomSSD.h"
70#include "AliITSDetType.h"
71#include "AliITSresponseSPD.h"
72#include "AliITSresponseSDD.h"
73#include "AliITSresponseSSD.h"
74#include "AliITSsegmentationSPD.h"
75#include "AliITSsegmentationSDD.h"
76#include "AliITSsegmentationSSD.h"
77#include "AliITSsimulationSPD.h"
78#include "AliITSsimulationSDD.h"
79#include "AliITSsimulationSSD.h"
80#include "AliITSClusterFinderSPD.h"
81#include "AliITSClusterFinderSDD.h"
82#include "AliITSClusterFinderSSD.h"
83
84
85ClassImp(AliITSv11)
86
87//______________________________________________________________________
88AliITSv11::AliITSv11() : AliITS() {
dfefbaec 89 ////////////////////////////////////////////////////////////////////////
90 // Standard default constructor for the ITS version 11.
91 ////////////////////////////////////////////////////////////////////////
2b680d9b 92}
93//______________________________________________________________________
94AliITSv11::AliITSv11(const char *title) : AliITS("ITS", title){
dfefbaec 95 ////////////////////////////////////////////////////////////////////////
96 // Standard constructor for the ITS version 11.
97 ////////////////////////////////////////////////////////////////////////
2b680d9b 98}
99//______________________________________________________________________
100AliITSv11::~AliITSv11() {
dfefbaec 101 ////////////////////////////////////////////////////////////////////////
102 // Standard destructor for the ITS version 11.
103 ////////////////////////////////////////////////////////////////////////
2b680d9b 104}
105//______________________________________________________________________
106void AliITSv11::Box(const char gnam[3],const TString &dis,
107 Double_t dx,Double_t dy,Double_t dz,Int_t med){
108 // Interface to TMC->Gsvolu() for ITS bos geometries. Box with faces
109 // perpendicular to the axes. It has 3 paramters. See SetScale() for
110 // units. Default units are geant 3 [cm].
111 // Inputs:
112 // const char gnam[3] 3 character geant volume name. The letter "I"
113 // is appended to the front to indecate that this
114 // is an ITS volume.
115 // TString &dis String containging part discription.
116 // Double_t dx half-length of box in x-axis
117 // Double_t dy half-length of box in y-axis
118 // Double_t dz half-length of box in z-axis
119 // Int_t med media index number.
120 // Output:
121 // none.
122 // Return.
123 // none.
124 char name[4];
125 Float_t param[3];
126
127 param[0] = fScale*dx;
128 param[1] = fScale*dy;
129 param[2] = fScale*dz;
130 name[0] = 'I';
131 for(Int_t i=0;i<3;i++) name[i+1] = gnam[i];
132 gMC->Gsvolu(name,"BOX ",fidmed[med],param,3);
133}
134//______________________________________________________________________
135void AliITSv11::Trapezoid1(const char gnam[3],const TString &dis,
136 Double_t dxn,Double_t dxp,Double_t dy,Double_t dz,
137 Int_t med){
138 // Interface to TMC->Gsvolu() for ITS TRD1 geometries. Trapezoid with the
139 // x dimension varing along z. It has 4 parameters. See SetScale() for
140 // units. Default units are geant 3 [cm].
141 // Inputs:
142 // const char gnam[3] 3 character geant volume name. The letter "I"
143 // is appended to the front to indecate that this
144 // is an ITS volume.
145 // TString &dis String containging part discription.
146 // Double_t dxn half-length along x at the z surface positioned
147 // at -DZ
148 // Double_t dxp half-length along x at the z surface positioned
149 // at +DZ
150 // Double_t dy half-length along the y-axis
151 // Double_t dz half-length along the z-axis
152 // Int_t med media index number.
153 // Output:
154 // none.
155 // Return.
156 // none.
157 char name[4];
158 Float_t param[4];
159
160 param[0] = fScale*dxn;
161 param[1] = fScale*dxp;
162 param[2] = fScale*dy;
163 param[3] = fScale*dz;
164 name[0] = 'I';
165 for(Int_t i=0;i<3;i++) name[i+1] = gnam[i];
166 gMC->Gsvolu(name,"TRD1",fidmed[med],param,4);
167}
168//______________________________________________________________________
169void AliITSv11::Trapezoid2(const char gnam[3],const TString &dis,Double_t dxn,
170 Double_t dxp,Double_t dyn,Double_t dyp,Double_t dz,
171 Int_t med){
172 // Interface to TMC->Gsvolu() for ITS TRD2 geometries. Trapezoid with the
173 // x and y dimension varing along z. It has 5 parameters. See SetScale()
174 // for units. Default units are geant 3 [cm].
175 // Inputs:
176 // const char gnam[3] 3 character geant volume name. The letter "I"
177 // is appended to the front to indecate that this
178 // is an ITS volume.
179 // TString &dis String containging part discription.
180 // Double_t dxn half-length along x at the z surface positioned
181 // at -DZ
182 // Double_t dxp half-length along x at the z surface positioned
183 // at +DZ
184 // Double_t dyn half-length along x at the z surface positioned
185 // at -DZ
186 // Double_t dyp half-length along x at the z surface positioned
187 // at +DZ
188 // Double_t dz half-length along the z-axis
189 // Int_t med media index number.
190 // Output:
191 // none.
192 // Return.
193 // none.
194 char name[4];
195 Float_t param[5];
196
197 param[0] = fScale*dxn;
198 param[1] = fScale*dxp;
199 param[2] = fScale*dyn;
200 param[3] = fScale*dyp;
201 param[4] = fScale*dz;
202 name[0] = 'I';
203 for(Int_t i=0;i<3;i++) name[i+1] = gnam[i];
204 gMC->Gsvolu(name,"TRD2",fidmed[med],param,5);
205}
206//______________________________________________________________________
207void AliITSv11::Trapezoid(const char gnam[3],const TString &dis,Double_t dz,
208 Double_t thet,Double_t phi,Double_t h1,Double_t bl1,
209 Double_t tl1,Double_t alp1,Double_t h2,Double_t bl2,
210 Double_t tl2,Double_t alp2,Int_t med){
211 // Interface to TMC->Gsvolu() for ITS TRAP geometries. General Trapezoid,
212 // The faces perpendicular to z are trapezia and their centers are not
213 // necessarily on a line parallel to the z axis. This shape has 11
214 // parameters, but only cosidering that the faces should be planar, only 9
215 // are really independent. A check is performed on the user parameters and
216 // a message is printed in case of non-planar faces. Ignoring this warning
217 // may cause unpredictable effects at tracking time. See SetScale()
218 // for units. Default units are geant 3 [cm].
219 // Inputs:
220 // const char gnam[3] 3 character geant volume name. The letter "I"
221 // is appended to the front to indecate that this
222 // is an ITS volume.
223 // TString &dis String containging part discription.
224 // Double_t dz Half-length along the z-asix
225 // Double_t thet Polar angle of the line joing the center of the
226 // face at -dz to the center of the one at dz
227 // [degree].
228 // Double_t phi aximuthal angle of the line joing the center of
229 // the face at -dz to the center of the one at +dz
230 // [degree].
231 // Double_t h1 half-length along y of the face at -dz.
232 // Double_t bl1 half-length along x of the side at -h1 in y of
233 // the face at -dz in z.
234 // Double_t tl1 half-length along x of teh side at +h1 in y of
235 // the face at -dz in z.
236 // Double_t alp1 angle with respect to the y axis from the center
237 // of the side at -h1 in y to the cetner of the
238 // side at +h1 in y of the face at -dz in z
239 // [degree].
240 // Double_t h2 half-length along y of the face at +dz
241 // Double_t bl2 half-length along x of the side at -h2 in y of
242 // the face at +dz in z.
243 // Double_t tl2 half-length along x of the side at _h2 in y of
244 // the face at +dz in z.
245 // Double_t alp2 angle with respect to the y axis from the center
246 // of the side at -h2 in y to the center of the
247 // side at +h2 in y of the face at +dz in z
248 // [degree].
249 // Int_t med media index number.
250 // Output:
251 // none.
252 // Return.
253 // none.
254 char name[4];
255 Float_t param[11];
256
257 param[0] = fScale*dz;
258 param[1] = thet;
259 param[2] = phi;
260 param[3] = fScale*h1;
261 param[4] = fScale*bl1;
262 param[5] = fScale*tl1;
263 param[6] = alp1;
264 param[7] = fScale*h2;
265 param[8] = fScale*bl2;
266 param[9] = fScale*tl2;
267 param[10] = alp2;
268 name[0] = 'I';
269 for(Int_t i=0;i<3;i++) name[i+1] = gnam[i];
270 gMC->Gsvolu(name,"TRAP",fidmed[med],param,11);
271}
272//______________________________________________________________________
273void AliITSv11::Tube(const char gnam[3],const TString &dis,Double_t rmin,
274 Double_t rmax,Double_t dz,Int_t med){
275 // Interface to TMC->Gsvolu() for ITS TUBE geometries. Simple Tube. It has
276 // 3 parameters. See SetScale()
277 // for units. Default units are geant 3 [cm].
278 // Inputs:
279 // const char gnam[3] 3 character geant volume name. The letter "I"
280 // is appended to the front to indecate that this
281 // is an ITS volume.
282 // TString &dis String containging part discription.
283 // Double_t rmin Inside Radius.
284 // Double_t rmax Outside Radius.
285 // Double_t dz half-length along the z-axis
286 // Int_t med media index number.
287 // Output:
288 // none.
289 // Return.
290 // none.
291 char name[4];
292 Float_t param[3];
293
294 param[0] = fScale*rmin;
295 param[1] = fScale*rmax;
296 param[2] = fScale*dz;
297 name[0] = 'I';
298 for(Int_t i=0;i<3;i++) name[i+1] = gnam[i];
299 gMC->Gsvolu(name,"TUBE",fidmed[med],param,3);
300}
301//______________________________________________________________________
302void AliITSv11::TubeSegment(const char gnam[3],const TString &dis,
303 Double_t rmin,Double_t rmax,Double_t dz,
304 Double_t phi1,Double_t phi2,Int_t med){
305 // Interface to TMC->Gsvolu() for ITS TUBE geometries. Phi segment of a
306 // tube. It has 5 parameters. Phi1 should be smaller than phi2. If this is
307 // not the case, the system adds 360 degrees to phi2. See SetScale()
308 // for units. Default units are geant 3 [cm].
309 // Inputs:
310 // const char gnam[3] 3 character geant volume name. The letter "I"
311 // is appended to the front to indecate that this
312 // is an ITS volume.
313 // TString &dis String containging part discription.
314 // Double_t rmin Inside Radius.
315 // Double_t rmax Outside Radius.
316 // Double_t dz half-length along the z-axis
317 // Double_t phi1 Starting angle of the segment [degree].
318 // Double_t phi2 Ending angle of the segment [degree].
319 // Int_t med media index number.
320 // Output:
321 // none.
322 // Return.
323 // none.
324 char name[4];
325 Float_t param[5];
326
327 param[0] = fScale*rmin;
328 param[1] = fScale*rmax;
329 param[2] = fScale*dz;
330 param[3] = phi1;
331 param[4] = phi2;
332 name[0] = 'I';
333 for(Int_t i=0;i<3;i++) name[i+1] = gnam[i];
334 gMC->Gsvolu(name,"TUBS",fidmed[med],param,5);
335}
336//______________________________________________________________________
337void AliITSv11::Cone(const char gnam[3],const TString &dis,Double_t dz,
338 Double_t rmin1,Double_t rmax1,Double_t rmin2,
339 Double_t rmax2,Int_t med){
340 // Interface to TMC->Gsvolu() for ITS Cone geometries. Conical tube. It
341 // has 5 parameters. See SetScale()
342 // for units. Default units are geant 3 [cm].
343 // Inputs:
344 // const char gnam[3] 3 character geant volume name. The letter "I"
345 // is appended to the front to indecate that this
346 // is an ITS volume.
347 // TString &dis String containging part discription.
348 // Double_t dz half-length along the z-axis
349 // Double_t rmin1 Inside Radius at -dz.
350 // Double_t rmax1 Outside Radius at -dz.
351 // Double_t rmin2 inside radius at +dz.
352 // Double_t rmax2 outside radius at +dz.
353 // Int_t med media index number.
354 // Output:
355 // none.
356 // Return.
357 // none.
358 char name[4];
359 Float_t param[5];
360
361 param[0] = fScale*dz;
362 param[1] = fScale*rmin1;
363 param[2] = fScale*rmax1;
364 param[3] = fScale*rmin2;
365 param[4] = fScale*rmax2;
366 name[0] = 'I';
367 for(Int_t i=0;i<3;i++) name[i+1] = gnam[i];
368 gMC->Gsvolu(name,"CONS",fidmed[med],param,5);
369}
370//______________________________________________________________________
371void AliITSv11::ConeSegment(const char gnam[3],const TString &dis,Double_t dz,
372 Double_t rmin1,Double_t rmax1,Double_t rmin2,
373 Double_t rmax2,Double_t phi1,Double_t phi2,
374 Int_t med){
375 // Interface to TMC->Gsvolu() for ITS ConS geometries. One segment of a
376 // conical tube. It has 7 parameters. Phi1 should be smaller than phi2. If
377 // this is not the case, the system adds 360 degrees to phi2. See
378 // SetScale() for units. Default units are geant 3 [cm].
379 // Inputs:
380 // const char gnam[3] 3 character geant volume name. The letter "I"
381 // is appended to the front to indecate that this
382 // is an ITS volume.
383 // TString &dis String containging part discription.
384 // Double_t dz half-length along the z-axis
385 // Double_t rmin1 Inside Radius at -dz.
386 // Double_t rmax1 Outside Radius at -dz.
387 // Double_t rmin2 inside radius at +dz.
388 // Double_t rmax2 outside radius at +dz.
389 // Double_t phi1 Starting angle of the segment [degree].
390 // Double_t phi2 Ending angle of the segment [degree].
391 // Int_t med media index number.
392 // Output:
393 // none.
394 // Return.
395 // none.
396 char name[4];
397 Float_t param[7];
398
399 param[0] = fScale*dz;
400 param[1] = fScale*rmin1;
401 param[2] = fScale*rmax1;
402 param[3] = fScale*rmin2;
403 param[4] = fScale*rmax2;
404 param[5] = phi1;
405 param[6] = phi2;
406 name[0] = 'I';
407 for(Int_t i=0;i<3;i++) name[i+1] = gnam[i];
408 gMC->Gsvolu(name,"CONS",fidmed[med],param,7);
409}
410//______________________________________________________________________
411void AliITSv11::Sphere(const char gnam[3],const TString &dis,Double_t rmin,
412 Double_t rmax,Double_t the1,Double_t the2,Double_t phi1,
413 Double_t phi2,Int_t med){
414 // Interface to TMC->Gsvolu() for ITS SPHE geometries. Segment of a
415 // sphereical shell. It has 6 parameters. See SetScale()
416 // for units. Default units are geant 3 [cm].
417 // Inputs:
418 // const char gnam[3] 3 character geant volume name. The letter "I"
419 // is appended to the front to indecate that this
420 // is an ITS volume.
421 // TString &dis String containging part discription.
422 // Double_t rmin Inside Radius.
423 // Double_t rmax Outside Radius.
424 // Double_t the1 staring polar angle of the shell [degree].
425 // Double_t the2 ending polar angle of the shell [degree].
426 // Double_t phui staring asimuthal angle of the shell [degree].
427 // Double_t phi2 ending asimuthal angle of the shell [degree].
428 // Int_t med media index number.
429 // Output:
430 // none.
431 // Return.
432 // none.
433 char name[4];
434 Float_t param[6];
435
436 param[0] = fScale*rmin;
437 param[1] = fScale*rmax;
438 param[2] = the1;
439 param[3] = the2;
440 param[4] = phi1;
441 param[5] = phi2;
442 name[0] = 'I';
443 for(Int_t i=0;i<3;i++) name[i+1] = gnam[i];
444 gMC->Gsvolu(name,"SPHE",fidmed[med],param,6);
445}
446//______________________________________________________________________
447void AliITSv11::Parallelepiped(const char gnam[3],const TString &dis,
448 Double_t dx,Double_t dy,Double_t dz,
449 Double_t alph,Double_t thet,Double_t phi,
450 Int_t med){
451 // Interface to TMC->Gsvolu() for ITS PARA geometries. Parallelepiped. It
452 // has 6 parameters. See SetScale() for units. Default units are geant 3
453 // [cm].
454 // Inputs:
455 // const char gnam[3] 3 character geant volume name. The letter "I"
456 // is appended to the front to indecate that this
457 // is an ITS volume.
458 // TString &dis String containging part discription.
459 // Double_t dx half-length allong x-axis
460 // Double_t dy half-length allong y-axis
461 // Double_t dz half-length allong z-axis
462 // Double_t alpha angle formed by the y axis and by the plane
463 // joining the center of teh faces parallel to the
464 // z-x plane at -dY and +dy [degree].
465 // Double_t thet polar angle of the line joining the centers of
466 // the faces at -dz and +dz in z [degree].
467 // Double_t phi azimuthal angle of teh line joing the centers of
468 // the faaces at -dz and +dz in z [degree].
469 // Int_t med media index number.
470 // Output:
471 // none.
472 // Return.
473 // none.
474 char name[4];
475 Float_t param[6];
476
477 param[0] = fScale*dx;
478 param[1] = fScale*dy;
479 param[2] = fScale*dz;
480 param[3] = alpha;
481 param[4] = thet;
482 param[5] = phi;
483 name[0] = 'I';
484 for(Int_t i=0;i<3;i++) name[i+1] = gnam[i];
485 gMC->Gsvolu(name,"PARA",fidmed[med],param,6);
486}
487//______________________________________________________________________
488void AliITSv11::Polygon(const char gnam[3],const TString &dis,Double_t phi1,
489 Double_t dphi,Int_t npdv,Int_t nz,Double_t *z,
490 Double_t *rmin,Double_t *rmax,Double_t ,Int_t med){
491 // Interface to TMC->Gsvolu() for ITS PGON geometry. Polygon It has 10
492 // parameters or more. See SetScale() for units. Default units are geant 3
493 // [cm].
494 // Inputs:
495 // const char gnam[3] 3 character geant volume name. The letter "I"
496 // is appended to the front to indecate that this
497 // is an ITS volume.
498 // TString &dis String containging part discription.
499 // Double_t phi1 the azimuthal angle at which the volume begins
500 // (angles are counted clouterclockwise) [degrees].
501 // Double_t dphi opening angle of the volume, which extends from
502 // phi1 to phi1+dphi [degree].
503 // Int_t npdv the number of sides of teh cross section between
504 // the given phi limits.
505 // Int_t nz number of planes perpendicular to the z axis
506 // where the dimension of the section is given -
507 // this number should be at least 2 and NP triples
508 // of number must follow.
509 // Double_t *z array [nz] of z coordiates of the sections..
510 // Double_t *rmin array [nz] of radius of teh circle tangent to
511 // the sides of the inner polygon in teh
512 // cross-section.
513 // Double_t *rmax array [nz] of radius of the circle tangent to
514 // the sides of the outer polygon in the
515 // cross-section.
516 // Int_t med media index number.
517 // Output:
518 // none.
519 // Return.
520 // none.
521 char name[4];
522 Float_t *param;
523 Int_t n,i;
524
525 n = 4+3*nz;
526 param = new Float_t[n]
527 param[0] = phi1;
528 param[1] = dphi;
529 param[2] = (Float_t)npdv;
530 param[3] = (Float_t)nz;
531 for(i=0;i<nz;i++){
532 param[4+3*i] = z[i];
533 param[5+3*i] = rmin[i];
534 param[6+3*i] = rmax[i];
535 } // end for i
536 name[0] = 'I';
537 for(i=0;i<3;i++) name[i+1] = gnam[i];
538 gMC->Gsvolu(name,"PGON",fidmed[med],param,n);
539
540 delete[] param;
541}
542//______________________________________________________________________
543void AliITSv11::PolyCone(const char gnam[3],const TString &dis,Double_t phi1,
544 Double_t dphi,Int_t nz,Double_t *z,Double_t *rmin,
545 Double_t *rmax,Int_t med){
546 // Interface to TMC->Gsvolu() for ITS PCON geometry. Poly-cone It has 9
547 // parameters or more. See SetScale() for units. Default units are geant 3
548 // [cm].
549 // Inputs:
550 // const char gnam[3] 3 character geant volume name. The letter "I"
551 // is appended to the front to indecate that this
552 // is an ITS volume.
553 // TString &dis String containging part discription.
554 // Double_t phi1 the azimuthal angle at which the volume begins
555 // (angles are counted clouterclockwise) [degrees].
556 // Double_t dphi opening angle of the volume, which extends from
557 // phi1 to phi1+dphi [degree].
558 // Int_t nz number of planes perpendicular to the z axis
559 // where the dimension of the section is given -
560 // this number should be at least 2 and NP triples
561 // of number must follow.
562 // Double_t *z Array [nz] of z coordinate of the section.
563 // Double_t *rmin Array [nz] of radius of teh inner circle in the
564 // cross-section.
565 // Double_t *rmax Array [nz] of radius of the outer circle in the
566 // cross-section.
567 // Int_t med media index number.
568 // Output:
569 // none.
570 // Return.
571 // none.
572 char name[4];
573 Float_t *param;
574 Int_t n,i;
575
576 n = 3+3*nz;
577 param = new Float_t[n];
578 param[0] = phi1;
579 param[1] = dphi;
580 param[2] = (Float_t) nz;
581 for(i=0;i<nz;i++){
582 param[3+3*i] = z[i];
583 param[4+3*i] = rmin[i];
584 param[5+3*i] = rmax[i];
585 } // end for i
586 name[0] = 'I';
587 for(i=0;i<3;i++) name[i+1] = gnam[i];
588 gMC->Gsvolu(name,"PCON",fidmed[med],param,n);
589
590 delete[] param;
591}
592//______________________________________________________________________
593void AliITSv11::TubeElliptical(const char gnam[3],const TString &dis,
594 Double_t p1,Double_t p2,Double_t dz,Int_t med){
595 // Interface to TMC->Gsvolu() for ITS ELTU geometries. Elliptical
596 // cross-section Tube. It has 3 parameters. See SetScale()
597 // for units. Default units are geant 3 [cm]. The equation of the surface
598 // is x^2 * p1^-2 + y^2 * p2^-2 = 1.
599 // Inputs:
600 // const char gnam[3] 3 character geant volume name. The letter "I"
601 // is appended to the front to indecate that this
602 // is an ITS volume.
603 // TString &dis String containging part discription.
604 // Double_t p1 semi-axis of the elipse along x.
605 // Double_t p2 semi-axis of the elipse along y.
606 // Double_t dz half-length along the z-axis
607 // Int_t med media index number.
608 // Output:
609 // none.
610 // Return.
611 // none.
612 char name[4];
613 Float_t param[3];
614
615 param[0] = fScale*p1;
616 param[1] = fScale*p2;
617 param[2] = fScale*dz;
618 name[0] = 'I';
619 for(Int_t i=0;i<3;i++) name[i+1] = gnam[i];
620 gMC->Gsvolu(name,"ELTU",fidmed[med],param,3);
621}
622//______________________________________________________________________
623void AliITSv11::HyperbolicTube(const char gnam[3],const TString &dis,
624 Double_t rmin,Double_t rmax,Double_t dz,
625 Double_t thet,Int_t med){
626 // Interface to TMC->Gsvolu() for ITS HYPE geometries. Hyperbolic tube.
627 // Fore example the inner and outer surfaces are hyperboloids, as would be
628 // foumed by a system of cylinderical wires which were then rotated
629 // tangentially about their centers. It has 4 parameters. See SetScale()
630 // for units. Default units are geant 3 [cm]. The hyperbolic surfaces are
631 // given by r^2 = (ztan(thet)^2 + r(z=0)^2.
632 // Inputs:
633 // const char gnam[3] 3 character geant volume name. The letter "I"
634 // is appended to the front to indecate that this
635 // is an ITS volume.
636 // TString &dis String containging part discription.
637 // Double_t rmin Inner radius at z=0 where tube is narrowest.
638 // Double_t rmax Outer radius at z=0 where tube is narrowest.
639 // Double_t dz half-length along the z-axis
640 // Double_t thet stero angel of rotation of the two faces
641 // [degrees].
642 // Int_t med media index number.
643 // Output:
644 // none.
645 // Return.
646 // none.
647 char name[4];
648 Float_t param[4];
649
650 param[0] = fScale*rmin;
651 param[1] = fScale*rmax;
652 param[2] = fScale*dz;
653 param[3] = thet;
654 name[0] = 'I';
655 for(Int_t i=0;i<3;i++) name[i+1] = gnam[i];
656 gMC->Gsvolu(name,"HYPE",fidmed[med],param,4);
657}
658//______________________________________________________________________
659void AliITSv11::TwistedTrapezoid(const char gnam[3],const TString &dis,
660 Double_t dz,Double_t thet,Double_t phi,
661 Double_t twist,Double_t h1,Double_t bl1,
662 Double_t tl1,Double_t apl1,Double_t h2,
663 Double_t bl2,Double_t tl2,Double_t apl2,
664 Int_t med){
665 // Interface to TMC->Gsvolu() for ITS GTRA geometries. General twisted
666 // trapazoid. The faces perpendicular to z are trapazia and their centers
667 // are not necessarily on a line parallel to the z axis as the TRAP.
668 // Additionally, the faces may be twisted so that none of their edges are
669 // parallel. It is a TRAP shape, exept that it is twisted in the x-y plane
670 // as a function of z. The parallel sides perpendicular to the x axis are
671 // rotated with respect to the x axis by an angle TWIST, which is one of
672 // the parameters. The shape is defined by the eight corners and is assumed
673 // to be constructed of straight lines joingin points on the boundry of the
674 // trapezoidal face at Z=-dz to the coresponding points on the face at
675 // z=+dz. Divisions are not allowed. It has 12 parameters. See SetScale()
676 // for units. Default units are geant 3 [cm]. Note: This shape suffers from
677 // the same limitations than the TRAP. The tracking routines assume that
678 // the faces are planar, but htis constraint is not easily expressed in
679 // terms of the 12 parameters. Additionally, no check on th efaces is
680 // performed in this case. Users should avoid to use this shape as much as
681 // possible, and if they have to do so, they should make sure that the
682 // faces are really planes. If this is not the case, the result of the
683 // trasport is unpredictable. To accelerat ethe computations necessary for
684 // trasport, 18 additioanl parameters are calculated for this shape are
685 // 1 DXODZ dx/dz of the line joing the centers of the faces at z=+_dz.
686 // 2 DYODZ dy/dz of the line joing the centers of the faces at z=+_dz.
687 // 3 XO1 x at z=0 for line joing the + on parallel side, perpendicular
688 // corners at z=+_dz.
689 // 4 YO1 y at z=0 for line joing the + on parallel side, + on
690 // perpendicular corners at z=+-dz.
691 // 5 DXDZ1 dx/dz for line joing the + on parallel side, + on
692 // perpendicular corners at z=+-dz.
693 // 6 DYDZ1 dy/dz for line joing the + on parallel side, + on
694 // perpendicular corners at z=+-dz.
695 // 7 X02 x at z=0 for line joing the - on parallel side, + on
696 // perpendicular corners at z=+-dz.
697 // 8 YO2 y at z=0 for line joing the - on parallel side, + on
698 // perpendicular corners at z=+-dz.
699 // 9 DXDZ2 dx/dz for line joing the - on parallel side, + on
700 // perpendicular corners at z=+-dz.
701 // 10 DYDZ2dy/dz for line joing the - on parallel side, + on
702 // perpendicular corners at z=+-dz.
703 // 11 XO3 x at z=0 for line joing the - on parallel side, - on
704 // perpendicular corners at z=+-dz.
705 // 12 YO3 y at z=0 for line joing the - on parallel side, - on
706 // perpendicular corners at z=+-dz.
707 // 13 DXDZ3 dx/dzfor line joing the - on parallel side, - on
708 // perpendicular corners at z=+-dz.
709 // 14 DYDZ3 dydz for line joing the - on parallel side, - on
710 // perpendicular corners at z=+-dz.
711 // 15 XO4 x at z=0 for line joing the + on parallel side, - on
712 // perpendicular corners at z=+-dz.
713 // 16 YO4 y at z=0 for line joing the + on parallel side, - on
714 // perpendicular corners at z=+-dz.
715 // 17 DXDZ4 dx/dz for line joing the + on parallel side, - on
716 // perpendicular corners at z=+-dz.
717 // 18 DYDZ4 dydz for line joing the + on parallel side, - on
718 // perpendicular corners at z=+-dz.
719 // Inputs:
720 // const char gnam[3] 3 character geant volume name. The letter "I"
721 // is appended to the front to indecate that this
722 // is an ITS volume.
723 // TString &dis String containging part discription.
724 // Double_t dz half-length along the z axis.
725 // Double_t thet polar angle of the line joing the center of the
726 // face at -dz to the center of the one at +dz
727 // [degrees].
728 // Double_t phi Azymuthal angle of teh line joing the centre of
729 // the face at -dz to the center of the one at +dz
730 // [degrees].
731 // Double_t twist Twist angle of the faces parallel to the x-y
732 // plane at z=+-dz around an axis parallel to z
733 // passing through their centre [degrees].
734 // Double_t h1 Half-length along y of the face at -dz.
735 // Double_t bl1 half-length along x of the side -h1 in y of the
736 // face at -dz in z.
737 // Double_t tl1 half-length along x of the side at +h1 in y of
738 // the face at -dz in z.
739 // Double_t apl1 Angle with respect to the y ais from the center
740 // of the side at -h1 in y to the centere of the
741 // side at +h1 in y of the face at -dz in z
742 // [degrees].
743 // Double_t h2 half-length along the face at +dz.
744 // Double_t bl2 half-length along x of the side at -h2 in y of
745 // the face at -dz in z.
746 // Double_t tl2 half-length along x of the side at +h2 in y of
747 // the face at +dz in z.
748 // Double_t apl2 angle with respect to the y axis from the center
749 // of the side at -h2 in y to the center of the side
750 // at +h2 in y of the face at +dz in z [degrees].
751 // Int_t med media index number.
752 // Output:
753 // none.
754 // Return.
755 // none.
756 char name[4];
757 Float_t param[12];
758
759 param[0] = fScale*dz;
760 param[1] = thet;
761 param[2] = phi;
762 param[3] = twist;
763 param[4] = fScale*h1;
764 param[5] = fScale*bl1;
765 param[6] = fScale*tl1;
766 param[7] = alp1;
767 param[8] = fScale*h2;
768 param[9] = fScale*bl2;
769 param[10] = fScale*tl2;
770 param[11] = alp2;
771 name[0] = 'I';
772 for(Int_t i=0;i<3;i++) name[i+1] = gnam[i];
773 gMC->Gsvolu(name,"GTRA",fidmed[med],param,12);
774}
775//______________________________________________________________________
776void AliITSv11::CutTube(const char gnam[3],const TString &dis,Double_t rmin,
777 Double_t rmax,Double_t dz,Double_t phi1,Double_t phi2,
778 Double_t lx,Double_t ly,Double_t lz,Double_t hx,
779 Double_t hy,Double_t hz,Int_t med){
780 // Interface to TMC->Gsvolu() for ITS CTUB geometries. Cut tube. A tube cut
781 // at the extremities with planes not necessarily perpendicular tot he z
782 // axis. It has 11 parameters. See SetScale() for units. Default units are
783 // geant 3 [cm]. phi1 should be smaller than phi2. If this is not the case,
784 // the system adds 360 degrees to phi2.
785 // Inputs:
786 // const char gnam[3] 3 character geant volume name. The letter "I"
787 // is appended to the front to indecate that this
788 // is an ITS volume.
789 // TString &dis String containging part discription.
790 // Double_t rmin Inner radius at z=0 where tube is narrowest.
791 // Double_t rmax Outer radius at z=0 where tube is narrowest.
792 // Double_t dz half-length along the z-axis
793 // Double_t dz half-length along the z-axis
794 // Double_t phi1 Starting angle of the segment [degree].
795 // Double_t phi2 Ending angle of the segment [degree].
796 // Double_t lx x component of a unit vector perpendicular to
797 // the face at -dz.
798 // Double_t ly y component of a unit vector perpendicular to
799 // the face at -dz.
800 // Double_t lz z component of a unit vector perpendicular to
801 // the face at -dz.
802 // Double_t hx x component of a unit vector perpendicular to
803 // the face at +dz.
804 // Double_t hy y component of a unit vector perpendicular to
805 // the face at +dz.
806 // Double_t hz z component of a unit vector perpendicular to
807 // the face at +dz.
808 // Int_t med media index number.
809 // Output:
810 // none.
811 // Return.
812 // none.
813 char name[4];
814 Float_t param[11];
815
816 param[0] = fScale*rmin;
817 param[1] = fScale*rmax;
818 param[2] = fScale*dz;
819 param[3] = phi1;
820 param[4] = phi2;
821 param[5] = lx;
822 param[6] = ly;
823 param[7] = lz;
824 param[8] = hx;
825 param[9] = hy;
826 param[10] = hz;
827 name[0] = 'I';
828 for(Int_t i=0;i<3;i++) name[i+1] = gnam[i];
829 gMC->Gsvolu(name,"CTUB",fidmed[med],param,11);
830}
831//______________________________________________________________________
832void AliITSv11::Pos(const char vol[3],Int_t cn,const char moth[3],Double_t x,
833 Double_t y,Double_t z,Int_t irot){
834 // Place a copy of a volume previously defined by a call to GSVOLU inside
835 // its mother volulme moth.
836 // Inputs:
837 // const char vol[3] 3 character geant volume name. The letter "I"
838 // is appended to the front to indecate that this
839 // is an ITS volume.
840 // const char moth[3] 3 character geant volume name of the mother volume
841 // in which vol will be placed. The letter "I" is
842 // appended to the front to indecate that this is an
843 // ITS volume.
844 // Double_t x The x positon of the volume in the mother's
845 // reference system
846 // Double_t y The y positon of the volume in the mother's
847 // reference system
848 // Double_t z The z positon of the volume in the mother's
849 // reference system
850 // Int_t irot the index for the rotation matrix to be used.
851 // irot=-1 => unit rotation.
852 // Outputs:
853 // none.
854 // Return:
855 // none.
856 char name[4],mother[4];
857 Float_t param[3];
858 Int_t r=0,i;
859
860 param[0] = x;
861 param[1] = y;
862 param[2] = z;
863 name[0] = 'I';
864 for(i=0;i<3;i++) name[i+1] = vol[i];
865 mother[0] = 'I';
866 for(i=0;i<3;i++) mother[i+1] = moth[i];
867 if(irot>=0) r=fidrot[irot];
868 fMC->Gspos(name,mother,param[0],param[1],param[2],r,"ONLY");
869}
870//______________________________________________________________________
871void AliITSv11::Matrix(Int_t irot,Double_t thet1,Double_t phi1,
872 Double_t thet2,Double_t phi2,
873 Double_t thet3,Double_t phi3){
874 // Defines a Geant rotation matrix. checks to see if it is the unit
875 // matrix. If so, then no additonal matrix is defined. Stores rotation
876 // matrix irot in the data structure JROTM. If the matrix is not
877 // orthonormal, it will be corrected by setting y' perpendicular to x'
878 // and z' = x' X y'. A warning message is printed in this case.
879 // Inputs:
880 // Int_t irot Intex specifing which rotation matrix.
881 // Double_t thet1 Polar angle for axisw x [degrees].
882 // Double_t phi1 azimuthal angle for axis x [degrees].
883 // Double_t thet12Polar angle for axisw y [degrees].
884 // Double_t phi2 azimuthal angle for axis y [degrees].
885 // Double_t thet3 Polar angle for axisw z [degrees].
886 // Double_t phi3 azimuthal angle for axis z [degrees].
887 // Outputs:
888 // none.
889 // Return:
890 // none.
891 Float_t t1,p1,t2,p2,t3,p3;
892
893 if(thet1==90.0&&phi1==0.0&&thet2==90.0&&phi2==90.0&&thet3==0.0&&phi3==0.0){
894 fidrot[irot] = 0; // Unit matrix
895 }else{
896 t1 = thet1;
897 p1 = phi1;
898 t2 = thet2;
899 p2 = phi2;
900 t3 = thet3;
901 p3 = phi3
902 AliMatrix(fidrot[irot],t1,p1,t2,p2,t3,p3);
903 } // end if
904}
905//______________________________________________________________________
dfefbaec 906void AliITSv11::Matrix(Int_t irot,Int_t axis,Double_t thet){
907 // Defines a Geant rotation matrix. checks to see if it is the unit
908 // matrix. If so, then no additonal matrix is defined. Stores rotation
909 // matrix irot in the data structure JROTM. If the matrix is not
910 // orthonormal, it will be corrected by setting y' perpendicular to x'
911 // and z' = x' X y'. A warning message is printed in this case.
912 // Inputs:
913 // Int_t irot Intex specifing which rotation matrix.
914 // Int_t axis Axis about which rotation is to be done.
915 // Double_t thet Angle to rotate by [degrees].
916 // Outputs:
917 // none.
918 // Return:
919 // none.
920
921 if(thet==0.0){
922 fidrot[irot] = 0; // Unit matrix
923 }else{
924 switch (irot) {
925 case 0: //Rotate about x-axis, x-axis does not change.
926 AliMatrix(fidrot[irot],90.0,0.0,90.0+thet,90.0,thet,90.0);
927 break;
928 case 1: //Rotate about y-axis, y-axis does not change.
929 AliMatrix(fidrot[irot],-90.0-thet,0.0,90.0,90.0,thet,90.0);
930 break;
931 case 2: //Rotate about z-axis, z-axis does not change.
932 AliMatrix(fidrot[irot],90.0,thet,90.0,-thet-90.0,0.0,0.0);
933 break;
934 default:
935 Error("Matrix","axis must be either 0, 1, or 2. for matrix=%d",
936 irot);
937 break;
938 } // end switch
939 } // end if
940}
941//______________________________________________________________________
2b680d9b 942void AliITSv11::Matrix(Int_t irot,Double_t rot[3][3]){
943 // Defines a Geant rotation matrix. checks to see if it is the unit
944 // matrix. If so, then no additonal matrix is defined. Stores rotation
945 // matrix irot in the data structure JROTM. If the matrix is not
946 // orthonormal, it will be corrected by setting y' perpendicular to x'
947 // and z' = x' X y'. A warning message is printed in this case.
948 // Inputs:
949 // Int_t irot Intex specifing which rotation matrix.
950 // Double_t rot[3][3] The 3 by 3 rotation matrix.
951 // Outputs:
952 // none.
953 // Return:
954 // none.
955
956 if(rot[0][0]==1.0&&rot[1][1]==1.0&&rot[2][2]==1.0&&
957 rot[0][1]==0.0&&rot[0][2]==0.0&&rot[1][0]==0.0&&
958 rot[1][2]==0.0&&rot[2][0]==0.0&&rot[2][1]==0.0){
959 fidrot[irot] = 0; // Unit matrix
960 }else{
961 Double_t si,c=180./TMath::Pi();
962 Double_t ang[6];
963
964 ang[1] = TMath::ATan2(rot[0][1],rot[0][0]);
965 if(TMath::Cos(ang[1])!=0.0) si = rot[0][0]/TMath::Cos(ang[1]);
966 else si = rot[0][1]/TMath::Sin(ang[1]);
967 ang[0] = TMath::ATan2(si,rot[0][2]);
968
969 ang[3] = TMath::ATan2(rot[1][1],rot[1][0]);
970 if(TMath::Cos(ang[3])!=0.0) si = rot[1][0]/TMath::Cos(ang[3]);
971 else si = rot[1][1]/TMath::Sin(ang[3]);
972 ang[2] = TMath::ATan2(si,rot[1][2]);
973
974 ang[5] = TMath::ATan2(rot[2][1],rot[2][0]);
975 if(TMath::Cos(ang[5])!=0.0) si = rot[2][0]/TMath::Cos(ang[5]);
976 else si = rot[2][1]/TMath::Sin(ang[5]);
977 ang[4] = TMath::ATan2(si,rot[2][2]);
978
979 for(Int_t i=0;i<6;i++) {ang[i] *= c; if(ang[i]<0.0) ang[i] += 360.;}
980 AliMatrix(fidrot[irot],ang[0],ang[1],ang[2],ang[3],ang[4],ang[5]);
981 } // end if
982}
983//______________________________________________________________________
dfefbaec 984Float_t AliITSv11::GetA(Int_t z){
985 // Returns the isotopicaly averaged atomic number.
2b680d9b 986 // Inputs:
dfefbaec 987 // Int_t z Elemental number
2b680d9b 988 // Outputs:
989 // none.
990 // Return:
dfefbaec 991 // The atomic mass number.
992 const Float_t A[]={ 1.00794 , 4.0026902, 6.941 , 9.012182 , 10.811 ,
993 12.01007 , 14.00674 , 15.9994 , 18.9984032, 20.1797 ,
994 22.98970 , 24.3050 , 26.981538, 28.0855 , 30.973761,
995 32.066 , 35.4527 , 39.948 , 39.0983 , 40.078 ,
996 44.95591 , 47.867 , 50.9415 , 51.9961 , 54.938049,
997 55.845 , 58.933200 , 58.6934 , 63.546 , 65.39 ,
998 69.723 , 72.61 , 74.92160 , 78.96 , 79.904 ,
999 83.80 , 85.4678 , 87.62 , 88.9085 , 91.224 ,
1000 92.90638 , 95.94 , 97.907215, 101.07 ,102.90550 ,
1001 106.42 ,107.8682 ,112.411 ,114.818 ,118.710 ,
1002 121.760 ,127.60 ,126.90447 ,131.29 ,132.90545 ,
1003 137.327 ,138.9055 ,140.116 ,140.90765 ,144.24 ,
1004 144.912746,150.36 ,151.964 ,157.25 ,158.92534 ,
1005 162.50 ,164.93032 ,167.26 ,168.93421 ,173.04 ,
1006 174.967 ,178.49 ,180.9479 ,183.84 ,186.207 ,
1007 190.23 ,192.217 ,195.078 ,196.96655 ,200.59 ,
1008 204.3833 ,207.2 ,208.98038,208.982415 ,209.987131,
1009 222.017570 ,223.019731,226.025402,227.027747 ,232.0381 ,
1010 231.03588 238.0289};
2b680d9b 1011
dfefbaec 1012 if(z<1||z>92){
1013 Error("GetA","z must be 0<z<93. z=%d",z);
1014 return 0.0;
2b680d9b 1015 } // end if
dfefbaec 1016 return A[z-1];
1017}
1018//______________________________________________________________________
1019Float_t AliITSv11::GetStandardMaxStepSize(Int_t istd){
1020 // Returns one of a set of standard Maximum Step Size values.
1021 // Inputs:
1022 // Int_t istd Index to indecate which standard.
1023 // Outputs:
1024 // none.
1025 // Return:
1026 // The appropreate standard Maximum Step Size value [cm].
1027 Float_t t[]={1.0, // default
1028 0.0075, // Silicon detectors...
1029 1.0, // Air in central detectors region
1030 1.0 // Material in non-centeral region
1031 };
1032 return t[istd];
1033}
1034//______________________________________________________________________
1035Float_t AliITSv11::GetStandardThetaMax(Int_t istd){
1036 // Returns one of a set of standard Theata Max values.
1037 // Inputs:
1038 // Int_t istd Index to indecate which standard.
1039 // Outputs:
1040 // none.
1041 // Return:
1042 // The appropreate standard Theta max value [degrees].
1043 Float_t t[]={0.1, // default
1044 0.1, // Silicon detectors...
1045 0.1, // Air in central detectors region
1046 1.0 // Material in non-centeral region
1047 };
1048 return t[istd];
1049}
1050//______________________________________________________________________
1051Float_t AliITSv11::GetStandardEfraction(Int_t istd){
1052 // Returns one of a set of standard E fraction values.
1053 // Inputs:
1054 // Int_t istd Index to indecate which standard.
1055 // Outputs:
1056 // none.
1057 // Return:
1058 // The appropreate standard E fraction value [#].
1059 Float_t t[]={0.1, // default
1060 0.1, // Silicon detectors...
1061 0.1, // Air in central detectors region
1062 1.0 // Material in non-centeral region
1063 };
1064 return t[istd];
1065}
1066//______________________________________________________________________
1067void AliITSv11::Element(Int_t imat,const char* name,Int_t z,Double_t dens,
1068 Int_t istd){
1069 // Defines a Geant single element material and sets its Geant medium
1070 // proporties. The average atomic A is assumed to be given by their
1071 // natural abundances. Things like the radiation length are calculated
1072 // for you.
1073 // Inputs:
1074 // Int_t imat Material number.
1075 // const char* name Material name. No need to add a $ at the end.
1076 // Int_t z The elemental number.
1077 // Double_t dens The density of the material [g/cm^3].
1078 // Int_t istd Defines which standard set of transport parameters
1079 // which should be used.
1080 // Output:
1081 // none.
1082 // Return:
1083 // none.
1084 Float_t rad,Z,A=GetA(z),tmax,stemax,deemax,epsilon;
1085 char *name2;
1086 Int_t len;
1087
1088 len = strlng(name)+1;
1089 name2 = new char[len];
1090 strncpy(name2,name,len-1);
1091 name2[len-1] = '\0';
1092 name2[len-2] = '$';
1093 Z = (Float_t)z;
1094 rad = GetRadLength(z)/dens;
1095 AliMaterial(imat,name2,A,Z,dens,rad,0.0,0,0);
1096 tmax = GetStandardTheataMax(istd); // degree
1097 stemax = GetStandardMaxStepSize(istd); // cm
1098 deemax = GetStandardEfraction(istd); // #
1099 epsilon = GetStandardEpsilon(istd);
1100 AliMedium(imat,name2,imat,0,gAlice->Field()->Integ(),
1101 gAlice->Field()->Max(),tmax,stemax,deemax,epsilon,0.0);
1102 delete[] name2;
1103}
1104//______________________________________________________________________
1105void AliITSv11::SSDCone(Double_t zShift){
1106 // Defines the volumes and materials for the ITS SSD Support cone.
1107 // Based on drawings ALR-0767 and ALR-0767/3. Units are in mm.
1108 // Inputs:
1109 // Double_t zShift The z shift to be applied to the final volume.
1110 // Outputs:
1111 // none.
1112 // Return:
1113 // none.
1114 Double_t *za,*rmina,*rmaxa,phi0=0.0,dphi=360.0;
1115 Int_t i,n,nz,nrad=0;
1116 Double_t Cthick=1.5; //mm, Carbon finber thickness
1117 Double_t r=15.0; // mm, Radius of curvature.
1118 Double_t tc=51.0; // angle of SSD cone [degrees].
1119 Double_t t; // some general angle [degrees].
1120 Int_t SSDcf=; // SSD support cone Carbon Fiber materal number.
1121
1122 SetScalemm();
1123 // Lets start with the upper left outer carbon fiber surface.
1124 nz = 6;
1125 za = new Double_t[nz];
1126 rmina = new Double_t[nz];
1127 rmaxa = new Double_t[nz];
1128
1129 za[0] = 0.0;
1130 rmaxa[0] = 985./2.;
1131 rmina[0] = rmaxa[0] - Cthick;
1132 za[1] = 13.5 - 5.0; // The original size of 13.5 (ALR-0767) is milled down
1133 rmaxa[1] = rmaxa[0]; // by 5mm to give a well defined reference surface
1134 rmina[1] = rmina[0]; // (ALR-0767/3).
1135 // The curved section is given by the following fomula
1136 // rmax = r*Sind(90.-t)+rmaxa[0]-r for 0<=t<=tc.
1137 // rmin = (r-Cthick)*Sind(90.-t)+rmina[0]-(r-Cthick) for 0<=t<=tc.
1138 // z = r*Cosd(90.-t)+za[1] for 0<=t<=tc.
1139 za[2] = (r-Cthick)*Cosd(90.-tc)+za[1];
1140 rmina[2] = (r-Cthick)*Sind(90.0-tc)+rmaxa[0]-(r-Cthick);
1141 t = 90.0 - ACosd((za[2]-za[1])/r); // angle for rmax
1142 rmaxa[2] = r*Sind(90.-t)+rmaxa[0]-r;
1143 rmaxa[3] = r*Sind(90.0-tc)+rmaxa[0]-r;
1144 za[3] =r*Cosd(90.-tc)+za[1];
1145 // angled section. surface is given by the following equations
1146 // R = -Tand(tc)*Z + rmaxa[3] or rmina[2]
1147 rmina[3] = -Tand(tc)*za[3] + rmina[2];
1148 // Point of whole. Whole surface has fixed radius = 890.0/2 mm
1149 rmina[4] = 890.0/2.+Cthick ; // Inner whole surface radius (ALR-0767)
1150 za[4] = (rmina[4] - rmina[2])/(-Tand(tc));
1151 rmaxa[4] = -Tand(tc)*za[4]+rmaxa[3];
1152 //
1153 rmaxa[5] = rmina[4];
1154 rmina[5] = rmina[4];
1155 za[5] = (rmaxa[5] - rmaxa[3])/(-Tand(tc));
1156 PolyCone("SCAA","SSD Suport cone Carbon Fiber Surface outer left",
1157 phi0,dphi,nz,*z,*rmin,*rmax,SSDcf);
1158 Za[0] = 1.; Wa[0] = ; // Hydrogen Content
1159 Za[1] = 6.; Wa[0] = ; // Carbon Content
1160 MixtureByWeight(SSDcf,"Carbon Fiber for SSD support cone",Z,W,dens,3);
1161 // Now for the Filler in the mounting regions Upper left first
1162 zb[0] = za[0];
1163 rmaxb[0] = rmina[0];
1164 rminb[0] = 945./2.-Cthick;
1165 //
1166 rmaxb[1] = rmina[1];
1167
1168 delete[] za;delete[] rmina;delete[] rmaxa;
1169 // Set back to cm default scale before exiting.
1170 SetScalecm();
1171 return;
2b680d9b 1172}
1173//______________________________________________________________________
1174void AliITSv11::CreateGeometry(){
dfefbaec 1175 ////////////////////////////////////////////////////////////////////////
1176 // This routine defines and Creates the geometry for version 11 of the ITS.
1177 ////////////////////////////////////////////////////////////////////////
1178}
1179//______________________________________________________________________
1180void AliITSv11::CreateMaterials(){
2b680d9b 1181////////////////////////////////////////////////////////////////////////
dfefbaec 1182 //
1183 // Create ITS materials
1184 // This function defines the default materials used in the Geant
1185 // Monte Carlo simulations for the geometries AliITSv1, AliITSv3,
1186 // AliITSv11.
1187 // In general it is automatically replaced by
1188 // the CreatMaterials routine defined in AliITSv?. Should the function
1189 // CreateMaterials not exist for the geometry version you are using this
1190 // one is used. See the definition found in AliITSv5 or the other routine
1191 // for a complete definition.
1192 //
1193}
1194//______________________________________________________________________
1195void AliITSv11::InitAliITSgeom(){
1196 // Based on the geometry tree defined in Geant 3.21, this
1197 // routine initilizes the Class AliITSgeom from the Geant 3.21 ITS geometry
1198 // sturture.
1199}
1200
1201//______________________________________________________________________
1202void AliITSv11::Init(){
1203 ////////////////////////////////////////////////////////////////////////
1204 // Initialise the ITS after it has been created.
1205 ////////////////////////////////////////////////////////////////////////
1206}
1207//______________________________________________________________________
1208void AliITSv11::SetDefaults(){
1209 // sets the default segmentation, response, digit and raw cluster classes
1210}
1211//______________________________________________________________________
1212void AliITSv11::DrawModule(){
1213 ////////////////////////////////////////////////////////////////////////
1214 // Draw a shaded view of the FMD version 11.
1215 ////////////////////////////////////////////////////////////////////////
1216}
1217//______________________________________________________________________
1218void AliITSv11::StepManager(){
1219 ////////////////////////////////////////////////////////////////////////
1220 // Called for every step in the ITS, then calles the AliITShit class
1221 // creator with the information to be recoreded about that hit.
1222 // The value of the macro ALIITSPRINTGEOM if set to 1 will allow the
1223 // printing of information to a file which can be used to create a .det
1224 // file read in by the routine CreateGeometry(). If set to 0 or any other
1225 // value except 1, the default behavior, then no such file is created nor
1226 // it the extra variables and the like used in the printing allocated.
1227 ////////////////////////////////////////////////////////////////////////
2b680d9b 1228}
dfefbaec 1229