]> git.uio.no Git - u/mrichter/AliRoot.git/blob - ITS/UPGRADE/AliITSUv11.cxx
Readout cycle span is set to +-126
[u/mrichter/AliRoot.git] / ITS / UPGRADE / AliITSUv11.cxx
1 /**************************************************************************
2  * Copyright(c) 2007-2009, 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 /* $Id: AliITSUv11.cxx */
18
19
20 //========================================================================
21 //
22 //        Geometry for the Upgrade of the Inner Tracking System
23 //
24 // Mario Sitta (sitta@to.infn.it)
25 //
26 //========================================================================
27
28
29
30 // $Log: AliITSUv11.cxx,v $
31
32 #include <TClonesArray.h>
33 #include <TGeoGlobalMagField.h>
34 #include <TGeoManager.h>
35 #include <TGeoMatrix.h>
36 #include <TGeoPhysicalNode.h>
37 #include <TGeoVolume.h>
38 #include <TGeoXtru.h>
39 #include <TLorentzVector.h>
40 #include <TString.h>
41 #include <TVirtualMC.h>
42
43 #include "AliITSU.h"
44 #include "AliITSUHit.h"
45 #include "AliLog.h"
46 #include "AliMC.h"
47 #include "AliMagF.h"
48 #include "AliRun.h"
49 #include "AliTrackReference.h"
50 #include "AliITSv11Geometry.h"
51 #include "AliITSUv11Layer.h"
52 #include "AliITSUv11.h"
53 #include "AliITSUGeomTGeo.h"
54 #include "AliGeomManager.h"
55 using namespace TMath;
56
57
58 ClassImp(AliITSUv11)
59
60 //______________________________________________________________________
61 AliITSUv11::AliITSUv11()
62 :  fLayTurbo(0)
63   ,fLayPhi0(0)
64   ,fLayRadii(0)
65   ,fLayZLength(0)
66   ,fLaddPerLay(0)
67   ,fModPerLadd(0)
68   ,fLadThick(0)
69   ,fLadWidth(0)
70   ,fLadTilt(0)
71   ,fDetThick(0)
72   ,fDetTypeID(0)
73   ,fUpGeom(0)
74 {
75   //    Standard default constructor
76   // Inputs:
77   //   none.
78   // Outputs:
79   //   none.
80   // Return:
81   //   none.
82 }
83
84 //______________________________________________________________________
85 AliITSUv11::AliITSUv11(const char *title,const Int_t nlay)
86   :AliITSU(title,nlay)
87   ,fLayTurbo(0)
88   ,fLayPhi0(0)
89   ,fLayRadii(0)
90   ,fLayZLength(0)
91   ,fLaddPerLay(0)
92   ,fModPerLadd(0)
93   ,fLadThick(0)
94   ,fLadWidth(0)
95   ,fLadTilt(0)
96   ,fDetThick(0)
97   ,fDetTypeID(0)
98   ,fUpGeom(0)
99 {
100   //    Standard constructor for the Upgrade geometry.
101   // Inputs:
102   //   const char * name   Ignored, set to "ITS"
103   //   const char * title  Arbitrary title
104   //   const Int_t nlay    Number of layers
105   //
106   fLayerName = new TString[fNLayers];
107   //
108   for (Int_t j=0; j<fNLayers; j++) fLayerName[j].Form("%s%d",AliITSUGeomTGeo::GetITSSensorPattern(),j); // See AliITSUv11Layer
109   //
110   fLayTurbo   = new Bool_t[fNLayers];
111   fLayPhi0    = new Double_t[fNLayers];
112   fLayRadii   = new Double_t[fNLayers];
113   fLayZLength = new Double_t[fNLayers];
114   fLaddPerLay = new Int_t[fNLayers];
115   fModPerLadd = new Int_t[fNLayers];
116   fLadThick   = new Double_t[fNLayers];
117   fLadWidth   = new Double_t[fNLayers];
118   fLadTilt    = new Double_t[fNLayers];
119   fDetThick   = new Double_t[fNLayers];
120   fDetTypeID  = new UInt_t[fNLayers];
121
122   fUpGeom = new AliITSUv11Layer*[fNLayers];
123   
124   if (fNLayers > 0) { // if not, we'll Fatal-ize in CreateGeometry
125     for (Int_t j=0; j<fNLayers; j++) {
126       fLayPhi0[j] = 0;
127       fLayRadii[j] = 0.;
128       fLayZLength[j] = 0.;
129       fLaddPerLay[j] = 0;
130       fModPerLadd[j] = 0;
131       fLadWidth[j] = 0.;
132       fDetThick[j] = 0.;
133       fDetTypeID[j] = 0;
134       fUpGeom[j] = 0;
135     }
136   }
137 }
138
139 //______________________________________________________________________
140 AliITSUv11::~AliITSUv11() {
141   //    Standard destructor
142   // Inputs:
143   //   none.
144   // Outputs:
145   //   none.
146   // Return:
147   //   none.
148   delete [] fLayTurbo;
149   delete [] fLayPhi0;
150   delete [] fLayRadii;
151   delete [] fLayZLength;
152   delete [] fLaddPerLay;
153   delete [] fModPerLadd;
154   delete [] fLadThick;
155   delete [] fLadWidth;
156   delete [] fLadTilt;
157   delete [] fDetThick;
158   delete [] fDetTypeID;
159   delete [] fUpGeom;
160 }
161
162 //______________________________________________________________________
163 void AliITSUv11::AddAlignableVolumes() const{
164   // Creates entries for alignable volumes associating the symbolic volume
165   // name with the corresponding volume path.
166   // 
167   // Records in the alignable entries the transformation matrices converting
168   // TGeo local coordinates (in the RS of alignable volumes) to the tracking
169   // system
170   // For this, this function has to run before the misalignment because we
171   // are using the ideal positions in the AliITSgeom object.
172   // Inputs:
173   //   none.
174   // Outputs:
175   //   none.
176   // Return:
177   //   none.
178
179   AliInfo("Add ITS alignable volumes");
180
181   if (!gGeoManager) { AliFatal("TGeoManager doesn't exist !"); return;  }
182   TString pth;
183   //
184   pth = Form("ALIC_1/%s_2",AliITSUGeomTGeo::GetITSVolPattern());
185   // RS: to be checked with MS
186   if( !gGeoManager->SetAlignableEntry(AliITSUGeomTGeo::ComposeSymNameITS(),pth.Data()) )
187     AliFatal(Form("Unable to set alignable entry ! %s :: %s","ITS",pth.Data()));    
188   //
189   int modNum = 0;
190   //
191   for (int lr=0; lr<fNLayers; lr++) {
192     //
193     pth = Form("ALIC_1/%s_2/%s%d_1",AliITSUGeomTGeo::GetITSVolPattern(),AliITSUGeomTGeo::GetITSLayerPattern(),lr);
194     //printf("SetAlignable: %s %s\n",snm.Data(),pth.Data());
195     gGeoManager->SetAlignableEntry(AliITSUGeomTGeo::ComposeSymNameLayer(lr),pth.Data());
196     //
197     for (int ld=0; ld<fLaddPerLay[lr]; ld++) {
198       //
199       TString pthL = Form("%s/%s%d_%d",pth.Data(),AliITSUGeomTGeo::GetITSLadderPattern(),lr,ld);
200       //printf("SetAlignable: %s %s\n",snmL.Data(),pthL.Data());
201       gGeoManager->SetAlignableEntry(AliITSUGeomTGeo::ComposeSymNameLadder(lr,ld),pthL.Data());
202       //
203       for (int md=0; md<fModPerLadd[lr]; md++) {
204         //
205         TString pthM = Form("%s/%s%d_%d",pthL.Data(),AliITSUGeomTGeo::GetITSModulePattern(),lr,md);
206         //
207         // RS: Attention, this is a hack: AliGeomManager cannot accomodate all ITSU modules w/o
208         // conflicts with TPC. For this reason we define the UID of the module to be simply its ID
209         //      int modUID = AliGeomManager::LayerToVolUID(lr+1,modNum++); // here modNum would be module within the layer
210         int modUID = AliITSUGeomTGeo::ModuleVolUID( modNum++ );
211         // 
212         gGeoManager->SetAlignableEntry(AliITSUGeomTGeo::ComposeSymNameModule(lr,ld,md),pthM.Data(),modUID);
213         //
214       }
215     }
216   }
217   //
218 }
219
220 //______________________________________________________________________
221 void AliITSUv11::CreateGeometry() {
222
223   // Create the geometry and insert it in the mother volume ITSV
224   TGeoManager *geoManager = gGeoManager;
225
226   TGeoVolume *vALIC = geoManager->GetVolume("ALIC");
227
228   new TGeoVolumeAssembly(AliITSUGeomTGeo::GetITSVolPattern());
229   TGeoVolume *vITSV = geoManager->GetVolume(AliITSUGeomTGeo::GetITSVolPattern());
230   vALIC->AddNode(vITSV, 2, 0);  // Copy number is 2 to cheat AliGeoManager::CheckSymNamesLUT
231
232   //
233   const Int_t kLength=100;
234   Char_t vstrng[kLength] = "xxxRS"; //?
235   vITSV->SetTitle(vstrng);
236   //
237   // Check that we have all needed parameters
238   if (fNLayers <= 0) AliFatal(Form("Wrong number of layers (%d)",fNLayers));
239   //
240   for (Int_t j=0; j<fNLayers; j++) {
241     if (fLayRadii[j] <= 0)                 AliFatal(Form("Wrong layer radius for layer %d (%f)",j,fLayRadii[j]));
242     if (fLayZLength[j] <= 0)               AliFatal(Form("Wrong layer length for layer %d (%f)",j,fLayZLength[j]));
243     if (fLaddPerLay[j] <= 0)               AliFatal(Form("Wrong number of ladders for layer %d (%d)",j,fLaddPerLay[j]));
244     if (fModPerLadd[j] <= 0)               AliFatal(Form("Wrong number of modules for layer %d (%d)",j,fModPerLadd[j]));
245     if (fLadThick[j] < 0)                  AliFatal(Form("Wrong ladder thickness for layer %d (%f)",j,fLadThick[j]));
246     if (fLayTurbo[j] && fLadWidth[j] <= 0) AliFatal(Form("Wrong ladder width for layer %d (%f)",j,fLadWidth[j]));
247     if (fDetThick[j] < 0)                  AliFatal(Form("Wrong module thickness for layer %d (%f)",j,fDetThick[j]));
248     //
249     if (j > 0) {
250       if (fLayRadii[j]<=fLayRadii[j-1])    AliFatal(Form("Layer %d radius (%f) is smaller than layer %d radius (%f)",
251                                                          j,fLayRadii[j],j-1,fLayRadii[j-1]));
252     } // if (j > 0)
253
254     if (fLadThick[j] == 0) AliInfo(Form("Ladder thickness for layer %d not set, using default",j));
255     if (fDetThick[j] == 0) AliInfo(Form("Module thickness for layer %d not set, using default",j));
256
257   } // for (Int_t j=0; j<fNLayers; j++)
258
259   // Now create the actual geometry
260   for (Int_t j=0; j<fNLayers; j++) {
261     if (fLayTurbo[j]) {
262       fUpGeom[j] = new AliITSUv11Layer(j,kTRUE,kFALSE);
263       fUpGeom[j]->SetLadderWidth(fLadWidth[j]);
264       fUpGeom[j]->SetLadderTilt(fLadTilt[j]);
265     }
266     else fUpGeom[j] = new AliITSUv11Layer(j,kFALSE);
267     //
268     fUpGeom[j]->SetPhi0(fLayPhi0[j]);
269     fUpGeom[j]->SetRadius(fLayRadii[j]);
270     fUpGeom[j]->SetZLength(fLayZLength[j]);
271     fUpGeom[j]->SetNLadders(fLaddPerLay[j]);
272     fUpGeom[j]->SetNModules(fModPerLadd[j]);
273     fUpGeom[j]->SetDetType(fDetTypeID[j]);
274     //
275     if (fLadThick[j] != 0) fUpGeom[j]->SetLadderThick(fLadThick[j]);
276     if (fDetThick[j] != 0) fUpGeom[j]->SetSensorThick(fDetThick[j]);
277     fUpGeom[j]->CreateLayer(vITSV);
278   }
279   //
280 }
281
282 //______________________________________________________________________
283 void AliITSUv11::CreateMaterials() {
284   // Create ITS materials
285   //     This function defines the default materials used in the Geant
286   // Monte Carlo simulations for the geometries AliITSv1, AliITSv3,
287   // AliITSv11Hybrid.
288   // In general it is automatically replaced by
289   // the CreateMaterials routine defined in AliITSv?. Should the function
290   // CreateMaterials not exist for the geometry version you are using this
291   // one is used. See the definition found in AliITSv5 or the other routine
292   // for a complete definition.
293   // Inputs:
294   //   none.
295   // Outputs:
296   //   none.
297   // Return:
298   //   none.
299
300   Int_t   ifield = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Integ();
301   Float_t fieldm = ((AliMagF*)TGeoGlobalMagField::Instance()->GetField())->Max();
302
303   Float_t tmaxfd = 0.1; // 1.0; // Degree
304   Float_t stemax = 1.0; // cm
305   Float_t deemax = 0.1; // 30.0; // Fraction of particle's energy 0<deemax<=1
306   Float_t epsil  = 1.0E-4; // 1.0; // cm
307   Float_t stmin  = 0.0; // cm "Default value used"
308
309   Float_t tmaxfdSi = 0.1; // .10000E+01; // Degree
310   Float_t stemaxSi = 0.0075; //  .10000E+01; // cm
311   Float_t deemaxSi = 0.1; // 0.30000E-02; // Fraction of particle's energy 0<deemax<=1
312   Float_t epsilSi  = 1.0E-4;// .10000E+01;
313   Float_t stminSi  = 0.0; // cm "Default value used"
314
315   Float_t tmaxfdAir = 0.1; // .10000E+01; // Degree
316   Float_t stemaxAir = .10000E+01; // cm
317   Float_t deemaxAir = 0.1; // 0.30000E-02; // Fraction of particle's energy 0<deemax<=1
318   Float_t epsilAir  = 1.0E-4;// .10000E+01;
319   Float_t stminAir  = 0.0; // cm "Default value used"
320
321   // AIR
322   Float_t aAir[4]={12.0107,14.0067,15.9994,39.948};
323   Float_t zAir[4]={6.,7.,8.,18.};
324   Float_t wAir[4]={0.000124,0.755267,0.231781,0.012827};
325   Float_t dAir = 1.20479E-3;
326
327
328   AliMaterial(1,"SI$",0.28086E+02,0.14000E+02,0.23300E+01,0.93600E+01,0.99900E+03);
329   AliMedium(1,"SI$",1,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,epsilSi,stminSi);
330
331   AliMixture(5,"AIR$",aAir,zAir,dAir,4,wAir);
332   AliMedium(5,"AIR$",5,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,epsilAir,stminAir);
333
334   AliMaterial(8,"BERILLIUM$",9.01, 4., 1.848, 35.3, 36.7);// From AliPIPEv3
335   AliMedium(8,"BERILLIUM$",8,0,ifield,fieldm,tmaxfd,stemax,deemax,epsil,stmin);
336     
337 }
338
339 //______________________________________________________________________
340 void AliITSUv11::DefineLayer(const Int_t nlay, const double phi0, const Double_t r,
341                                  const Double_t zlen, const Int_t nladd,
342                                  const Int_t nmod, const Double_t lthick,
343                                  const Double_t dthick, const UInt_t dettypeID)
344 {
345   //     Sets the layer parameters
346   // Inputs:
347   //          nlay    layer number
348   //          phi0    layer phi0
349   //          r       layer radius
350   //          zlen    layer length
351   //          nladd   number of ladders
352   //          nmod    number of modules per ladder
353   //          lthick  ladder thickness (if omitted, defaults to 0)
354   //          dthick  detector thickness (if omitted, defaults to 0)
355   // Outputs:
356   //   none.
357   // Return:
358   //   none.
359   
360   if (nlay >= fNLayers || nlay < 0) {
361     AliError(Form("Wrong layer number (%d)",nlay));
362     return;
363   }
364   
365   fLayTurbo[nlay] = kFALSE;
366   fLayPhi0[nlay] = phi0;
367   fLayRadii[nlay] = r;
368   fLayZLength[nlay] = zlen;
369   fLaddPerLay[nlay] = nladd;
370   fModPerLadd[nlay] = nmod;
371   fLadThick[nlay] = lthick;
372   fDetThick[nlay] = dthick;
373   fDetTypeID[nlay] = dettypeID;
374     
375 }
376
377 //______________________________________________________________________
378 void AliITSUv11::DefineLayerTurbo(Int_t nlay, Double_t phi0, Double_t r, Double_t zlen, Int_t nladd,
379                                   Int_t nmod, Double_t width, Double_t tilt,
380                                   Double_t lthick,Double_t dthick,
381                                   UInt_t dettypeID)
382 {
383   //     Sets the layer parameters for a "turbo" layer
384   //     (i.e. a layer whose ladders overlap in phi)
385   // Inputs:
386   //          nlay    layer number
387   //          phi0    phi of 1st ladder
388   //          r       layer radius
389   //          zlen    layer length
390   //          nladd   number of ladders
391   //          nmod    number of modules per ladder
392   //          width   ladder width
393   //          tilt    layer tilt angle (degrees)
394   //          lthick  ladder thickness (if omitted, defaults to 0)
395   //          dthick  detector thickness (if omitted, defaults to 0)
396   // Outputs:
397   //   none.
398   // Return:
399   //   none.
400
401   if (nlay >= fNLayers || nlay < 0) {
402     AliError(Form("Wrong layer number (%d)",nlay));
403     return;
404   }
405
406   fLayTurbo[nlay] = kTRUE;
407   fLayPhi0[nlay] = phi0;
408   fLayRadii[nlay] = r;
409   fLayZLength[nlay] = zlen;
410   fLaddPerLay[nlay] = nladd;
411   fModPerLadd[nlay] = nmod;
412   fLadThick[nlay] = lthick;
413   fLadWidth[nlay] = width;
414   fLadTilt[nlay] = tilt;
415   fDetThick[nlay] = dthick;
416   fDetTypeID[nlay] = dettypeID;
417   //
418 }
419
420 //______________________________________________________________________
421 void AliITSUv11::GetLayerParameters(Int_t nlay, Double_t &phi0,
422                                     Double_t &r, Double_t &zlen,
423                                     Int_t &nladd, Int_t &nmod,
424                                     Double_t &width, Double_t &tilt,
425                                     Double_t &lthick, Double_t &dthick) const
426 {
427   //     Gets the layer parameters
428   // Inputs:
429   //          nlay    layer number
430   // Outputs:
431   //          phi0    phi of 1st ladder
432   //          r       layer radius
433   //          zlen    layer length
434   //          nladd   number of ladders
435   //          nmod    number of modules per ladder
436   //          width   ladder width
437   //          tilt    ladder tilt angle
438   //          lthick  ladder thickness
439   //          dthick  detector thickness
440   // Return:
441   //   none.
442
443   if (nlay >= fNLayers || nlay < 0) {
444     AliError(Form("Wrong layer number (%d)",nlay));
445     return;
446   }
447   
448   phi0   = fLayPhi0[nlay];
449   r      = fLayRadii[nlay];
450   zlen   = fLayZLength[nlay];
451   nladd  = fLaddPerLay[nlay];
452   nmod   = fModPerLadd[nlay];
453   width  = fLadWidth[nlay];
454   tilt   = fLadTilt[nlay];
455   lthick = fLadThick[nlay];
456   dthick = fDetThick[nlay];
457 }
458
459 //______________________________________________________________________
460 void AliITSUv11::Init()
461 {
462   //     Initialise the ITS after it has been created.
463   UpdateInternalGeometry();
464   AliITSU::Init();
465   //  
466 }
467
468 //______________________________________________________________________
469 Bool_t AliITSUv11::IsLayerTurbo(Int_t nlay)
470 {
471   //     Returns true if the layer is a "turbo" layer
472   if ( nlay < 0 || nlay > fNLayers ) {
473     AliError(Form("Wrong layer number %d",nlay));
474     return kFALSE;
475   } 
476   else return fUpGeom[nlay]->IsTurbo();
477 }
478
479 //______________________________________________________________________
480 void AliITSUv11::SetDefaults()
481 {
482   // sets the default segmentation, response, digit and raw cluster classes
483 }
484
485 //______________________________________________________________________
486 void AliITSUv11::StepManager()
487 {
488   //    Called for every step in the ITS, then calles the AliITSUHit class
489   // creator with the information to be recoreded about that hit.
490   //     The value of the macro ALIITSPRINTGEOM if set to 1 will allow the
491   // printing of information to a file which can be used to create a .det
492   // file read in by the routine CreateGeometry(). If set to 0 or any other
493   // value except 1, the default behavior, then no such file is created nor
494   // it the extra variables and the like used in the printing allocated.
495   // Inputs:
496   //   none.
497   // Outputs:
498   //   none.
499   // Return:
500   //   none.
501   if(!(this->IsActive())) return;
502   if(!(gMC->TrackCharge())) return;
503   //
504   Int_t copy, lay = 0;
505   Int_t id = gMC->CurrentVolID(copy);
506
507   Bool_t notSens = kFALSE;
508   while ((lay<fNLayers)  && (notSens = (id!=fIdSens[lay]))) ++lay;
509   //printf("R: %.1f | Lay: %d  NotSens: %d\n",positionRS.Pt(), lay, notSens);
510            
511   if (notSens) return;
512
513   if(gMC->IsTrackExiting()) {
514     AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kITS);
515   } // if Outer ITS mother Volume
516
517   static TLorentzVector position, momentum; // Saves on calls to construtors
518   static AliITSUHit hit;// Saves on calls to constructors
519
520   TClonesArray &lhits = *(Hits());
521   Int_t   cpn0, cpn1, mod, status = 0;
522   //
523   // Track status
524   if(gMC->IsTrackInside())      status +=  1;
525   if(gMC->IsTrackEntering())    status +=  2;
526   if(gMC->IsTrackExiting())     status +=  4;
527   if(gMC->IsTrackOut())         status +=  8;
528   if(gMC->IsTrackDisappeared()) status += 16;
529   if(gMC->IsTrackStop())        status += 32;
530   if(gMC->IsTrackAlive())       status += 64;
531
532   //
533   // retrieve the indices with the volume path
534   //
535   if (lay < 0 || lay >= fNLayers) {
536     AliError(Form("Invalid value: lay=%d. Not an ITS sensitive volume",lay));
537     return; // not an ITS sensitive volume.
538   } else {
539     copy = 1;
540     gMC->CurrentVolOffID(1,cpn1);
541     gMC->CurrentVolOffID(2,cpn0);
542   } //
543
544   mod = fGeomTGeo->GetModuleIndex(lay,cpn0,cpn1);
545   //RS2DEL  fInitGeom.DecodeDetector(mod,lay+1,cpn0,cpn1,copy);
546   //
547   // Fill hit structure.
548   //
549   hit.SetModule(mod);
550   hit.SetTrack(gAlice->GetMCApp()->GetCurrentTrackNumber());
551   gMC->TrackPosition(position);
552   gMC->TrackMomentum(momentum);
553   hit.SetPosition(position);
554   hit.SetTime(gMC->TrackTime());
555   hit.SetMomentum(momentum);
556   hit.SetStatus(status);
557   hit.SetEdep(gMC->Edep());
558   hit.SetShunt(GetIshunt());
559   if(gMC->IsTrackEntering()){
560     hit.SetStartPosition(position);
561     hit.SetStartTime(gMC->TrackTime());
562     hit.SetStartStatus(status);
563     return; // don't save entering hit.
564   } // end if IsEntering
565     // Fill hit structure with this new hit.
566     //Info("StepManager","Calling Copy Constructor");
567   new(lhits[fNhits++]) AliITSUHit(hit); // Use Copy Construtor.
568   // Save old position... for next hit.
569   hit.SetStartPosition(position);
570   hit.SetStartTime(gMC->TrackTime());
571   hit.SetStartStatus(status);
572
573   return;
574 }
575
576 //______________________________________________________________________
577 void AliITSUv11::SetLayerDetTypeID(Int_t lr, UInt_t id)
578 {
579   // set det type
580   if (!fDetTypeID || fNLayers<=lr) AliFatal(Form("Number of layers %d, %d is manipulated",fNLayers,lr));
581   fDetTypeID[lr] = id;
582 }
583
584 //______________________________________________________________________
585 Int_t AliITSUv11::GetLayerDetTypeID(Int_t lr)
586 {
587   // set det type
588   if (!fDetTypeID || fNLayers<=lr) AliFatal(Form("Number of layers %d, %d is manipulated",fNLayers,lr));
589   return fDetTypeID[lr];
590 }