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