]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSvPPRcoarseasymm.cxx
Mother volume ITSV corrected
[u/mrichter/AliRoot.git] / ITS / AliITSvPPRcoarseasymm.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 asymmetric                                         //
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 ASYMMETRIC 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 "AliITSvPPRcoarseasymm.h"
90 #include "AliRun.h"
91
92
93 ClassImp(AliITSvPPRcoarseasymm)
94  
95 //_____________________________________________________________________________
96 AliITSvPPRcoarseasymm::AliITSvPPRcoarseasymm() {
97 ////////////////////////////////////////////////////////////////////////
98 //    Standard default constructor for the ITS version 6.
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 AliITSvPPRcoarseasymm::AliITSvPPRcoarseasymm(const char *name, const char *title) : AliITS(name, title){
114 ////////////////////////////////////////////////////////////////////////
115 //    Standard constructor for the ITS version 6.
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 AliITSvPPRcoarseasymm::AliITSvPPRcoarseasymm(const AliITSvPPRcoarseasymm &source){
132 ////////////////////////////////////////////////////////////////////////
133 //     Copy Constructor for ITS version 6.
134 ////////////////////////////////////////////////////////////////////////
135     if(&source == this) return;
136     printf("Not allowed to copy AliITSvPPRcoarseasymm\n");
137     return;
138 }
139 //_____________________________________________________________________________
140 AliITSvPPRcoarseasymm& AliITSvPPRcoarseasymm::operator=(const AliITSvPPRcoarseasymm &source){
141 ////////////////////////////////////////////////////////////////////////
142 //    Assignment operator for the ITS version 6.
143 ////////////////////////////////////////////////////////////////////////
144   if(&source == this) return *this;
145     printf("Not allowed to copy AliITSvPPRcoarseasymm\n");
146   return *this;
147 }
148 //_____________________________________________________________________________
149 AliITSvPPRcoarseasymm::~AliITSvPPRcoarseasymm() {
150 ////////////////////////////////////////////////////////////////////////
151 //    Standard destructor for the ITS version 6.
152 ////////////////////////////////////////////////////////////////////////
153 }
154
155 //__________________________________________________________________________
156 void AliITSvPPRcoarseasymm::BuildGeometry(){
157 ////////////////////////////////////////////////////////////////////////
158 //    Geometry builder for the ITS version 6.
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 AliITSvPPRcoarseasymm::CreateGeometry(){
203 ////////////////////////////////////////////////////////////////////////
204 //    This routine defines and Creates the geometry for version 6 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   // --- Define ghost volume containing the six layers and fill it with air 
239   
240   dgh[0] = 0.;
241   dgh[1] = 360.;
242   dgh[2] = 4.;
243   dgh[3] = -76.708;
244   dgh[4] = 45.;
245   dgh[5] = 56.;
246   dgh[6] = -36.;     
247   dgh[7] = 3.3;
248   dgh[8] = 56.;
249   dgh[9] = 36.;
250   dgh[10] = 3.3;
251   dgh[11] = 56.;
252   dgh[12] = 76.708;
253   dgh[13] = 45.;
254   dgh[14] = 56.;
255   gMC->Gsvolu("ITSV", "PCON", idtmed[275], dgh, 15);
256   
257   // --- Place the ghost volume in its mother volume (ITSV) and make it 
258   //     invisible 
259   
260   gMC->Gspos("ITSV", 1, "ALIC", 0., 0., 0., 0, "ONLY");
261   //gMC->Gsatt("ITSV", "SEEN", 0);
262   
263   //     ITS LAYERS (SILICON) 
264   
265   dits[0] = rl[0];
266   dits[1] = rl[0] + drl[0];
267   dits[2] = dzl[0];
268   gMC->Gsvolu("ITS1", "TUBE", idtmed[199], dits, 3);
269   gMC->Gspos("ITS1", 1, "ITSV", 0., 0., 0., 0, "ONLY");
270   
271   dits[0] = rl[1];
272   dits[1] = rl[1] + drl[1];
273   dits[2] = dzl[1];
274   gMC->Gsvolu("ITS2", "TUBE", idtmed[199], dits, 3);
275   gMC->Gspos("ITS2", 1, "ITSV", 0., 0., 0., 0, "ONLY");
276   
277   dits[0] = rl[2];
278   dits[1] = rl[2] + drl[2];
279   dits[2] = dzl[2];
280   gMC->Gsvolu("ITS3", "TUBE", idtmed[224], dits, 3);
281   gMC->Gspos("ITS3", 1, "ITSV", 0., 0., 0., 0, "ONLY");
282   
283   dits[0] = rl[3];
284   dits[1] = rl[3] + drl[3];
285   dits[2] = dzl[3];
286   gMC->Gsvolu("ITS4", "TUBE", idtmed[224], dits, 3);
287   gMC->Gspos("ITS4", 1, "ITSV", 0., 0., 0., 0, "ONLY");
288   
289   dits[0] = rl[4];
290   dits[1] = rl[4] + drl[4];
291   dits[2] = dzl[4];
292   gMC->Gsvolu("ITS5", "TUBE", idtmed[249], dits, 3);
293   gMC->Gspos("ITS5", 1, "ITSV", 0., 0., 0., 0, "ONLY");
294   
295   dits[0] = rl[5];
296   dits[1] = rl[5] + drl[5];
297   dits[2] = dzl[5];
298   gMC->Gsvolu("ITS6", "TUBE", idtmed[249], dits, 3);
299   gMC->Gspos("ITS6", 1, "ITSV", 0., 0., 0., 0, "ONLY");
300   
301   // END-LADDER ELECTRONICS BOXES AND CABLES 
302   
303   gMC->Gsvolu("IELE", "TUBE", idtmed[233], dits, 0); // check the medium !!
304   for (i = 0; i < 6; i++) {
305     dits[0] = rl[i];
306     dits[1] = dits[0] + drb[i];
307     dits[2] = dzb[i] / 2.;
308     zpos = dzl[i] + dits[2];
309     gMC->Gsposp("IELE", i+1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3);
310     gMC->Gsposp("IELE", i+1+6, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3);
311   }
312     
313
314   //    DEFINE END CONES FOR SPD
315   
316   pcits[0] = 0.;
317   pcits[1] = 360.;
318   pcits[2] = 2.;
319   pcits[3] = 32.;
320   pcits[4] = (rl[0]+rl[1])/2.;
321   pcits[5] = (rl[0]+rl[1])/2.+2.;   // check thickness !!
322   pcits[6] = 39.4;
323   pcits[7] = 10.065;
324   pcits[8] = 10.065+2.;   // check thickness !!
325   gMC->Gsvolu("ICO1", "PCON", idtmed[275], pcits, 9);    // check the medium !!
326   AliMatrix(idrotm[200], 90., 0., 90., 90., 180., 0.);
327   gMC->Gspos("ICO1", 1, "ITSV", 0., 0., 0., 0, "ONLY");
328   gMC->Gspos("ICO1", 2, "ITSV", 0., 0., 0., idrotm[200], "ONLY");
329
330
331   //    DEFINE END CONES FOR SDD
332   
333   pcits[0] = 0.;
334   pcits[1] = 360.;
335   pcits[2] = 2.;
336   pcits[3] = 39.4;
337   pcits[4] = 10.065;
338   pcits[5] = 10.065+3.0;   // check thickness !!
339   pcits[6] = 57.4;
340   pcits[7] = 28.;
341   pcits[8] = 28.+3.0;     // check thickness !!
342   gMC->Gsvolu("ICO2", "PCON", idtmed[275], pcits, 9);    // check the medium !!
343   gMC->Gspos("ICO2", 1, "ITSV", 0., 0., 0., 0, "ONLY");
344   gMC->Gspos("ICO2", 2, "ITSV", 0., 0., 0., idrotm[200], "ONLY");
345
346
347   //    DEFINE END CONES FOR SSD
348   
349   pcits[0] = 0.;
350   pcits[1] = 360.;
351   pcits[2] = 2.;
352   pcits[3] = 57.4;
353   pcits[4] = 28.0;
354   pcits[5] = 28.0+4.0;   // check thickness !!
355   pcits[6] = 74.0;
356   pcits[7] = 47.;
357   pcits[8] = 47.+4.0;     // check thickness !!
358   gMC->Gsvolu("ICO3", "PCON", idtmed[275], pcits, 9);    // check the medium !!
359   gMC->Gspos("ICO3", 1, "ITSV", 0., 0., 0., 0, "ONLY");
360   gMC->Gspos("ICO3", 2, "ITSV", 0., 0., 0., idrotm[200], "ONLY");
361
362   
363   // SERVICES
364   
365   
366   // --- Define cables at the end of the ITS cones
367   
368   dgh[0] = 45.;
369   dgh[1] = 56.;
370   dgh[2] = 9.75;
371   
372   gMC->Gsvolu("ICA1", "TUBE", idtmed[275], dgh, 3);  // check medium !!!
373   gMC->Gspos("ICA1", 1, "ALIC", 0., 0., 86.45, 0, "ONLY");
374   gMC->Gspos("ICA1", 2, "ALIC", 0., 0., -86.45, idrotm[200], "ONLY");
375   
376   // --- Define patch panels at the end of the ITS cones
377   
378   dgh[0] = 45.;
379   dgh[1] = 56.;
380   dgh[2] = 2.25;
381   
382   gMC->Gsvolu("IPAN", "TUBE", idtmed[275], dgh, 3);  // check medium !!!  
383   gMC->Gspos("IPAN", 1, "ALIC", 0., 0., 98.45, 0, "ONLY");  
384   gMC->Gspos("IPAN", 2, "ALIC", 0., 0., -98.45, idrotm[200], "ONLY"); 
385   
386   // --- Define cables/cooling on the absorber side
387   
388   dgh[0] = 0.;
389   dgh[1] = 360.;
390   dgh[2] = 2.;
391   dgh[3] = 100.7;
392   dgh[4] = 45.2;
393   dgh[5] = 50.53;    // same cross section
394   dgh[6] = xltpc;
395   dgh[7] = 61.8;
396   dgh[8] = 65.8;    // same cross section
397   gMC->Gsvolu("ICC1", "PCON", idtmed[275], dgh, 9);  // check medium !!!  
398   gMC->Gspos("ICC1", 1, "ALIC", 0., 0., 0., 0, "ONLY");  
399   gMC->Gspos("ICC1", 2, "ALIC", 0., 0., -98.45, idrotm[200], "ONLY"); 
400   
401   // --- Define cables/cooling behind the TPC on the absorber side
402   
403   dgh[0] = 0.;
404   dgh[1] = 360.;
405   dgh[2] = 2.;
406   dgh[3] = xltpc;
407   dgh[4] = 62.5;
408   dgh[5] = 74.5;
409   dgh[6] = xltpc+4.;
410   dgh[7] = 62.5;
411   dgh[8] = 74.5;    
412   gMC->Gsvolu("ICC2", "PCON", idtmed[275], dgh, 9);  // check medium !!!  
413   gMC->Gspos("ICC2", 1, "ALIC", 0., 0., 0., 0, "ONLY");  
414   
415   // --- Define cables/cooling on the other side w.r.t. the absorber 
416   
417   dgh[0] = 45.;
418   dgh[1] = 49.;
419   dgh[2] = (xltpc-100.7)/2.;
420   gMC->Gsvolu("ICC3", "TUBE", idtmed[275], dgh, 3);  // check medium !!!  
421   gMC->Gspos("ICC3", 1, "ALIC", 0., 0., -100.7-dgh[2], 0, "ONLY");  
422
423   
424   // --- Define cables/cooling behind the TPC on other side w.r.t. the absorber
425   
426   dgh[0] = 0.;
427   dgh[1] = 360.;
428   dgh[2] = 2.;
429   dgh[3] = -xltpc;
430   dgh[4] = 45.;
431   dgh[5] = 74.5;
432   dgh[6] = -xltpc-2.3;
433   dgh[7] = 45.;
434   dgh[8] = 74.5;    
435   gMC->Gsvolu("ICC4", "PCON", idtmed[275], dgh, 9);  // check medium !!!  
436   gMC->Gspos("ICC4", 1, "ALIC", 0., 0., 0., 0, "ONLY");  
437     
438   // --- Define hook for the TPC on other side w.r.t. the absorber
439   
440   dgh[0] = 74.5;
441   dgh[1] = 79.5;
442   dgh[2] = 2.5;
443   gMC->Gsvolu("IHOK", "TUBE", idtmed[275], dgh, 3);  // check medium !!!  
444   gMC->Gspos("IHOK", 1, "ALIC", 0., 0., -xltpc-dgh[2], 0, "ONLY");    
445   
446   
447   // --- Outputs the geometry tree in the EUCLID/CAD format 
448   
449   if (fEuclidOut) {
450     gMC->WriteEuclid("ITSgeometry", "ITSV", 1, 5);
451   }
452 }
453 //_____________________________________________________________________________
454 void AliITSvPPRcoarseasymm::CreateMaterials(){
455 ////////////////////////////////////////////////////////////////////////
456   //
457   // Create ITS materials
458   //     This function defines the default materials used in the Geant
459   // Monte Carlo simulations for the geometries AliITSv1, AliITSv3,
460   // AliITSvPPRcoarseasymm.
461   // In general it is automatically replaced by
462   // the CreatMaterials routine defined in AliITSv?. Should the function
463   // CreateMaterials not exist for the geometry version you are using this
464   // one is used. See the definition found in AliITSv5 or the other routine
465   // for a complete definition.
466   //
467   // Water H2O
468   Float_t awat[2]  = { 1.00794,15.9994 };
469   Float_t zwat[2]  = { 1.,8. };
470   Float_t wwat[2]  = { 2.,1. };
471   Float_t denswat  = 1.;
472   // Freon
473   Float_t afre[2]  = { 12.011,18.9984032 };
474   Float_t zfre[2]  = { 6.,9. };
475   Float_t wfre[2]  = { 5.,12. };
476   Float_t densfre  = 1.5;
477   // Ceramics
478   //     94.4% Al2O3 , 2.8% SiO2 , 2.3% MnO , 0.5% Cr2O3 
479   Float_t acer[5]  = { 26.981539,15.9994,28.0855,54.93805,51.9961 };
480   Float_t zcer[5]  = { 13.,8.,14.,25.,      24. };
481   Float_t wcer[5]  = { .49976,1.01233,.01307,       .01782,.00342 };
482   Float_t denscer  = 3.6;
483   //
484   //     60% SiO2 , 40% G10FR4 
485   // PC board
486   Float_t apcb[3]  = { 28.0855,15.9994,17.749 };
487   Float_t zpcb[3]  = { 14.,8.,8.875 };
488   Float_t wpcb[3]  = { .28,.32,.4 };
489   Float_t denspcb  = 1.8;
490   // POLYETHYL
491   Float_t apoly[2] = { 12.01,1. };
492   Float_t zpoly[2] = { 6.,1. };
493   Float_t wpoly[2] = { .33,.67 };
494   // SERVICES
495   Float_t zserv[4] = { 1.,6.,26.,29. };
496   Float_t aserv[4] = { 1.,12.,55.8,63.5 };
497   Float_t wserv[4] = { .014,.086,.42,.48 };
498   
499   Int_t  isxfld  = gAlice->Field()->Integ();
500   Float_t sxmgmx = gAlice->Field()->Max();
501   
502   
503   // --- Define the various materials for GEANT --- 
504   
505   //  200-224 --> Silicon Pixel Detectors (detectors, chips, buses, cooling,..)
506   
507   AliMaterial(0, "SPD Si$",      28.0855, 14., 2.33, 9.36, 999);
508   AliMaterial(1, "SPD Si chip$", 28.0855, 14., 2.33, 9.36, 999);
509   AliMaterial(2, "SPD Si bus$",  28.0855, 14., 2.33, 9.36, 999);
510   AliMaterial(3, "SPD C$",       12.011,   6., 2.265,18.8, 999);
511   // v. dens 
512   AliMaterial(4, "SPD Air$",    14.61, 7.3, .001205, 30423., 999);
513   AliMaterial(5, "SPD Vacuum$", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
514   AliMaterial(6, "SPD Al$",     26.981539, 13., 2.6989, 8.9, 999);
515   AliMixture( 7, "SPD Water $", awat, zwat, denswat, -2, wwat);
516   AliMixture( 8, "SPD Freon$",  afre, zfre, densfre, -2, wfre);
517   // ** 
518   AliMedium(0, "SPD Si$",      0, 1,isxfld,sxmgmx, 10., .01, .1, .003, .003);
519   AliMedium(1, "SPD Si chip$", 1, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
520   AliMedium(2, "SPD Si bus$",  2, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
521   AliMedium(3, "SPD C$",       3, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
522   AliMedium(4, "SPD Air$",     4, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
523   AliMedium(5, "SPD Vacuum$",  5, 0,isxfld,sxmgmx, 10.,1.00, .1, .100,10.00);
524   AliMedium(6, "SPD Al$",      6, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
525   AliMedium(7, "SPD Water $",  7, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
526   AliMedium(8, "SPD Freon$",   8, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
527   
528   //  225-249 --> Silicon Drift Detectors (detectors, chips, buses, cooling,..)
529   
530   AliMaterial(25, "SDD Si$",      28.0855, 14., 2.33,  9.36, 999);
531   AliMaterial(26, "SDD Si chip$", 28.0855, 14., 2.33,  9.36, 999);
532   AliMaterial(27, "SDD Si bus$",  28.0855, 14., 2.33,  9.36, 999);
533   AliMaterial(28, "SDD C$",       12.011,   6., 2.265,18.8,  999);
534   // v. dens 
535   AliMaterial(29, "SDD Air$",     14.61, 7.3, .001205, 30423., 999);
536   AliMaterial(30, "SDD Vacuum$",  1e-16, 1e-16, 1e-16, 1e16,  1e16);
537   AliMaterial(31, "SDD Al$",      26.981539, 13., 2.6989, 8.9, 999);
538   // After a call with ratios by number (negative number of elements), 
539   // the ratio array is changed to the ratio by weight, so all successive 
540   // calls with the same array must specify the number of elements as 
541   // positive 
542   AliMixture(32, "SDD Water $", awat, zwat, denswat, 2, wwat);
543   // After a call with ratios by number (negative number of elements), 
544   // the ratio array is changed to the ratio by weight, so all successive 
545   // calls with the same array must specify the number of elements as 
546   // positive 
547   AliMixture( 33, "SDD Freon$", afre, zfre, densfre, 2, wfre);
548   AliMixture( 34, "SDD PCB$",   apcb, zpcb, denspcb, 3, wpcb);
549   AliMaterial(35, "SDD Copper$", 63.546, 29., 8.96, 1.43, 999);
550   AliMixture( 36, "SDD Ceramics$", acer, zcer, denscer, -5, wcer);
551   AliMaterial(37, "SDD Kapton$", 12.011, 6., 1.3, 31.27, 999);
552   // ** 
553   // check A and Z 
554   AliMedium(25, "SDD Si$",      25, 1,isxfld,sxmgmx, 10., .01, .1, .003, .003);
555   AliMedium(26, "SDD Si chip$", 26, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
556   AliMedium(27, "SDD Si bus$",  27, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
557   AliMedium(28, "SDD C$",       28, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
558   AliMedium(29, "SDD Air$",     29, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
559   AliMedium(30, "SDD Vacuum$",  30, 0,isxfld,sxmgmx, 10.,1.00, .1, .100,10.00);
560   AliMedium(31, "SDD Al$",      31, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
561   AliMedium(32, "SDD Water $",  32, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
562   AliMedium(33, "SDD Freon$",   33, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
563   AliMedium(34, "SDD PCB$",     34, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
564   AliMedium(35, "SDD Copper$",  35, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
565   AliMedium(36, "SDD Ceramics$",36, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
566   AliMedium(37, "SDD Kapton$",  37, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
567   
568   //  250-274 --> Silicon Strip Detectors (detectors, chips, buses, cooling,..)
569   
570   AliMaterial(50, "SSD Si$",      28.0855, 14., 2.33, 9.36, 999.);
571   AliMaterial(51, "SSD Si chip$", 28.0855, 14., 2.33, 9.36, 999.);
572   AliMaterial(52, "SSD Si bus$",  28.0855, 14., 2.33, 9.36, 999.);
573   AliMaterial(53, "SSD C$",       12.011,   6., 2.265,18.8, 999.);
574   // v. dens 
575   AliMaterial(54, "SSD Air$",     14.61, 7.3, .001205, 30423., 999);
576   AliMaterial(55, "SSD Vacuum$",  1e-16, 1e-16, 1e-16, 1e16, 1e16);
577   AliMaterial(56, "SSD Al$",      26.981539, 13., 2.6989, 8.9, 999);
578   // After a call with ratios by number (negative number of elements), 
579   // the ratio array is changed to the ratio by weight, so all successive 
580   // calls with the same array must specify the number of elements as 
581   // positive 
582   AliMixture(57, "SSD Water $", awat, zwat, denswat, 2, wwat);
583   // After a call with ratios by number (negative number of elements), 
584   // the ratio array is changed to the ratio by weight, so all successive 
585   // calls with the same array must specify the number of elements as 
586   // positive 
587   AliMixture(58, "SSD Freon$", afre, zfre, densfre, 2, wfre);
588   AliMixture(59, "SSD PCB$",   apcb, zpcb, denspcb, 3, wpcb);
589   AliMaterial(60, "SSD Copper$", 63.546, 29., 8.96, 1.43, 999.);
590   // After a call with ratios by number (negative number of elements), 
591   // the ratio array is changed to the ratio by weight, so all successive 
592   // calls with the same array must specify the number of elements as 
593   // positive 
594   AliMixture( 61, "SSD Ceramics$", acer, zcer, denscer, 5, wcer);
595   AliMaterial(62, "SSD Kapton$", 12.011, 6., 1.3, 31.27, 999.);
596   // check A and Z 
597   AliMaterial(63, "SDD G10FR4$", 17.749, 8.875, 1.8, 21.822, 999.);
598   // ** 
599   AliMedium(50, "SSD Si$",      50, 1,isxfld,sxmgmx, 10., .01, .1, .003, .003);
600   AliMedium(51, "SSD Si chip$", 51, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
601   AliMedium(52, "SSD Si bus$",  52, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
602   AliMedium(53, "SSD C$",       53, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
603   AliMedium(54, "SSD Air$",     54, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
604   AliMedium(55, "SSD Vacuum$",  55, 0,isxfld,sxmgmx, 10.,1.00, .1, .100,10.00);
605   AliMedium(56, "SSD Al$",      56, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
606   AliMedium(57, "SSD Water $",  57, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
607   AliMedium(58, "SSD Freon$",   58, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
608   AliMedium(59, "SSD PCB$",     59, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
609   AliMedium(60, "SSD Copper$",  60, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
610   AliMedium(61, "SSD Ceramics$",61, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
611   AliMedium(62, "SSD Kapton$",  62, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
612   AliMedium(63, "SSD G10FR4$",  63, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
613   
614   //     275-299 --> General (end-caps, frames, cooling, cables, etc.) 
615   
616   AliMaterial(75, "GEN C$", 12.011, 6., 2.265, 18.8, 999.);
617   // verify density 
618   AliMaterial(76, "GEN Air$", 14.61, 7.3, .001205, 30423., 999);
619   AliMaterial(77, "GEN Vacuum$", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
620   AliMixture( 78, "GEN POLYETHYL$", apoly, zpoly, .95, -2, wpoly);
621   AliMixture( 79, "GEN SERVICES$",  aserv, zserv, 4.68, 4, wserv);
622   AliMaterial(80, "GEN Copper$", 63.546, 29., 8.96, 1.43, 999.);
623   // After a call with ratios by number (negative number of elements), 
624   // the ratio array is changed to the ratio by weight, so all successive 
625   // calls with the same array must specify the number of elements as 
626   // positive 
627   AliMixture(81, "GEN Water $", awat, zwat, denswat, 2, wwat);
628   // ** 
629   AliMedium(75,"GEN C$",        75, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
630   AliMedium(76,"GEN Air$",      76, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
631   AliMedium(77,"GEN Vacuum$",   77, 0,isxfld,sxmgmx, 10., .10, .1, .100,10.00);
632   AliMedium(78,"GEN POLYETHYL$",78, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
633   AliMedium(79,"GEN SERVICES$", 79, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
634   AliMedium(80,"GEN Copper$",   80, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
635   AliMedium(81,"GEN Water $",   81, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
636 }
637 //_____________________________________________________________________________
638 void AliITSvPPRcoarseasymm::Init(){
639 ////////////////////////////////////////////////////////////////////////
640 //     Initialise the ITS after it has been created.
641 ////////////////////////////////////////////////////////////////////////
642
643     //
644     AliITS::Init();
645     fMajorVersion = 1;
646     fMinorVersion = 0;
647 }  
648  
649 //_____________________________________________________________________________
650 void AliITSvPPRcoarseasymm::DrawModule(){
651 ////////////////////////////////////////////////////////////////////////
652 //     Draw a shaded view of the FMD version 6.
653 ////////////////////////////////////////////////////////////////////////
654   
655   // Set everything unseen
656   gMC->Gsatt("*", "seen", -1);
657   // 
658   // Set ALIC mother visible
659   gMC->Gsatt("ALIC","SEEN",0);
660   //
661   // Set the volumes visible
662   gMC->Gsatt("ITSD","SEEN",0);
663   gMC->Gsatt("ITS1","SEEN",1);
664   gMC->Gsatt("ITS2","SEEN",1);
665   gMC->Gsatt("ITS3","SEEN",1);
666   gMC->Gsatt("ITS4","SEEN",1);
667   gMC->Gsatt("ITS5","SEEN",1);
668   gMC->Gsatt("ITS6","SEEN",1);
669
670   gMC->Gsatt("IPCB","SEEN",1);
671   gMC->Gsatt("ICO2","SEEN",1);
672   gMC->Gsatt("ICER","SEEN",0);
673   gMC->Gsatt("ISI2","SEEN",0);
674   gMC->Gsatt("IPLA","SEEN",0);
675   gMC->Gsatt("ICO3","SEEN",0);
676   gMC->Gsatt("IEPX","SEEN",0);
677   gMC->Gsatt("ISI3","SEEN",1);
678   gMC->Gsatt("ISUP","SEEN",0);
679   gMC->Gsatt("ICHO","SEEN",0);
680   gMC->Gsatt("ICMO","SEEN",0);
681   gMC->Gsatt("ICMD","SEEN",0);
682   gMC->Gsatt("ICCO","SEEN",1);
683   gMC->Gsatt("ICCM","SEEN",0);
684   gMC->Gsatt("ITMD","SEEN",0);
685   gMC->Gsatt("ITTT","SEEN",1);
686
687   //
688   gMC->Gdopt("hide", "on");
689   gMC->Gdopt("shad", "on");
690   gMC->Gsatt("*", "fill", 7);
691   gMC->SetClipBox(".");
692   gMC->SetClipBox("*", 0, 300, -300, 300, -300, 300);
693   gMC->DefaultRange();
694   gMC->Gdraw("alic", 40, 30, 0, 11, 10, .07, .07);
695   gMC->Gdhead(1111, "Inner Tracking System Version 1");
696   gMC->Gdman(17, 6, "MAN");
697 }
698 //_____________________________________________________________________________
699 void AliITSvPPRcoarseasymm::StepManager(){
700 ////////////////////////////////////////////////////////////////////////
701 //    Called for every step in the ITS, then calls the AliITShit class
702 // creator with the information to be recoreded about that hit.
703 ////////////////////////////////////////////////////////////////////////
704   Int_t         copy, id;
705   Float_t       hits[8];
706   Int_t         vol[4];
707   TLorentzVector position, momentum;
708 //  TClonesArray &lhits = *fHits;
709 //
710 // no hits for this coarse asymmetric version.
711 //
712
713   //
714   // Track status
715   vol[3] = 0;
716   if(gMC->IsTrackInside())      vol[3] +=  1;
717   if(gMC->IsTrackEntering())    vol[3] +=  2;
718   if(gMC->IsTrackExiting())     vol[3] +=  4;
719   if(gMC->IsTrackOut())         vol[3] +=  8;
720   if(gMC->IsTrackDisappeared()) vol[3] += 16;
721   if(gMC->IsTrackStop())        vol[3] += 32;
722   if(gMC->IsTrackAlive())       vol[3] += 64;
723   //
724   // Fill hit structure.
725   if( !(gMC->TrackCharge()) ) return;
726     //
727     // Only entering charged tracks
728     if((id=gMC->CurrentVolID(copy))==fIdSens[0]) {  
729       vol[0]=1;
730       id=gMC->CurrentVolOffID(1,copy);      
731       vol[1]=copy;
732       id=gMC->CurrentVolOffID(2,copy);
733       vol[2]=copy;                       
734     } else if(id==fIdSens[1]) {
735       vol[0]=2;
736       id=gMC->CurrentVolOffID(1,copy);       
737       vol[1]=copy;
738       id=gMC->CurrentVolOffID(2,copy);
739       vol[2]=copy;                    
740     } else if(id==fIdSens[2]) {
741       vol[0]=3;
742       vol[1]=copy;
743       id=gMC->CurrentVolOffID(1,copy);
744       vol[2]=copy;             
745     } else if(id==fIdSens[3]) {
746       vol[0]=4;
747       vol[1]=copy;
748       id=gMC->CurrentVolOffID(1,copy);
749       vol[2]=copy;                  
750     } else if(id==fIdSens[4]) {
751       vol[0]=5;
752       vol[1]=copy;
753       id=gMC->CurrentVolOffID(1,copy);
754       vol[2]=copy;               
755     } else if(id==fIdSens[5]) {
756       vol[0]=6;
757       vol[1]=copy;
758       id=gMC->CurrentVolOffID(1,copy);
759       vol[2]=copy;                      
760     } else return;
761     gMC->TrackPosition(position);
762     gMC->TrackMomentum(momentum);
763     hits[0]=position[0];
764     hits[1]=position[1];
765     hits[2]=position[2];          
766     hits[3]=momentum[0];
767     hits[4]=momentum[1];
768     hits[5]=momentum[2];
769     hits[6]=gMC->Edep();
770     hits[7]=gMC->TrackTime();
771 //    new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->CurrentTrack(),vol,hits);
772 //
773 // no hits for this coarse asymmetric version.
774 //
775
776 }
777 /*
778 //____________________________________________________________________________
779 void AliITSvPPRcoarseasymm::Streamer(TBuffer &R__b){
780 ////////////////////////////////////////////////////////////////////////
781 //    A dummy Streamer function for this class AliITSvPPRcoarseasymm. By default it
782 // only streams the AliITS class as it is required. Since this class
783 // dosen't contain any "real" data to be saved, it doesn't.
784 ////////////////////////////////////////////////////////////////////////
785
786    if (R__b.IsReading()) {
787       Version_t R__v = R__b.ReadVersion(); if (R__v) { }
788       AliITS::Streamer(R__b);
789    } else {
790       R__b.WriteVersion(AliITSvPPRcoarseasymm::IsA());
791       AliITS::Streamer(R__b);
792    } // end if R__b.IsReading()
793 }
794 */