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