]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/AliITSv11.cxx
Replacing array of objects by array of pointers
[u/mrichter/AliRoot.git] / ITS / AliITSv11.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 //                 Inner Traking System geometry v11
18 //
19 //  Based on ROOT geometrical modeler
20 //  Set #define WITHROOT in TGeant3.h
21 //
22 // B. Nilsen, L. Gaudichet
23 //************************************************************************
24
25
26 //#include <Riostream.h>
27 #include <TClonesArray.h>
28 #include <TLorentzVector.h>
29
30 #include "AliITS.h"
31 #include "AliITSDetType.h"
32 #include "AliITSGeant3Geometry.h"
33 #include "AliITSgeom.h"
34 #include "AliITSgeomSDD.h"
35 #include "AliITSgeomSPD.h"
36 #include "AliITSgeomSSD.h"
37 #include "AliITShit.h"
38 #include "AliITSresponseSDD.h"
39 #include "AliITSresponseSPD.h"
40 #include "AliITSresponseSSD.h"
41 #include "AliITSsegmentationSDD.h"
42 #include "AliITSsegmentationSPD.h"
43 #include "AliITSsegmentationSSD.h"
44 #include "AliITSv11.h"
45 #include "AliMagF.h"
46 #include "AliRun.h"
47 #include "AliTrackReference.h"
48 #include "AliMC.h"
49
50 #include <TGeoManager.h>
51 #include <TGeoVolume.h>
52 #include <TGeoPcon.h>
53 //#include "AliITSv11GeometrySPD.h"
54 #include "AliITSv11GeometrySDD.h"
55 //#include "AliITSv11GeometrySupport.h"
56
57
58
59 ClassImp(AliITSv11)
60  
61
62
63 AliITSv11::AliITSv11() : AliITS()
64 {
65   //    Standard default constructor for the ITS version 11.
66   fGeomDetOut=kFALSE;
67   fGeomDetIn=kFALSE;
68   fMajorVersion=11;
69   fMinorVersion=0;
70   Int_t i;
71   for(i=0;i<60;i++) fRead[i] = '\0';
72   for(i=0;i<60;i++) fWrite[i] = '\0';
73   for(i=0;i<60;i++) fEuclidGeomDet[i] = '\0';
74   strncpy(fRead,"$ALICE_ROOT/ITS/ITSgeometry_vPPRasymmFMD.det",60);
75   SetEUCLID(kFALSE);
76
77 //   fSPDgeom = new AliITSv11GeometrySPD();
78   fSDDgeom = new AliITSv11GeometrySDD();
79 //   fSupgeom = new AliITSv11GeometrySupport();
80
81   fIdN = 1;         
82   fIdName    = new TString[fIdN];
83   fIdName[0] = fSDDgeom->GetSenstiveVolumeMame();
84   fIdSens    = new Int_t[fIdN];
85   for(Int_t i=0; i<fIdN; i++) fIdSens[i] = 0;
86 }
87
88
89 //______________________________________________________________________
90 AliITSv11::AliITSv11(const char *name, const char *title)
91   : AliITS("ITS", title)
92 {
93   //    Standard constructor for the ITS version 11.
94
95   fGeomDetOut = kFALSE;
96   fGeomDetIn = kFALSE;
97   fMajorVersion = 11;
98   fMinorVersion = 0;
99   printf("%s\n constructor",name);
100
101   Int_t i;
102   for(i=0;i<60;i++) fRead[i] = '\0';
103   for(i=0;i<60;i++) fWrite[i] = '\0';
104   for(i=0;i<60;i++) fEuclidGeomDet[i] = '\0';
105   strncpy(fRead,"$ALICE_ROOT/ITS/ITSgeometry_vPPRasymmFMD.det",60);
106   SetEUCLID(kFALSE);
107
108 //   fSPDgeom = new AliITSv11GeometrySPD();
109   fSDDgeom = new AliITSv11GeometrySDD();
110 //   fSupgeom = new AliITSv11GeometrySupport();
111
112   fIdN = 1;         
113   fIdName    = new TString[fIdN];
114   fIdName[0] = fSDDgeom->GetSenstiveVolumeMame();
115   fIdSens    = new Int_t[fIdN];
116   for(Int_t i=0; i<fIdN; i++) fIdSens[i] = 0;
117 }
118
119
120
121 //______________________________________________________________________
122 AliITSv11::AliITSv11(Int_t debugITS,Int_t debugSPD,Int_t debugSDD,
123                    Int_t debugSSD,Int_t debugSUP) :
124   AliITS("ITS","ITS geometry v11"),
125   fGeomDetOut(kFALSE),
126   fGeomDetIn(kFALSE),
127   fMajorVersion(11),
128   fMinorVersion(0) {
129   // Standard default constructor for the ITS version 11.
130   // Inputs:
131   //   Int_t    debugITS  Debug flag for ITS code (required).
132   //   Int_t    debugSPD  Debug flag for SPD geometry (default = 0).
133   //   Int_t    debugSDD  Debug flag for SDD geometry (default = 0).
134   //   Int_t    debugSSD  Debug flag for SSD geometry (default = 0).
135   //   Int_t    debugSUP  Debug flag for SUPort geometry (default = 0).
136   // Outputs:
137   //   none.
138   // Return
139
140   SetDensityServicesByThickness();
141
142   SetEUCLID(kFALSE);
143   fEuclidGeometry="$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.euc";
144   strncpy(fEuclidGeomDet,"$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det",60);
145   strncpy(fRead,fEuclidGeomDet,60);
146   strncpy(fWrite,fEuclidGeomDet,60);
147   strncpy(fRead,"$ALICE_ROOT/ITS/ITSgeometry_vPPRasymmFMD.det",60);
148
149 //   fSPDgeom = new AliITSv11GeometrySPD(debugSPD);
150   fSDDgeom = new AliITSv11GeometrySDD(debugSDD);
151 //   fSupgeom = new AliITSv11GeometrySupport(debugSUP);
152
153   fIdN = 1;         
154   fIdName    = new TString[fIdN];
155   fIdName[0] = fSDDgeom->GetSenstiveVolumeMame();
156   fIdSens    = new Int_t[fIdN];
157   for(Int_t i=0; i<fIdN; i++) fIdSens[i] = 0;
158
159   debugITS = (debugSPD && debugSSD && debugSUP && debugSDD); //remove temp. warnings
160 }
161
162
163 //______________________________________________________________________
164 AliITSv11::AliITSv11(const AliITSv11 &source) :
165  AliITS(source){
166     //     Copy Constructor for ITS version 11. This function is not to be
167     // used. If any other instance of this function, other than "this" is
168     // passed, an error message is returned.
169     // Inputs:
170     //   const AliITSv11 &source This class
171
172     if(&source == this) return;
173     Warning("Copy Constructor","Not allowed to copy AliITSv11");
174     return;
175 }
176
177
178 //______________________________________________________________________
179 AliITSv11& AliITSv11::operator=(const AliITSv11 
180                                                   &source){
181     //     Assignment operator for the ITS version 11. This function is not 
182     // to be used. If any other instance of this function, other than "this" 
183     // is passed, an error message is returned.
184     // Inputs:
185     //   const AliITSv11 &source This class
186
187     if(&source == this) return *this;
188     Warning("= operator","Not allowed to copy AliITSv11");
189     return *this;
190 }
191
192
193 //______________________________________________________________________
194 AliITSv11::~AliITSv11() {
195   delete fSDDgeom;
196 }
197
198
199 //______________________________________________________________________
200 void AliITSv11::BuildGeometry(){
201
202 }
203
204
205 //______________________________________________________________________
206 void AliITSv11::CreateGeometry(){
207   //
208   // Create ROOT geometry
209   //
210
211   TGeoManager *geoManager = gGeoManager;
212   TGeoVolume *vALIC = geoManager->GetTopVolume();
213
214   TGeoPcon *sITS = new TGeoPcon("ITS Top Volume",0.0,360.0,2);
215
216   // DefineSection(section number, Z, Rmin, Rmax).
217   const Double_t kcm = 1.0;
218   sITS->DefineSection(0,-300.0*kcm,0.01*kcm,50.0*kcm);
219   sITS->DefineSection(1,+300.0*kcm,0.01*kcm,50.0*kcm);
220
221   TGeoMedium *air = gGeoManager->GetMedium("ITSair");
222   TGeoVolume *vITS = new TGeoVolume("vITS",sITS,air);
223   vITS->SetVisibility(kFALSE);
224   vALIC->AddNode(vITS,1,0);
225
226 //   fSPDgeom->CenteralSPD(vITS);
227
228 //   fSDDgeom->AddOnlyLay3Ladder(0,1);
229 //   fSDDgeom->AddOnlyLay4Ladder(0,1);
230   fSDDgeom->Layer3(vITS);
231   fSDDgeom->Layer4(vITS);
232
233 //     fSupgeom->SPDCone(vITS);
234 //     fSupgeom->SPDThermalSheald(vITS);
235 //     fSupgeom->SDDCone(vITS);
236 //     fSupgeom->SSDCone(vITS);
237 //     fSupgeom->ServicesCableSupport(vITS);
238
239 }
240
241
242 //______________________________________________________________________
243 void AliITSv11::CreateMaterials(){
244   //
245   // Create ITS materials
246   // Defined media here should correspond to the one defined in galice.cuts
247   // File which is red in (AliMC*) fMCApp::Init() { ReadTransPar(); }
248   //
249
250     Int_t   ifield = gAlice->Field()->Integ();
251     Float_t fieldm = gAlice->Field()->Max();
252
253     Float_t tmaxfd = 0.1; // 1.0; // Degree
254     Float_t stemax = 1.0; // cm
255     Float_t deemax = 0.1; // 30.0; // Fraction of particle's energy 0<deemax<=1
256     Float_t epsil  = 1.0E-4; // 1.0; // cm
257     Float_t stmin  = 0.0; // cm "Default value used"
258
259     Float_t tmaxfdSi = 0.1; // .10000E+01; // Degree
260     Float_t stemaxSi = 0.0075; //  .10000E+01; // cm
261     Float_t deemaxSi = 0.1; // 0.30000E-02; // Fraction of particle's energy 0<deemax<=1
262     Float_t epsilSi  = 1.0E-4;// .10000E+01;
263     Float_t stminSi  = 0.0; // cm "Default value used"
264
265     Float_t tmaxfdAir = 0.1; // .10000E+01; // Degree
266     Float_t stemaxAir = .10000E+01; // cm
267     Float_t deemaxAir = 0.1; // 0.30000E-02; // Fraction of particle's energy 0<deemax<=1
268     Float_t epsilAir  = 1.0E-4;// .10000E+01;
269     Float_t stminAir  = 0.0; // cm "Default value used"
270
271     Float_t tmaxfdServ = 1.0; // 10.0; // Degree
272     Float_t stemaxServ = 1.0; // 0.01; // cm
273     Float_t deemaxServ = 0.5; // 0.1; // Fraction of particle's energy 0<deemax<=1
274     Float_t epsilServ  = 1.0E-3; // 0.003; // cm
275     Float_t stminServ  = 0.0; //0.003; // cm "Default value used"
276
277     // Freon PerFluorobuthane C4F10 see 
278     // http://st-support-cooling-electronics.web.cern.ch/
279     //        st-support-cooling-electronics/default.htm
280     Float_t afre[2]  = { 12.011,18.9984032 };
281     Float_t zfre[2]  = { 6., 9. };
282     Float_t wfre[2]  = { 4.,10. };
283     Float_t densfre  = 1.52;
284
285
286     //CM55J
287     Float_t aCM55J[4]={12.0107,14.0067,15.9994,1.00794};
288     Float_t zCM55J[4]={6.,7.,8.,1.};
289     Float_t wCM55J[4]={0.908508078,0.010387573,0.055957585,0.025146765};
290     Float_t dCM55J = 1.63;
291
292     //ALCM55J
293     Float_t aALCM55J[5]={12.0107,14.0067,15.9994,1.00794,26.981538};
294     Float_t zALCM55J[5]={6.,7.,8.,1.,13.};
295     Float_t wALCM55J[5]={0.817657902,0.0093488157,0.0503618265,0.0226320885,0.1};
296     Float_t dALCM55J = 1.9866;
297
298     //Si Chips
299     Float_t aSICHIP[6]={12.0107,14.0067,15.9994,1.00794,28.0855,107.8682};
300     Float_t zSICHIP[6]={6.,7.,8.,1.,14., 47.};
301     Float_t wSICHIP[6]={0.039730642,0.001396798,0.01169634,
302                         0.004367771,0.844665,0.09814344903};
303     Float_t dSICHIP = 2.36436;
304
305     //Inox
306     Float_t aINOX[9]={12.0107,54.9380, 28.0855,30.9738,32.066,
307                       58.6928,55.9961,95.94,55.845};
308     Float_t zINOX[9]={6.,25.,14.,15.,16., 28.,24.,42.,26.};
309     Float_t wINOX[9]={0.0003,0.02,0.01,0.00045,0.0003,0.12,0.17,0.025,0.654};
310     Float_t dINOX = 8.03;
311
312     //SDD HV microcable
313     Float_t aHVm[5]={12.0107,1.00794,14.0067,15.9994,26.981538};
314     Float_t zHVm[5]={6.,1.,7.,8.,13.};
315     Float_t wHVm[5]={0.520088819984,0.01983871336,0.0551367996,0.157399667056, 0.247536};
316     Float_t dHVm = 1.6087;
317
318     //SDD LV+signal cable
319     Float_t aLVm[5]={12.0107,1.00794,14.0067,15.9994,26.981538};
320     Float_t zLVm[5]={6.,1.,7.,8.,13.};
321     Float_t wLVm[5]={0.21722436468,0.0082859922,0.023028867,0.06574077612, 0.68572};
322     Float_t dLVm = 2.1035;
323
324     //SDD hybrid microcab
325     Float_t aHLVm[5]={12.0107,1.00794,14.0067,15.9994,26.981538};
326     Float_t zHLVm[5]={6.,1.,7.,8.,13.};
327     Float_t wHLVm[5]={0.24281879711,0.00926228815,0.02574224025,0.07348667449, 0.64869};
328     Float_t dHLVm = 2.0502;
329
330     //SDD anode microcab
331     Float_t aALVm[5]={12.0107,1.00794,14.0067,15.9994,26.981538};
332     Float_t zALVm[5]={6.,1.,7.,8.,13.};
333     Float_t wALVm[5]={0.392653705471,0.0128595919215,
334                       0.041626868025,0.118832707289, 0.431909};
335     Float_t dALVm = 2.0502;
336
337     //X7R capacitors
338     Float_t aX7R[7]={137.327,47.867,15.9994,58.6928,63.5460,118.710,207.2};
339     Float_t zX7R[7]={56.,22.,8.,28.,29.,50.,82.};
340     Float_t wX7R[7]={0.251639432,0.084755042,0.085975822,
341                      0.038244751,0.009471271,0.321736471,0.2081768};
342     Float_t dX7R = 7.14567;
343
344     // AIR
345     Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
346     Float_t zAir[4]={6.,7.,8.,18.};
347     Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
348     Float_t dAir = 1.20479E-3;
349
350     // Water
351     Float_t aWater[2]={1.00794,15.9994};
352     Float_t zWater[2]={1.,8.};
353     Float_t wWater[2]={0.111894,0.888106};
354     Float_t dWater   = 1.0;
355
356     // CERAMICS
357   //     94.4% Al2O3 , 2.8% SiO2 , 2.3% MnO , 0.5% Cr2O3
358     Float_t acer[5]  = { 26.981539,15.9994,28.0855,54.93805,51.9961 };
359     Float_t zcer[5]  = {       13.,     8.,    14.,     25.,    24. };
360     Float_t wcer[5]  = {.4443408,.5213375,.0130872,.0178135,.003421};
361     Float_t denscer  = 3.6;
362
363     //G10FR4
364     Float_t zG10FR4[14] = {14.00,       20.00,  13.00,  12.00,  5.00,
365                            22.00,       11.00,  19.00,  26.00,  9.00,
366                            8.00,        6.00,   7.00,   1.00};
367     Float_t aG10FR4[14] = {28.0855000,40.0780000,26.9815380,24.3050000,
368                            10.8110000,47.8670000,22.9897700,39.0983000,
369                            55.8450000,18.9984000,15.9994000,12.0107000,
370                            14.0067000,1.0079400};
371     Float_t wG10FR4[14] = {0.15144894,0.08147477,0.04128158,0.00904554,
372                            0.01397570,0.00287685,0.00445114,0.00498089,
373                            0.00209828,0.00420000,0.36043788,0.27529426,
374                            0.01415852,0.03427566};
375     Float_t densG10FR4= 1.8;
376     
377      //--- EPOXY  --- C18 H19 O3
378       Float_t aEpoxy[3] = {15.9994, 1.00794, 12.0107} ; 
379       Float_t zEpoxy[3] = {     8.,      1.,      6.} ; 
380       Float_t wEpoxy[3] = {     3.,     19.,     18.} ; 
381       Float_t dEpoxy = 1.8 ;
382
383       // rohacell: C9 H13 N1 O2
384     Float_t arohac[4] = {12.01,  1.01, 14.010, 16.};
385     Float_t zrohac[4] = { 6.,    1.,    7.,     8.};
386     Float_t wrohac[4] = { 9.,   13.,    1.,     2.};
387     Float_t drohac    = 0.05;
388
389     // If he/she means stainless steel (inox) + Aluminium and Zeff=15.3383 then
390 //
391 // %Al=81.6164 %inox=100-%Al
392
393     Float_t aInAl[5] = {27., 55.847,51.9961,58.6934,28.0855 };
394     Float_t zInAl[5] = {13., 26.,24.,28.,14. };
395     Float_t wInAl[5] = {.816164, .131443,.0330906,.0183836,.000919182};
396     Float_t dInAl    = 3.075;
397
398     // Kapton
399     Float_t aKapton[4]={1.00794,12.0107, 14.010,15.9994};
400     Float_t zKapton[4]={1.,6.,7.,8.};
401     Float_t wKapton[4]={0.026362,0.69113,0.07327,0.209235};
402     Float_t dKapton   = 1.42;
403
404     //SDD ruby sph.
405     Float_t aAlOxide[2]  = { 26.981539,15.9994};
406     Float_t zAlOxide[2]  = {       13.,     8.};
407     Float_t wAlOxide[2]  = {0.4707, 0.5293};
408     Float_t dAlOxide     = 3.97;
409
410     //---------
411     AliMaterial(1,"ITSsddSi",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
412     AliMedium(1,"ITSsddSi",1,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
413     
414     AliMixture(5,"ITSair",aAir,zAir,dAir,4,wAir);
415     AliMedium(5,"ITSair",5,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
416     
417     AliMixture(7,"ITSsddSiChip",aSICHIP,zSICHIP,dSICHIP,6,wSICHIP);
418     AliMedium(7,"ITSsddSiChip",7,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
419
420     AliMaterial(79,"SDD SI insensitive$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
421     AliMedium(79,"SDD SI insensitive$",79,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
422
423     AliMaterial(11,"ITSal",0.26982E+02,0.13000E+02,0.26989E+01,0.89000E+01,0.99900E+03);
424     AliMedium(11,"ITSal",11,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
425
426     AliMixture(9,"ITSsddCarbonM55J",aCM55J,zCM55J,dCM55J,4,wCM55J);
427     AliMedium(9,"ITSsddCarbonM55J",9,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
428
429     AliMixture(10,"SDD AIR$",aAir,zAir,dAir,4,wAir);
430     AliMedium(10,"SDD AIR$",10,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
431
432     AliMixture(12, "WATER",aWater,zWater,dWater,2,wWater);
433     AliMedium(12,"WATER",12,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
434
435      AliMixture(69,"ITSsddCAlM55J",aALCM55J,zALCM55J,dALCM55J,5,wALCM55J);
436     AliMedium(69,"ITSsddCAlM55J",69,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
437   
438     AliMixture(70, "ITSsddKAPTON_POLYCH2", aKapton, zKapton, dKapton, 4, wKapton);
439     AliMedium(70,"ITSsddKAPTON_POLYCH2",70,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
440
441     AliMixture(77,"SDDX7Rcapacitors",aX7R,zX7R,dX7R,7,wX7R);
442     AliMedium(77,"SDDX7Rcapacitors",77,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
443
444     AliMixture(78,"SDD ruby sph. Al2O3$",aAlOxide,zAlOxide,dAlOxide,2,wAlOxide);
445     AliMedium(78,"SDD ruby sph. Al2O3$",78,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
446
447
448     AliMaterial(64,"ALUMINUM$",0.26982E+02,0.13000E+02,0.26989E+01,0.89000E+01,0.99900E+03);
449     AliMedium(64,"ALUMINUM$",64,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
450
451     AliMaterial(14,"COPPER",0.63546E+02,0.29000E+02,0.89600E+01,0.14300E+01,0.99900E+03);
452     AliMedium(14,"COPPER",14,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
453
454     AliMaterial(2,"SPD SI CHIP$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
455     AliMedium(2,"SPD SI CHIP$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
456
457     AliMaterial(3,"SPD SI BUS$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
458     AliMedium(3,"SPD SI BUS$",3,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
459
460     AliMixture(4,"C (M55J)$",aCM55J,zCM55J,dCM55J,4,wCM55J);
461     AliMedium(4,"C (M55J)$",4,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
462
463  
464     AliMixture(6,"GEN AIR$",aAir,zAir,dAir,4,wAir);
465     AliMedium(6,"GEN AIR$",6,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
466
467     AliMixture(13,"Freon$",afre,zfre,densfre,-2,wfre);
468     AliMedium(13,"Freon$",13,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
469
470
471     AliMixture(15,"CERAMICS$",acer,zcer,denscer,5,wcer);
472     AliMedium(15,"CERAMICS$",15,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
473
474     AliMixture(20,"SSD C (M55J)$",aCM55J,zCM55J,dCM55J,4,wCM55J);
475     AliMedium(20,"SSD C (M55J)$",20,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
476
477     AliMixture(21,"SSD AIR$",aAir,zAir,dAir,4,wAir);
478     AliMedium(21,"SSD AIR$",21,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
479
480     AliMixture(25,"G10FR4$",aG10FR4,zG10FR4,densG10FR4,14,wG10FR4);
481     AliMedium(25,"G10FR4$",25,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
482
483      AliMixture(26,"GEN C (M55J)$",aCM55J,zCM55J,dCM55J,4,wCM55J);
484     AliMedium(26,"GEN C (M55J)$",26,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
485
486     AliMixture(27,"GEN Air$",aAir,zAir,dAir,4,wAir);
487     AliMedium(27,"GEN Air$",27,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
488
489     AliMaterial(51,"SPD SI$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
490     AliMedium(51,"SPD SI$",51,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
491
492     AliMaterial(52,"SPD SI CHIP$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
493     AliMedium(52,"SPD SI CHIP$",52,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
494
495     AliMaterial(53,"SPD SI BUS$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
496     AliMedium(53,"SPD SI BUS$",53,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
497
498     AliMixture(54,"SPD C (M55J)$",aCM55J,zCM55J,dCM55J,4,wCM55J);
499     AliMedium(54,"SPD C (M55J)$",54,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
500
501     AliMixture(55,"SPD AIR$",aAir,zAir,dAir,4,wAir);
502     AliMedium(55,"SPD AIR$",55,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
503
504     AliMixture(56, "SPD KAPTON(POLYCH2)", aKapton, zKapton, dKapton, 4, wKapton);
505     AliMedium(56,"SPD KAPTON(POLYCH2)$",56,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
506
507     AliMixture(61,"EPOXY$",aEpoxy,zEpoxy,dEpoxy,-3,wEpoxy);
508     AliMedium(61,"EPOXY$",61,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
509
510     AliMaterial(62,"SILICON$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
511     AliMedium(62,"SILICON$",62,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
512
513     AliMixture(63, "KAPTONH(POLYCH2)", aKapton, zKapton, dKapton, 4, wKapton);
514     AliMedium(63,"KAPTONH(POLYCH2)$",63,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
515
516
517     AliMixture(65,"INOX$",aINOX,zINOX,dINOX,9,wINOX);
518     AliMedium(65,"INOX$",65,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
519
520     AliMixture(68,"ROHACELL$",arohac,zrohac,drohac,-4,wrohac);
521     AliMedium(68,"ROHACELL$",68,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
522
523
524      AliMaterial(71,"ITS SANDW A$",0.12011E+02,0.60000E+01,0.2115E+00,0.17479E+03,0.99900E+03);
525     AliMedium(71,"ITS SANDW A$",71,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
526
527     AliMaterial(72,"ITS SANDW B$",0.12011E+02,0.60000E+01,0.27000E+00,0.18956E+03,0.99900E+03);
528     AliMedium(72,"ITS SANDW B$",72,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
529
530     AliMaterial(73,"ITS SANDW C$",0.12011E+02,0.60000E+01,0.41000E+00,0.90868E+02,0.99900E+03);
531     AliMedium(73,"ITS SANDW C$",73,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
532
533     AliMaterial(74,"HEAT COND GLUE$",0.12011E+02,0.60000E+01,0.1930E+01,0.22100E+02,0.99900E+03);
534     AliMedium(74,"HEAT COND GLUE$",74,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
535
536     AliMaterial(75,"ELASTO SIL$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
537     AliMedium(75,"ELASTO SIL$",75,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
538
539     AliMaterial(76,"SPDBUS(AL+KPT+EPOX)$",0.19509E+02,0.96502E+01,0.19060E+01,0.15413E+02,0.99900E+03);
540     AliMedium(76,"SPDBUS(AL+KPT+EPOX)$",76,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
541                
542
543     AliMixture(80,"SDD HV microcable$",aHVm,zHVm,dHVm,5,wHVm);
544     AliMedium(80,"SDD HV microcable$",80,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
545
546     AliMixture(81,"SDD LV+signal cable$",aLVm,zLVm,dLVm,5,wLVm);
547     AliMedium(81,"SDD LV+signal cable$",81,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
548
549     AliMixture(82,"SDD hybrid microcab$",aHLVm, zHLVm,dHLVm,5,wHLVm);
550     AliMedium(82,"SDD hybrid microcab$",82,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
551
552     AliMixture(83,"SDD anode microcab$",aALVm,zALVm,dALVm,5,wALVm);
553     AliMedium(83,"SDD anode microcab$",83,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
554
555     AliMaterial(84,"SDD/SSD rings$",0.123565E+02,0.64561E+01,0.18097E+01,0.229570E+02,0.99900E+03);
556     AliMedium(84,"SDD/SSD rings$",84,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
557
558     AliMixture(85,"inox/alum$",aInAl,zInAl,dInAl,5,wInAl);
559     AliMedium(85,"inox/alum$",85,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
560
561
562     // special media to take into account services in the SDD and SSD 
563     // cones for the FMD
564
565        Float_t aA[13],zZ[13],wW[13],den;
566     // From Pierluigi Barberis calculations of 2SPD+1SDD October 2 2002.
567     zZ[0] = 1.0; aA[0] = 1.00794; // Hydrogen
568     zZ[1] = 6.0; aA[1] = 12.011; // Carbon
569     zZ[2] = 7.0; aA[2] = 14.00674; // Nitrogen
570     zZ[3] = 8.0; aA[3] = 15.9994; // Oxigen
571     zZ[4] = 14.0; aA[4] = 28.0855; // Silicon
572     zZ[5] = 24.0; aA[5] = 51.9961; //Cromium
573     zZ[6] = 25.0; aA[6] = 54.938049; // Manganese
574     zZ[7] = 26.0; aA[7] = 55.845; // Iron
575     zZ[8] = 28.0; aA[8] = 58.6934; // Nickle
576     zZ[9] = 29.0; aA[9] = 63.546; // Copper
577     zZ[10] = 13.0; aA[10] = 26.981539; // Alulminum
578     zZ[11] = 47.0; aA[11] = 107.8682; // Silver
579     zZ[12] = 27.0; aA[12] = 58.9332; // Cobolt
580     wW[0] = 0.019965;
581     wW[1] = 0.340961;
582     wW[2] = 0.041225;
583     wW[3] = 0.200352;
584     wW[4] = 0.000386;
585     wW[5] = 0.001467;
586     wW[6] = 0.000155;
587     wW[7] = 0.005113;
588     wW[8] = 0.000993;
589     wW[9] = 0.381262;
590     wW[10] = 0.008121;
591     wW[11] = 0.000000;
592     wW[12] = 0.000000;
593     if(fByThick){// New values seeITS_MatBudget_4B.xls
594         den = 1.5253276; // g/cm^3  Cell O370
595     }else{
596         den = 2.58423412; // g/cm^3 Cell L370
597     } // end if fByThick
598     //den = 6161.7/(3671.58978);//g/cm^3 Volume does not exclude holes
599     AliMixture(86,"AIRFMDSDD$",aA,zZ,den,+11,wW);
600     AliMedium(86,"AIRFMDSDD$",86,0,ifield,fieldm,tmaxfdAir,stemaxAir,
601               deemaxAir,epsilAir,stminAir);
602
603
604     wW[0] = 0.019777;
605     wW[1] = 0.325901;
606     wW[2] = 0.031848;
607     wW[3] = 0.147668;
608     wW[4] = 0.030609;
609     wW[5] = 0.013993;
610     wW[6] = 0.001479;
611     wW[7] = 0.048792;
612     wW[8] = 0.009477;
613     wW[9] = 0.350697;
614     wW[10] = 0.014546;
615     wW[11] = 0.005213;
616     wW[12] = 0.000000;
617     if(fByThick){// New values seeITS_MatBudget_4B.xls
618         den = 1.2464275; // g/cm^3   Cell O403
619     }else{
620         den = 1.28134409; // g/cm^3  Cell L403
621     } // end if fByThick
622     //den = 7666.3/(9753.553259); // volume does not exclude holes
623     AliMixture(87,"AIRFMDSSD$",aA,zZ,den,+12,wW); 
624     AliMedium(87,"AIRFMDSSD$",87,0,ifield,fieldm,tmaxfdAir,stemaxAir,
625               deemaxAir,epsilAir,stminAir);
626
627     wW[0] = 0.016302;
628     wW[1] = 0.461870;
629     wW[2] = 0.033662;
630     wW[3] = 0.163595;
631     wW[4] = 0.000315;
632     wW[5] = 0.001197;
633     wW[6] = 0.000127;
634     wW[7] = 0.004175;
635     wW[8] = 0.000811;
636     wW[9] = 0.311315;
637     wW[10] = 0.006631;
638     wW[11] = 0.000000;
639     wW[12] = 0.000000;
640     if(fByThick){// New values seeITS_MatBudget_4B.xls
641         den = 1.9353276; // g/cm^3  Cell N370
642     }else{
643         den = 3.2788626; // g/cm^3 Cell F370
644     } // end if fByThick
645     //den = 7667.1/(3671.58978); // Volume does not excludeholes
646     AliMixture(88,"ITS SANDW CFMDSDD$",aA,zZ,den,+11,wW); 
647     AliMedium(88,"ITS SANDW CFMDSDD$",88,0,ifield,fieldm,tmaxfd,stemax,
648               deemax,epsil,stmin);
649
650     wW[0] = 0.014065;
651     wW[1] = 0.520598;
652     wW[2] = 0.022650;
653     wW[3] = 0.105018;
654     wW[4] = 0.021768;
655     wW[5] = 0.009952;
656     wW[6] = 0.001051;
657     wW[7] = 0.034700;
658     wW[8] = 0.006740;
659     wW[9] = 0.249406;
660     wW[10] = 0.010345;
661     wW[11] = 0.0003707;
662     wW[12] = 0.000000;
663     if(fByThick){// New values seeITS_MatBudget_4B.xls
664         den = 1.6564275; // g/cm^3  Cell N304
665     }else{
666         den = 1.7028296; // g/cm^3  Cell F304
667     } // end if fByThick
668     //den = 1166.5/(3671.58978); // Volume does not exclude holes
669     AliMixture(89,"ITS SANDW CFMDSSD$",aA,zZ,den,+12,wW); 
670     AliMedium(89,"ITS SANDW CFMDSSD$",89,0,ifield,fieldm,tmaxfd,stemax,
671               deemax,epsil,stmin);
672
673     wW[0] = 0.005970;
674     wW[1] = 0.304704;
675     wW[2] = 0.042510;
676     wW[3] = 0.121715;
677     wW[4] = 0.001118;
678     wW[5] = 0.030948;
679     wW[6] = 0.003270;
680     wW[7] = 0.107910;
681     wW[8] = 0.020960;
682     wW[9] = 0.360895;
683     wW[10] = 0.000000;
684     wW[11] = 0.000000;
685     wW[12] = 0.000000;
686     if(fByThick){// New values seeITS_MatBudget_4B.xls
687         den = 80.31136576; // g/cm^3 Cell H329
688     }else{
689         den = 87.13062; // g/cm^3  Cell G329
690     } // end if fByThick
691     //den = 1251.3/(0.05*2.0*TMath::Pi()*(7.75*7.75 - 3.7*3.7)); // g/cm^3
692     AliMixture(97,"SPD SERVICES$",aA,zZ,den,+10,wW); 
693     AliMedium(97,"SPD SERVICES$",97,0,ifield,fieldm,tmaxfd,stemax,
694               deemax,epsil,stmin);
695
696     // Special media
697
698     AliMaterial(90,"SPD shield$", 12.011, 6., 1.93/10. , 22.1*10., 999);
699     AliMedium(90,"SPD shield$",90,0,ifield,fieldm,tmaxfdServ,stemaxServ,
700               deemaxServ,epsilServ,stminServ);
701
702     AliMaterial(91, "SPD End ladder$", 47.0447, 21.7963, 3.6374, 4.4711, 999); 
703     AliMedium(91,"SPD End ladder$",91,0,ifield,fieldm,tmaxfdServ,stemaxServ,
704               deemaxServ,epsilServ,stminServ);
705
706     AliMaterial(92, "SPD cone$",28.0855, 14., 2.33, 9.36, 999);    
707     AliMedium(92,"SPD cone$",92,0,ifield,fieldm,tmaxfdServ,stemaxServ,
708               deemaxServ,epsilServ,stminServ);
709
710 //     Material with fractional Z not actually used
711 //     AliMaterial(93, "SDD End ladder$", 69.9298, 29.8246, 0.3824, 36.5103, 999);
712 //     AliMedium(93,"SDD End ladder$",93,0,ifield,fieldm,tmaxfdServ,stemaxServ,
713 //               deemaxServ,epsilServ,stminServ);
714
715     AliMaterial(94, "SDD cone$",63.546, 29., 1.15, 1.265, 999);
716     AliMedium(94,"SDD cone$",94,0,ifield,fieldm,tmaxfdServ,stemaxServ,
717               deemaxServ,epsilServ,stminServ);
718
719 //     Material with fractional Z not actually used
720 //     AliMaterial(95, "SSD End ladder$", 32.0988, 15.4021, 0.68, 35.3238, 999); 
721 //     AliMedium(95,"SSD End ladder$",95,0,ifield,fieldm,tmaxfdServ,stemaxServ,
722 //     deemaxServ,epsilServ,stminServ);
723
724     AliMaterial(96, "SSD cone$",63.546, 29., 1.15, 1.265, 999);
725     AliMedium(96,"SSD cone$",96,0,ifield,fieldm,tmaxfdServ,stemaxServ,
726               deemaxServ,epsilServ,stminServ);
727
728 }
729
730
731 //______________________________________________________________________
732 void AliITSv11::InitAliITSgeom(){
733   //
734   // Fill fITSgeom with the 3 sub-detector geometries
735   //
736
737   const Int_t knlayers = 6;
738   Int_t nlad[knlayers],ndet[knlayers];
739   nlad[0]= 0; ndet[0]=0;
740   nlad[1]= 0; ndet[1]=0;
741   nlad[2]= fSDDgeom->GetLay3NLadders(); ndet[2]=6;
742   nlad[3]= fSDDgeom->GetLay4NLadders(); ndet[3]=8;
743   nlad[4]= 0; ndet[4]=0;
744   nlad[5]= 0; ndet[5]=0;
745   Int_t nSPD = nlad[0]*ndet[0]+nlad[1]*ndet[1];
746   Int_t nSDD = nlad[2]*ndet[2]+nlad[3]*ndet[3];
747   Int_t nSSD = nlad[4]*ndet[4]+nlad[5]*ndet[5];
748   Int_t nModTot = nSPD + nSDD + nSSD;
749   if (fITSgeom) delete fITSgeom;
750   fITSgeom = new AliITSgeom(0,knlayers,nlad,ndet,nModTot);
751
752
753   //***************************************************
754   //               Set default shapes 
755   // (These default shapes won't exist anymore when all
756   //  layers are coded)
757
758   const Float_t kDxyzSPD[] = {0.6400, 0.015,   3.480};  
759   if(!(fITSgeom->IsShapeDefined(kSPD)))
760     fITSgeom->ReSetShape(kSPD,
761                          new AliITSgeomSPD425Short(3,(Float_t *)kDxyzSPD));
762
763   const Float_t kDxyzSSD[] = {3.6500, 0.0150,  2.000};
764   if(!(fITSgeom->IsShapeDefined(kSSD)))
765     fITSgeom->ReSetShape(kSSD,
766                          new AliITSgeomSSD75and275(3,(Float_t *)kDxyzSSD));
767
768   //*****************************************
769   fSDDgeom->ExportSensorGeometry(fITSgeom, +3, 0);  //SDD
770
771   return;
772 }
773
774
775 //______________________________________________________________________
776 void AliITSv11::Init(){
777   //
778   //     Initialise the ITS after it has been created.
779   //
780
781     Int_t i;
782     for(i=0;i<20;i++) printf("*");
783     printf( " ITSv%i.%i_Init ", fMajorVersion,fMinorVersion );
784     for(i=0;i<20;i++) printf("*"); printf("\n");
785
786     // Create geometry
787     if(fRead[0]=='\0') strncpy(fRead,fEuclidGeomDet,60);
788     if(fWrite[0]=='\0') strncpy(fWrite,fEuclidGeomDet,60);
789     if(fITSgeom!=0) delete fITSgeom;
790     fITSgeom = new AliITSgeom();
791     if(fGeomDetIn) fITSgeom->ReadNewFile(fRead);
792     else this->InitAliITSgeom();
793     if(fGeomDetOut) fITSgeom->WriteNewFile(fWrite);
794
795     // Initialize AliITS
796     AliITS::Init();
797     for(i=0;i<40+16;i++) printf("*"); printf("\n");
798 }
799
800
801 //______________________________________________________________________
802 void AliITSv11::SetDefaults(){
803   //
804   // Set response ans segmentation models for SPD, SDD and SSD
805   //
806
807   printf("AliITSv11::SetDefaults :\n");
808   const Float_t kconv = 1.0e+04; // convert cm to microns
809
810   AliITSDetType *iDetType;
811   AliITSgeomSPD  *s0;
812   AliITSgeomSDD  *s1;
813   AliITSgeomSSD  *s2;
814   Int_t i;
815   Float_t bx[256],bz[280];
816
817   //================================================ SPD
818   iDetType=DetType(kSPD);
819   s0 = (AliITSgeomSPD*) fITSgeom->GetShape(kSPD);// Get shape info. Do it this way for now.
820   // If some SPD detectors have been inserted in t
821   if (s0) {
822     AliITSresponse *resp0=new AliITSresponseSPD();
823     SetResponseModel(kSPD,resp0);
824     AliITSsegmentationSPD *seg0=new AliITSsegmentationSPD(fITSgeom);
825     seg0->SetDetSize(s0->GetDx()*2.*kconv, // base this on AliITSgeomSPD
826                      s0->GetDz()*2.*kconv, // for now.
827                      s0->GetDy()*2.*kconv); // x,z,y full width in microns.
828     seg0->SetNPads(256,160);// Number of Bins in x and z
829     for(i=000;i<256;i++) bx[i] =  50.0; // in x all are 50 microns.
830     for(i=000;i<160;i++) bz[i] = 425.0; // most are 425 microns except below
831     for(i=160;i<280;i++) bz[i] =   0.0; // Outside of detector.
832     bz[ 31] = bz[ 32] = 625.0; // first chip boundry
833     bz[ 63] = bz[ 64] = 625.0; // first chip boundry
834     bz[ 95] = bz[ 96] = 625.0; // first chip boundry
835     bz[127] = bz[128] = 625.0; // first chip boundry
836     bz[160] = 425.0; // Set so that there is no zero pixel size for fNz.
837     seg0->SetBinSize(bx,bz); // Based on AliITSgeomSPD for now.
838     SetSegmentationModel(kSPD,seg0);
839     // set digit and raw cluster classes to be used
840     const char *kData0=(iDetType->GetResponseModel())->DataType();
841     if (strstr(kData0,"real")) iDetType->ClassNames("AliITSdigit",
842                                                     "AliITSRawClusterSPD");
843     else iDetType->ClassNames("AliITSdigitSPD","AliITSRawClusterSPD");
844   };
845   
846   //================================================ SDD
847   iDetType=DetType(kSDD);
848   s1 = (AliITSgeomSDD*) fITSgeom->GetShape(kSDD);
849   if (s1) {
850     AliITSresponseSDD     *resp1 = new AliITSresponseSDD("simulated");
851     AliITSsegmentationSDD  *seg1 = new AliITSsegmentationSDD(fITSgeom,resp1);
852     seg1->SetDetSize(s1->GetDx()*kconv,
853                      s1->GetDz()*4*kconv,  // z in 2th and y in 3th position in
854                      s1->GetDy()*4*kconv); // AliITSsegmentation::SetDetSize()...
855     seg1->SetNPads(256, 256);
856     SetResponseModel(kSDD, resp1);
857     SetSegmentationModel(kSDD, seg1);
858     const char *kData1 = (iDetType->GetResponseModel())->DataType();
859     const char *kopt   = iDetType->GetResponseModel()->ZeroSuppOption();
860     if((!strstr(kopt,"2D")) && (!strstr(kopt,"1D")) || strstr(kData1,"real") ){
861       iDetType->ClassNames("AliITSdigit","AliITSRawClusterSDD");
862     } else iDetType->ClassNames("AliITSdigitSDD","AliITSRawClusterSDD");
863   };
864   
865   //================================================ SSD  Layer 5
866   iDetType=DetType(kSSD);
867   s2 = (AliITSgeomSSD*) fITSgeom->GetShape(kSSD);// Get shape info. Do it this way for now.
868   if (s2) {
869     AliITSresponse *resp2=new AliITSresponseSSD("simulated");
870     SetResponseModel(kSSD,resp2);
871     AliITSsegmentationSSD *seg2=new AliITSsegmentationSSD(fITSgeom);
872     seg2->SetDetSize(s2->GetDx()*2.*kconv, // base this on AliITSgeomSSD
873                      s2->GetDz()*2.*kconv, // for now.
874                      s2->GetDy()*2.*kconv); // x,z,y full width in microns.
875     seg2->SetPadSize(95.,0.); // strip x pitch in microns
876     seg2->SetNPads(768,0); // number of strips on each side.
877     seg2->SetAngles(0.0075,0.0275); // strip angels rad P and N side.
878     seg2->SetAnglesLay5(0.0075,0.0275); // strip angels rad P and N side.
879     seg2->SetAnglesLay6(0.0275,0.0075); // strip angels rad P and N side.
880     SetSegmentationModel(kSSD,seg2); 
881     const char *kData2=(iDetType->GetResponseModel())->DataType();
882     if(strstr(kData2,"real") ) iDetType->ClassNames("AliITSdigit",
883                                                     "AliITSRawClusterSSD");
884     else iDetType->ClassNames("AliITSdigitSSD","AliITSRawClusterSSD");
885   };
886   
887   if(kNTYPES>3){
888     Warning("SetDefaults",
889             "Only the four basic detector types are initialised!");
890   }// end if
891   return;
892 };
893
894
895 //______________________________________________________________________
896 void AliITSv11::DrawModule() const{
897
898 }
899
900 //______________________________________________________________________
901 void AliITSv11::StepManager(){
902   //
903   //    Called for every step in the ITS, then calles the AliITShit class
904   // creator with the information to be recoreded about that hit.
905   //
906
907   Int_t         copy, id;
908   TLorentzVector position, momentum;
909   static TLorentzVector position0;
910   static Int_t stat0=0;
911     
912   if(!(this->IsActive())){
913     return;
914   } // end if !Active volume.
915
916   if(!(gMC->TrackCharge())) return;
917   
918   id=gMC->CurrentVolID(copy);
919
920   Bool_t sensvol = kFALSE;
921   for(Int_t kk = 0; kk < fIdN; kk++)
922     if(id == fIdSens[kk]) sensvol = kTRUE;
923
924   if (sensvol && (gMC->IsTrackExiting())) {
925     copy = fTrackReferences->GetEntriesFast();
926     TClonesArray &lTR = *fTrackReferences;
927     // Fill TrackReference structure with this new TrackReference.
928     new(lTR[copy]) AliTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber());
929   } // if Outer ITS mother Volume
930   
931   Int_t   vol[5];
932   TClonesArray &lhits = *fHits;
933   //
934   // Track status
935   vol[3] = 0;
936   vol[4] = 0;
937   // Fill hit structure.
938   if(gMC->IsTrackInside())      vol[3] +=  1;
939   if(gMC->IsTrackEntering())    vol[3] +=  2;
940   if(gMC->IsTrackExiting())     vol[3] +=  4;
941   if(gMC->IsTrackOut())         vol[3] +=  8;
942   if(gMC->IsTrackDisappeared()) vol[3] += 16;
943   if(gMC->IsTrackStop())        vol[3] += 32;
944   if(gMC->IsTrackAlive())       vol[3] += 64;
945
946   // Only entering charged tracks
947   if(!(gMC->TrackCharge())) return;
948  
949   if((id = gMC->CurrentVolID(copy)) == fIdSens[0]) {
950     fSDDgeom->GetCurrentLayLaddDet(vol[0], vol[2], vol[1]);
951     // vol[2], vol[1]) : in this order because the ladder
952     // index and the det. index are exchanged in the constructor
953     // of AliITShit ...                     ???
954
955   } else {
956     return; // not an ITS volume?
957   };
958
959   gMC->TrackPosition(position);
960   gMC->TrackMomentum(momentum);
961   vol[4] = stat0;
962   if(gMC->IsTrackEntering()){
963     position0 = position;
964     stat0 = vol[3];
965     return;
966   } // end if IsEntering
967     // Fill hit structure with this new hit.
968   new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->GetMCApp()->GetCurrentTrackNumber(),
969                                  vol, gMC->Edep(),gMC->TrackTime(),position,
970                                  position0,momentum);
971   //
972   position0 = position;
973   stat0 = vol[3];
974  
975   return;
976 };