]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSvPPRcoarsesymm.cxx
Some new materials and media defined
[u/mrichter/AliRoot.git] / ITS / AliITSvPPRcoarsesymm.cxx
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$
18 Revision 1.2  2000/10/07 10:42:43  barbera
19 Mother volume ITSV corrected
20
21 Revision 1.1  2000/10/06 23:09:12  barbera
22 New coarse geometry (symmetric services
23
24 Revision 1.20  2000/10/02 21:28:08  fca
25 Removal of useless dependecies via forward declarations
26
27 Revision 1.19  2000/07/10 16:07:19  fca
28 Release version of ITS code
29
30 Revision 1.14.2.2  2000/05/19 10:09:21  nilsen
31 fix for bug with HP and Sun unix + fix for event display in ITS-working branch
32
33 Revision 1.14.2.1  2000/03/04 23:45:19  nilsen
34 Fixed up the comments/documentation.
35
36 Revision 1.14  1999/11/25 06:52:56  fca
37 Correct value of drca
38
39 Revision 1.13.2.1  1999/11/25 06:52:21  fca
40 Correct value of drca
41
42 Revision 1.13  1999/10/27 11:16:26  fca
43 Correction of problem in geometry
44
45 Revision 1.12  1999/10/22 08:25:25  fca
46 remove double definition of destructors
47
48 Revision 1.11  1999/10/22 08:16:49  fca
49 Correct destructors, thanks to I.Hrivnacova
50
51 Revision 1.10  1999/10/06 19:56:50  fca
52 Add destructor
53
54 Revision 1.9  1999/10/05 08:05:09  fca
55 Minor corrections for uninitialised variables.
56
57 Revision 1.8  1999/09/29 09:24:20  fca
58 Introduction of the Copyright and cvs Log
59
60 */
61
62 ///////////////////////////////////////////////////////////////////////////////
63 //                                                                           //
64 //  Inner Traking System version PPR coarse symmetric                                         //
65 //  This class contains the base procedures for the Inner Tracking System    //
66 //                                                                           //
67 // Authors: R. Barbera
68 // version 6.
69 // Created  2000.
70 //
71 //  NOTE: THIS IS THE COARSE SYMMETRIC PPR geometry of the ITS. 
72 // THIS WILL NOT WORK
73 // with the geometry or module classes or any analysis classes. You are 
74 // strongly encouraged to uses AliITSv5.
75 //                                                                           //
76 ///////////////////////////////////////////////////////////////////////////////
77  
78 #include <TMath.h>
79 #include <TRandom.h>
80 #include <TVector.h>
81 #include <TGeometry.h>
82 #include <TNode.h>
83 #include <TTUBE.h>
84 #include <TFile.h>    // only required for Tracking function?
85 #include <TCanvas.h>
86 #include <TObjArray.h>
87 #include <TClonesArray.h>
88
89
90 #include "AliMC.h"
91 #include "AliMagF.h"
92 #include "AliConst.h"
93
94 #include "AliITShit.h"
95 #include "AliITSvPPRcoarsesymm.h"
96 #include "AliRun.h"
97
98
99 ClassImp(AliITSvPPRcoarsesymm)
100  
101 //_____________________________________________________________________________
102 AliITSvPPRcoarsesymm::AliITSvPPRcoarsesymm() {
103 ////////////////////////////////////////////////////////////////////////
104 //    Standard default constructor for the ITS version 7.
105 ////////////////////////////////////////////////////////////////////////
106
107   fIdN = 6;
108   fIdName = new TString[fIdN];
109   fIdName[0] = "ITS1";
110   fIdName[1] = "ITS2";
111   fIdName[2] = "ITS3";
112   fIdName[3] = "ITS4";
113   fIdName[4] = "ITS5";
114   fIdName[5] = "ITS6";
115   fIdSens    = new Int_t[fIdN];
116   for (Int_t i=0;i<fIdN;i++) fIdSens[i]=fIdName[i].Length();
117 }
118 //_____________________________________________________________________________
119 AliITSvPPRcoarsesymm::AliITSvPPRcoarsesymm(const char *name, const char *title) : AliITS(name, title){
120 ////////////////////////////////////////////////////////////////////////
121 //    Standard constructor for the ITS version 7.
122 ////////////////////////////////////////////////////////////////////////
123
124   fIdN = 6;
125   fIdName = new TString[fIdN];
126   fIdName[0] = "ITS1";
127   fIdName[1] = "ITS2";
128   fIdName[2] = "ITS3";
129   fIdName[3] = "ITS4";
130   fIdName[4] = "ITS5";
131   fIdName[5] = "ITS6";
132   fIdSens    = new Int_t[fIdN];
133   for (Int_t i=0;i<fIdN;i++) fIdSens[i]=fIdName[i].Length();
134
135 }
136 //____________________________________________________________________________
137 AliITSvPPRcoarsesymm::AliITSvPPRcoarsesymm(const AliITSvPPRcoarsesymm &source){
138 ////////////////////////////////////////////////////////////////////////
139 //     Copy Constructor for ITS version 7.
140 ////////////////////////////////////////////////////////////////////////
141     if(&source == this) return;
142     printf("Not allowed to copy AliITSvPPRcoarsesymm\n");
143     return;
144 }
145 //_____________________________________________________________________________
146 AliITSvPPRcoarsesymm& AliITSvPPRcoarsesymm::operator=(const AliITSvPPRcoarsesymm &source){
147 ////////////////////////////////////////////////////////////////////////
148 //    Assignment operator for the ITS version 7.
149 ////////////////////////////////////////////////////////////////////////
150   if(&source == this) return *this;
151     printf("Not allowed to copy AliITSvPPRcoarsesymm\n");
152   return *this;
153 }
154 //_____________________________________________________________________________
155 AliITSvPPRcoarsesymm::~AliITSvPPRcoarsesymm() {
156 ////////////////////////////////////////////////////////////////////////
157 //    Standard destructor for the ITS version 7.
158 ////////////////////////////////////////////////////////////////////////
159 }
160
161 //__________________________________________________________________________
162 void AliITSvPPRcoarsesymm::BuildGeometry(){
163 ////////////////////////////////////////////////////////////////////////
164 //    Geometry builder for the ITS version 7.
165 ////////////////////////////////////////////////////////////////////////
166     TNode *node, *top;
167     const int kColorITS=kYellow;
168     //
169     top = gAlice->GetGeometry()->GetNode("alice");
170
171     new TTUBE("S_layer1","Layer1 of ITS","void",3.95,3.95+0.05475,12.25);
172     top->cd();
173     node = new TNode("Layer1","Layer1","S_layer1",0,0,0,"");
174     node->SetLineColor(kColorITS);
175     fNodes->Add(node);
176
177     new TTUBE("S_layer2","Layer2 of ITS","void",7.,7.+0.05475,16.3);
178     top->cd();
179     node = new TNode("Layer2","Layer2","S_layer2",0,0,0,"");
180     node->SetLineColor(kColorITS);
181     fNodes->Add(node);
182
183     new TTUBE("S_layer3","Layer3 of ITS","void",15.,15.+0.05288,21.1);
184     top->cd();
185     node = new TNode("Layer3","Layer3","S_layer3",0,0,0,"");
186     node->SetLineColor(kColorITS);
187     fNodes->Add(node);
188
189     new TTUBE("S_layer4","Layer4 of ITS","void",24,24+0.05288,29.6);
190     top->cd();
191     node = new TNode("Layer4","Layer4","S_layer4",0,0,0,"");
192     node->SetLineColor(kColorITS);
193     fNodes->Add(node);
194
195     new TTUBE("S_layer5","Layer5 of ITS","void",40,40+0.05382,45.1);
196     top->cd();
197     node = new TNode("Layer5","Layer5","S_layer5",0,0,0,"");
198     node->SetLineColor(kColorITS);
199     fNodes->Add(node);
200
201     new TTUBE("S_layer6","Layer6 of ITS","void",45,45+0.05382,50.4);
202     top->cd();
203     node = new TNode("Layer6","Layer6","S_layer6",0,0,0,"");
204     node->SetLineColor(kColorITS);
205     fNodes->Add(node);
206 }
207 //_____________________________________________________________________________
208 void AliITSvPPRcoarsesymm::CreateGeometry(){
209 ////////////////////////////////////////////////////////////////////////
210 //    This routine defines and Creates the geometry for version 7 of the ITS.
211 ////////////////////////////////////////////////////////////////////////
212   
213   //INNER RADII OF THE SILICON LAYERS 
214   Float_t rl[6]    = { 3.95,7.,15.,24.,38.1,43.5765 };   
215   //THICKNESSES OF LAYERS (in % radiation length)
216   Float_t drl[6]   = { 1.03,1.03+0.36,0.34+0.94,0.95,0.34+0.91,0.87 };   
217   //HALF LENGTHS OF LAYERS  
218   Float_t dzl[6]   = { 14.344,14.344,25.1,32.1,49.405,55.27 };
219   //LENGTHS OF END-LADDER BOXES (ALL INCLUDED)
220   Float_t dzb[6]   = { 17.,17.,15.,17.,12.,11. };   // check !!  
221   //THICKNESSES OF END-LADDER BOXES (ALL INCLUDED)
222   Float_t drb[6]   = { 1.5,1.5,5.,5.,3.,3. };   // check spd and ssd !!      
223
224  
225   Float_t dits[3], rlim, zmax;
226   Float_t zpos;
227   Float_t pcits[15], xltpc;
228   Int_t idrotm[399], i;
229   Float_t dgh[50];
230   
231   Int_t *idtmed = fIdtmed->GetArray()-199;
232   
233   //     CONVERT INTO CM (RL(SI)=9.36 CM) 
234   for (i = 0; i < 6; ++i) {
235     drl[i] = drl[i] / 100. * 9.36;
236   }
237     
238   //     FIELD CAGE HALF LENGTH 
239   
240   rlim  = 56.;
241   zmax  = 76.708;
242   xltpc = 284.;
243     
244   // --- Define ghost volume containing the whole ITS (including services) 
245   //     and fill it with air 
246   
247   dgh[0] = 0.;
248   dgh[1] = 360.;
249   dgh[2] = 12.;
250   dgh[3] = -xltpc-5.-0.1;
251   dgh[4] = 62.4;
252   dgh[5] = 85.;
253   dgh[6] = -xltpc;
254   dgh[7] = 61.5;
255   dgh[8] = 85.;
256   dgh[9] = -xltpc;
257   dgh[10] = 61.5;
258   dgh[11] = 61.5+4.;
259   dgh[12] = -100.7;
260   dgh[13] = 44.9;
261   dgh[14] = 56.1;
262   dgh[15] = -76.708;
263   dgh[16] = 44.9;
264   dgh[17] = 56.1;
265   dgh[18] = -36.;
266   dgh[19] = 3.29;
267   dgh[20] = 56.1; 
268   dgh[21] = 36.;
269   dgh[22] = 3.29;
270   dgh[23] = 56.1;
271   dgh[24] = 76.708;
272   dgh[25] = 44.9;
273   dgh[26] = 56.1;
274   dgh[27] = 100.7;
275   dgh[28] = 44.9;
276   dgh[29] = 56.1;
277   dgh[30] = xltpc;
278   dgh[31] = 61.5;
279   dgh[32] = 61.5+4.;
280   dgh[33] = xltpc;
281   dgh[34] = 61.5;
282   dgh[35] = 85.;
283   dgh[36] = xltpc+4.+0.1;
284   dgh[37] = 62.4;
285   dgh[38] = 85.;
286
287   gMC->Gsvolu("ITSV", "PCON", idtmed[275], dgh, 39);
288   
289   // --- Place the ghost volume in its mother volume (ALIC) and make it 
290   //     invisible 
291   
292   gMC->Gspos("ITSV", 1, "ALIC", 0., 0., 0., 0, "ONLY");
293   //gMC->Gsatt("ITSV", "SEEN", 0); 
294  
295   
296   // --- Define ghost volume containing the six layers and fill it with air 
297   
298   dgh[0] = 0.;
299   dgh[1] = 360.;
300   dgh[2] = 4.;
301   dgh[3] = -76.708;
302   dgh[4] = 45.;
303   dgh[5] = 56.;
304   dgh[6] = -36.;     
305   dgh[7] = 3.3;
306   dgh[8] = 56.;
307   dgh[9] = 36.;
308   dgh[10] = 3.3;
309   dgh[11] = 56.;
310   dgh[12] = 76.708;
311   dgh[13] = 45.;
312   dgh[14] = 56.;
313   gMC->Gsvolu("ITSD", "PCON", idtmed[275], dgh, 15);
314   
315   // --- Place the ghost volume in its mother volume (ALIC) and make it 
316   //     invisible 
317   
318   gMC->Gspos("ITSD", 1, "ITSV", 0., 0., 0., 0, "ONLY");
319   //gMC->Gsatt("ITSV", "SEEN", 0);
320   
321   //     ITS LAYERS (SILICON) 
322   
323   dits[0] = rl[0];
324   dits[1] = rl[0] + drl[0];
325   dits[2] = dzl[0];
326   gMC->Gsvolu("ITS1", "TUBE", idtmed[199], dits, 3);
327   gMC->Gspos("ITS1", 1, "ITSD", 0., 0., 0., 0, "ONLY");
328   
329   dits[0] = rl[1];
330   dits[1] = rl[1] + drl[1];
331   dits[2] = dzl[1];
332   gMC->Gsvolu("ITS2", "TUBE", idtmed[199], dits, 3);
333   gMC->Gspos("ITS2", 1, "ITSD", 0., 0., 0., 0, "ONLY");
334   
335   dits[0] = rl[2];
336   dits[1] = rl[2] + drl[2];
337   dits[2] = dzl[2];
338   gMC->Gsvolu("ITS3", "TUBE", idtmed[224], dits, 3);
339   gMC->Gspos("ITS3", 1, "ITSD", 0., 0., 0., 0, "ONLY");
340   
341   dits[0] = rl[3];
342   dits[1] = rl[3] + drl[3];
343   dits[2] = dzl[3];
344   gMC->Gsvolu("ITS4", "TUBE", idtmed[224], dits, 3);
345   gMC->Gspos("ITS4", 1, "ITSD", 0., 0., 0., 0, "ONLY");
346   
347   dits[0] = rl[4];
348   dits[1] = rl[4] + drl[4];
349   dits[2] = dzl[4];
350   gMC->Gsvolu("ITS5", "TUBE", idtmed[249], dits, 3);
351   gMC->Gspos("ITS5", 1, "ITSD", 0., 0., 0., 0, "ONLY");
352   
353   dits[0] = rl[5];
354   dits[1] = rl[5] + drl[5];
355   dits[2] = dzl[5];
356   gMC->Gsvolu("ITS6", "TUBE", idtmed[249], dits, 3);
357   gMC->Gspos("ITS6", 1, "ITSD", 0., 0., 0., 0, "ONLY");
358   
359   // END-LADDER ELECTRONICS BOXES AND CABLES FOR SPD
360   
361   gMC->Gsvolu("IEL1", "TUBE", idtmed[208], dits, 0); 
362   for (i = 0; i < 2; i++) {
363     dits[0] = rl[i];
364     dits[1] = dits[0] + drb[i];
365     dits[2] = dzb[i] / 2.;
366     zpos = dzl[i] + dits[2];
367     gMC->Gsposp("IEL1", i+1, "ITSD", 0., 0., zpos, 0, "ONLY", dits, 3);
368     gMC->Gsposp("IEL1", i+1+6, "ITSD", 0., 0.,-zpos, 0, "ONLY", dits, 3);
369   }
370   
371   // END-LADDER ELECTRONICS BOXES AND CABLES FOR SDD
372   
373   gMC->Gsvolu("IEL2", "TUBE", idtmed[237], dits, 0); 
374   for (i = 2; i < 4; i++) {
375     dits[0] = rl[i];
376     dits[1] = dits[0] + drb[i];
377     dits[2] = dzb[i] / 2.;
378     zpos = dzl[i] + dits[2];
379     gMC->Gsposp("IEL2", i+1, "ITSD", 0., 0., zpos, 0, "ONLY", dits, 3);
380     gMC->Gsposp("IEL2", i+1+6, "ITSD", 0., 0.,-zpos, 0, "ONLY", dits, 3);
381   }
382   
383   // END-LADDER ELECTRONICS BOXES AND CABLES FOR SSD
384   
385   gMC->Gsvolu("IEL3", "TUBE", idtmed[263], dits, 0); 
386   for (i = 4; i < 6; i++) {
387     dits[0] = rl[i];
388     dits[1] = dits[0] + drb[i];
389     dits[2] = dzb[i] / 2.;
390     zpos = dzl[i] + dits[2];
391     gMC->Gsposp("IEL3", i+1, "ITSD", 0., 0., zpos, 0, "ONLY", dits, 3);
392     gMC->Gsposp("IEL3", i+1+6, "ITSD", 0., 0.,-zpos, 0, "ONLY", dits, 3);
393   }    
394     
395   //    DEFINE END CONES FOR SPD
396   
397   pcits[0] = 0.;
398   pcits[1] = 360.;
399   pcits[2] = 2.;
400   pcits[3] = 32.;
401   pcits[4] = (rl[0]+rl[1])/2.;
402   pcits[5] = (rl[0]+rl[1])/2.+2.;   // check thickness !!
403   pcits[6] = 39.4;
404   pcits[7] = 10.065;
405   pcits[8] = 10.065+2.;   // check thickness !!
406   gMC->Gsvolu("ICO1", "PCON", idtmed[209], pcits, 9);   
407   AliMatrix(idrotm[200], 90., 0., 90., 90., 180., 0.);
408   gMC->Gspos("ICO1", 1, "ITSD", 0., 0., 0., 0, "ONLY");
409   gMC->Gspos("ICO1", 2, "ITSD", 0., 0., 0., idrotm[200], "ONLY");
410
411
412   //    DEFINE END CONES FOR SDD
413   
414   pcits[0] = 0.;
415   pcits[1] = 360.;
416   pcits[2] = 2.;
417   pcits[3] = 39.4;
418   pcits[4] = 10.065;
419   pcits[5] = 10.065+3.0;   // check thickness !!
420   pcits[6] = 57.4;
421   pcits[7] = 28.;
422   pcits[8] = 28.+3.0;     // check thickness !!
423   gMC->Gsvolu("ICO2", "PCON", idtmed[238], pcits, 9);    
424   gMC->Gspos("ICO2", 1, "ITSD", 0., 0., 0., 0, "ONLY");
425   gMC->Gspos("ICO2", 2, "ITSD", 0., 0., 0., idrotm[200], "ONLY");
426
427
428   //    DEFINE END CONES FOR SSD
429   
430   pcits[0] = 0.;
431   pcits[1] = 360.;
432   pcits[2] = 2.;
433   pcits[3] = 57.4;
434   pcits[4] = 28.0;
435   pcits[5] = 28.0+4.0;   // check thickness !!
436   pcits[6] = 74.0;
437   pcits[7] = 47.;
438   pcits[8] = 47.+4.0;     // check thickness !!
439   gMC->Gsvolu("ICO3", "PCON", idtmed[264], pcits, 9);    
440   gMC->Gspos("ICO3", 1, "ITSD", 0., 0., 0., 0, "ONLY");
441   gMC->Gspos("ICO3", 2, "ITSD", 0., 0., 0., idrotm[200], "ONLY");
442
443   
444   // SERVICES
445   
446   
447   // --- Define cables at the end of the ITS cones
448   
449   dgh[0] = 45.;
450   dgh[1] = 56.;
451   dgh[2] = 9.75;
452   
453   gMC->Gsvolu("ICA1", "TUBE", idtmed[281], dgh, 3);  
454   gMC->Gspos("ICA1", 1, "ITSV", 0., 0., 86.45, 0, "ONLY");
455   gMC->Gspos("ICA1", 2, "ITSV", 0., 0., -86.45, idrotm[200], "ONLY");
456   
457   // --- Define patch panels at the end of the ITS cones
458   
459   dgh[0] = 45.;
460   dgh[1] = 56.;
461   dgh[2] = 2.25;
462   
463   gMC->Gsvolu("IPAN", "TUBE", idtmed[282], dgh, 3);  // check medium !!!  
464   gMC->Gspos("IPAN", 1, "ITSV", 0., 0., 98.45, 0, "ONLY");  
465   gMC->Gspos("IPAN", 2, "ITSV", 0., 0., -98.45, idrotm[200], "ONLY"); 
466   
467   // --- Define cables/cooling below the TPC 
468   
469   dgh[0] = 0.;
470   dgh[1] = 360.;
471   dgh[2] = 2.;
472   dgh[3] = 100.7;
473   dgh[4] = 45.2;
474   dgh[5] = 50.53;    // same cross section
475   dgh[6] = xltpc;
476   dgh[7] = 61.8;
477   dgh[8] = 65.8;    // same cross section
478   gMC->Gsvolu("ICC1", "PCON", idtmed[283], dgh, 9);    
479   gMC->Gspos("ICC1", 1, "ITSV", 0., 0., 0., 0, "ONLY");  
480   gMC->Gspos("ICC1", 2, "ITSV", 0., 0., 0., idrotm[200], "ONLY"); 
481   
482   // --- Define cables/cooling behind the TPC 
483   
484   dgh[0] = 0.;
485   dgh[1] = 360.;
486   dgh[2] = 2.;
487   dgh[3] = xltpc;
488   dgh[4] = 62.5;
489   dgh[5] = 74.5;
490   dgh[6] = xltpc+4.;
491   dgh[7] = 62.5;
492   dgh[8] = 74.5;    
493   gMC->Gsvolu("ICC2", "PCON", idtmed[283], dgh, 9);    
494   gMC->Gspos("ICC2", 1, "ITSV", 0., 0., 0., 0, "ONLY");  
495   gMC->Gspos("ICC2", 2, "ITSV", 0., 0., 0., idrotm[200], "ONLY");   
496     
497   // --- Define hook to the TPC on other side w.r.t. the absorber
498   
499   dgh[0] = 74.5;
500   dgh[1] = 79.5;
501   dgh[2] = 2.5;
502   gMC->Gsvolu("IHOK", "TUBE", idtmed[284], dgh, 3);   
503   gMC->Gspos("IHOK", 1, "ITSV", 0., 0., -xltpc-dgh[2], 0, "ONLY");    
504   
505   
506   // --- Outputs the geometry tree in the EUCLID/CAD format 
507   
508   if (fEuclidOut) {
509     gMC->WriteEuclid("ITSgeometry", "ITSV", 1, 5);
510   }
511 }
512 //_____________________________________________________________________________
513 void AliITSvPPRcoarsesymm::CreateMaterials(){
514 ////////////////////////////////////////////////////////////////////////
515   //
516   // Create ITS materials
517   //     This function defines the default materials used in the Geant
518   // Monte Carlo simulations for the geometries AliITSv1, AliITSv3,
519   // AliITSvPPRcoarsesymm, AliITSvPPRcoarseasymm.
520   // In general it is automatically replaced by
521   // the CreatMaterials routine defined in AliITSv?. Should the function
522   // CreateMaterials not exist for the geometry version you are using this
523   // one is used. See the definition found in AliITSv5 or the other routine
524   // for a complete definition.
525   //
526   // Water H2O
527   Float_t awat[2]  = { 1.00794,15.9994 };
528   Float_t zwat[2]  = { 1.,8. };
529   Float_t wwat[2]  = { 2.,1. };
530   Float_t denswat  = 1.;
531   // Freon
532   Float_t afre[2]  = { 12.011,18.9984032 };
533   Float_t zfre[2]  = { 6.,9. };
534   Float_t wfre[2]  = { 5.,12. };
535   Float_t densfre  = 1.5;
536   // Ceramics
537   //     94.4% Al2O3 , 2.8% SiO2 , 2.3% MnO , 0.5% Cr2O3 
538   Float_t acer[5]  = { 26.981539,15.9994,28.0855,54.93805,51.9961 };
539   Float_t zcer[5]  = { 13.,8.,14.,25.,      24. };
540   Float_t wcer[5]  = { .49976,1.01233,.01307,       .01782,.00342 };
541   Float_t denscer  = 3.6;
542   //
543   //     60% SiO2 , 40% G10FR4 
544   // PC board
545   Float_t apcb[3]  = { 28.0855,15.9994,17.749 };
546   Float_t zpcb[3]  = { 14.,8.,8.875 };
547   Float_t wpcb[3]  = { .28,.32,.4 };
548   Float_t denspcb  = 1.8;
549   // POLYETHYL
550   Float_t apoly[2] = { 12.01,1. };
551   Float_t zpoly[2] = { 6.,1. };
552   Float_t wpoly[2] = { .33,.67 };
553   // old SERVICES
554   Float_t zserv[4] = { 1.,6.,26.,29. };
555   Float_t aserv[4] = { 1.,12.,55.8,63.5 };
556   Float_t wserv[4] = { .014,.086,.42,.48 };
557   // Stainless steel
558   Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
559   Float_t zsteel[4] = { 26.,24.,28.,14. };
560   Float_t wsteel[4] = { .715,.18,.1,.005 };
561   
562   
563   Int_t  isxfld  = gAlice->Field()->Integ();
564   Float_t sxmgmx = gAlice->Field()->Max();
565   
566   
567   // --- Define the various materials for GEANT --- 
568   
569   //  200-224 --> Silicon Pixel Detectors (detectors, chips, buses, cooling,..)
570   
571   AliMaterial(0, "SPD Si$",      28.0855, 14., 2.33, 9.36, 999);
572   AliMaterial(1, "SPD Si chip$", 28.0855, 14., 2.33, 9.36, 999);
573   AliMaterial(2, "SPD Si bus$",  28.0855, 14., 2.33, 9.36, 999);
574   AliMaterial(3, "SPD C$",       12.011,   6., 2.265,18.8, 999);
575   // v. dens 
576   AliMaterial(4, "SPD Air$",    14.61, 7.3, .001205, 30423., 999);
577   AliMaterial(5, "SPD Vacuum$", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
578   AliMaterial(6, "SPD Al$",     26.981539, 13., 2.6989, 8.9, 999);
579   AliMixture( 7, "SPD Water $", awat, zwat, denswat, -2, wwat);
580   AliMixture( 8, "SPD Freon$",  afre, zfre, densfre, -2, wfre);
581   AliMaterial(9, "SPD End ladder$",28.0855, 14., 2.33, 9.36, 999); // check !!!!
582   AliMaterial(10, "SPD cone$",28.0855, 14., 2.33, 9.36, 999);       // check !!!!
583   // ** 
584   AliMedium(0, "SPD Si$",       0, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
585   AliMedium(1, "SPD Si chip$",  1, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
586   AliMedium(2, "SPD Si bus$",   2, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
587   AliMedium(3, "SPD C$",        3, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
588   AliMedium(4, "SPD Air$",      4, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
589   AliMedium(5, "SPD Vacuum$",   5, 0,isxfld,sxmgmx, 10.,1.00, .1, .100,10.00);
590   AliMedium(6, "SPD Al$",       6, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
591   AliMedium(7, "SPD Water $",   7, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
592   AliMedium(8, "SPD Freon$",    8, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
593   AliMedium(9, "SPD End ladder",9, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
594   AliMedium(10, "SPD cone$",   10, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);   
595   
596   //  225-249 --> Silicon Drift Detectors (detectors, chips, buses, cooling,..)
597   
598   AliMaterial(25, "SDD Si$",      28.0855, 14., 2.33,  9.36, 999);
599   AliMaterial(26, "SDD Si chip$", 28.0855, 14., 2.33,  9.36, 999);
600   AliMaterial(27, "SDD Si bus$",  28.0855, 14., 2.33,  9.36, 999);
601   AliMaterial(28, "SDD C$",       12.011,   6., 2.265,18.8,  999);
602   // v. dens 
603   AliMaterial(29, "SDD Air$",     14.61, 7.3, .001205, 30423., 999);
604   AliMaterial(30, "SDD Vacuum$",  1e-16, 1e-16, 1e-16, 1e16,  1e16);
605   AliMaterial(31, "SDD Al$",      26.981539, 13., 2.6989, 8.9, 999);
606   // After a call with ratios by number (negative number of elements), 
607   // the ratio array is changed to the ratio by weight, so all successive 
608   // calls with the same array must specify the number of elements as 
609   // positive 
610   AliMixture(32, "SDD Water $", awat, zwat, denswat, 2, wwat);
611   // After a call with ratios by number (negative number of elements), 
612   // the ratio array is changed to the ratio by weight, so all successive 
613   // calls with the same array must specify the number of elements as 
614   // positive 
615   AliMixture( 33, "SDD Freon$", afre, zfre, densfre, 2, wfre);
616   AliMixture( 34, "SDD PCB$",   apcb, zpcb, denspcb, 3, wpcb);
617   AliMaterial(35, "SDD Copper$", 63.546, 29., 8.96, 1.43, 999);
618   AliMixture( 36, "SDD Ceramics$", acer, zcer, denscer, -5, wcer);
619   AliMaterial(37, "SDD Kapton$", 12.011, 6., 1.3, 31.27, 999);
620   AliMaterial(38, "SDD End ladder$",28.0855, 14., 2.33, 9.36, 999); // check !!!!
621   AliMaterial(39, "SDD cone$",28.0855, 14., 2.33, 9.36, 999);       // check !!!!
622   // ** 
623   // check A and Z 
624   AliMedium(25, "SDD Si$",      25, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
625   AliMedium(26, "SDD Si chip$", 26, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
626   AliMedium(27, "SDD Si bus$",  27, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
627   AliMedium(28, "SDD C$",       28, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
628   AliMedium(29, "SDD Air$",     29, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
629   AliMedium(30, "SDD Vacuum$",  30, 0,isxfld,sxmgmx, 10.,1.00, .1, .100,10.00);
630   AliMedium(31, "SDD Al$",      31, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
631   AliMedium(32, "SDD Water $",  32, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
632   AliMedium(33, "SDD Freon$",   33, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
633   AliMedium(34, "SDD PCB$",     34, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
634   AliMedium(35, "SDD Copper$",  35, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
635   AliMedium(36, "SDD Ceramics$",36, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
636   AliMedium(37, "SDD Kapton$",  37, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
637   AliMedium(38, "SDD End ladder",38, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
638   AliMedium(39, "SDD cone$",   39, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
639   
640   //  250-274 --> Silicon Strip Detectors (detectors, chips, buses, cooling,..)
641   
642   AliMaterial(50, "SSD Si$",      28.0855, 14., 2.33, 9.36, 999.);
643   AliMaterial(51, "SSD Si chip$", 28.0855, 14., 2.33, 9.36, 999.);
644   AliMaterial(52, "SSD Si bus$",  28.0855, 14., 2.33, 9.36, 999.);
645   AliMaterial(53, "SSD C$",       12.011,   6., 2.265,18.8, 999.);
646   // v. dens 
647   AliMaterial(54, "SSD Air$",     14.61, 7.3, .001205, 30423., 999);
648   AliMaterial(55, "SSD Vacuum$",  1e-16, 1e-16, 1e-16, 1e16, 1e16);
649   AliMaterial(56, "SSD Al$",      26.981539, 13., 2.6989, 8.9, 999);
650   // After a call with ratios by number (negative number of elements), 
651   // the ratio array is changed to the ratio by weight, so all successive 
652   // calls with the same array must specify the number of elements as 
653   // positive 
654   AliMixture(57, "SSD Water $", awat, zwat, denswat, 2, wwat);
655   // After a call with ratios by number (negative number of elements), 
656   // the ratio array is changed to the ratio by weight, so all successive 
657   // calls with the same array must specify the number of elements as 
658   // positive 
659   AliMixture(58, "SSD Freon$", afre, zfre, densfre, 2, wfre);
660   AliMixture(59, "SSD PCB$",   apcb, zpcb, denspcb, 3, wpcb);
661   AliMaterial(60, "SSD Copper$", 63.546, 29., 8.96, 1.43, 999.);
662   // After a call with ratios by number (negative number of elements), 
663   // the ratio array is changed to the ratio by weight, so all successive 
664   // calls with the same array must specify the number of elements as 
665   // positive 
666   AliMixture( 61, "SSD Ceramics$", acer, zcer, denscer, 5, wcer);
667   AliMaterial(62, "SSD Kapton$", 12.011, 6., 1.3, 31.27, 999.);
668   // check A and Z 
669   AliMaterial(63, "SSD G10FR4$", 17.749, 8.875, 1.8, 21.822, 999.);
670   AliMaterial(64, "SSD End ladder$",28.0855, 14., 2.33, 9.36, 999); // check !!!!
671   AliMaterial(65, "SSD cone$",28.0855, 14., 2.33, 9.36, 999);       // check !!!! 
672   // ** 
673   AliMedium(50, "SSD Si$",      50, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
674   AliMedium(51, "SSD Si chip$", 51, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
675   AliMedium(52, "SSD Si bus$",  52, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
676   AliMedium(53, "SSD C$",       53, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
677   AliMedium(54, "SSD Air$",     54, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
678   AliMedium(55, "SSD Vacuum$",  55, 0,isxfld,sxmgmx, 10.,1.00, .1, .100,10.00);
679   AliMedium(56, "SSD Al$",      56, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
680   AliMedium(57, "SSD Water $",  57, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
681   AliMedium(58, "SSD Freon$",   58, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
682   AliMedium(59, "SSD PCB$",     59, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
683   AliMedium(60, "SSD Copper$",  60, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
684   AliMedium(61, "SSD Ceramics$",61, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
685   AliMedium(62, "SSD Kapton$",  62, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
686   AliMedium(63, "SSD G10FR4$",  63, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
687   AliMedium(64, "SPD End ladder",64, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
688   AliMedium(65, "SPD cone$",   65, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
689   
690   //     275-299 --> General (end-caps, frames, cooling, cables, etc.) 
691   
692   AliMaterial(75, "GEN C$", 12.011, 6., 2.265, 18.8, 999.);
693   // verify density 
694   AliMaterial(76, "GEN Air$", 14.61, 7.3, .001205, 30423., 999);
695   AliMaterial(77, "GEN Vacuum$", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
696   AliMixture( 78, "GEN POLYETHYL$", apoly, zpoly, .95, -2, wpoly);
697   AliMixture( 79, "GEN SERVICES$",  aserv, zserv, 4.68, 4, wserv);
698   AliMaterial(80, "GEN Copper$", 63.546, 29., 8.96, 1.43, 999.);
699   // After a call with ratios by number (negative number of elements), 
700   // the ratio array is changed to the ratio by weight, so all successive 
701   // calls with the same array must specify the number of elements as 
702   // positive 
703   AliMixture(81, "GEN Water $", awat, zwat, denswat, 2, wwat);
704   AliMaterial(82, "GEN Cables$", 12.011, 6., 2.265, 18.8, 999.);  // check !!!
705   AliMaterial(83, "GEN patch pan$", 12.011, 6., 2.265, 18.8, 999.);  // check !!!  
706   AliMaterial(84, "GEN serv$", 12.011, 6., 2.265, 18.8, 999.);  // check !!!  
707   AliMixture(85, "GEN Inox$", asteel, zsteel, 7.88, 4, wsteel);
708   // ** 
709   AliMedium(75,"GEN C$",        75, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
710   AliMedium(76,"GEN Air$",      76, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
711   AliMedium(77,"GEN Vacuum$",   77, 0,isxfld,sxmgmx, 10., .10, .1, .100,10.00);
712   AliMedium(78,"GEN POLYETHYL$",78, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
713   AliMedium(79,"GEN SERVICES$", 79, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
714   AliMedium(80,"GEN Copper$",   80, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
715   AliMedium(81,"GEN Water $",   81, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
716   AliMedium(82,"GEN Cables$",   82, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
717   AliMedium(83,"GEN patch pan$",83, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);  
718   AliMedium(84,"GEN serv$",     84, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
719   AliMedium(85,"GEN Inox$",     85, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
720 }
721 //_____________________________________________________________________________
722 void AliITSvPPRcoarsesymm::Init(){
723 ////////////////////////////////////////////////////////////////////////
724 //     Initialise the ITS after it has been created.
725 ////////////////////////////////////////////////////////////////////////
726
727     //
728     AliITS::Init();
729     fMajorVersion = 1;
730     fMinorVersion = 0;
731 }  
732  
733 //_____________________________________________________________________________
734 void AliITSvPPRcoarsesymm::DrawModule(){
735 ////////////////////////////////////////////////////////////////////////
736 //     Draw a shaded view of the FMD version 6.
737 ////////////////////////////////////////////////////////////////////////
738   
739   // Set everything unseen
740   gMC->Gsatt("*", "seen", -1);
741   // 
742   // Set ALIC mother visible
743   gMC->Gsatt("ALIC","SEEN",0);
744   //
745   // Set the volumes visible
746   gMC->Gsatt("ITSD","SEEN",0);
747   gMC->Gsatt("ITS1","SEEN",1);
748   gMC->Gsatt("ITS2","SEEN",1);
749   gMC->Gsatt("ITS3","SEEN",1);
750   gMC->Gsatt("ITS4","SEEN",1);
751   gMC->Gsatt("ITS5","SEEN",1);
752   gMC->Gsatt("ITS6","SEEN",1);
753
754   gMC->Gsatt("IPCB","SEEN",1);
755   gMC->Gsatt("ICO2","SEEN",1);
756   gMC->Gsatt("ICER","SEEN",0);
757   gMC->Gsatt("ISI2","SEEN",0);
758   gMC->Gsatt("IPLA","SEEN",0);
759   gMC->Gsatt("ICO3","SEEN",0);
760   gMC->Gsatt("IEPX","SEEN",0);
761   gMC->Gsatt("ISI3","SEEN",1);
762   gMC->Gsatt("ISUP","SEEN",0);
763   gMC->Gsatt("ICHO","SEEN",0);
764   gMC->Gsatt("ICMO","SEEN",0);
765   gMC->Gsatt("ICMD","SEEN",0);
766   gMC->Gsatt("ICCO","SEEN",1);
767   gMC->Gsatt("ICCM","SEEN",0);
768   gMC->Gsatt("ITMD","SEEN",0);
769   gMC->Gsatt("ITTT","SEEN",1);
770
771   //
772   gMC->Gdopt("hide", "on");
773   gMC->Gdopt("shad", "on");
774   gMC->Gsatt("*", "fill", 7);
775   gMC->SetClipBox(".");
776   gMC->SetClipBox("*", 0, 300, -300, 300, -300, 300);
777   gMC->DefaultRange();
778   gMC->Gdraw("alic", 40, 30, 0, 11, 10, .07, .07);
779   gMC->Gdhead(1111, "Inner Tracking System Version 1");
780   gMC->Gdman(17, 6, "MAN");
781 }
782 //_____________________________________________________________________________
783 void AliITSvPPRcoarsesymm::StepManager(){
784 ////////////////////////////////////////////////////////////////////////
785 //    Called for every step in the ITS, then calls the AliITShit class
786 // creator with the information to be recoreded about that hit.
787 ////////////////////////////////////////////////////////////////////////
788
789 /*
790   Int_t         copy, id;
791   Float_t       hits[8];
792   Int_t         vol[4];
793   TLorentzVector position, momentum;
794 //  TClonesArray &lhits = *fHits;
795 //
796 // no hits for this coarse symmetric version.
797 //
798
799   //
800   // Track status
801   vol[3] = 0;
802   if(gMC->IsTrackInside())      vol[3] +=  1;
803   if(gMC->IsTrackEntering())    vol[3] +=  2;
804   if(gMC->IsTrackExiting())     vol[3] +=  4;
805   if(gMC->IsTrackOut())         vol[3] +=  8;
806   if(gMC->IsTrackDisappeared()) vol[3] += 16;
807   if(gMC->IsTrackStop())        vol[3] += 32;
808   if(gMC->IsTrackAlive())       vol[3] += 64;
809   //
810   // Fill hit structure.
811   if( !(gMC->TrackCharge()) ) return;
812     //
813     // Only entering charged tracks
814     if((id=gMC->CurrentVolID(copy))==fIdSens[0]) {  
815       vol[0]=1;
816       id=gMC->CurrentVolOffID(1,copy);      
817       vol[1]=copy;
818       id=gMC->CurrentVolOffID(2,copy);
819       vol[2]=copy;                       
820     } else if(id==fIdSens[1]) {
821       vol[0]=2;
822       id=gMC->CurrentVolOffID(1,copy);       
823       vol[1]=copy;
824       id=gMC->CurrentVolOffID(2,copy);
825       vol[2]=copy;                    
826     } else if(id==fIdSens[2]) {
827       vol[0]=3;
828       vol[1]=copy;
829       id=gMC->CurrentVolOffID(1,copy);
830       vol[2]=copy;             
831     } else if(id==fIdSens[3]) {
832       vol[0]=4;
833       vol[1]=copy;
834       id=gMC->CurrentVolOffID(1,copy);
835       vol[2]=copy;                  
836     } else if(id==fIdSens[4]) {
837       vol[0]=5;
838       vol[1]=copy;
839       id=gMC->CurrentVolOffID(1,copy);
840       vol[2]=copy;               
841     } else if(id==fIdSens[5]) {
842       vol[0]=6;
843       vol[1]=copy;
844       id=gMC->CurrentVolOffID(1,copy);
845       vol[2]=copy;                      
846     } else return;
847     gMC->TrackPosition(position);
848     gMC->TrackMomentum(momentum);
849     hits[0]=position[0];
850     hits[1]=position[1];
851     hits[2]=position[2];          
852     hits[3]=momentum[0];
853     hits[4]=momentum[1];
854     hits[5]=momentum[2];
855     hits[6]=gMC->Edep();
856     hits[7]=gMC->TrackTime();
857 //    new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->CurrentTrack(),vol,hits);
858 //
859 // no hits for this coarse symmetric version.
860 //
861 */
862 }
863 /*
864 //____________________________________________________________________________
865 void AliITSvPPRcoarsesymm::Streamer(TBuffer &R__b){
866 ////////////////////////////////////////////////////////////////////////
867 //    A dummy Streamer function for this class AliITSvPPRcoarsesymm. By default it
868 // only streams the AliITS class as it is required. Since this class
869 // dosen't contain any "real" data to be saved, it doesn't.
870 ////////////////////////////////////////////////////////////////////////
871
872    if (R__b.IsReading()) {
873       Version_t R__v = R__b.ReadVersion(); if (R__v) { }
874       AliITS::Streamer(R__b);
875    } else {
876       R__b.WriteVersion(AliITSvPPRcoarsesymm::IsA());
877       AliITS::Streamer(R__b);
878    } // end if R__b.IsReading()
879 }
880 */