]>
Commit | Line | Data |
---|---|---|
2b680d9b | 1 | /************************************************************************** |
effd7456 | 2 | * Copyright(c) 2007-2008, ALICE Experiment at CERN, All rights reserved. * |
2b680d9b | 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 | ||
effd7456 | 16 | |
b7943f00 | 17 | //************************************************************************ |
effd7456 | 18 | // |
b7943f00 | 19 | // Inner Traking System geometry v11 |
20 | // | |
21 | // Based on ROOT geometrical modeler | |
b7943f00 | 22 | // |
23 | // B. Nilsen, L. Gaudichet | |
24 | //************************************************************************ | |
25 | ||
541f7ba6 | 26 | #include <TClonesArray.h> |
7dd2cbe4 | 27 | #include <TGeoManager.h> |
28 | #include <TGeoPcon.h> | |
29 | #include <TGeoVolume.h> | |
2b680d9b | 30 | #include <TLorentzVector.h> |
7dd2cbe4 | 31 | #include <TVirtualMC.h> |
b7943f00 | 32 | |
33 | #include "AliITS.h" | |
7dd2cbe4 | 34 | #include "AliITSCalibrationSDD.h" |
531d6cdc | 35 | #include "AliITSDetTypeSim.h" |
b7943f00 | 36 | #include "AliITShit.h" |
2b680d9b | 37 | #include "AliITSsegmentationSDD.h" |
b7943f00 | 38 | #include "AliITSsegmentationSPD.h" |
39 | #include "AliITSsegmentationSSD.h" | |
108bd0fe | 40 | #include "AliITSv11.h" |
db486a6e | 41 | #include "AliITSv11GeometrySDD.h" |
7dd2cbe4 | 42 | #include "AliITSv11GeometrySPD.h" |
54c9a3d9 | 43 | #include "AliITSv11GeometrySSD.h" |
44 | #include "AliITSv11GeometrySupport.h" | |
7dd2cbe4 | 45 | #include "AliMC.h" |
46 | #include "AliMagF.h" | |
47 | #include "AliRun.h" | |
48 | #include "AliTrackReference.h" | |
541f7ba6 | 49 | |
b7943f00 | 50 | ClassImp(AliITSv11) |
51 | ||
33ddec7d | 52 | //______________________________________________________________________ |
012f0f4c | 53 | AliITSv11::AliITSv11() : |
012f0f4c | 54 | fByThick(kTRUE), |
55 | fMajorVersion(IsVersion()), | |
56 | fMinorVersion(0), | |
54c9a3d9 | 57 | fSPDgeom(), |
012f0f4c | 58 | fSDDgeom(0), |
54c9a3d9 | 59 | fSSDgeom(), |
60 | fSupgeom(), | |
012f0f4c | 61 | fIgm(kv11) |
33ddec7d | 62 | { |
b7943f00 | 63 | // Standard default constructor for the ITS version 11. |
f7315efc | 64 | |
531d6cdc | 65 | fIdN = 0; |
66 | fIdName = 0; | |
67 | fIdSens = 0; | |
2b680d9b | 68 | } |
b7943f00 | 69 | |
fa4639a3 | 70 | |
71 | //______________________________________________________________________ | |
012f0f4c | 72 | AliITSv11::AliITSv11(const char *name, const char *title): |
73 | AliITS("ITS", title), | |
012f0f4c | 74 | fByThick(kTRUE), |
75 | fMajorVersion(IsVersion()), | |
76 | fMinorVersion(0), | |
54c9a3d9 | 77 | fSPDgeom(), |
012f0f4c | 78 | fSDDgeom(0), |
54c9a3d9 | 79 | fSSDgeom(), |
80 | fSupgeom(), | |
012f0f4c | 81 | fIgm(kv11) |
33ddec7d | 82 | { |
fa4639a3 | 83 | // Standard constructor for the ITS version 11. |
84 | ||
531d6cdc | 85 | fSDDgeom = new AliITSv11GeometrySDD(0); |
fa4639a3 | 86 | |
87 | Int_t i; | |
531d6cdc | 88 | fIdN = 6; |
89 | fIdName = new TString[fIdN]; | |
90 | fIdName[0] = name; // removes warning message | |
91 | fIdName[0] = "ITS1"; | |
92 | fIdName[1] = "ITS2"; | |
108bd0fe | 93 | fIdName[2] = fSDDgeom->GetSenstiveVolumeName3(); |
94 | fIdName[3] = fSDDgeom->GetSenstiveVolumeName4(); | |
531d6cdc | 95 | fIdName[4] = "ITS5"; |
96 | fIdName[5] = "ITS6"; | |
fa4639a3 | 97 | fIdSens = new Int_t[fIdN]; |
531d6cdc | 98 | for(i=0;i<fIdN;i++) fIdSens[i] = 0; |
33ddec7d | 99 | // not needed, fByThick set to kTRUE in in the member initialization lis |
531d6cdc | 100 | |
fa4639a3 | 101 | } |
2b680d9b | 102 | //______________________________________________________________________ |
112d72a8 | 103 | AliITSv11::AliITSv11(Int_t /* debugITS */,Int_t debugSPD,Int_t debugSDD, |
b7943f00 | 104 | Int_t debugSSD,Int_t debugSUP) : |
012f0f4c | 105 | AliITS("ITS","ITS geometry v11"), |
012f0f4c | 106 | fByThick(kTRUE), |
107 | fMajorVersion(IsVersion()), | |
108 | fMinorVersion(0), | |
54c9a3d9 | 109 | fSPDgeom(), |
012f0f4c | 110 | fSDDgeom(0), |
54c9a3d9 | 111 | fSSDgeom(), |
112 | fSupgeom(), | |
012f0f4c | 113 | fIgm(kv11) |
114 | { | |
b7943f00 | 115 | // Standard default constructor for the ITS version 11. |
b7943f00 | 116 | |
b7943f00 | 117 | |
112d72a8 | 118 | fSPDgeom = new AliITSv11GeometrySPD(debugSPD); |
531d6cdc | 119 | fSDDgeom = new AliITSv11GeometrySDD(debugSDD); |
120 | fSDDgeom->SetDebug(debugSDD); | |
112d72a8 | 121 | fSupgeom = new AliITSv11GeometrySupport(debugSUP); |
531d6cdc | 122 | |
123 | Int_t i; | |
124 | fIdN = 6; | |
125 | fIdName = new TString[fIdN]; | |
54c9a3d9 | 126 | fIdName[0] = fSPDgeom->GetSenstiveVolumeName1(); |
127 | fIdName[1] = fSPDgeom->GetSenstiveVolumeName2(); | |
108bd0fe | 128 | fIdName[2] = fSDDgeom->GetSenstiveVolumeName3(); |
129 | fIdName[3] = fSDDgeom->GetSenstiveVolumeName4(); | |
54c9a3d9 | 130 | fIdName[4] = fSSDgeom->GetSenstiveVolumeName5(); |
131 | fIdName[5] = fSSDgeom->GetSenstiveVolumeName6(); | |
531d6cdc | 132 | fIdSens = new Int_t[fIdN]; |
133 | for(i=0;i<fIdN;i++) fIdSens[i] = 0; | |
112d72a8 | 134 | // debugITS = (debugSPD && debugSSD && debugSUP && debugSDD); //remove temp. warnings |
162acd47 | 135 | } |
dfefbaec | 136 | //______________________________________________________________________ |
b7943f00 | 137 | AliITSv11::~AliITSv11() { |
138 | delete fSDDgeom; | |
2b680d9b | 139 | } |
140 | //______________________________________________________________________ | |
aa9bc63b | 141 | void AliITSv11::CreateGeometry(){ |
012f0f4c | 142 | // |
143 | // Create ROOT geometry | |
144 | // | |
145 | // These constant character strings are set by cvs during commit | |
146 | // do not change them unless you know what you are doing! | |
147 | const Char_t *cvsDate="$Date$"; | |
148 | const Char_t *cvsRevision="$Revision$"; | |
149 | ||
150 | TGeoManager *geoManager = gGeoManager; | |
151 | TGeoVolume *vALIC = geoManager->GetTopVolume(); | |
152 | ||
153 | TGeoPcon *sITS = new TGeoPcon("ITS Top Volume",0.0,360.0,2); | |
154 | ||
155 | // DefineSection(section number, Z, Rmin, Rmax). | |
156 | const Double_t kcm = 1.0; | |
157 | sITS->DefineSection(0,-300.0*kcm,0.01*kcm,50.0*kcm); | |
158 | sITS->DefineSection(1,+300.0*kcm,0.01*kcm,50.0*kcm); | |
159 | ||
160 | TGeoMedium *air = gGeoManager->GetMedium("ITS_AIR$"); | |
161 | TGeoVolume *vITS = new TGeoVolume("ITSV",sITS,air); | |
162 | vITS->SetVisibility(kFALSE); | |
163 | const Int_t length=100; | |
164 | Char_t vstrng[length]; | |
165 | if(fIgm.WriteVersionString(vstrng,length,(AliITSVersion_t)IsVersion(), | |
166 | fMinorVersion,cvsDate,cvsRevision)) | |
167 | vITS->SetTitle(vstrng); | |
168 | //printf("Title set to %s\n",vstrng); | |
169 | vALIC->AddNode(vITS,1,0); | |
b7943f00 | 170 | |
171 | // fSPDgeom->CenteralSPD(vITS); | |
fa4639a3 | 172 | |
b7943f00 | 173 | fSDDgeom->Layer3(vITS); |
174 | fSDDgeom->Layer4(vITS); | |
fa4639a3 | 175 | |
b7943f00 | 176 | // fSupgeom->SPDCone(vITS); |
177 | // fSupgeom->SPDThermalSheald(vITS); | |
178 | // fSupgeom->SDDCone(vITS); | |
179 | // fSupgeom->SSDCone(vITS); | |
180 | // fSupgeom->ServicesCableSupport(vITS); | |
181 | ||
541f7ba6 | 182 | } |
183 | //______________________________________________________________________ | |
184 | void AliITSv11::CreateMaterials(){ | |
54c9a3d9 | 185 | // Create Standard ITS Materials |
186 | // Inputs: | |
187 | // none. | |
188 | // Outputs: | |
189 | // none. | |
190 | // Return: | |
191 | // none. | |
531d6cdc | 192 | |
531d6cdc | 193 | |
54c9a3d9 | 194 | // |
195 | fSPDgeom->AliITSv11Geometry::CreateDefaultMaterials(); | |
196 | // Detector specific material definistions | |
197 | fSPDgeom->CreateMaterials(); | |
198 | fSDDgeom->CreateMaterials(); | |
199 | fSSDgeom->CreateMaterials(); | |
200 | fSupgeom->CreateMaterials(); | |
dfefbaec | 201 | } |
b7943f00 | 202 | |
dfefbaec | 203 | //______________________________________________________________________ |
204 | void AliITSv11::Init(){ | |
b7943f00 | 205 | // |
206 | // Initialise the ITS after it has been created. | |
207 | // | |
208 | ||
531d6cdc | 209 | //AliInfo(Form("Minor version %d",fMinorVersion)); |
210 | // | |
012f0f4c | 211 | UpdateInternalGeometry(); |
212 | AliITS::Init(); | |
012f0f4c | 213 | |
dfefbaec | 214 | } |
b7943f00 | 215 | |
dfefbaec | 216 | //______________________________________________________________________ |
217 | void AliITSv11::SetDefaults(){ | |
b7943f00 | 218 | // |
108bd0fe | 219 | // Set response and segmentation models for SPD, SDD and SSD |
b7943f00 | 220 | // |
221 | ||
108bd0fe | 222 | // if(!fDetTypeSim) fDetTypeSim = new AliITSDetTypeSim(); |
223 | // fDetTypeSim->SetITSgeom(GetITSgeom()); | |
224 | if(!fDetTypeSim) { | |
225 | Warning("SetDefaults","Error fDetTypeSim not defined"); | |
226 | return; | |
227 | } | |
531d6cdc | 228 | |
531d6cdc | 229 | fDetTypeSim->ResetCalibrationArray(); |
230 | fDetTypeSim->ResetSegmentation(); | |
231 | fDetTypeSim->SetDefaults(); | |
232 | ||
531d6cdc | 233 | if(fgkNTYPES>3){ |
234 | Warning("SetDefaults", | |
235 | "Only the four basic detector types are initialised!"); | |
236 | }// end if | |
237 | ||
238 | ||
239 | return; | |
240 | } | |
b7943f00 | 241 | |
242 | ||
108bd0fe | 243 | |
244 | ||
245 | ||
dfefbaec | 246 | //______________________________________________________________________ |
b7943f00 | 247 | void AliITSv11::DrawModule() const{ |
248 | ||
dfefbaec | 249 | } |
b7943f00 | 250 | |
108bd0fe | 251 | // //______________________________________________________________________ |
252 | // void AliITSv11::StepManager(){ | |
253 | // // | |
254 | // // Called for every step in the ITS, then calles the AliITShit class | |
255 | // // creator with the information to be recoreded about that hit. | |
256 | // // | |
257 | // Int_t copy, id; | |
258 | // TLorentzVector position, momentum; | |
259 | // static TLorentzVector position0; | |
260 | // static Int_t stat0=0; | |
261 | ||
262 | // if(!(this->IsActive())){ | |
263 | // return; | |
264 | // } // end if !Active volume. | |
265 | ||
266 | // if(!(gMC->TrackCharge())) return; | |
267 | ||
268 | // id=gMC->CurrentVolID(copy); | |
269 | ||
270 | // Bool_t sensvol = kFALSE; | |
271 | // for(Int_t kk=0;kk<6;kk++)if(id == fIdSens[kk])sensvol=kTRUE; | |
272 | // if(sensvol && (gMC->IsTrackExiting())){ | |
273 | // copy = fTrackReferences->GetEntriesFast(); | |
274 | // TClonesArray &lTR = *fTrackReferences; | |
275 | // // Fill TrackReference structure with this new TrackReference. | |
276 | // new(lTR[copy]) AliTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber()); | |
277 | // } // if Outer ITS mother Volume | |
278 | ||
279 | ||
280 | // Int_t copy1,copy2; | |
281 | // Int_t vol[5]; | |
282 | // TClonesArray &lhits = *fHits; | |
283 | // // | |
284 | // // Track status | |
285 | // vol[3] = 0; | |
286 | // vol[4] = 0; | |
287 | // if(gMC->IsTrackInside()) vol[3] += 1; | |
288 | // if(gMC->IsTrackEntering()) vol[3] += 2; | |
289 | // if(gMC->IsTrackExiting()) vol[3] += 4; | |
290 | // if(gMC->IsTrackOut()) vol[3] += 8; | |
291 | // if(gMC->IsTrackDisappeared()) vol[3] += 16; | |
292 | // if(gMC->IsTrackStop()) vol[3] += 32; | |
293 | // if(gMC->IsTrackAlive()) vol[3] += 64; | |
294 | // // | |
295 | // // Fill hit structure. | |
296 | // if(!(gMC->TrackCharge())) return; | |
297 | // // | |
298 | // // Only entering charged tracks | |
299 | // if((id = gMC->CurrentVolID(copy)) == fIdSens[0]) { | |
300 | // vol[0] = 1; | |
301 | // id = gMC->CurrentVolOffID(2,copy); | |
302 | // //detector copy in the ladder = 1<->4 (ITS1 < I101 < I103 < I10A) | |
303 | // vol[1] = copy; | |
304 | // gMC->CurrentVolOffID(3,copy1); | |
305 | // //ladder copy in the module = 1<->2 (I10A < I12A) | |
306 | // gMC->CurrentVolOffID(4,copy2); | |
307 | // //module copy in the layer = 1<->10 (I12A < IT12) | |
308 | // vol[2] = copy1+(copy2-1)*2;//# of ladders in one module = 2 | |
309 | // } else if(id == fIdSens[1]){ | |
310 | // vol[0] = 2; | |
311 | // id = gMC->CurrentVolOffID(2,copy); | |
312 | // //detector copy in the ladder = 1<->4 (ITS2 < I1D1 < I1D3 < I20A) | |
313 | // vol[1] = copy; | |
314 | // gMC->CurrentVolOffID(3,copy1); | |
315 | // //ladder copy in the module = 1<->4 (I20A < I12A) | |
316 | // gMC->CurrentVolOffID(4,copy2); | |
317 | // //module copy in the layer = 1<->10 (I12A < IT12) | |
318 | // vol[2] = copy1+(copy2-1)*4;//# of ladders in one module = 4 | |
319 | // } else if(id == fIdSens[2]){ | |
320 | // vol[0] = 3; | |
321 | // id = gMC->CurrentVolOffID(1,copy); | |
322 | // //detector copy in the ladder = 1<->6 (ITS3 < I302 < I004) | |
323 | // vol[1] = copy; | |
324 | // id = gMC->CurrentVolOffID(2,copy); | |
325 | // //ladder copy in the layer = 1<->14 (I004 < IT34) | |
326 | // vol[2] = copy; | |
327 | // } else if(id == fIdSens[3]){ | |
328 | // vol[0] = 4; | |
329 | // id = gMC->CurrentVolOffID(1,copy); | |
330 | // //detector copy in the ladder = 1<->8 (ITS4 < I402 < I005) | |
331 | // vol[1] = copy; | |
332 | // id = gMC->CurrentVolOffID(2,copy); | |
333 | // //ladder copy in the layer = 1<->22 (I005 < IT34)) | |
334 | // vol[2] = copy; | |
335 | // }else if(id == fIdSens[4]){ | |
336 | // vol[0] = 5; | |
337 | // id = gMC->CurrentVolOffID(1,copy); | |
338 | // //detector copy in the ladder = 1<->22 (ITS5 < I562 < I565) | |
339 | // vol[1] = copy; | |
340 | // id = gMC->CurrentVolOffID(2,copy); | |
341 | // //ladder copy in the layer = 1<->34 (I565 < IT56) | |
342 | // vol[2] = copy; | |
343 | // }else if(id == fIdSens[5]){ | |
344 | // vol[0] = 6; | |
345 | // id = gMC->CurrentVolOffID(1,copy); | |
346 | // //detector copy in the ladder = 1<->25 (ITS6 < I566 < I569) | |
347 | // vol[1] = copy; | |
348 | // id = gMC->CurrentVolOffID(2,copy); | |
349 | // //ladder copy in the layer = 1<->38 (I569 < IT56) | |
350 | // vol[2] = copy; | |
351 | // } else { | |
352 | // return; // not an ITS volume? | |
353 | // } // end if/else if (gMC->CurentVolID(copy) == fIdSens[i]) | |
354 | // // | |
355 | // gMC->TrackPosition(position); | |
356 | // gMC->TrackMomentum(momentum); | |
357 | // vol[4] = stat0; | |
358 | // if(gMC->IsTrackEntering()){ | |
359 | // position0 = position; | |
360 | // stat0 = vol[3]; | |
361 | // return; | |
362 | // } // end if IsEntering | |
363 | // // Fill hit structure with this new hit. | |
364 | ||
365 | // new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->GetMCApp()->GetCurrentTrackNumber(),vol, | |
366 | // gMC->Edep(),gMC->TrackTime(),position, | |
367 | // position0,momentum); | |
368 | ||
369 | // position0 = position; | |
370 | // stat0 = vol[3]; | |
371 | ||
372 | // return; | |
373 | // } | |
374 | ||
375 | ||
dfefbaec | 376 | //______________________________________________________________________ |
377 | void AliITSv11::StepManager(){ | |
b7943f00 | 378 | // |
379 | // Called for every step in the ITS, then calles the AliITShit class | |
380 | // creator with the information to be recoreded about that hit. | |
381 | // | |
531d6cdc | 382 | Int_t copy, id; |
383 | TLorentzVector position, momentum; | |
384 | static TLorentzVector position0; | |
385 | static Int_t stat0=0; | |
386 | ||
387 | if(!(this->IsActive())){ | |
388 | return; | |
389 | } // end if !Active volume. | |
390 | ||
391 | if(!(gMC->TrackCharge())) return; | |
392 | ||
393 | id=gMC->CurrentVolID(copy); | |
394 | ||
395 | Bool_t sensvol = kFALSE; | |
396 | for(Int_t kk=0;kk<6;kk++)if(id == fIdSens[kk])sensvol=kTRUE; | |
397 | if(sensvol && (gMC->IsTrackExiting())){ | |
e6add757 | 398 | AddTrackReference(gAlice->GetMCApp()->GetCurrentTrackNumber(), AliTrackReference::kITS); |
531d6cdc | 399 | } // if Outer ITS mother Volume |
400 | ||
401 | ||
402 | Int_t copy1,copy2; | |
403 | Int_t vol[5]; | |
404 | TClonesArray &lhits = *fHits; | |
405 | // | |
406 | // Track status | |
407 | vol[3] = 0; | |
408 | vol[4] = 0; | |
409 | if(gMC->IsTrackInside()) vol[3] += 1; | |
410 | if(gMC->IsTrackEntering()) vol[3] += 2; | |
411 | if(gMC->IsTrackExiting()) vol[3] += 4; | |
412 | if(gMC->IsTrackOut()) vol[3] += 8; | |
413 | if(gMC->IsTrackDisappeared()) vol[3] += 16; | |
414 | if(gMC->IsTrackStop()) vol[3] += 32; | |
415 | if(gMC->IsTrackAlive()) vol[3] += 64; | |
416 | // | |
417 | // Fill hit structure. | |
418 | if(!(gMC->TrackCharge())) return; | |
108bd0fe | 419 | |
531d6cdc | 420 | // Only entering charged tracks |
421 | if((id = gMC->CurrentVolID(copy)) == fIdSens[0]) { | |
422 | vol[0] = 1; | |
423 | id = gMC->CurrentVolOffID(2,copy); | |
424 | //detector copy in the ladder = 1<->4 (ITS1 < I101 < I103 < I10A) | |
425 | vol[1] = copy; | |
426 | gMC->CurrentVolOffID(3,copy1); | |
427 | //ladder copy in the module = 1<->2 (I10A < I12A) | |
428 | gMC->CurrentVolOffID(4,copy2); | |
429 | //module copy in the layer = 1<->10 (I12A < IT12) | |
430 | vol[2] = copy1+(copy2-1)*2;//# of ladders in one module = 2 | |
108bd0fe | 431 | |
531d6cdc | 432 | } else if(id == fIdSens[1]){ |
433 | vol[0] = 2; | |
434 | id = gMC->CurrentVolOffID(2,copy); | |
435 | //detector copy in the ladder = 1<->4 (ITS2 < I1D1 < I1D3 < I20A) | |
436 | vol[1] = copy; | |
437 | gMC->CurrentVolOffID(3,copy1); | |
438 | //ladder copy in the module = 1<->4 (I20A < I12A) | |
439 | gMC->CurrentVolOffID(4,copy2); | |
440 | //module copy in the layer = 1<->10 (I12A < IT12) | |
441 | vol[2] = copy1+(copy2-1)*4;//# of ladders in one module = 4 | |
108bd0fe | 442 | |
531d6cdc | 443 | } else if(id == fIdSens[2]){ |
444 | vol[0] = 3; | |
445 | id = gMC->CurrentVolOffID(1,copy); | |
446 | //detector copy in the ladder = 1<->6 (ITS3 < I302 < I004) | |
447 | vol[1] = copy; | |
448 | id = gMC->CurrentVolOffID(2,copy); | |
449 | //ladder copy in the layer = 1<->14 (I004 < IT34) | |
450 | vol[2] = copy; | |
108bd0fe | 451 | |
531d6cdc | 452 | } else if(id == fIdSens[3]){ |
453 | vol[0] = 4; | |
454 | id = gMC->CurrentVolOffID(1,copy); | |
455 | //detector copy in the ladder = 1<->8 (ITS4 < I402 < I005) | |
456 | vol[1] = copy; | |
457 | id = gMC->CurrentVolOffID(2,copy); | |
458 | //ladder copy in the layer = 1<->22 (I005 < IT34)) | |
459 | vol[2] = copy; | |
108bd0fe | 460 | |
531d6cdc | 461 | }else if(id == fIdSens[4]){ |
462 | vol[0] = 5; | |
463 | id = gMC->CurrentVolOffID(1,copy); | |
464 | //detector copy in the ladder = 1<->22 (ITS5 < I562 < I565) | |
465 | vol[1] = copy; | |
466 | id = gMC->CurrentVolOffID(2,copy); | |
467 | //ladder copy in the layer = 1<->34 (I565 < IT56) | |
468 | vol[2] = copy; | |
108bd0fe | 469 | |
531d6cdc | 470 | }else if(id == fIdSens[5]){ |
471 | vol[0] = 6; | |
472 | id = gMC->CurrentVolOffID(1,copy); | |
473 | //detector copy in the ladder = 1<->25 (ITS6 < I566 < I569) | |
474 | vol[1] = copy; | |
475 | id = gMC->CurrentVolOffID(2,copy); | |
476 | //ladder copy in the layer = 1<->38 (I569 < IT56) | |
477 | vol[2] = copy; | |
478 | } else { | |
479 | return; // not an ITS volume? | |
480 | } // end if/else if (gMC->CurentVolID(copy) == fIdSens[i]) | |
481 | // | |
482 | gMC->TrackPosition(position); | |
483 | gMC->TrackMomentum(momentum); | |
484 | vol[4] = stat0; | |
485 | if(gMC->IsTrackEntering()){ | |
486 | position0 = position; | |
487 | stat0 = vol[3]; | |
488 | return; | |
489 | } // end if IsEntering | |
490 | // Fill hit structure with this new hit. | |
b7943f00 | 491 | |
531d6cdc | 492 | new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->GetMCApp()->GetCurrentTrackNumber(),vol, |
493 | gMC->Edep(),gMC->TrackTime(),position, | |
494 | position0,momentum); | |
b7943f00 | 495 | |
b7943f00 | 496 | position0 = position; |
497 | stat0 = vol[3]; | |
531d6cdc | 498 | |
b7943f00 | 499 | return; |
531d6cdc | 500 | } |
108bd0fe | 501 |