Updated for coding convenstions compilation errors and warnings and the like.
[u/mrichter/AliRoot.git] / ITS / AliITSv1.cxx
CommitLineData
4c039060 1/**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
15
16/*
17$Log$
481937a6 18Revision 1.14.2.6 2000/06/12 19:14:32 barbera
19Remove partical transision to new Config.C calling convension. Bug Found.
20
21Revision 1.14.2.5 2000/06/12 18:15:13 barbera
22fixed posible compilation errors on HP unix. Modifided default constructor
23for use with new calling requirements. Removed creation of hits from this
24cource geometry.
25
26Revision 1.14.2.4 2000/06/11 20:37:26 barbera
27coding convenstion update.
28
b6668dd3 29Revision 1.14.2.2 2000/05/19 10:09:21 nilsen
30fix for bug with HP and Sun unix + fix for event display in ITS-working branch
c9a71be1 31
56d6a1ef 32Revision 1.14.2.1 2000/03/04 23:45:19 nilsen
33Fixed up the comments/documentation.
34
35Revision 1.14 1999/11/25 06:52:56 fca
36Correct value of drca
37
c4a5a168 38Revision 1.13.2.1 1999/11/25 06:52:21 fca
39Correct value of drca
40
41Revision 1.13 1999/10/27 11:16:26 fca
42Correction of problem in geometry
43
7963222e 44Revision 1.12 1999/10/22 08:25:25 fca
45remove double definition of destructors
46
1e3deba7 47Revision 1.11 1999/10/22 08:16:49 fca
48Correct destructors, thanks to I.Hrivnacova
49
5b8cc8df 50Revision 1.10 1999/10/06 19:56:50 fca
51Add destructor
52
1c1b73f8 53Revision 1.9 1999/10/05 08:05:09 fca
54Minor corrections for uninitialised variables.
55
593d2ea1 56Revision 1.8 1999/09/29 09:24:20 fca
57Introduction of the Copyright and cvs Log
58
4c039060 59*/
60
fe4da5cc 61///////////////////////////////////////////////////////////////////////////////
62// //
63// Inner Traking System version 1 //
58005f18 64// This class contains the base procedures for the Inner Tracking System //
fe4da5cc 65// //
58005f18 66// Authors: R. Barbera, A. Morsch.
67// version 1.
68// Created 1998.
69//
70// NOTE: THIS IS THE COARSE pre.TDR geometry of the ITS. THIS WILL NOT WORK
71// with the geometry or module classes or any analysis classes. You are
72// strongly encouraged to uses AliITSv5.
fe4da5cc 73// //
74///////////////////////////////////////////////////////////////////////////////
75
76#include <TMath.h>
77#include <TRandom.h>
78#include <TVector.h>
c9a71be1 79#include <TGeometry.h>
80#include <TNode.h>
81#include <TTUBE.h>
b6668dd3 82#include <TFile.h> // only required for Tracking function?
83#include <TCanvas.h>
84#include <TObjArray.h>
85#include <TClonesArray.h>
86
c9a71be1 87
88#include "AliMC.h"
89#include "AliConst.h"
90
58005f18 91#include "AliITShit.h"
fe4da5cc 92#include "AliITSv1.h"
93#include "AliRun.h"
94
fe4da5cc 95
96ClassImp(AliITSv1)
97
98//_____________________________________________________________________________
481937a6 99 AliITSv1::AliITSv1()/*:AliITS("ITS","TDR cource version")*/ {
56d6a1ef 100////////////////////////////////////////////////////////////////////////
101// Standard default constructor for the ITS version 1.
102////////////////////////////////////////////////////////////////////////
593d2ea1 103 fId1N = 6;
104 fId1Name = new char*[fId1N];
105 fId1Name[0] = "ITS1";
106 fId1Name[1] = "ITS2";
107 fId1Name[2] = "ITS3";
108 fId1Name[3] = "ITS4";
109 fId1Name[4] = "ITS5";
110 fId1Name[5] = "ITS6";
481937a6 111 printf("Created ITS TDR Cource version\n");
fe4da5cc 112}
fe4da5cc 113//_____________________________________________________________________________
56d6a1ef 114AliITSv1::AliITSv1(const char *name, const char *title) : AliITS(name, title){
115////////////////////////////////////////////////////////////////////////
116// Standard constructor for the ITS version 1.
117////////////////////////////////////////////////////////////////////////
593d2ea1 118 fId1N = 6;
119 fId1Name = new char*[fId1N];
120 fId1Name[0] = "ITS1";
121 fId1Name[1] = "ITS2";
122 fId1Name[2] = "ITS3";
123 fId1Name[3] = "ITS4";
124 fId1Name[4] = "ITS5";
125 fId1Name[5] = "ITS6";
481937a6 126 printf("Created ITS TDR Cource version\n");
fe4da5cc 127}
b6668dd3 128//____________________________________________________________________________
129AliITSv1::AliITSv1(const AliITSv1 &source){
130////////////////////////////////////////////////////////////////////////
131// Copy Constructor for ITS version 1.
132////////////////////////////////////////////////////////////////////////
133 if(&source == this) return;
134 this->fId1N = source.fId1N;
135 this->fId1Name = new char*[fId1N];
481937a6 136 Int_t i;
137 for(i=0;i<6;i++) strcpy(this->fId1Name[i],source.fId1Name[i]);
138 return;
b6668dd3 139}
140//_____________________________________________________________________________
141AliITSv1& AliITSv1::operator=(const AliITSv1 &source){
142////////////////////////////////////////////////////////////////////////
143// Assignment operator for the ITS version 1.
144////////////////////////////////////////////////////////////////////////
481937a6 145 if(&source == this) return *this;
146 this->fId1N = source.fId1N;
147 this->fId1Name = new char*[fId1N];
148 Int_t i;
149 for(i=0;i<6;i++) strcpy(this->fId1Name[i],source.fId1Name[i]);
150 return *this;
b6668dd3 151}
1c1b73f8 152//_____________________________________________________________________________
153AliITSv1::~AliITSv1() {
56d6a1ef 154////////////////////////////////////////////////////////////////////////
155// Standard destructor for the ITS version 1.
156////////////////////////////////////////////////////////////////////////
1c1b73f8 157 delete [] fId1Name;
b6668dd3 158}//__________________________________________________________________________
c9a71be1 159void AliITSv1::BuildGeometry(){
b6668dd3 160////////////////////////////////////////////////////////////////////////
161// Geometry builder for the ITS version 1.
162////////////////////////////////////////////////////////////////////////
163 TNode *node, *top;
481937a6 164 const Int_t kColorITS=kYellow;
c9a71be1 165 //
b6668dd3 166 top = gAlice->GetGeometry()->GetNode("alice");
c9a71be1 167
168 new TTUBE("S_layer1","Layer1 of ITS","void",3.9,3.9+0.05475,12.25);
b6668dd3 169 top->cd();
170 node = new TNode("Layer1","Layer1","S_layer1",0,0,0,"");
171 node->SetLineColor(kColorITS);
172 fNodes->Add(node);
c9a71be1 173
174 new TTUBE("S_layer2","Layer2 of ITS","void",7.6,7.6+0.05475,16.3);
b6668dd3 175 top->cd();
176 node = new TNode("Layer2","Layer2","S_layer2",0,0,0,"");
177 node->SetLineColor(kColorITS);
178 fNodes->Add(node);
c9a71be1 179
180 new TTUBE("S_layer3","Layer3 of ITS","void",14,14+0.05288,21.1);
b6668dd3 181 top->cd();
182 node = new TNode("Layer3","Layer3","S_layer3",0,0,0,"");
183 node->SetLineColor(kColorITS);
184 fNodes->Add(node);
c9a71be1 185
186 new TTUBE("S_layer4","Layer4 of ITS","void",24,24+0.05288,29.6);
b6668dd3 187 top->cd();
188 node = new TNode("Layer4","Layer4","S_layer4",0,0,0,"");
189 node->SetLineColor(kColorITS);
190 fNodes->Add(node);
c9a71be1 191
192 new TTUBE("S_layer5","Layer5 of ITS","void",40,40+0.05382,45.1);
b6668dd3 193 top->cd();
194 node = new TNode("Layer5","Layer5","S_layer5",0,0,0,"");
195 node->SetLineColor(kColorITS);
196 fNodes->Add(node);
c9a71be1 197
198 new TTUBE("S_layer6","Layer6 of ITS","void",45,45+0.05382,50.4);
b6668dd3 199 top->cd();
200 node = new TNode("Layer6","Layer6","S_layer6",0,0,0,"");
201 node->SetLineColor(kColorITS);
202 fNodes->Add(node);
c9a71be1 203}
fe4da5cc 204//_____________________________________________________________________________
56d6a1ef 205void AliITSv1::CreateGeometry(){
206////////////////////////////////////////////////////////////////////////
207// This routine defines and Creates the geometry for version 1 of the ITS.
208////////////////////////////////////////////////////////////////////////
fe4da5cc 209
210 Float_t drcer[6] = { 0.,0.,.08,.08,0.,0. }; //CERAMICS THICKNESS
211 Float_t drepx[6] = { 0.,0.,0.,0.,.5357,.5357 }; //EPOXY THICKNESS
212 Float_t drpla[6] = { 0.,0.,0.,0.,.1786,.1786 }; //PLASTIC THICKNESS
213 Float_t dzb[6] = { 0.,0.,15.,15.,4.,4. }; //LENGTH OF BOXES
214 Float_t dphi[6] = { 72.,72.,72.,72.,50.6,45. }; //COVERED PHI-RANGE FOR LAYERS 1-6
215 Float_t rl[6] = { 3.9,7.6,14.,24.,40.,45. }; //SILICON LAYERS INNER RADIUS
216 Float_t drl[6] = { .755,.755,.809,.809,.7,.7 }; //THICKNESS OF LAYERS (in % radiation length)
217 Float_t dzl[6] = { 12.67,16.91,20.85,29.15,45.11,50.975 };//HALF LENGTH OF LAYERS
218 Float_t drpcb[6] = { 0.,0.,.06,.06,0.,0. }; //PCB THICKNESS
219 Float_t drcu[6] = { 0.,0.,.0504,.0504,.0357,.0357 }; //COPPER THICKNESS
220 Float_t drsi[6] = { 0.,0.,.006,.006,.3571,.3571 }; //SILICON THICKNESS
221
c4a5a168 222 Float_t drca, dzfc;
fe4da5cc 223 Int_t i, nsec;
b6668dd3 224 Float_t rend, drcatpc, dzco, zend, dits[3], rlim, drsu, zmax;
fe4da5cc 225 Float_t zpos, dzco1, dzco2;
226 Float_t drcac[6], acone, dphii;
227 Float_t pcits[15], xltpc;
228 Float_t rzcone, rstep, r0, z0, acable, fp, dz, zi, ri;
229 Int_t idrotm[399];
230 Float_t dgh[15];
231
ad51aeb0 232 Int_t *idtmed = fIdtmed->GetArray()-199;
fe4da5cc 233
234 // CONVERT INTO CM (RL(SI)=9.36 CM)
481937a6 235 for(i = 0; i < 6; ++i) {
fe4da5cc 236 drl[i] = drl[i] / 100. * 9.36;
237 }
238
239 // SUPPORT ENDPLANE THICKNESS
240 drsu = 2.*0.06+1./20; // 1./20. is 1 cm of honeycomb (1/20 carbon density);
241
242 // CONE BELOW TPC
243
b6668dd3 244 drcatpc = 1.2/4.;
fe4da5cc 245
246 // CABLE THICKNESS (CONICAL CABLES CONNECTING THE LAYERS)
247
c4a5a168 248 drca = 0.2;
fe4da5cc 249
250 // ITS CONE ANGLE
251
252 acone = 45.;
253 acone *= kDegrad;
254
255 // CONE RADIUS AT 1ST LAYER
256
257 rzcone = 30.;
258
259 // FIELD CAGE HALF LENGTH
260
261 dzfc = 64.5;
262 rlim = 48.;
263 zmax = 80.;
264 xltpc = 275.;
265
266
267 // PARAMETERS FOR SMALL (1/2) ITS
268
481937a6 269 for(i = 0; i < 6; ++i) {
fe4da5cc 270 dzl[i] /= 2.;
271 dzb[i] /= 2.;
272 }
273 drca /= 2.;
274 acone /= 2.;
b6668dd3 275 drcatpc /= 2.;
fe4da5cc 276 rzcone /= 2.;
277 dzfc /= 2.;
278 zmax /= 2.;
279 xltpc /= 2.;
280 acable = 15.;
281
282
283
284 // EQUAL DISTRIBUTION INTO THE 6 LAYERS
b6668dd3 285 rstep = drcatpc / 6.;
481937a6 286 for(i = 0; i < 6; ++i) {
fe4da5cc 287 drcac[i] = (i+1) * rstep;
288 }
289
290 // NUMBER OF PHI SECTORS
291
292 nsec = 5;
293
294 // PACK IN PHI AS MUCH AS POSSIBLE
295 // NOW PACK USING THICKNESS
296
481937a6 297 for(i = 0; i < 6; ++i) {
fe4da5cc 298
299// PACKING FACTOR
300 fp = rl[5] / rl[i];
301
302 // PHI-PACKING NOT SUFFICIENT ?
303
304 if (dphi[i]/45 < fp) {
305 drcac[i] = drcac[i] * fp * 45/dphi[i];
306 }
307 }
308
309
310 // --- Define ghost volume containing the six layers and fill it with air
311
312 dgh[0] = 3.5;
313 dgh[1] = 50.;
314 dgh[2] = zmax;
cfce8870 315 gMC->Gsvolu("ITSV", "TUBE", idtmed[275], dgh, 3);
fe4da5cc 316
317 // --- Place the ghost volume in its mother volume (ALIC) and make it
318 // invisible
319
cfce8870 320 gMC->Gspos("ITSV", 1, "ALIC", 0., 0., 0., 0, "ONLY");
321 gMC->Gsatt("ITSV", "SEEN", 0);
fe4da5cc 322
323 // ITS LAYERS (SILICON)
324
325 dits[0] = rl[0];
326 dits[1] = rl[0] + drl[0];
327 dits[2] = dzl[0];
cfce8870 328 gMC->Gsvolu("ITS1", "TUBE", idtmed[199], dits, 3);
329 gMC->Gspos("ITS1", 1, "ITSV", 0., 0., 0., 0, "ONLY");
fe4da5cc 330
331 dits[0] = rl[1];
332 dits[1] = rl[1] + drl[1];
333 dits[2] = dzl[1];
cfce8870 334 gMC->Gsvolu("ITS2", "TUBE", idtmed[199], dits, 3);
335 gMC->Gspos("ITS2", 1, "ITSV", 0., 0., 0., 0, "ONLY");
fe4da5cc 336
337 dits[0] = rl[2];
338 dits[1] = rl[2] + drl[2];
339 dits[2] = dzl[2];
cfce8870 340 gMC->Gsvolu("ITS3", "TUBE", idtmed[224], dits, 3);
341 gMC->Gspos("ITS3", 1, "ITSV", 0., 0., 0., 0, "ONLY");
fe4da5cc 342
343 dits[0] = rl[3];
344 dits[1] = rl[3] + drl[3];
345 dits[2] = dzl[3];
cfce8870 346 gMC->Gsvolu("ITS4", "TUBE", idtmed[224], dits, 3);
347 gMC->Gspos("ITS4", 1, "ITSV", 0., 0., 0., 0, "ONLY");
fe4da5cc 348
349 dits[0] = rl[4];
350 dits[1] = rl[4] + drl[4];
351 dits[2] = dzl[4];
cfce8870 352 gMC->Gsvolu("ITS5", "TUBE", idtmed[249], dits, 3);
353 gMC->Gspos("ITS5", 1, "ITSV", 0., 0., 0., 0, "ONLY");
fe4da5cc 354
355 dits[0] = rl[5];
356 dits[1] = rl[5] + drl[5];
357 dits[2] = dzl[5];
cfce8870 358 gMC->Gsvolu("ITS6", "TUBE", idtmed[249], dits, 3);
359 gMC->Gspos("ITS6", 1, "ITSV", 0., 0., 0., 0, "ONLY");
fe4da5cc 360
361 // ELECTRONICS BOXES
362
363 // PCB (layer #3 and #4)
364
cfce8870 365 gMC->Gsvolu("IPCB", "TUBE", idtmed[233], dits, 0);
481937a6 366 for(i = 2; i < 4; ++i) {
fe4da5cc 367 dits[0] = rl[i];
368 dits[1] = dits[0] + drpcb[i];
369 dits[2] = dzb[i] / 2.;
370 zpos = dzl[i] + dits[2];
cfce8870 371 gMC->Gsposp("IPCB", i-1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3);
372 gMC->Gsposp("IPCB", i+1, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3);
fe4da5cc 373 }
374
375 // COPPER (layer #3 and #4)
376
cfce8870 377 gMC->Gsvolu("ICO2", "TUBE", idtmed[234], dits, 0);
481937a6 378 for(i = 2; i < 4; ++i) {
fe4da5cc 379 dits[0] = rl[i] + drpcb[i];
380 dits[1] = dits[0] + drcu[i];
381 dits[2] = dzb[i] / 2.;
382 zpos = dzl[i] + dits[2];
cfce8870 383 gMC->Gsposp("ICO2", i-1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3);
384 gMC->Gsposp("ICO2", i+1, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3);
fe4da5cc 385 }
386
387 // CERAMICS (layer #3 and #4)
388
cfce8870 389 gMC->Gsvolu("ICER", "TUBE", idtmed[235], dits, 0);
481937a6 390 for(i = 2; i < 4; ++i) {
fe4da5cc 391 dits[0] = rl[i] + drpcb[i] + drcu[i];
392 dits[1] = dits[0] + drcer[i];
393 dits[2] = dzb[i] / 2.;
394 zpos = dzl[i] + dits[2];
cfce8870 395 gMC->Gsposp("ICER", i-1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3);
396 gMC->Gsposp("ICER", i+1, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3);
fe4da5cc 397 }
398
399 // SILICON (layer #3 and #4)
400
cfce8870 401 gMC->Gsvolu("ISI2", "TUBE", idtmed[226], dits, 0);
481937a6 402 for(i = 2; i < 4; ++i) {
fe4da5cc 403 dits[0] = rl[i] + drpcb[i] + drcu[i] + drcer[i];
404 dits[1] = dits[0] + drsi[i];
405 dits[2] = dzb[i] / 2.;
406 zpos = dzl[i] + dits[2];
cfce8870 407 gMC->Gsposp("ISI2", i-1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3);
408 gMC->Gsposp("ISI2", i+1, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3);
fe4da5cc 409 }
410
411 // PLASTIC (G10FR4) (layer #5 and #6)
412
cfce8870 413 gMC->Gsvolu("IPLA", "TUBE", idtmed[262], dits, 0);
481937a6 414 for(i = 4; i < 6; ++i) {
fe4da5cc 415 dits[0] = rl[i];
416 dits[1] = dits[0] + drpla[i];
417 dits[2] = dzb[i] / 2.;
418 zpos = dzl[i] + dits[2];
cfce8870 419 gMC->Gsposp("IPLA", i-1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3);
420 gMC->Gsposp("IPLA", i+1, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3);
fe4da5cc 421 }
422
423 // COPPER (layer #5 and #6)
424
cfce8870 425 gMC->Gsvolu("ICO3", "TUBE", idtmed[259], dits, 0);
481937a6 426 for(i = 4; i < 6; ++i) {
fe4da5cc 427 dits[0] = rl[i] + drpla[i];
428 dits[1] = dits[0] + drcu[i];
429 dits[2] = dzb[i] / 2.;
430 zpos = dzl[i] + dits[2];
cfce8870 431 gMC->Gsposp("ICO3", i-1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3);
432 gMC->Gsposp("ICO3", i+1, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3);
fe4da5cc 433 }
434
435 // EPOXY (layer #5 and #6)
436
cfce8870 437 gMC->Gsvolu("IEPX", "TUBE", idtmed[262], dits, 0);
481937a6 438 for(i = 4; i < 6; ++i) {
fe4da5cc 439 dits[0] = rl[i] + drpla[i] + drcu[i];
440 dits[1] = dits[0] + drepx[i];
441 dits[2] = dzb[i] / 2.;
442 zpos = dzl[i] + dits[2];
cfce8870 443 gMC->Gsposp("IEPX", i-1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3);
444 gMC->Gsposp("IEPX", i+1, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3);
fe4da5cc 445 }
446
447 // SILICON (layer #5 and #6)
448
cfce8870 449 gMC->Gsvolu("ISI3", "TUBE", idtmed[251], dits, 0);
481937a6 450 for(i = 4; i < 6; ++i) {
fe4da5cc 451 dits[0] = rl[i] + drpla[i] + drcu[i] + drepx[i];
452 dits[1] = dits[0] + drsi[i];
453 dits[2] = dzb[i] / 2.;
454 zpos = dzl[i] + dits[2];
cfce8870 455 gMC->Gsposp("ISI3", i-1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3);
456 gMC->Gsposp("ISI3", i+1, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3);
fe4da5cc 457 }
458
459 // SUPPORT
460
cfce8870 461 gMC->Gsvolu("ISUP", "TUBE", idtmed[274], dits, 0);
481937a6 462 for(i = 0; i < 6; ++i) {
fe4da5cc 463 dits[0] = rl[i];
7963222e 464 if (i < 5) dits[1] = rl[i+1];
fe4da5cc 465 else dits[1] = rlim;
466 dits[2] = drsu / 2.;
467 zpos = dzl[i] + dzb[i] + dits[2];
cfce8870 468 gMC->Gsposp("ISUP", i+1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3);
469 gMC->Gsposp("ISUP", i+7, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3);
fe4da5cc 470 }
471
472 // CABLES (HORIZONTAL)
473
cfce8870 474 gMC->Gsvolu("ICHO", "TUBE", idtmed[278], dits, 0);
481937a6 475 for(i = 0; i < 6; ++i) {
fe4da5cc 476 dits[0] = rl[i];
477 dits[1] = dits[0] + drca;
478 dits[2] = (rzcone + TMath::Tan(acone) * (rl[i] - rl[0]) - (dzl[i]+ dzb[i] + drsu)) / 2.;
479 zpos = dzl[i - 1] + dzb[i] + drsu + dits[2];
cfce8870 480 gMC->Gsposp("ICHO", i+1, "ITSV", 0., 0., zpos, 0, "ONLY", dits, 3);
481 gMC->Gsposp("ICHO", i+7, "ITSV", 0., 0.,-zpos, 0, "ONLY", dits, 3);
fe4da5cc 482 }
483 // DEFINE A CONICAL GHOST VOLUME FOR THE PHI SEGMENTATION
484 pcits[0] = 0.;
485 pcits[1] = 360.;
486 pcits[2] = 2.;
487 pcits[3] = rzcone;
488 pcits[4] = 3.5;
489 pcits[5] = rl[0];
490 pcits[6] = pcits[3] + TMath::Tan(acone) * (rlim - rl[0]);
491 pcits[7] = rlim - rl[0] + 3.5;
492 pcits[8] = rlim;
cfce8870 493 gMC->Gsvolu("ICMO", "PCON", idtmed[275], pcits, 9);
fe4da5cc 494 AliMatrix(idrotm[200], 90., 0., 90., 90., 180., 0.);
cfce8870 495 gMC->Gspos("ICMO", 1, "ITSV", 0., 0., 0., 0, "ONLY");
496 gMC->Gspos("ICMO", 2, "ITSV", 0., 0., 0., idrotm[200], "ONLY");
fe4da5cc 497
498 // DIVIDE INTO NSEC PHI-SECTIONS
499
cfce8870 500 gMC->Gsdvn("ICMD", "ICMO", nsec, 2);
501 gMC->Gsatt("ICMO", "SEEN", 0);
502 gMC->Gsatt("ICMD", "SEEN", 0);
fe4da5cc 503
504 // CONICAL CABLES
505
506 pcits[2] = 2.;
cfce8870 507 gMC->Gsvolu("ICCO", "PCON", idtmed[278], pcits, 0);
481937a6 508 for(i = 1; i < 6; ++i) {
fe4da5cc 509 pcits[0] = -dphi[i] / 2.;
510 pcits[1] = dphi[i];
511 if (i < 5) {
512 dzco = TMath::Tan(acone) * (rl[i+1] - rl[i]);
513 } else {
514 dzco1 = zmax - (rzcone + TMath::Tan(acone) * (rl[5] - rl[0])) -2.;
515 dzco2 = (rlim - rl[5]) * TMath::Tan(acone);
516 if (rl[5] + dzco1 / TMath::Tan(acone) < rlim) {
517 dzco = dzco1;
518 } else {
519 dzco = dzco2;
520 }
521 }
522 pcits[3] = rzcone + TMath::Tan(acone) * (rl[i] - rl[0]);
523 pcits[4] = rl[i] - drcac[i] / TMath::Sin(acone);
524 pcits[5] = rl[i];
525 pcits[6] = pcits[3] + dzco;
526 pcits[7] = rl[i] + dzco / TMath::Tan(acone) - drcac[i] / TMath::Sin(acone);
527 pcits[8] = rl[i] + dzco / TMath::Tan(acone);
528
cfce8870 529 gMC->Gsposp("ICCO", i, "ICMD", 0., 0., 0., 0, "ONLY", pcits, 9);
fe4da5cc 530
531 }
532 zend = pcits[6];
533 rend = pcits[8];
534
535 // CONICAL CABLES BELOW TPC
536
537 // DEFINE A CONICAL GHOST VOLUME FOR THE PHI SEGMENTATION
538 pcits[0] = 0.;
539 pcits[1] = 360.;
540 pcits[2] = 2.;
541 pcits[3] = zend;
542 pcits[5] = rend;
b6668dd3 543 pcits[4] = pcits[5] - drcatpc;
fe4da5cc 544 pcits[6] = xltpc;
545 pcits[8] = pcits[4] + (pcits[6] - pcits[3]) * TMath::Tan(acable * kDegrad);
b6668dd3 546 pcits[7] = pcits[8] - drcatpc;
fe4da5cc 547 AliMatrix(idrotm[200], 90., 0., 90., 90., 180., 0.);
cfce8870 548 gMC->Gsvolu("ICCM", "PCON", idtmed[275], pcits, 9);
549 gMC->Gspos("ICCM", 1, "ALIC", 0., 0., 0., 0, "ONLY");
550 gMC->Gspos("ICCM", 2, "ALIC", 0., 0., 0., idrotm[200], "ONLY");
551 gMC->Gsdvn("ITMD", "ICCM", nsec, 2);
552 gMC->Gsatt("ITMD", "SEEN", 0);
553 gMC->Gsatt("ICCM", "SEEN", 0);
fe4da5cc 554
555 // NOW PLACE SEGMENTS WITH DECREASING PHI SEGMENTS INTO THE
556 // GHOST-VOLUME
557
558 pcits[2] = 2.;
cfce8870 559 gMC->Gsvolu("ITTT", "PCON", idtmed[278], pcits, 0);
fe4da5cc 560 r0 = rend;
561 z0 = zend;
562 dz = (xltpc - zend) / 9.;
481937a6 563 for(i = 0; i < 9; ++i) {
fe4da5cc 564 zi = z0 + i*dz + dz / 2.;
565 ri = r0 + (zi - z0) * TMath::Tan(acable * kDegrad);
566 dphii = dphi[5] * r0 / ri;
567 pcits[0] = -dphii / 2.;
568 pcits[1] = dphii;
569 pcits[3] = zi - dz / 2.;
570 pcits[5] = r0 + (pcits[3] - z0) * TMath::Tan(acable * kDegrad);
b6668dd3 571 pcits[4] = pcits[5] - drcatpc;
fe4da5cc 572 pcits[6] = zi + dz / 2.;
573 pcits[8] = r0 + (pcits[6] - z0) * TMath::Tan(acable * kDegrad);
b6668dd3 574 pcits[7] = pcits[8] - drcatpc;
fe4da5cc 575
cfce8870 576 gMC->Gsposp("ITTT", i+1, "ITMD", 0., 0., 0., 0, "ONLY", pcits, 9);
fe4da5cc 577 }
578
579 // --- Outputs the geometry tree in the EUCLID/CAD format
580
581 if (fEuclidOut) {
cfce8870 582 gMC->WriteEuclid("ITSgeometry", "ITSV", 1, 5);
fe4da5cc 583 }
584}
fe4da5cc 585//_____________________________________________________________________________
56d6a1ef 586void AliITSv1::CreateMaterials(){
587////////////////////////////////////////////////////////////////////////
c9a71be1 588 //
589 // Create ITS materials
590 // This function defines the default materials used in the Geant
b6668dd3 591 // Monte Carlo simulations for the geometries AliITSv1 and AliITSv3.
592 // In general it is automatically replaced by
c9a71be1 593 // the CreatMaterials routine defined in AliITSv?. Should the function
594 // CreateMaterials not exist for the geometry version you are using this
595 // one is used. See the definition found in AliITSv5 or the other routine
596 // for a complete definition.
597 //
598 // Water H2O
599 Float_t awat[2] = { 1.00794,15.9994 };
600 Float_t zwat[2] = { 1.,8. };
601 Float_t wwat[2] = { 2.,1. };
602 Float_t denswat = 1.;
603 // Freon
604 Float_t afre[2] = { 12.011,18.9984032 };
605 Float_t zfre[2] = { 6.,9. };
606 Float_t wfre[2] = { 5.,12. };
607 Float_t densfre = 1.5;
608 // Ceramics
609 // 94.4% Al2O3 , 2.8% SiO2 , 2.3% MnO , 0.5% Cr2O3
610 Float_t acer[5] = { 26.981539,15.9994,28.0855,54.93805,51.9961 };
611 Float_t zcer[5] = { 13.,8.,14.,25., 24. };
612 Float_t wcer[5] = { .49976,1.01233,.01307, .01782,.00342 };
613 Float_t denscer = 3.6;
614 //
615 // 60% SiO2 , 40% G10FR4
616 // PC board
617 Float_t apcb[3] = { 28.0855,15.9994,17.749 };
618 Float_t zpcb[3] = { 14.,8.,8.875 };
619 Float_t wpcb[3] = { .28,.32,.4 };
620 Float_t denspcb = 1.8;
621 // POLYETHYL
622 Float_t apoly[2] = { 12.01,1. };
623 Float_t zpoly[2] = { 6.,1. };
624 Float_t wpoly[2] = { .33,.67 };
625 // SERVICES
626 Float_t zserv[4] = { 1.,6.,26.,29. };
627 Float_t aserv[4] = { 1.,12.,55.8,63.5 };
628 Float_t wserv[4] = { .014,.086,.42,.48 };
629
b6668dd3 630 Int_t isxfld = gAlice->Field()->Integ();
631 Float_t sxmgmx = gAlice->Field()->Max();
c9a71be1 632
633
634 // --- Define the various materials for GEANT ---
635
636 // 200-224 --> Silicon Pixel Detectors (detectors, chips, buses, cooling,..)
637
638 AliMaterial(0, "SPD Si$", 28.0855, 14., 2.33, 9.36, 999);
639 AliMaterial(1, "SPD Si chip$", 28.0855, 14., 2.33, 9.36, 999);
640 AliMaterial(2, "SPD Si bus$", 28.0855, 14., 2.33, 9.36, 999);
641 AliMaterial(3, "SPD C$", 12.011, 6., 2.265,18.8, 999);
642 // v. dens
643 AliMaterial(4, "SPD Air$", 14.61, 7.3, .001205, 30423., 999);
644 AliMaterial(5, "SPD Vacuum$", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
645 AliMaterial(6, "SPD Al$", 26.981539, 13., 2.6989, 8.9, 999);
646 AliMixture( 7, "SPD Water $", awat, zwat, denswat, -2, wwat);
647 AliMixture( 8, "SPD Freon$", afre, zfre, densfre, -2, wfre);
648 // **
b6668dd3 649 AliMedium(0, "SPD Si$", 0, 1,isxfld,sxmgmx, 10., .01, .1, .003, .003);
650 AliMedium(1, "SPD Si chip$", 1, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
651 AliMedium(2, "SPD Si bus$", 2, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
652 AliMedium(3, "SPD C$", 3, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
653 AliMedium(4, "SPD Air$", 4, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
654 AliMedium(5, "SPD Vacuum$", 5, 0,isxfld,sxmgmx, 10.,1.00, .1, .100,10.00);
655 AliMedium(6, "SPD Al$", 6, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
656 AliMedium(7, "SPD Water $", 7, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
657 AliMedium(8, "SPD Freon$", 8, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
c9a71be1 658
659 // 225-249 --> Silicon Drift Detectors (detectors, chips, buses, cooling,..)
660
661 AliMaterial(25, "SDD Si$", 28.0855, 14., 2.33, 9.36, 999);
662 AliMaterial(26, "SDD Si chip$", 28.0855, 14., 2.33, 9.36, 999);
663 AliMaterial(27, "SDD Si bus$", 28.0855, 14., 2.33, 9.36, 999);
664 AliMaterial(28, "SDD C$", 12.011, 6., 2.265,18.8, 999);
665 // v. dens
666 AliMaterial(29, "SDD Air$", 14.61, 7.3, .001205, 30423., 999);
667 AliMaterial(30, "SDD Vacuum$", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
668 AliMaterial(31, "SDD Al$", 26.981539, 13., 2.6989, 8.9, 999);
669 // After a call with ratios by number (negative number of elements),
670 // the ratio array is changed to the ratio by weight, so all successive
671 // calls with the same array must specify the number of elements as
672 // positive
673 AliMixture(32, "SDD Water $", awat, zwat, denswat, 2, wwat);
674 // After a call with ratios by number (negative number of elements),
675 // the ratio array is changed to the ratio by weight, so all successive
676 // calls with the same array must specify the number of elements as
677 // positive
678 AliMixture( 33, "SDD Freon$", afre, zfre, densfre, 2, wfre);
679 AliMixture( 34, "SDD PCB$", apcb, zpcb, denspcb, 3, wpcb);
680 AliMaterial(35, "SDD Copper$", 63.546, 29., 8.96, 1.43, 999);
681 AliMixture( 36, "SDD Ceramics$", acer, zcer, denscer, -5, wcer);
682 AliMaterial(37, "SDD Kapton$", 12.011, 6., 1.3, 31.27, 999);
683 // **
684 // check A and Z
b6668dd3 685 AliMedium(25, "SDD Si$", 25, 1,isxfld,sxmgmx, 10., .01, .1, .003, .003);
686 AliMedium(26, "SDD Si chip$", 26, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
687 AliMedium(27, "SDD Si bus$", 27, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
688 AliMedium(28, "SDD C$", 28, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
689 AliMedium(29, "SDD Air$", 29, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
690 AliMedium(30, "SDD Vacuum$", 30, 0,isxfld,sxmgmx, 10.,1.00, .1, .100,10.00);
691 AliMedium(31, "SDD Al$", 31, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
692 AliMedium(32, "SDD Water $", 32, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
693 AliMedium(33, "SDD Freon$", 33, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
694 AliMedium(34, "SDD PCB$", 34, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
695 AliMedium(35, "SDD Copper$", 35, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
696 AliMedium(36, "SDD Ceramics$",36, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
697 AliMedium(37, "SDD Kapton$", 37, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
c9a71be1 698
699 // 250-274 --> Silicon Strip Detectors (detectors, chips, buses, cooling,..)
700
701 AliMaterial(50, "SSD Si$", 28.0855, 14., 2.33, 9.36, 999.);
702 AliMaterial(51, "SSD Si chip$", 28.0855, 14., 2.33, 9.36, 999.);
703 AliMaterial(52, "SSD Si bus$", 28.0855, 14., 2.33, 9.36, 999.);
704 AliMaterial(53, "SSD C$", 12.011, 6., 2.265,18.8, 999.);
705 // v. dens
706 AliMaterial(54, "SSD Air$", 14.61, 7.3, .001205, 30423., 999);
707 AliMaterial(55, "SSD Vacuum$", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
708 AliMaterial(56, "SSD Al$", 26.981539, 13., 2.6989, 8.9, 999);
709 // After a call with ratios by number (negative number of elements),
710 // the ratio array is changed to the ratio by weight, so all successive
711 // calls with the same array must specify the number of elements as
712 // positive
713 AliMixture(57, "SSD Water $", awat, zwat, denswat, 2, wwat);
714 // After a call with ratios by number (negative number of elements),
715 // the ratio array is changed to the ratio by weight, so all successive
716 // calls with the same array must specify the number of elements as
717 // positive
718 AliMixture(58, "SSD Freon$", afre, zfre, densfre, 2, wfre);
719 AliMixture(59, "SSD PCB$", apcb, zpcb, denspcb, 3, wpcb);
720 AliMaterial(60, "SSD Copper$", 63.546, 29., 8.96, 1.43, 999.);
721 // After a call with ratios by number (negative number of elements),
722 // the ratio array is changed to the ratio by weight, so all successive
723 // calls with the same array must specify the number of elements as
724 // positive
725 AliMixture( 61, "SSD Ceramics$", acer, zcer, denscer, 5, wcer);
726 AliMaterial(62, "SSD Kapton$", 12.011, 6., 1.3, 31.27, 999.);
727 // check A and Z
728 AliMaterial(63, "SDD G10FR4$", 17.749, 8.875, 1.8, 21.822, 999.);
729 // **
b6668dd3 730 AliMedium(50, "SSD Si$", 50, 1,isxfld,sxmgmx, 10., .01, .1, .003, .003);
731 AliMedium(51, "SSD Si chip$", 51, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
732 AliMedium(52, "SSD Si bus$", 52, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
733 AliMedium(53, "SSD C$", 53, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
734 AliMedium(54, "SSD Air$", 54, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
735 AliMedium(55, "SSD Vacuum$", 55, 0,isxfld,sxmgmx, 10.,1.00, .1, .100,10.00);
736 AliMedium(56, "SSD Al$", 56, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
737 AliMedium(57, "SSD Water $", 57, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
738 AliMedium(58, "SSD Freon$", 58, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
739 AliMedium(59, "SSD PCB$", 59, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
740 AliMedium(60, "SSD Copper$", 60, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
741 AliMedium(61, "SSD Ceramics$",61, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
742 AliMedium(62, "SSD Kapton$", 62, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
743 AliMedium(63, "SSD G10FR4$", 63, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
c9a71be1 744
745 // 275-299 --> General (end-caps, frames, cooling, cables, etc.)
746
747 AliMaterial(75, "GEN C$", 12.011, 6., 2.265, 18.8, 999.);
748 // verify density
749 AliMaterial(76, "GEN Air$", 14.61, 7.3, .001205, 30423., 999);
750 AliMaterial(77, "GEN Vacuum$", 1e-16, 1e-16, 1e-16, 1e16, 1e16);
751 AliMixture( 78, "GEN POLYETHYL$", apoly, zpoly, .95, -2, wpoly);
752 AliMixture( 79, "GEN SERVICES$", aserv, zserv, 4.68, 4, wserv);
753 AliMaterial(80, "GEN Copper$", 63.546, 29., 8.96, 1.43, 999.);
754 // After a call with ratios by number (negative number of elements),
755 // the ratio array is changed to the ratio by weight, so all successive
756 // calls with the same array must specify the number of elements as
757 // positive
758 AliMixture(81, "GEN Water $", awat, zwat, denswat, 2, wwat);
759 // **
b6668dd3 760 AliMedium(75,"GEN C$", 75, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
761 AliMedium(76,"GEN Air$", 76, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
762 AliMedium(77,"GEN Vacuum$", 77, 0,isxfld,sxmgmx, 10., .10, .1, .100,10.00);
763 AliMedium(78,"GEN POLYETHYL$",78, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
764 AliMedium(79,"GEN SERVICES$", 79, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
765 AliMedium(80,"GEN Copper$", 80, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
766 AliMedium(81,"GEN Water $", 81, 0,isxfld,sxmgmx, 10., .01, .1, .003, .003);
fe4da5cc 767}
fe4da5cc 768//_____________________________________________________________________________
593d2ea1 769void AliITSv1::Init(){
56d6a1ef 770////////////////////////////////////////////////////////////////////////
771// Initialise the ITS after it has been created.
772////////////////////////////////////////////////////////////////////////
593d2ea1 773 Int_t i,j,l;
774
775 fIdN = fId1N;;
776 fIdName = new char*[fIdN];
777 fIdSens = new Int_t[fIdN];
778 for(i=0;i<fId1N;i++) {
779 l = strlen(fId1Name[i]);
780 fIdName[i] = new char[l+1];
781 for(j=0;j<l;j++) fIdName[i][j] = fId1Name[i][j];
782 fIdName[i][l] = '\0'; // Null terminate this string.
783 } // end for i
784 //
785 AliITS::Init();
786 fMajorVersion = 1;
787 fMinorVersion = 0;
fe4da5cc 788}
789
790//_____________________________________________________________________________
56d6a1ef 791void AliITSv1::DrawModule(){
792////////////////////////////////////////////////////////////////////////
793// Draw a shaded view of the FMD version 1.
794////////////////////////////////////////////////////////////////////////
fe4da5cc 795
796 // Set everything unseen
cfce8870 797 gMC->Gsatt("*", "seen", -1);
fe4da5cc 798 //
799 // Set ALIC mother visible
cfce8870 800 gMC->Gsatt("ALIC","SEEN",0);
fe4da5cc 801 //
802 // Set the volumes visible
cfce8870 803 gMC->Gsatt("ITSV","SEEN",0);
804 gMC->Gsatt("ITS1","SEEN",1);
805 gMC->Gsatt("ITS2","SEEN",1);
806 gMC->Gsatt("ITS3","SEEN",1);
807 gMC->Gsatt("ITS4","SEEN",1);
808 gMC->Gsatt("ITS5","SEEN",1);
809 gMC->Gsatt("ITS6","SEEN",1);
fe4da5cc 810
cfce8870 811 gMC->Gsatt("IPCB","SEEN",1);
812 gMC->Gsatt("ICO2","SEEN",1);
813 gMC->Gsatt("ICER","SEEN",0);
814 gMC->Gsatt("ISI2","SEEN",0);
815 gMC->Gsatt("IPLA","SEEN",0);
816 gMC->Gsatt("ICO3","SEEN",0);
817 gMC->Gsatt("IEPX","SEEN",0);
818 gMC->Gsatt("ISI3","SEEN",1);
819 gMC->Gsatt("ISUP","SEEN",0);
820 gMC->Gsatt("ICHO","SEEN",0);
821 gMC->Gsatt("ICMO","SEEN",0);
822 gMC->Gsatt("ICMD","SEEN",0);
823 gMC->Gsatt("ICCO","SEEN",1);
824 gMC->Gsatt("ICCM","SEEN",0);
825 gMC->Gsatt("ITMD","SEEN",0);
826 gMC->Gsatt("ITTT","SEEN",1);
fe4da5cc 827
828 //
cfce8870 829 gMC->Gdopt("hide", "on");
830 gMC->Gdopt("shad", "on");
831 gMC->Gsatt("*", "fill", 7);
832 gMC->SetClipBox(".");
833 gMC->SetClipBox("*", 0, 300, -300, 300, -300, 300);
834 gMC->DefaultRange();
835 gMC->Gdraw("alic", 40, 30, 0, 11, 10, .07, .07);
836 gMC->Gdhead(1111, "Inner Tracking System Version 1");
837 gMC->Gdman(17, 6, "MAN");
fe4da5cc 838}
fe4da5cc 839//_____________________________________________________________________________
56d6a1ef 840void AliITSv1::StepManager(){
841////////////////////////////////////////////////////////////////////////
842// Called for every step in the ITS, then calles the AliITShit class
843// creator with the information to be recoreded about that hit.
844////////////////////////////////////////////////////////////////////////
481937a6 845 /*
846 We no longer generate hits from the cource version.
fe4da5cc 847 Int_t copy, id;
58005f18 848 Float_t hits[8];
849 Int_t vol[4];
0a6d8768 850 TLorentzVector position, momentum;
fe4da5cc 851 TClonesArray &lhits = *fHits;
fe4da5cc 852 //
58005f18 853 // Track status
854 vol[3] = 0;
855 if(gMC->IsTrackInside()) vol[3] += 1;
856 if(gMC->IsTrackEntering()) vol[3] += 2;
857 if(gMC->IsTrackExiting()) vol[3] += 4;
858 if(gMC->IsTrackOut()) vol[3] += 8;
859 if(gMC->IsTrackDisappeared()) vol[3] += 16;
860 if(gMC->IsTrackStop()) vol[3] += 32;
861 if(gMC->IsTrackAlive()) vol[3] += 64;
862 //
863 // Fill hit structure.
56d6a1ef 864 if( !(gMC->TrackCharge()) ) return;
fe4da5cc 865 //
866 // Only entering charged tracks
58005f18 867 if((id=gMC->CurrentVolID(copy))==fIdSens[0]) {
fe4da5cc 868 vol[0]=1;
0a6d8768 869 id=gMC->CurrentVolOffID(1,copy);
fe4da5cc 870 vol[1]=copy;
0a6d8768 871 id=gMC->CurrentVolOffID(2,copy);
fe4da5cc 872 vol[2]=copy;
58005f18 873 } else if(id==fIdSens[1]) {
fe4da5cc 874 vol[0]=2;
0a6d8768 875 id=gMC->CurrentVolOffID(1,copy);
fe4da5cc 876 vol[1]=copy;
0a6d8768 877 id=gMC->CurrentVolOffID(2,copy);
fe4da5cc 878 vol[2]=copy;
58005f18 879 } else if(id==fIdSens[2]) {
fe4da5cc 880 vol[0]=3;
881 vol[1]=copy;
0a6d8768 882 id=gMC->CurrentVolOffID(1,copy);
fe4da5cc 883 vol[2]=copy;
58005f18 884 } else if(id==fIdSens[3]) {
fe4da5cc 885 vol[0]=4;
886 vol[1]=copy;
0a6d8768 887 id=gMC->CurrentVolOffID(1,copy);
fe4da5cc 888 vol[2]=copy;
58005f18 889 } else if(id==fIdSens[4]) {
fe4da5cc 890 vol[0]=5;
891 vol[1]=copy;
0a6d8768 892 id=gMC->CurrentVolOffID(1,copy);
fe4da5cc 893 vol[2]=copy;
58005f18 894 } else if(id==fIdSens[5]) {
fe4da5cc 895 vol[0]=6;
896 vol[1]=copy;
0a6d8768 897 id=gMC->CurrentVolOffID(1,copy);
fe4da5cc 898 vol[2]=copy;
899 } else return;
cfce8870 900 gMC->TrackPosition(position);
901 gMC->TrackMomentum(momentum);
fe4da5cc 902 hits[0]=position[0];
903 hits[1]=position[1];
904 hits[2]=position[2];
0a6d8768 905 hits[3]=momentum[0];
906 hits[4]=momentum[1];
58005f18 907 hits[5]=momentum[2];
cfce8870 908 hits[6]=gMC->Edep();
58005f18 909 hits[7]=gMC->TrackTime();
fe4da5cc 910 new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->CurrentTrack(),vol,hits);
481937a6 911 we no longer generate hit from the cource version.
912 */
913 return;
fe4da5cc 914}
593d2ea1 915//____________________________________________________________________________
56d6a1ef 916void AliITSv1::Streamer(TBuffer &R__b){
917////////////////////////////////////////////////////////////////////////
918// A dummy Streamer function for this class AliITSv1. By default it
919// only streams the AliITS class as it is required. Since this class
920// dosen't contain any "real" data to be saved, it doesn't.
921////////////////////////////////////////////////////////////////////////
593d2ea1 922
b6668dd3 923 printf("AliITSv1Streamer Starting\n");
593d2ea1 924 if (R__b.IsReading()) {
925 Version_t R__v = R__b.ReadVersion(); if (R__v) { }
926 AliITS::Streamer(R__b);
927 // This information does not need to be read. It is "hard wired"
928 // into this class via its creators.
929 //R__b >> fId1N;
930 //R__b.ReadArray(fId1Name);
931 } else {
932 R__b.WriteVersion(AliITSv1::IsA());
933 AliITS::Streamer(R__b);
934 // This information does not need to be saved. It is "hard wired"
935 // into this class via its creators.
936 //R__b << fId1N;
937 //R__b.WriteArray(fId1Name, __COUNTER__);
56d6a1ef 938 } // end if R__b.IsReading()
b6668dd3 939 printf("AliITSv1Streamer Finishing\n");
593d2ea1 940}