]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSvPPRcoarseasymm.cxx
Bug fix (selection of RawReaderDate from Yuri was not correct)
[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 /* $Id$ */
17
18 ///////////////////////////////////////////////////////////////////////////////
19 //                                                                           //
20 //  Inner Traking System version PPR coarse asymmetric                                         //
21 //  This class contains the base procedures for the Inner Tracking System    //
22 //                                                                           //
23 // Authors: R. Barbera
24 // version 6.
25 // Created  2000.
26 //
27 //  NOTE: THIS IS THE COARSE ASYMMETRIC PPR geometry of the ITS. 
28 // THIS WILL NOT WORK
29 // with the geometry or module classes or any analysis classes. You are 
30 // strongly encouraged to uses AliITSv5.
31 //                                                                           //
32 ///////////////////////////////////////////////////////////////////////////////
33 #include <Riostream.h> 
34 #include <TMath.h>
35 #include <TNode.h>
36 #include <TObjArray.h>
37 #include <TRandom.h>
38 #include <TTUBE.h>
39 #include <TVector.h>
40 #include <TVirtualMC.h>
41 #include <TGeometry.h>
42 #include <TGeoManager.h>
43
44 #include "AliMagF.h"
45 #include "AliConst.h"
46 #include "AliITShit.h"
47 #include "AliITSvPPRcoarseasymm.h"
48 #include "AliMagF.h"
49 #include "AliRun.h"
50
51 ClassImp(AliITSvPPRcoarseasymm)
52  
53 //_____________________________________________________________________________
54 AliITSvPPRcoarseasymm::AliITSvPPRcoarseasymm():
55 AliITS(),
56 fMajorVersion(IsVersion()),
57 fMinorVersion(0),
58 fRails(0),
59 fSuppMat(0),
60 fIgm(kvPPRcourseasymm) {
61 ////////////////////////////////////////////////////////////////////////
62 //    Standard default constructor for the ITS version 6.
63 ////////////////////////////////////////////////////////////////////////
64
65     fIdN = 0;
66     fIdName = 0;
67     fIdSens    = 0;
68 }
69 //_____________________________________________________________________________
70 AliITSvPPRcoarseasymm::AliITSvPPRcoarseasymm(const char *name, const char *title) : 
71 AliITS(name, title),
72 fMajorVersion(IsVersion()),
73 fMinorVersion(0),
74 fRails(0),
75 fSuppMat(0),
76 fIgm(kvPPRcourseasymm) {
77 ////////////////////////////////////////////////////////////////////////
78 //    Standard constructor for the ITS version 6.
79 ////////////////////////////////////////////////////////////////////////
80
81     fIdN = 6;
82     fIdName = new TString[fIdN];
83     fIdName[0] = "ITS1";
84     fIdName[1] = "ITS2";
85     fIdName[2] = "ITS3";
86     fIdName[3] = "ITS4";
87     fIdName[4] = "ITS5";
88     fIdName[5] = "ITS6";
89     fIdSens    = new Int_t[fIdN];
90     for (Int_t i=0;i<fIdN;i++) fIdSens[i]=0;
91 }
92 //_____________________________________________________________________________
93 AliITSvPPRcoarseasymm::~AliITSvPPRcoarseasymm() {
94 ////////////////////////////////////////////////////////////////////////
95 //    Standard destructor for the ITS version 6.
96 ////////////////////////////////////////////////////////////////////////
97 }
98
99 //__________________________________________________________________________
100 void AliITSvPPRcoarseasymm::BuildGeometry(){
101 ////////////////////////////////////////////////////////////////////////
102 //    Geometry builder for the ITS version 6.
103 ////////////////////////////////////////////////////////////////////////
104     TNode *node, *top;
105     const Int_t kColorITS=kYellow;
106     //
107     top = gAlice->GetGeometry()->GetNode("alice");
108
109     new TTUBE("S_layer1","Layer1 of ITS","void",3.8095,3.8095+1.03*9.36/100.,14.35);
110     top->cd();
111     node = new TNode("Layer1","Layer1","S_layer1",0,0,0,"");
112     node->SetLineColor(kColorITS);
113     fNodes->Add(node);
114
115     new TTUBE("S_layer2","Layer2 of ITS","void",7.,7.+1.03*9.36/100.,14.35);
116     top->cd();
117     node = new TNode("Layer2","Layer2","S_layer2",0,0,0,"");
118     node->SetLineColor(kColorITS);
119     fNodes->Add(node);
120
121     new TTUBE("S_layer3","Layer3 of ITS","void",15.,15.+0.94*9.36/100.,25.1);
122     top->cd();
123     node = new TNode("Layer3","Layer3","S_layer3",0,0,0,"");
124     node->SetLineColor(kColorITS);
125     fNodes->Add(node);
126
127     new TTUBE("S_layer4","Layer4 of ITS","void",24.1,24.1+0.95*9.36/100.,32.1);
128     top->cd();
129     node = new TNode("Layer4","Layer4","S_layer4",0,0,0,"");
130     node->SetLineColor(kColorITS);
131     fNodes->Add(node);
132
133     new TTUBE("S_layer5","Layer5 of ITS","void",38.5,38.5+0.91*9.36/100.,49.405);
134     top->cd();
135     node = new TNode("Layer5","Layer5","S_layer5",0,0,0,"");
136     node->SetLineColor(kColorITS);
137     fNodes->Add(node);
138
139     new TTUBE("S_layer6","Layer6 of ITS","void",43.5765,43.5765+0.87*9.36/100.,55.27);
140     top->cd();
141     node = new TNode("Layer6","Layer6","S_layer6",0,0,0,"");
142     node->SetLineColor(kColorITS);
143     fNodes->Add(node);
144 }
145 //_____________________________________________________________________________
146 void AliITSvPPRcoarseasymm::CreateGeometry(){
147     ////////////////////////////////////////////////////////////////////////
148     // This routine defines and Creates the geometry for version 6 of the ITS.
149     ////////////////////////////////////////////////////////////////////////
150   
151     //INNER RADII OF THE SILICON LAYERS 
152     Float_t rl[6]    = { 3.8095,7.,15.,24.,38.5,43.5765 };   
153     //THICKNESSES OF LAYERS (in % radiation length)
154     Float_t drl[6]   = { 1.03,1.03,0.94,0.95,0.91,0.87 };   
155     //HALF LENGTHS OF LAYERS  
156     Float_t dzl[6]   = { 14.35,14.35,25.1,32.1,49.405,55.27 };
157     //LENGTHS OF END-LADDER BOXES (ALL INCLUDED)
158     Float_t dzb[6]   = { 12.4,12.4,13.5,15.,7.5,7.5 };   
159     //THICKNESSES OF END-LADDER BOXES (ALL INCLUDED)
160     Float_t drb[6]   = { rl[1]-rl[0],0.2,5.,5.,4.,4. };        
161
162  
163     Float_t dits[3], rlim, zmax;
164     Float_t zpos;
165     Float_t pcits[100], ztpc;
166     Int_t idrotm[1999], i;
167     Float_t dgh[100];
168   
169     Int_t rails = 1;       // flag for rails (1 --> rails in; 0 --> rails out)
170     Int_t suppmat = 0;     // flag to change the material of the services
171                            // supports (=0 copper, =1 aluminum, =2 carbon)
172     // These constant character strings are set by cvs during commit
173     // do not change them unless you know what you are doing!
174     const Char_t *cvsDate="$Date$";
175     const Char_t *cvsRevision="$Revision$";
176     rails = GetRails();
177   
178     if(rails != 0 && rails != 1) {
179         cout << "ITS - WARNING: the switch for rails is not set "
180             "neither to 0 (rails out) nor to 1 (rails in)." 
181             " The default value of 1 (rails in) will be used." << endl;
182     }  // end if
183   
184     if (rails == 0 ) {
185         cout << "ITS: Rails are out." << endl; 
186     } else {
187         cout << "ITS: Rails are in." << endl;
188     } // end if 
189     suppmat = GetSupportMaterial();   
190   
191     if (suppmat != 0 && suppmat != 1 && suppmat != 2) {
192         cout << "ITS - WARNING: the flag for the material of "
193             "services supports is not set neither to 0 (copper) "
194             "nor to 1 (aluminum) nor to 2 (carbon)." 
195             " The default value of 0 (copper) will be used." << endl;
196     }   // end if
197   
198     if (suppmat == 0) {
199         cout << "ITS: The material of the services supports is copper." 
200              << endl; 
201     } else if (suppmat == 1){
202         cout << "ITS: The material of the services supports is aluminum." 
203              << endl;
204     } else {
205         cout << "ITS: The material of the services supports is carbon." 
206              << endl;
207     } // end if
208       
209
210     Int_t *idtmed = fIdtmed->GetArray()-199;
211   
212     //     CONVERT INTO CM (RL(SI)=9.36 CM) 
213     for (i = 0; i < 6; ++i) {
214         drl[i] = drl[i] / 100. * 9.36;
215     } // end if
216     
217     //     FIELD CAGE HALF LENGTH 
218   
219     rlim  = 50.;
220     zmax  = 74.;
221     ztpc = 284.;
222   
223     // --- Define ghost volume containing the whole ITS (including services) 
224     //     and fill it with air 
225     /*
226     dgh[0] = 0.;
227     dgh[1] = 360.;
228     dgh[2] = 16.;
229     dgh[3] = -ztpc-5.-0.1;
230     dgh[4] = 46;   
231     dgh[5] = 85.;
232     dgh[6] = -ztpc;
233     dgh[7] = 46;   
234     dgh[8] = 85.;
235     dgh[9] = -ztpc;
236     dgh[10] = 46;  
237     dgh[11] = rlim+6;
238     dgh[12] = -97.5;
239     dgh[13] = 46;  
240     dgh[14] = rlim+6;
241     dgh[15] = -zmax;
242     dgh[16] = 46;  
243     dgh[17] = rlim+6;
244     dgh[18] = -48;   
245     dgh[19] = 6;
246     dgh[20] = rlim+6;
247     dgh[21] = -28.6;   
248     dgh[22] = 6;
249     dgh[23] = rlim+6;    
250     dgh[24] = -27.6;  
251     dgh[25] = 3.295;
252     dgh[26] = rlim+6; 
253     dgh[27] = 27.6;   
254     dgh[28] = 3.295;
255     dgh[29] = rlim+6;
256     dgh[30] = 28.6;   
257     dgh[31] = 6;
258     dgh[32] = rlim+6;
259     dgh[33] = 48;   
260     dgh[34] = 6;
261     dgh[35] = rlim+6;  
262     dgh[36] = zmax;
263     dgh[37] = 46;
264     dgh[38] = rlim+6;
265     dgh[39] = 97.5;
266     dgh[40] = 46;  
267     dgh[41] = rlim+6;
268     dgh[42] = ztpc;
269     dgh[43] = 62;     
270     dgh[44] = 62+4.;  
271     dgh[45] = ztpc;
272     dgh[46] = 62;     
273     dgh[47] = 85.;
274     dgh[48] = ztpc+4.+0.1;
275     dgh[49] = 62.4;
276     dgh[50] = 85.;
277     gMC->Gsvolu("ITSV", "PCON", idtmed[275], dgh, 51);
278   
279     // --- Place the ghost volume in its mother volume (ALIC) and make it 
280     //     invisible 
281   
282     gMC->Gspos("ITSV", 1, "ALIC", 0., 0., 0., 0, "ONLY");
283     //gMC->Gsatt("ITSV", "SEEN", 0);
284     */
285     TGeoVolumeAssembly *itsV = gGeoManager->MakeVolumeAssembly("ITSV");
286     const Int_t length=100;
287     Char_t vstrng[length];
288     if(fIgm.WriteVersionString(vstrng,length,(AliITSVersion_t)IsVersion(),
289                                fMinorVersion,cvsDate,cvsRevision))
290         itsV->SetTitle(vstrng);
291
292     TGeoVolume *alic = gGeoManager->GetVolume("ALIC");
293     if(alic==0) {
294         Error("CreateGeometry","alic=0");
295         return;
296     } // end if
297     // See idrotm[199] for angle definitions.
298     //alic->AddNode(itsV,1,new TGeoRotation("", 90.,180., 90.,90., 180.,0.));
299     alic->AddNode(itsV,1,0);
300
301     // --- Define ghost volume containing the six layers and fill it with air 
302   
303   dgh[0] = 0.;
304   dgh[1] = 360.;
305   dgh[2] = 8.;
306   dgh[3] = -zmax;  
307   dgh[4] = 46.;
308   dgh[5] = rlim;
309   dgh[6] = -47.5;    
310   dgh[7] = 6.005;
311   dgh[8] = rlim;
312   dgh[9] = -28.5;    
313   dgh[10] = 6.005;
314   dgh[11] = rlim;  
315   dgh[12] = -27.5;   
316   dgh[13] = 3.3;
317   dgh[14] = rlim;
318   dgh[15] = 27.5;    
319   dgh[16] = 3.3;
320   dgh[17] = rlim;
321   dgh[18] = 28.5;    
322   dgh[19] = 6.005;
323   dgh[20] = rlim;
324   dgh[21] = 47.5;    
325   dgh[22] = 6.005;
326   dgh[23] = rlim;
327   dgh[24] = zmax;    
328   dgh[25] = 46.;
329   dgh[26] = rlim;
330   gMC->Gsvolu("ITSD", "PCON", idtmed[275], dgh, 27);
331   
332   // --- Place the ghost volume in its mother volume (ITSV) and make it 
333   //     invisible 
334   
335   gMC->Gspos("ITSD", 1, "ITSV", 0., 0., 0., 0, "ONLY");
336   //gMC->Gsatt("ITSD", "SEEN", 0);
337   
338
339   //     ITS LAYERS (SILICON) 
340   
341   dits[0] = rl[0];
342   dits[1] = rl[0] + drl[0];
343   dits[2] = dzl[0];
344   gMC->Gsvolu("ITS1", "TUBE", idtmed[199], dits, 3);
345   gMC->Gspos("ITS1", 1, "ITSD", 0., 0., 0., 0, "ONLY");
346   
347   dits[0] = rl[1];
348   dits[1] = rl[1] + drl[1];
349   dits[2] = dzl[1];
350   gMC->Gsvolu("ITS2", "TUBE", idtmed[199], dits, 3);
351   gMC->Gspos("ITS2", 1, "ITSD", 0., 0., 0., 0, "ONLY");
352   
353   dits[0] = rl[2];
354   dits[1] = rl[2] + drl[2];
355   dits[2] = dzl[2];
356   gMC->Gsvolu("ITS3", "TUBE", idtmed[224], dits, 3);
357   gMC->Gspos("ITS3", 1, "ITSD", 0., 0., 0., 0, "ONLY");
358   
359   dits[0] = rl[3];
360   dits[1] = rl[3] + drl[3];
361   dits[2] = dzl[3];
362   gMC->Gsvolu("ITS4", "TUBE", idtmed[224], dits, 3);
363   gMC->Gspos("ITS4", 1, "ITSD", 0., 0., 0., 0, "ONLY");
364   
365   dits[0] = rl[4];
366   dits[1] = rl[4] + drl[4];
367   dits[2] = dzl[4];
368   gMC->Gsvolu("ITS5", "TUBE", idtmed[249], dits, 3);
369   gMC->Gspos("ITS5", 1, "ITSD", 0., 0., 0., 0, "ONLY");
370   
371   dits[0] = rl[5];
372   dits[1] = rl[5] + drl[5];
373   dits[2] = dzl[5];
374   gMC->Gsvolu("ITS6", "TUBE", idtmed[249], dits, 3);
375   gMC->Gspos("ITS6", 1, "ITSD", 0., 0., 0., 0, "ONLY");
376   
377   // END-LADDER ELECTRONICS BOXES AND CABLES FOR SPD
378   
379   gMC->Gsvolu("IEL1", "TUBE", idtmed[208], dits, 0); 
380   for (i = 0; i < 2; i++) {
381     dits[0] = rl[i];
382     dits[1] = dits[0] + drb[i];
383     dits[2] = dzb[i] / 2.;
384     zpos = dzl[i] + dits[2];
385     gMC->Gsposp("IEL1", i+1, "ITSD", 0., 0., zpos, 0, "ONLY", dits, 3);
386     gMC->Gsposp("IEL1", i+1+6, "ITSD", 0., 0.,-zpos, 0, "ONLY", dits, 3);
387   }
388   
389   // END-LADDER ELECTRONICS BOXES AND CABLES FOR SDD
390   
391   gMC->Gsvolu("IEL2", "TUBE", idtmed[237], dits, 0); 
392   for (i = 2; i < 3; i++) {
393     dits[0] = rl[i]-2.5;
394     dits[1] = dits[0] + drb[i];
395     dits[2] = dzb[i] / 2.;
396     zpos = dzl[i] + dits[2];
397     gMC->Gsposp("IEL2", i+1, "ITSD", 0., 0., zpos, 0, "ONLY", dits, 3);
398     gMC->Gsposp("IEL2", i+1+6, "ITSD", 0., 0.,-zpos, 0, "ONLY", dits, 3);
399   }
400   for (i = 3; i < 4; i++) {
401     dits[0] = rl[i]-1.4;
402     dits[1] = dits[0] + drb[i];
403     dits[2] = dzb[i] / 2.;
404     zpos = dzl[i] + dits[2];
405     gMC->Gsposp("IEL2", i+1, "ITSD", 0., 0., zpos, 0, "ONLY", dits, 3);
406     gMC->Gsposp("IEL2", i+1+6, "ITSD", 0., 0.,-zpos, 0, "ONLY", dits, 3);
407   }
408   
409   // END-LADDER ELECTRONICS BOXES AND CABLES FOR SSD
410   
411   gMC->Gsvolu("IEL3", "TUBE", idtmed[263], dits, 0); 
412   for (i = 4; i < 5; i++) {
413     dits[0] = rl[i]+1.4;
414     dits[1] = dits[0] + drb[i];
415     dits[2] = dzb[i] / 2.;
416     zpos = dzl[i] + dits[2];
417     gMC->Gsposp("IEL3", i+1, "ITSD", 0., 0., zpos, 0, "ONLY", dits, 3);
418     gMC->Gsposp("IEL3", i+1+6, "ITSD", 0., 0.,-zpos, 0, "ONLY", dits, 3);
419   }    
420   for (i = 5; i < 6; i++) {
421     dits[0] = rl[i]+0.4235;
422     dits[1] = dits[0] + drb[i];
423     dits[2] = dzb[i] / 2.;
424     zpos = dzl[i] + dits[2];
425     gMC->Gsposp("IEL3", i+1, "ITSD", 0., 0., zpos, 0, "ONLY", dits, 3);
426     gMC->Gsposp("IEL3", i+1+6, "ITSD", 0., 0.,-zpos, 0, "ONLY", dits, 3);
427   }        
428
429   //    DEFINE THERMAL SCREEN FOR SPD
430   
431   pcits[0] = 8.3;
432   pcits[1] = 8.5;
433   pcits[2] = 42.5;
434   gMC->Gsvolu("ICY1", "TUBE", idtmed[274], pcits, 3);   
435   gMC->Gspos("ICY1", 1, "ITSD", 0., 0., 0., 0, "ONLY");
436
437   //    DEFINE END CONES FOR SDD
438   
439   pcits[0] = (59.-42.5)/2.;
440   pcits[1] = 8.5;
441   pcits[2] = 8.5+0.1;
442   pcits[3] = 28.;
443   pcits[4] = 28.+0.1;  
444   gMC->Gsvolu("ICO1", "CONE", idtmed[238], pcits, 5);    
445   AliMatrix(idrotm[200], 90., 0., 90., 90., 180., 0.);
446   gMC->Gspos("ICO1", 1, "ITSD", 0., 0., 42.5+pcits[0], 0, "ONLY");
447   gMC->Gspos("ICO1", 2, "ITSD", 0., 0., -(42.5+pcits[0]), idrotm[200], "ONLY");
448
449   //    DEFINE CYLINDER BETWEEN SDD AND SSD
450   
451   pcits[0] = (59.5-0.13/2.)/2.;
452   pcits[1] = (59.5+0.13/2.)/2.;
453   pcits[2] = 57.;
454   gMC->Gsvolu("ICY2", "TUBE", idtmed[274], pcits, 3);   
455   gMC->Gspos("ICY2", 1, "ITSD", 0., 0., 0., 0, "ONLY"); 
456
457   //    DEFINE END CONES FOR SSD
458   
459   pcits[0] = (74.-59.)/2.;
460   pcits[1] = 28.;
461   pcits[2] = 28.+0.1;
462   pcits[3] = 47.;
463   pcits[4] = 47.+0.1;
464   gMC->Gsvolu("ICO2", "CONE", idtmed[264], pcits, 5);    
465   gMC->Gspos("ICO2", 1, "ITSD", 0., 0., 59.+pcits[0], 0, "ONLY");
466   gMC->Gspos("ICO2", 2, "ITSD", 0., 0., -(59.+pcits[0]), idrotm[200], "ONLY");
467   
468     
469   // ****************************  SERVICES  *********************************
470   
471
472   
473   // --- DEFINE CABLES AT THE END OF THE ITS CONES - COPPER PART
474   //     UPPER PART
475   
476   dgh[0] = 46.;    
477   dgh[1] = 46.+1.0;  
478   dgh[2] = 9.5;
479   dgh[3] = 12.;
480   dgh[4] = 168.;
481   
482   if (suppmat == 0) {
483      gMC->Gsvolu("I1CU", "TUBS", idtmed[279], dgh, 5);    // copper
484   } else if (suppmat == 1) {
485      gMC->Gsvolu("I1CU", "TUBS", idtmed[285], dgh, 5);    // aluminum
486   } else {
487      gMC->Gsvolu("I1CU", "TUBS", idtmed[274], dgh, 5);    // carbon
488   }     
489   gMC->Gspos("I1CU", 1, "ITSV", 0., 0., 83.5, 0, "ONLY");
490   gMC->Gspos("I1CU", 2, "ITSV", 0., 0., -83.5, idrotm[200], "ONLY");
491   
492   // --- DEFINE CABLES AT THE END OF THE ITS CONES - COPPER PART
493   //     LOWER PART
494   
495   dgh[0] = 46.;    
496   dgh[1] = 46.+1.0;  
497   dgh[2] = 9.5;
498   dgh[3] = 192.;
499   dgh[4] = 348.;
500   
501   if (suppmat == 0) {
502      gMC->Gsvolu("I2CU", "TUBS", idtmed[279], dgh, 5);    // copper
503   } else if (suppmat == 1) {
504      gMC->Gsvolu("I2CU", "TUBS", idtmed[285], dgh, 5);    // aluminum
505   } else {
506      gMC->Gsvolu("I2CU", "TUBS", idtmed[274], dgh, 5);    // carbon
507   }     
508   gMC->Gspos("I2CU", 1, "ITSV", 0., 0., 83.5, 0, "ONLY");
509   gMC->Gspos("I2CU", 2, "ITSV", 0., 0., -83.5, idrotm[200], "ONLY");
510
511
512   // --- DEFINE CABLES AT THE END OF THE ITS CONES - CARBON PART
513   //     UPPER PART
514   
515   dgh[0] = 46.+1.0;  
516   dgh[1] = 46.+1.0+1.5;   
517   dgh[2] = 9.5;
518   dgh[3] = 12.;
519   dgh[4] = 168.;
520   
521   gMC->Gsvolu("I1CC", "TUBS", idtmed[274], dgh, 5);  
522   gMC->Gspos("I1CC", 1, "ITSV", 0., 0., 83.5, 0, "ONLY");
523   gMC->Gspos("I1CC", 2, "ITSV", 0., 0., -83.5, idrotm[200], "ONLY");  
524   
525   // --- DEFINE CABLES AT THE END OF THE ITS CONES - CARBON PART
526   //     LOWER PART
527   
528   dgh[0] = 46.+1.0;  
529   dgh[1] = 46.+1.0+1.5;   
530   dgh[2] = 9.5;
531   dgh[3] = 192.;
532   dgh[4] = 348.;
533   
534   gMC->Gsvolu("I2CC", "TUBS", idtmed[274], dgh, 5);  
535   gMC->Gspos("I2CC", 1, "ITSV", 0., 0., 83.5, 0, "ONLY");
536   gMC->Gspos("I2CC", 2, "ITSV", 0., 0., -83.5, idrotm[200], "ONLY");  
537
538   // --- DEFINE PATCH PANELS AT THE END OF THE ITS CONES
539   //    UPPER PART
540     
541   dgh[0] = 46.;  
542   dgh[1] = 56.;
543   dgh[2] = 2.25;
544   dgh[3] = 12.;
545   dgh[4] = 168.;
546   
547   gMC->Gsvolu("IPA1", "TUBS", idtmed[285], dgh, 5);  
548   gMC->Gspos("IPA1", 1, "ITSV", 0., 0., 95.25, 0, "ONLY");  
549   gMC->Gspos("IPA1", 2, "ITSV", 0., 0., -95.25, idrotm[200], "ONLY"); 
550
551
552   // --- DEFINE PATCH PANELS AT THE END OF THE ITS CONES
553   //     LOWER PART
554     
555   dgh[0] = 46.;  
556   dgh[1] = 56.;
557   dgh[2] = 2.25;
558   dgh[3] = 192.;
559   dgh[4] = 348.;
560   
561   gMC->Gsvolu("IPA2", "TUBS", idtmed[285], dgh, 5);  
562   gMC->Gspos("IPA2", 1, "ITSV", 0., 0., 95.25, 0, "ONLY");  
563   gMC->Gspos("IPA2", 2, "ITSV", 0., 0., -95.25, idrotm[200], "ONLY"); 
564
565
566   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE ABSORBER SIDE - COPPER PART
567   //     UPPER PART
568   
569   dgh[0] = (ztpc-97.5)/2.;
570   dgh[1] = 46.2;     
571   dgh[2] = 46.2+1.0;  
572   dgh[3] = 62.3;     
573   dgh[4] = 62.3+1.0;   
574   dgh[5] = 12.;    
575   dgh[6] = 168.;
576   if (suppmat == 0) {
577      gMC->Gsvolu("ICU1", "CONS", idtmed[279], dgh, 7);    // copper
578   } else if (suppmat == 1) {
579      gMC->Gsvolu("ICU1", "CONS", idtmed[285], dgh, 7);    // aluminum  
580   } else {
581      gMC->Gsvolu("ICU1", "CONS", idtmed[274], dgh, 7);    // carbon
582   }
583   gMC->Gspos("ICU1", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");   
584   
585   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE ABSORBER SIDE - COPPER PART
586   //     LOWER PART
587   
588   dgh[0] = (ztpc-97.5)/2.;
589   dgh[1] = 46.2;      
590   dgh[2] = 46.2+1.0;  
591   dgh[3] = 62.3;      
592   dgh[4] = 62.3+1.0;  
593   dgh[5] = 192.;    
594   dgh[6] = 348.;
595   if (suppmat == 0) {
596      gMC->Gsvolu("ICU2", "CONS", idtmed[279], dgh, 7);    // copper
597   } else if (suppmat == 1) {
598      gMC->Gsvolu("ICU2", "CONS", idtmed[285], dgh, 7);    // aluminum  
599   } else {
600      gMC->Gsvolu("ICU2", "CONS", idtmed[274], dgh, 7);    // carbon
601   }
602   gMC->Gspos("ICU2", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");  
603
604
605    // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE ABSORBER SIDE - CARBON PART
606    //     UPPER PART
607   
608   dgh[0] = (ztpc-97.5)/2.;
609   dgh[1] = 46.2+1.0;      
610   dgh[2] = 46.2+1.0+1.5;  
611   dgh[3] = 62.3+1.0;      
612   dgh[4] = 62.3+1.0+1.5;  
613   dgh[5] = 12.;    
614   dgh[6] = 168.;  
615   gMC->Gsvolu("ICC1", "CONS", idtmed[274], dgh, 7);    
616   gMC->Gspos("ICC1", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");   
617   
618   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE ABSORBER SIDE - CARBON PART
619   //     LOWER PART
620   
621   dgh[0] = (ztpc-97.5)/2.;
622   dgh[1] = 46.2+1.0;    
623   dgh[2] = 46.2+1.0+1.5;
624   dgh[3] = 62.3+1.0;    
625   dgh[4] = 62.3+1.0+1.5;
626   dgh[5] = 192.;    
627   dgh[6] = 348.;  
628   gMC->Gsvolu("ICC2", "CONS", idtmed[274], dgh, 7);    
629   gMC->Gspos("ICC2", 1, "ITSV", 0., 0., 97.5+dgh[0], 0, "ONLY");  
630    
631   // --- DEFINE CABLES/COOLING BEHIND THE TPC ON THE ABSORBER SIDE - COPPER PART
632   //     UPPER PART
633     
634   dgh[0] = 62.1; 
635   dgh[1] = 74.5;
636   dgh[2] = 0.5;
637   dgh[3] = 12.;
638   dgh[4] = 168.;
639   if (suppmat == 0) {
640      gMC->Gsvolu("ICU3", "TUBS", idtmed[279], dgh, 5);    // copper
641   } else if (suppmat == 1) {
642      gMC->Gsvolu("ICU3", "TUBS", idtmed[285], dgh, 5);    // aluminum
643   } else {
644      gMC->Gsvolu("ICU3", "TUBS", idtmed[274], dgh, 5);    // carbon
645     }
646   gMC->Gspos("ICU3", 1, "ITSV", 0., 0., ztpc+1.5+dgh[2], 0, "ONLY");  
647
648   // --- DEFINE CABLES/COOLING BEHIND THE TPC ON THE ABSORBER SIDE - COPPER PART
649   //     LOWER PART
650   
651   dgh[0] = 62.1;  
652   dgh[1] = 74.5;
653   dgh[2] = 0.5;
654   dgh[3] = 192.;
655   dgh[4] = 348.;
656   if (suppmat == 0) {
657      gMC->Gsvolu("ICU4", "TUBS", idtmed[279], dgh, 5);    // copper
658   } else if (suppmat == 1) {
659      gMC->Gsvolu("ICU4", "TUBS", idtmed[285], dgh, 5);    // aluminum
660   } else {
661      gMC->Gsvolu("ICU4", "TUBS", idtmed[274], dgh, 5);    // carbon
662   }
663   gMC->Gspos("ICU4", 1, "ITSV", 0., 0., ztpc+1.5+dgh[2], 0, "ONLY");     
664      
665   // --- DEFINE CABLES/COOLING BEHIND THE TPC ON THE ABSORBER SIDE - CARBON PART
666   //     UPPER PART
667
668   dgh[0] = 62.1;  
669   dgh[1] = 74.5;
670   dgh[2] = 0.75;
671   dgh[3] = 12.;
672   dgh[4] = 168.;
673   gMC->Gsvolu("ICC3", "TUBS", idtmed[274], dgh, 5);    
674   gMC->Gspos("ICC3", 1, "ITSV", 0., 0., ztpc+dgh[2], 0, "ONLY");   
675     
676   // --- DEFINE CABLES/COOLING BEHIND THE TPC ON THE ABSORBER SIDE - CARBON PART
677   //     LOWER PART
678
679   dgh[0] = 62.1;  
680   dgh[1] = 74.5;
681   dgh[2] = 0.75;
682   dgh[3] = 192.;
683   dgh[4] = 348.;
684   gMC->Gsvolu("ICC4", "TUBS", idtmed[274], dgh, 5);    
685   gMC->Gspos("ICC4", 1, "ITSV", 0., 0., ztpc+dgh[2], 0, "ONLY");  
686   
687   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE OTHER SIDE W.R.T.
688   //     THE ABSORBER - COPPER PART - UPPER PART
689   
690   dgh[0] = 46.;      
691   dgh[1] = 46.+1.0;  
692   dgh[2] = (ztpc-97.5+1.5)/2.;
693   dgh[3] = 12.;
694   dgh[4] = 168.;
695   if (suppmat == 0) {
696      gMC->Gsvolu("ICU5", "TUBS", idtmed[279], dgh, 5);   // copper
697   } else if (suppmat == 1) {
698      gMC->Gsvolu("ICU5", "TUBS", idtmed[285], dgh, 5);   // aluminum
699   } else {
700      gMC->Gsvolu("ICU5", "TUBS", idtmed[274], dgh, 5);   // carbon
701   }
702   gMC->Gspos("ICU5", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");  
703   
704   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE OTHER SIDE W.R.T.
705   //     THE ABSORBER - COPPER PART - LOWER PART
706   
707   dgh[0] = 46.;  
708   dgh[1] = 46.+1.0;  
709   dgh[2] = (ztpc-97.5+1.5)/2.;
710   dgh[3] = 192.;
711   dgh[4] = 348.;  
712   if (suppmat == 0) {
713      gMC->Gsvolu("ICU6", "TUBS", idtmed[279], dgh, 5);   // copper
714   } else if (suppmat == 1) {
715      gMC->Gsvolu("ICU6", "TUBS", idtmed[285], dgh, 5);   // aluminum
716   } else {
717      gMC->Gsvolu("ICU6", "TUBS", idtmed[274], dgh, 5);   // carbon
718   }
719   gMC->Gspos("ICU6", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");    
720   
721   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE OTHER SIDE W.R.T.
722   //     THE ABSORBER - CARBON PART - UPPER PART
723   
724   dgh[0] = 46.+1.0;  
725   dgh[1] = 46.+1.0+1.5; 
726   dgh[2] = (ztpc-97.5)/2.;
727   dgh[3] = 12.;
728   dgh[4] = 168.;  
729   gMC->Gsvolu("ICC5", "TUBS", idtmed[274], dgh, 5);   
730   gMC->Gspos("ICC5", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");   
731   
732   // --- DEFINE CABLES/COOLING BELOW THE TPC ON THE OTHER SIDE W.R.T.
733   //     THE ABSORBER - CARBON PART - LOWER PART
734   
735   dgh[0] = 46.+1.0;   
736   dgh[1] = 46.+1.0+1.5;  
737   dgh[2] = (ztpc-97.5)/2.;
738   dgh[3] = 192.;
739   dgh[4] = 348.;  
740   gMC->Gsvolu("ICC6", "TUBS", idtmed[274], dgh, 5);   
741   gMC->Gspos("ICC6", 1, "ITSV", 0., 0., -97.5-dgh[2], 0, "ONLY");      
742
743   // --- DEFINE CABLES/COOLING BEHIND THE TPC ON OTHER SIDE W.R.T. THE ABSORBER
744   //     COPPER PART - UPPER PART
745     
746   dgh[0] = 46.;   
747   dgh[1] = 74.5;
748   dgh[2] = 0.5;
749   dgh[3] = 12.;
750   dgh[4] = 168.;  
751   if (suppmat == 0) {
752      gMC->Gsvolu("ICU7", "TUBS", idtmed[279], dgh, 5);   // copper
753   } else if (suppmat == 1) {
754      gMC->Gsvolu("ICU7", "TUBS", idtmed[285], dgh, 5);   // aluminum
755   } else {
756      gMC->Gsvolu("ICU7", "TUBS", idtmed[274], dgh, 5);   // carbon
757   }
758   gMC->Gspos("ICU7", 1, "ITSV", 0., 0., -(ztpc+1.5+dgh[2]), 0, "ONLY");  
759   
760   // --- DEFINE CABLES/COOLING BEHIND THE TPC ON OTHER SIDE W.R.T. THE ABSORBER
761   //     COPPER PART - LOWER PART
762     
763   dgh[0] = 46.; 
764   dgh[1] = 74.5;
765   dgh[2] = 0.5;
766   dgh[3] = 192.;
767   dgh[4] = 348.;   
768   if (suppmat == 0) {
769      gMC->Gsvolu("ICU8", "TUBS", idtmed[279], dgh, 5);   // copper
770   } else if (suppmat == 1) {
771      gMC->Gsvolu("ICU8", "TUBS", idtmed[285], dgh, 5);   // aluminum
772   } else {
773      gMC->Gsvolu("ICU8", "TUBS", idtmed[274], dgh, 5);   // carbon
774   }
775   gMC->Gspos("ICU8", 1, "ITSV", 0., 0., -(ztpc+1.5+dgh[2]), 0, "ONLY");      
776     
777   // --- DEFINE CABLES/COOLING BEHIND THE TPC ON OTHER SIDE W.R.T. THE ABSORBER
778   //     CARBON PART - UPPER PART
779   
780   dgh[0] = 46.+1.0;  
781   dgh[1] = 74.5;
782   dgh[2] = 0.75;
783   dgh[3] = 12.;
784   dgh[4] = 168.;   
785   gMC->Gsvolu("ICC7", "TUBS", idtmed[274], dgh, 5);   
786   gMC->Gspos("ICC7", 1, "ITSV", 0., 0., -(ztpc+dgh[2]), 0, "ONLY"); 
787   
788   // --- DEFINE CABLES/COOLING BEHIND THE TPC ON OTHER SIDE W.R.T. THE ABSORBER
789   //     CARBON PART - LOWER PART
790   
791   dgh[0] = 46.+1.0;  
792   dgh[1] = 74.5;
793   dgh[2] = 0.75;
794   dgh[3] = 192.;
795   dgh[4] = 348.;     
796   gMC->Gsvolu("ICC8", "TUBS", idtmed[274], dgh, 5);   
797   gMC->Gspos("ICC8", 1, "ITSV", 0., 0., -(ztpc+dgh[2]), 0, "ONLY");        
798     
799   // --- DEFINE HOOK TO THE TPC ON OTHER SIDE W.R.T. THE ABSORBER - UPPER PART
800   
801   dgh[0] = 74.5;
802   dgh[1] = 79.5;
803   dgh[2] = 2.5;
804   dgh[3] = 12.;
805   dgh[4] = 168.;    
806   gMC->Gsvolu("IHK1", "TUBS", idtmed[284], dgh, 5);  
807   gMC->Gspos("IHK1", 1, "ITSV", 0., 0., -ztpc-dgh[2], 0, "ONLY");   
808   
809   // --- DEFINE HOOK TO THE TPC ON OTHER SIDE W.R.T. THE ABSORBER - LOWER PART
810   
811   dgh[0] = 74.5;
812   dgh[1] = 79.5;
813   dgh[2] = 2.5;
814   dgh[3] = 192.;
815   dgh[4] = 348.;    
816   gMC->Gsvolu("IHK2", "TUBS", idtmed[284], dgh, 5);  
817   gMC->Gspos("IHK2", 1, "ITSV", 0., 0., -ztpc-dgh[2], 0, "ONLY");      
818   
819   // --- DEFINE RAILS BETWEEN THE ITS AND THE TPC
820   
821   if (rails == 1) {
822   
823      dgh[0] = 2.;          
824      dgh[1] = 8.;           
825      dgh[2] = 190.;         
826      gMC->Gsvolu("IRA1", "BOX ", idtmed[239], dgh, 3);
827      gMC->Gspos("IRA1", 1, "ITSV", 53.5, 0., -69.5, 0, "ONLY");   
828      gMC->Gsvolu("IRA2", "BOX ", idtmed[239], dgh, 3);    
829      gMC->Gspos("IRA2", 1, "ITSV", -53.5, 0., -69.5, 0, "ONLY");    
830
831      dgh[0] = 2.-0.5;    // 0.5 was determined in such a way that the aluminum area is 20.9 cm^2      
832      dgh[1] = 8.-0.5;    // 0.5 was determined in such a way that the aluminum area is 20.9 cm^2       
833      dgh[2] = 190.;         
834      gMC->Gsvolu("IRA3", "BOX ", idtmed[275], dgh, 3);   
835      gMC->Gspos("IRA3", 1, "IRA1", 0., 0., 0., 0, "ONLY");   
836      gMC->Gsvolu("IRA4", "BOX ", idtmed[275], dgh, 3);     
837      gMC->Gspos("IRA4", 1, "IRA2", 0., 0., 0., 0, "ONLY");    
838
839   }
840
841   // --- DEFINE CYLINDERS HOLDING RAILS BETWEEN THE ITS AND THE TPC
842   
843   dgh[0] = 56.9;    
844   dgh[1] = 59.;
845   dgh[2] = 0.6;    
846   gMC->Gsvolu("ICYL", "TUBE", idtmed[285], dgh, 3);   
847   gMC->Gspos("ICYL", 1, "ALIC", 0., 0., 74.1, 0, "ONLY");       
848   gMC->Gspos("ICYL", 2, "ALIC", 0., 0., -74.1, idrotm[200], "ONLY");  
849
850   // --- DEFINE SUPPORTS FOR RAILS ATTACHED TO THE CYLINDERS
851
852   dgh[0] = 0.;        
853   dgh[1] = 3.;         
854   dgh[2] = 5.;  // 5. comes from the fact that the volume has to be 567.6/2 cm^3       
855   gMC->Gsvolu("ISR1", "TUBE", idtmed[286], dgh, 3);   
856   gMC->Gspos("ISR1", 1, "ITSV", 53.4292, 10.7053, 79.75, 0, "ONLY");    
857   gMC->Gspos("ISR1", 2, "ITSV", 53.4292, -10.7053, 79.75, 0, "ONLY");   
858   gMC->Gspos("ISR1", 3, "ITSV", -53.4292, 10.7053, 79.75, 0, "ONLY"); 
859   gMC->Gspos("ISR1", 4, "ITSV", -53.4292, -10.7053, 79.75, 0, "ONLY");  
860   gMC->Gspos("ISR1", 5, "ITSV", 53.4292, 10.7053, -79.75, 0, "ONLY");   
861   gMC->Gspos("ISR1", 6, "ITSV", 53.4292, -10.7053, -79.75, 0, "ONLY");   
862   gMC->Gspos("ISR1", 7, "ITSV", -53.4292, 10.7053, -79.75, 0, "ONLY"); 
863   gMC->Gspos("ISR1", 8, "ITSV", -53.4292, -10.7053, -79.75, 0, "ONLY");         
864   
865   // --- DEFINE SUPPORTS FOR RAILS ATTACHED TO THE ABSORBER
866
867   dgh[0] = 5.;        
868   dgh[1] = 12.;         
869   dgh[2] = 5.;         
870   gMC->Gsvolu("ISR2", "BOX ", idtmed[285], dgh, 3);   
871   gMC->Gspos("ISR2", 1, "ALIC", 53.5, 0., 125.5, 0, "ONLY");
872   gMC->Gsvolu("ISR3", "BOX ", idtmed[285], dgh, 3);   
873   gMC->Gspos("ISR3", 1, "ALIC", -53.5, 0., 125.5, 0, "ONLY");  
874   
875   dgh[0] = 5.-2.;        
876   dgh[1] = 12.-2.;         
877   dgh[2] = 5.;         
878   gMC->Gsvolu("ISR4", "BOX ", idtmed[275], dgh, 3);   
879   gMC->Gspos("ISR4", 1, "ISR2", 0., 0., 0., 0, "ONLY");     
880   gMC->Gsvolu("ISR5", "BOX ", idtmed[275], dgh, 3);   
881   gMC->Gspos("ISR5", 1, "ISR3", 0., 0., 0., 0, "ONLY");
882   
883   // --- DEFINE SUPPORTS TO ATTACH THE ITS TO THE TPC
884   
885   dgh[0] = 0.;        
886   dgh[1] = 5.;         
887   dgh[2] = 2.;         
888   gMC->Gsvolu("ISR6", "TUBE", idtmed[285], dgh, 3);   
889   gMC->Gspos("ISR6", 1, "ALIC", 0., 54., 77., 0, "ONLY"); 
890   gMC->Gspos("ISR6", 2, "ALIC", 0., 54., -77., 0, "ONLY"); 
891   gMC->Gspos("ISR6", 3, "ALIC", 0., -54., -77., 0, "ONLY");                   
892     
893     
894   // --- Outputs the geometry tree in the EUCLID/CAD format 
895   
896   if (fEuclidOut) {
897     gMC->WriteEuclid("ITSgeometry", "ITSV", 1, 5);
898   }
899 }
900 //_____________________________________________________________________________
901 void AliITSvPPRcoarseasymm::CreateMaterials(){
902 ////////////////////////////////////////////////////////////////////////
903   //
904   // Create ITS materials
905   //     This function defines the default materials used in the Geant
906   // Monte Carlo simulations for the geometries AliITSv1, AliITSv3,
907   // AliITSvPPRcoarseasymm.
908   // In general it is automatically replaced by
909   // the CreateMaterials routine defined in AliITSv?. Should the function
910   // CreateMaterials not exist for the geometry version you are using this
911   // one is used. See the definition found in AliITSv5 or the other routine
912   // for a complete definition.
913   //
914   // Water H2O
915   Float_t awat[2]  = { 1.00794,15.9994 };
916   Float_t zwat[2]  = { 1.,8. };
917   Float_t wwat[2]  = { 2.,1. };
918   Float_t denswat  = 1.;
919   // Freon
920   Float_t afre[2]  = { 12.011,18.9984032 };
921   Float_t zfre[2]  = { 6.,9. };
922   Float_t wfre[2]  = { 5.,12. };
923   Float_t densfre  = 1.5;
924   // Ceramics
925   //     94.4% Al2O3 , 2.8% SiO2 , 2.3% MnO , 0.5% Cr2O3 
926   Float_t acer[5]  = { 26.981539,15.9994,28.0855,54.93805,51.9961 };
927   Float_t zcer[5]  = { 13.,8.,14.,25.,      24. };
928   Float_t wcer[5]  = { .49976,1.01233,.01307,       .01782,.00342 };
929   Float_t denscer  = 3.6;
930   //
931   //     60% SiO2 , 40% G10FR4 
932   // PC board
933   Float_t apcb[3]  = { 28.0855,15.9994,17.749 };
934   Float_t zpcb[3]  = { 14.,8.,8.875 };
935   Float_t wpcb[3]  = { .28,.32,.4 };
936   Float_t denspcb  = 1.8;
937   // POLYETHYL
938   Float_t apoly[2] = { 12.01,1. };
939   Float_t zpoly[2] = { 6.,1. };
940   Float_t wpoly[2] = { .33,.67 };
941   // old SERVICES
942   Float_t zserv[4] = { 1.,6.,26.,29. };
943   Float_t aserv[4] = { 1.,12.,55.8,63.5 };
944   Float_t wserv[4] = { .014,.086,.42,.48 };
945   // Stainless steel
946   Float_t asteel[4] = { 55.847,51.9961,58.6934,28.0855 };
947   Float_t zsteel[4] = { 26.,24.,28.,14. };
948   Float_t wsteel[4] = { .715,.18,.1,.005 };
949   
950   
951   Int_t  isxfld  = gAlice->Field()->Integ();
952   Float_t sxmgmx = gAlice->Field()->Max();
953   
954   
955   // --- Define the various materials for GEANT --- 
956   
957   //  200-224 --> Silicon Pixel Detectors (detectors, chips, buses, cooling,..)
958   
959   AliMaterial(0, "SPD Si$",      28.0855, 14., 2.33, 9.36, 999.);
960   AliMaterial(1, "SPD Si chip$", 28.0855, 14., 2.33, 9.36, 999.);
961   AliMaterial(2, "SPD Si bus$",  28.0855, 14., 2.33, 9.36, 999.);
962   AliMaterial(3, "SPD C$",       12.011,   6., 2.265,18.8, 999.);
963   // v. dens 
964   AliMaterial(4, "SPD Air$",    14.61, 7.3, .001205, 30423., 999.);
965   AliMaterial(5, "SPD Vacuum$", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
966   AliMaterial(6, "SPD Al$",     26.981539, 13., 2.6989, 8.9, 999.);
967   AliMixture( 7, "SPD Water $", awat, zwat, denswat, -2, wwat);
968   AliMixture( 8, "SPD Freon$",  afre, zfre, densfre, -2, wfre);
969   AliMaterial(9, "SPD End ladder$", 55.845, 26., 7.87/10., 1.76*10., 999.); 
970   //AliMaterial(9, "SPD End ladder$", 55.845, 26., -7.87/10., -1.76*10., 999.);   
971   AliMaterial(10, "SPD cone$",28.0855, 14., 2.33, 9.36, 999.);       // check !!!!
972   // ** 
973   AliMedium(0, "SPD Si$",        0, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
974   AliMedium(1, "SPD Si chip$",   1, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
975   AliMedium(2, "SPD Si bus$",    2, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
976   AliMedium(3, "SPD C$",         3, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
977   AliMedium(4, "SPD Air$",       4, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
978   AliMedium(5, "SPD Vacuum$",    5, 0,isxfld,sxmgmx, 10.,1.00, .1, .100,10.00);
979   AliMedium(6, "SPD Al$",        6, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
980   AliMedium(7, "SPD Water $",    7, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
981   AliMedium(8, "SPD Freon$",     8, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
982   AliMedium(9, "SPD End ladder$",9, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
983   AliMedium(10, "SPD cone$",    10, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);   
984   
985   //  225-249 --> Silicon Drift Detectors (detectors, chips, buses, cooling,..)
986   
987   AliMaterial(25, "SDD Si$",      28.0855, 14., 2.33,  9.36, 999.);
988   AliMaterial(26, "SDD Si chip$", 28.0855, 14., 2.33,  9.36, 999.);
989   AliMaterial(27, "SDD Si bus$",  28.0855, 14., 2.33,  9.36, 999.);
990   AliMaterial(28, "SDD C$",       12.011,   6., 2.265,18.8,  999.);
991   // v. dens 
992   AliMaterial(29, "SDD Air$",     14.61, 7.3, .001205, 30423., 999.);
993   AliMaterial(30, "SDD Vacuum$",  1e-16, 1e-16, 1e-16, 1e16,  1e16);
994   AliMaterial(31, "SDD Al$",      26.981539, 13., 2.6989, 8.9, 999.);
995   // After a call with ratios by number (negative number of elements), 
996   // the ratio array is changed to the ratio by weight, so all successive 
997   // calls with the same array must specify the number of elements as 
998   // positive 
999   AliMixture(32, "SDD Water $", awat, zwat, denswat, 2, wwat);
1000   // After a call with ratios by number (negative number of elements), 
1001   // the ratio array is changed to the ratio by weight, so all successive 
1002   // calls with the same array must specify the number of elements as 
1003   // positive 
1004   AliMixture( 33, "SDD Freon$", afre, zfre, densfre, 2, wfre);
1005   AliMixture( 34, "SDD PCB$",   apcb, zpcb, denspcb, 3, wpcb);
1006   AliMaterial(35, "SDD Copper$", 63.546, 29., 8.96, 1.43, 999.);
1007   AliMixture( 36, "SDD Ceramics$", acer, zcer, denscer, -5, wcer);
1008   AliMaterial(37, "SDD Kapton$", 12.011, 6., 1.3, 31.27, 999.);
1009   AliMaterial(38, "SDD End ladder$", 69.9298, 29.8246, 0.3824, 36.5103, 999.); 
1010   AliMaterial(39, "SDD cone$",63.546, 29., 1.15, 1.265, 999.);   
1011   AliMaterial(40, "SDD M55J$",12.3565, 6.4561, 1.8097, 22.9570, 999.);         
1012   //AliMaterial(38, "SDD End ladder$", 69.9298, 29.8246, -0.3824, -36.5103, 999.); 
1013   //AliMaterial(39, "SDD cone$",63.546, 29., -1.15, -1.265, 999.);       
1014
1015   // ** 
1016   // check A and Z 
1017   AliMedium(25, "SDD Si$",        25, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1018   AliMedium(26, "SDD Si chip$",   26, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1019   AliMedium(27, "SDD Si bus$",    27, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1020   AliMedium(28, "SDD C$",         28, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1021   AliMedium(29, "SDD Air$",       29, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1022   AliMedium(30, "SDD Vacuum$",    30, 0,isxfld,sxmgmx, 10.,1.00, .1, .100,10.00);
1023   AliMedium(31, "SDD Al$",        31, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1024   AliMedium(32, "SDD Water $",    32, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1025   AliMedium(33, "SDD Freon$",     33, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1026   AliMedium(34, "SDD PCB$",       34, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1027   AliMedium(35, "SDD Copper$",    35, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1028   AliMedium(36, "SDD Ceramics$",  36, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1029   AliMedium(37, "SDD Kapton$",    37, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1030   AliMedium(38, "SDD End ladder$",38, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1031   AliMedium(39, "SDD cone$",      39, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1032   AliMedium(40, "SDD M55J$",      40, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);  
1033   //  250-274 --> Silicon Strip Detectors (detectors, chips, buses, cooling,..)
1034   
1035   AliMaterial(50, "SSD Si$",      28.0855, 14., 2.33, 9.36, 999.);
1036   AliMaterial(51, "SSD Si chip$", 28.0855, 14., 2.33, 9.36, 999.);
1037   AliMaterial(52, "SSD Si bus$",  28.0855, 14., 2.33, 9.36, 999.);
1038   AliMaterial(53, "SSD C$",       12.011,   6., 2.265,18.8, 999.);
1039   // v. dens 
1040   AliMaterial(54, "SSD Air$",     14.61, 7.3, .001205, 30423., 999.);
1041   AliMaterial(55, "SSD Vacuum$",  1e-16, 1e-16, 1e-16, 1e16, 1e16);
1042   AliMaterial(56, "SSD Al$",      26.981539, 13., 2.6989, 8.9, 999.);
1043   // After a call with ratios by number (negative number of elements), 
1044   // the ratio array is changed to the ratio by weight, so all successive 
1045   // calls with the same array must specify the number of elements as 
1046   // positive 
1047   AliMixture(57, "SSD Water $", awat, zwat, denswat, 2, wwat);
1048   // After a call with ratios by number (negative number of elements), 
1049   // the ratio array is changed to the ratio by weight, so all successive 
1050   // calls with the same array must specify the number of elements as 
1051   // positive 
1052   AliMixture(58, "SSD Freon$", afre, zfre, densfre, 2, wfre);
1053   AliMixture(59, "SSD PCB$",   apcb, zpcb, denspcb, 3, wpcb);
1054   AliMaterial(60, "SSD Copper$", 63.546, 29., 8.96, 1.43, 999.);
1055   // After a call with ratios by number (negative number of elements), 
1056   // the ratio array is changed to the ratio by weight, so all successive 
1057   // calls with the same array must specify the number of elements as 
1058   // positive 
1059   AliMixture(61, "SSD Ceramics$", acer, zcer, denscer, 5, wcer);
1060   AliMaterial(62, "SSD Kapton$", 12.011, 6., 1.3, 31.27, 999.);
1061   // check A and Z 
1062   AliMaterial(63, "SSD G10FR4$", 17.749, 8.875, 1.8, 21.822, 999.);
1063   AliMaterial(64, "SSD End ladder$", 32.0988, 15.4021, 0.68, 35.3238, 999.); 
1064   AliMaterial(65, "SSD cone$",63.546, 29., 1.15, 1.265, 999.);  
1065   //AliMaterial(64, "SSD End ladder$", 32.0988, 15.4021, -0.68, -35.3238, 999.); 
1066   //AliMaterial(65, "SSD cone$",63.546, 29., -1.15, -1.265, 999.);    
1067   // ** 
1068   AliMedium(50, "SSD Si$",        50, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1069   AliMedium(51, "SSD Si chip$",   51, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1070   AliMedium(52, "SSD Si bus$",    52, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1071   AliMedium(53, "SSD C$",         53, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1072   AliMedium(54, "SSD Air$",       54, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1073   AliMedium(55, "SSD Vacuum$",    55, 0,isxfld,sxmgmx, 10.,1.00, .1, .100,10.00);
1074   AliMedium(56, "SSD Al$",        56, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1075   AliMedium(57, "SSD Water $",    57, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1076   AliMedium(58, "SSD Freon$",     58, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1077   AliMedium(59, "SSD PCB$",       59, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1078   AliMedium(60, "SSD Copper$",    60, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1079   AliMedium(61, "SSD Ceramics$",  61, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1080   AliMedium(62, "SSD Kapton$",    62, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1081   AliMedium(63, "SSD G10FR4$",    63, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1082   AliMedium(64, "SSD End ladder$",64, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1083   AliMedium(65, "SSD cone$",      65, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1084
1085   //     275-299 --> General (end-caps, frames, cooling, cables, etc.) 
1086   
1087   AliMaterial(75, "GEN C$", 12.011, 6., 2.265, 18.8, 999.);
1088   // verify density 
1089   AliMaterial(76, "GEN Air$", 14.61, 7.3, .001205, 30423., 999.);
1090   AliMaterial(77, "GEN Vacuum$", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
1091   AliMixture( 78, "GEN POLYETHYL$", apoly, zpoly, .95, -2, wpoly);
1092   AliMixture( 79, "GEN SERVICES$",  aserv, zserv, 4.68, 4, wserv);
1093   AliMaterial(80, "GEN Copper$", 63.546, 29., 8.96, 1.43, 999.);
1094   // After a call with ratios by number (negative number of elements), 
1095   // the ratio array is changed to the ratio by weight, so all successive 
1096   // calls with the same array must specify the number of elements as 
1097   // positive 
1098   AliMixture(81, "GEN Water $", awat, zwat, denswat, 2, wwat);
1099 //  AliMaterial(82, "GEN Cables$", 12.011, 6., 2.265, 18.8, 999.);  // check !!!
1100 //  AliMaterial(83, "GEN patch pan$", 12.011, 6., 2.265, 18.8, 999.);  // check !!!  
1101 //  AliMaterial(84, "GEN serv$", 12.011, 6., 2.265, 18.8, 999.);  // check !!!  
1102   AliMixture(85, "GEN Inox$", asteel, zsteel, 7.88, 4, wsteel);
1103   AliMaterial(86, "GEN Al$",      26.981539, 13., 2.6989, 8.9, 999.);
1104   AliMaterial(87,"inox/alum$",    32.1502,15.3383,3.0705,6.9197,999.);
1105   // ** 
1106   AliMedium(75,"GEN C$",        75, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1107   AliMedium(76,"GEN Air$",      76, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1108   AliMedium(77,"GEN Vacuum$",   77, 0,isxfld,sxmgmx, 10., .10, .1, .100,10.00);
1109   AliMedium(78,"GEN POLYETHYL$",78, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1110   AliMedium(79,"GEN SERVICES$", 79, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1111   AliMedium(80,"GEN Copper$",   80, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1112   AliMedium(81,"GEN Water $",   81, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1113 //  AliMedium(82,"GEN Cables$",   82, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1114 //  AliMedium(83,"GEN patch pan$",83, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);  
1115 //  AliMedium(84,"GEN serv$",     84, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1116   AliMedium(85,"GEN Inox$",     85, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1117   AliMedium(86, "GEN Al$",      86, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1118   AliMedium(87,"inox/alum$",    87, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
1119
1120 }
1121 //_____________________________________________________________________________
1122 void AliITSvPPRcoarseasymm::Init(){
1123 ////////////////////////////////////////////////////////////////////////
1124 //     Initialise the ITS after it has been created.
1125 ////////////////////////////////////////////////////////////////////////
1126     Int_t i;
1127
1128     cout << endl;
1129     for(i=0;i<24;i++) cout << "*";cout << " ITSvPPRcoarseasymm_Init ";
1130     for(i=0;i<25;i++) cout << "*";cout << endl;
1131 //
1132     AliITS::Init();
1133 //
1134     for(i=0;i<72;i++) cout << "*";
1135     cout << endl;
1136 }  
1137  
1138 //_____________________________________________________________________________
1139 void AliITSvPPRcoarseasymm::DrawModule() const {
1140 ////////////////////////////////////////////////////////////////////////
1141 //     Draw a shaded view of the FMD version 6.
1142 ////////////////////////////////////////////////////////////////////////
1143   
1144   // Set everything unseen
1145   gMC->Gsatt("*", "seen", -1);
1146   // 
1147   // Set ALIC mother visible
1148   gMC->Gsatt("ALIC","SEEN",0);
1149   //
1150   // Set the volumes visible
1151   gMC->Gsatt("ITSD","SEEN",0);
1152   gMC->Gsatt("ITS1","SEEN",1);
1153   gMC->Gsatt("ITS2","SEEN",1);
1154   gMC->Gsatt("ITS3","SEEN",1);
1155   gMC->Gsatt("ITS4","SEEN",1);
1156   gMC->Gsatt("ITS5","SEEN",1);
1157   gMC->Gsatt("ITS6","SEEN",1);
1158
1159   gMC->Gsatt("IPCB","SEEN",1);
1160   gMC->Gsatt("ICO2","SEEN",1);
1161   gMC->Gsatt("ICER","SEEN",0);
1162   gMC->Gsatt("ISI2","SEEN",0);
1163   gMC->Gsatt("IPLA","SEEN",0);
1164   gMC->Gsatt("ICO3","SEEN",0);
1165   gMC->Gsatt("IEPX","SEEN",0);
1166   gMC->Gsatt("ISI3","SEEN",1);
1167   gMC->Gsatt("ISUP","SEEN",0);
1168   gMC->Gsatt("ICHO","SEEN",0);
1169   gMC->Gsatt("ICMO","SEEN",0);
1170   gMC->Gsatt("ICMD","SEEN",0);
1171   gMC->Gsatt("ICCO","SEEN",1);
1172   gMC->Gsatt("ICCM","SEEN",0);
1173   gMC->Gsatt("ITMD","SEEN",0);
1174   gMC->Gsatt("ITTT","SEEN",1);
1175
1176   //
1177   gMC->Gdopt("hide", "on");
1178   gMC->Gdopt("shad", "on");
1179   gMC->Gsatt("*", "fill", 7);
1180   gMC->SetClipBox(".");
1181   gMC->SetClipBox("*", 0, 300, -300, 300, -300, 300);
1182   gMC->DefaultRange();
1183   gMC->Gdraw("alic", 40, 30, 0, 11, 10, .07, .07);
1184   gMC->Gdhead(1111, "Inner Tracking System Version 1");
1185   gMC->Gdman(17, 6, "MAN");
1186 }
1187 //_____________________________________________________________________________
1188 void AliITSvPPRcoarseasymm::StepManager(){
1189 ////////////////////////////////////////////////////////////////////////
1190 //    Called for every step in the ITS, then calls the AliITShit class
1191 // creator with the information to be recoreded about that hit.
1192 ////////////////////////////////////////////////////////////////////////
1193
1194 /*
1195   Int_t         copy, id;
1196   Float_t       hits[8];
1197   Int_t         vol[4];
1198   TLorentzVector position, momentum;
1199 //  TClonesArray &lhits = *fHits;
1200 //
1201 // no hits for this coarse asymmetric version.
1202 //
1203
1204   //
1205   // Track status
1206   vol[3] = 0;
1207   if(gMC->IsTrackInside())      vol[3] +=  1;
1208   if(gMC->IsTrackEntering())    vol[3] +=  2;
1209   if(gMC->IsTrackExiting())     vol[3] +=  4;
1210   if(gMC->IsTrackOut())         vol[3] +=  8;
1211   if(gMC->IsTrackDisappeared()) vol[3] += 16;
1212   if(gMC->IsTrackStop())        vol[3] += 32;
1213   if(gMC->IsTrackAlive())       vol[3] += 64;
1214   //
1215   // Fill hit structure.
1216   if( !(gMC->TrackCharge()) ) return;
1217     //
1218     // Only entering charged tracks
1219     if((id=gMC->CurrentVolID(copy))==fIdSens[0]) {  
1220       vol[0]=1;
1221       id=gMC->CurrentVolOffID(1,copy);      
1222       vol[1]=copy;
1223       id=gMC->CurrentVolOffID(2,copy);
1224       vol[2]=copy;                       
1225     } else if(id==fIdSens[1]) {
1226       vol[0]=2;
1227       id=gMC->CurrentVolOffID(1,copy);       
1228       vol[1]=copy;
1229       id=gMC->CurrentVolOffID(2,copy);
1230       vol[2]=copy;                    
1231     } else if(id==fIdSens[2]) {
1232       vol[0]=3;
1233       vol[1]=copy;
1234       id=gMC->CurrentVolOffID(1,copy);
1235       vol[2]=copy;             
1236     } else if(id==fIdSens[3]) {
1237       vol[0]=4;
1238       vol[1]=copy;
1239       id=gMC->CurrentVolOffID(1,copy);
1240       vol[2]=copy;                  
1241     } else if(id==fIdSens[4]) {
1242       vol[0]=5;
1243       vol[1]=copy;
1244       id=gMC->CurrentVolOffID(1,copy);
1245       vol[2]=copy;               
1246     } else if(id==fIdSens[5]) {
1247       vol[0]=6;
1248       vol[1]=copy;
1249       id=gMC->CurrentVolOffID(1,copy);
1250       vol[2]=copy;                      
1251     } else return;
1252     gMC->TrackPosition(position);
1253     gMC->TrackMomentum(momentum);
1254     hits[0]=position[0];
1255     hits[1]=position[1];
1256     hits[2]=position[2];          
1257     hits[3]=momentum[0];
1258     hits[4]=momentum[1];
1259     hits[5]=momentum[2];
1260     hits[6]=gMC->Edep();
1261     hits[7]=gMC->TrackTime();
1262 //    new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->GetMCApp()->GetCurrentTrackNumber(),vol,hits);
1263 //
1264 // no hits for this coarse asymmetric version.
1265 //
1266 */
1267 }
1268