1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
16 // Enrico Fragiacomo - 15/03/2004
17 // Geometry for the June 2003 SSD beam test
19 #include <TGeometry.h>
21 #include <TLorentzVector.h>
22 #include <TClonesArray.h>
24 #include <TVirtualMC.h>
25 #include <TGeoMatrix.h>
26 #include <TGeoManager.h>
30 #include "AliTrackReference.h"
31 #include "AliITShit.h"
33 #include "AliITSvSSD03.h"
34 #include "AliITSgeom.h"
35 #include "AliITSgeomSSD.h"
36 #include "AliITSDetTypeSim.h"
37 #include "AliITSCalibrationSSD.h"
38 #include "AliITSsegmentationSSD.h"
39 #include "AliITSsimulationSSD.h"
43 ///////////////////////////////////////////////////////////////////////
48 // geometry of June 2003
50 ///////////////////////////////////////////////////////////////////////
51 ClassImp(AliITSvSSD03)
53 //______________________________________________________________________
54 AliITSvSSD03::AliITSvSSD03():
55 AliITS(), // Base Class
56 fGeomDetOut(kFALSE), // Flag to write .det file out
57 fGeomDetIn(kFALSE), // Flag to read .det file or directly from Geat.
58 fMajorVersion(IsVersion()),// Major version number == IsVersion
59 fMinorVersion(-1), // Minor version number
60 fGeomNumber(2003), // Geometry version number (year)
61 fEuclidGeomDet(), // file where detector transormation are define.
62 fRead(), //! file name to read .det file
63 fWrite(), //! file name to write .det file
64 fIDMother(0), //! ITS Mother Volume id.
65 fIgm(kvSSD03){ //! AliITSInitGeometry object {
66 ////////////////////////////////////////////////////////////////////////
67 // Standard default constructor for the ITS SSD test beam 2003 version 1.
73 // A default created class.
74 ////////////////////////////////////////////////////////////////////////
80 for(i=0;i<60;i++) fRead[i] = '\0';
81 for(i=0;i<60;i++) fWrite[i] = '\0';
82 for(i=0;i<60;i++) fEuclidGeomDet[i] = '\0';
84 //______________________________________________________________________
85 AliITSvSSD03::AliITSvSSD03(const char *title,Int_t gn) :
86 AliITS("ITS",title), // Base Class
87 fGeomDetOut(kFALSE), // Flag to write .det file out
88 fGeomDetIn(kFALSE), // Flag to read .det file or directly from Geat.
89 fMajorVersion(IsVersion()),// Major version number == IsVersion
90 fMinorVersion(2), // Minor version number
91 fGeomNumber(gn), // Geometry version number (year)
92 fEuclidGeomDet(), // file where detector transormation are define.
93 fRead(), //! file name to read .det file
94 fWrite(), //! file name to write .det file
95 fIDMother(0), //! ITS Mother Volume id.
96 fIgm(kvSSD03){ //! AliITSInitGeometry object {
97 ////////////////////////////////////////////////////////////////////////
98 // Standard constructor for the ITS SSD testbeam 2003 version 1.
100 // const char *title title for this ITS geometry.
101 // Int_t gn Geometry version number (year) default 2003.
105 // A standard created class.
106 ////////////////////////////////////////////////////////////////////////
111 fIdName = new TString[fIdN];
113 fIdSens = new Int_t[fIdN];
114 for(i=0;i<fIdN;i++) fIdSens[i] = 0;
116 fEuclidGeometry="$ALICE_ROOT/ITS/ITSgeometry_vSSD03.euc";
117 strncpy(fEuclidGeomDet,"$ALICE_ROOT/ITS/ITSgeometry_vSSD03.det",60);
118 strncpy(fRead,fEuclidGeomDet,60);
119 strncpy(fWrite,fEuclidGeomDet,60);
121 //______________________________________________________________________
122 AliITSvSSD03::~AliITSvSSD03() {
123 ////////////////////////////////////////////////////////////////////////
124 // Standard destructor for the ITS SSD test beam 2003 version 1.
131 ////////////////////////////////////////////////////////////////////////
133 //______________________________________________________________________
134 void AliITSvSSD03::BuildGeometry(){
135 ////////////////////////////////////////////////////////////////////////
136 // Geometry builder for the ITS SSD test beam 2003 version 1.
137 // ALIC ALICE Mother Volume
138 // |- ITSV ITS Mother Volume
139 // |- ITST Detector under Test
147 ////////////////////////////////////////////////////////////////////////
148 // Get the top alice volume.
150 switch (fGeomNumber){
159 //______________________________________________________________________
160 void AliITSvSSD03::BuildGeometry2003(){
161 ////////////////////////////////////////////////////////////////////////
162 // Geometry builder for the ITS SSD test beam 2003 version 1.
163 // ALIC ALICE Mother Volume
164 // |- ITSV ITS Mother Volume
165 // |- ITST Detector under Test
172 ////////////////////////////////////////////////////////////////////////
174 // Get the top alice volume.
175 TNode *aALIC = gAlice->GetGeometry()->GetNode("alice");
178 // Define ITS Mother Volume
180 Float_t ddettest=300.0E-4;
181 //Float_t yposition= 0.0;
182 TRotMatrix *r0 = new TRotMatrix("ITSidrotm0","ITSidrotm0",
183 90.0,0,0.0,0,90.0,270.0);
185 // Mother volume (beam along z)
186 data[0] = 10.0; // in centimeter
189 TBRIK *iITSVshape = new TBRIK("ITSVshape",
190 "ITS Logical Mother Volume","Air",
191 data[0],data[1],data[2]);
192 TNode *iITSV = new TNode("ITSV","ITS Mother Volume",iITSVshape,
194 iITSV->cd(); // set ourselve into ITSV subvolume of aALIC
196 // SSD part of telescope (Note. strips in local xz plan)
197 data[0] = 3.5; // half-length of the SSD module
198 data[1] = 0.5*ddettest; // half-width of the SSD module
199 data[2] = 2.0; // half-heigth of the SSD module
200 TBRIK *iITSTshape = new TBRIK("ITSTshape","SSD sensitive volume","Si",
201 data[0],data[1],data[2]);
202 TNode *iITST = new TNode("ITST","SSD sensitive volume",iITSTshape,
206 iITST->SetLineColor(kYellow);
209 //______________________________________________________________________
210 void AliITSvSSD03::CreateGeometry(){
211 ////////////////////////////////////////////////////////////////////////
212 // Geometry builder for the ITS SSD test beam 2003 version 1.
213 // ALIC ALICE Mother Volume
214 // |- ITSV ITS Mother Volume
215 // |- IDET Detector under Test
222 ////////////////////////////////////////////////////////////////////////
224 switch (fGeomNumber){
226 CreateGeometry2003();
229 CreateGeometry2003();
233 //______________________________________________________________________
234 void AliITSvSSD03::CreateGeometry2003(){
235 ////////////////////////////////////////////////////////////////////////
237 // ALIC ALICE Mother Volume
238 // |- ITSV Beamtest Mother Volume
240 // |- ITSA Aluminum cover for scintillator
241 // | |-ITSS first Trieste trigger plastic scintillator
242 // |- ITSA Aluminum cover for scintillator
243 // | |-ITSS second Trieste's trigger plastic scintillator
245 // |- IGAR Black box around ITST
246 // | |-IAIR Air inside the black box
247 // | |-ITST Detector under Test
249 // |- IFRA Aluminum cover for scintillator
250 // | |-IFRS French plastic scintillator
252 // |- ITSA Aluminum cover for scintillator
253 // | |-ITSS third Trieste's plastic scintillator
255 // ITSA ITSA IGAR IFRA ITSA
256 // Z-> -282 -280 0 16 270
266 ////////////////////////////////////////////////////////////////////////
268 // Define media off-set
269 Int_t *idtmed = fIdtmed->GetArray()+1; // array of media indexes
270 Int_t idrotm[4]; // Array of rotation matrix indexes
271 // These constant character strings are set by cvs during commit
272 // do not change them unless you know what you are doing!
273 const Char_t *cvsDate="$Date$";
274 const Char_t *cvsRevision="$Revision$";
275 //Float_t yposition= 0.0;
278 // Define Rotation-reflextion Matrixes needed
279 // 0 is the unit matrix
282 // Beamtest mother volume (air) positioned in ALIC mother volume
286 gMC->Gsvolu("ITSV","BOX",idtmed[0],data,3);
287 gMC->Gspos("ITSV",1,"ALIC",0.0,0.0,0.0,0,"ONLY");
289 TGeoVolumeAssembly *itsV = gGeoManager->MakeVolumeAssembly("ITSV");
290 const Int_t length=100;
291 Char_t vstrng[length];
292 if(fIgm.WriteVersionString(vstrng,length,(AliITSVersion_t)IsVersion(),
293 fMinorVersion,cvsDate,cvsRevision))
294 itsV->SetTitle(vstrng);
295 else Error("CreateGeometry","Error writing/setting version string");
296 //printf("Title set to %s\n",vstrng);
297 TGeoVolume *alic = gGeoManager->GetVolume("ALIC");
299 Error("CreateGeometry","alic=0");
302 // See idrotm[199] for angle definitions.
303 alic->AddNode(itsV,1,0);
305 // Trieste's plastic scintillators for the trigger (2 at beam enter)
306 // ...define them (aluminum cover + scintillator inside)
308 data[0] = 30.01; // size+2x50 microns Kapton
311 //gMC->Gsvolu("ITSA","BOX ",idtmed[3],data,3);//
312 gMC->Gsvolu("ITSA","BOX ",idtmed[4],data,3);//
316 // plastic scintillator
317 gMC->Gsvolu("ITSS","BOX ",idtmed[2],data,3);
318 gMC->Gspos("ITSS",1,"ITSA",0.0,0.0,0.0,0,"ONLY");
319 // ... and place them inside ITSV
320 AliMatrix(idrotm[0], 90.0,0.0, 0.0,0.0, 90.0,270.0);
321 // first scintillator
322 gMC->Gspos("ITSA",1,"ITSV",0.0,0.0,-282.0,idrotm[0],"ONLY");
323 // second scintillator
324 gMC->Gspos("ITSA",2,"ITSV",0.0,0.0,-280.0,idrotm[0],"ONLY");
326 // black kapton box with the SSD sensor inside (width 50 microns)
330 gMC->Gsvolu("IGAR","BOX ",idtmed[4],data,3); //
331 // air in the black kapton box
335 gMC->Gsvolu("IAIR","BOX ",idtmed[0],data,3); //
337 Float_t ddettest=300.0E-4;
339 data[1] = 0.5*ddettest;
341 gMC->Gsvolu("ITST","BOX ",idtmed[1],data,3);// sensitive detector volume
342 // place ITST inside IAIR (no rotation: it will be rotated with IGAR)
343 gMC->Gspos("ITST",1,"IAIR",0.0,0.0,0.0,0,"ONLY");
344 // place IAIR inside IGAR
345 gMC->Gspos("IAIR",1,"IGAR",0.0,0.0,0.0,0,"ONLY");
346 // place IGAR inside ITSV
347 AliMatrix(idrotm[0], 90.0,0.0, 0.0,0.0, 90.0,270.0);
348 gMC->Gspos("IGAR",1,"ITSV",0.0,0.0,0.0,idrotm[0],"ONLY");
349 //gMC->Gspos("IGAR",1,"ITSV",0.0,0.0,0.0,0,"ONLY");
351 // The so called French detector
352 // ...define it (Kapton cover + scintillator inside)
354 data[0] = 2.01; // size+2x50 microns Kapton width
357 gMC->Gsvolu("IFRA","BOX ",idtmed[4],data,3);//
361 // plastic scintillator
362 gMC->Gsvolu("IFRS","BOX ",idtmed[2],data,3);
363 gMC->Gspos("IFRS",1,"IFRA",0.0,0.0,0.0,0,"ONLY");
364 // ... and place it inside ITSV
365 AliMatrix(idrotm[0], 90.0,0.0, 0.0,0.0, 90.0,270.0);
366 gMC->Gspos("IFRA",1,"ITSV",0.0,0.0,16.0,idrotm[0],"ONLY");
368 // An other Trieste's plastic scintillator for the trigger
369 // ...just place an other copy inside ITSV
370 AliMatrix(idrotm[0], 90.0,0.0, 0.0,0.0, 90.0,270.0);
371 gMC->Gspos("ITSA",3,"ITSV",0.0,0.0,270.0,idrotm[0],"ONLY");
375 //______________________________________________________________________
376 void AliITSvSSD03::CreateMaterials(){
377 ////////////////////////////////////////////////////////////////////////
379 // Create ITS SSD test beam materials
380 // This function defines the default materials used in the Geant
381 // Monte Carlo simulations for the geometries AliITSv1, AliITSv3,
383 // In general it is automatically replaced by
384 // the CreateMaterials routine defined in AliITSv?. Should the function
385 // CreateMaterials not exist for the geometry version you are using this
386 // one is used. See the definition found in AliITSv5 or the other routine
387 // for a complete definition.
395 /////////////////////////////////////////////////////////////////////////
397 switch (fGeomNumber){
399 CreateMaterials2003();
402 CreateMaterials2003();
406 //______________________________________________________________________
407 void AliITSvSSD03::CreateMaterials2003(){
408 ////////////////////////////////////////////////////////////////////////
410 // Create ITS SSD test beam materials
411 // This function defines the default materials used in the Geant
412 // Monte Carlo simulations for the geometries AliITSv1, AliITSv3,
414 // In general it is automatically replaced by
415 // the CreateMaterials routine defined in AliITSv?. Should the function
416 // CreateMaterials not exist for the geometry version you are using this
417 // one is used. See the definition found in AliITSv5 or the other routine
418 // for a complete definition.
426 /////////////////////////////////////////////////////////////////////////
428 Int_t ifield = gAlice->Field()->Integ();
429 Float_t fieldm = gAlice->Field()->Max();
432 Float_t ascin[2]={1.01,12.01};
433 Float_t zscin[2]={1,6};
434 Float_t wscin[2]={1,1};
435 Float_t denscin=1.03;
436 AliMixture( 3, "Scintillator$",ascin,zscin,denscin,-2,wscin);
437 AliMedium(3, "Scintillator$", 3, 1, ifield, fieldm, 0.1, .01,
441 Float_t tmaxfdAl = 0.1; // Degree
442 Float_t stemaxAl = 0.01; // cm
443 Float_t deemaxAl = 0.1; // Fraction of particle's energy 0<deemax<=1
444 Float_t epsilAl = 1.0E-4;//
445 Float_t stminAl = 0.0; // cm "Default value used"
446 AliMaterial(4, "Al$", 26.98, 13., 2.7, 8.9, 37.2);
447 AliMedium(4, "Al$", 4, 0, ifield, fieldm, tmaxfdAl, stemaxAl,
448 deemaxAl, epsilAl, stminAl);
451 Float_t tmaxfdAir = 0.1; // Degree
452 Float_t stemaxAir = .10000E+01; // cm
453 Float_t deemaxAir = 0.1; // Fraction of particle's energy 0<deemax<=1
454 Float_t epsilAir = 1.0E-4;//
455 Float_t stminAir = 0.0; // cm "Default value used"
456 AliMaterial(1,"AIR$",0.14610E+03,0.73000E+01,0.12050E-03,
457 0.30423E+05,0.99900E+03);
458 AliMedium(1,"AIR$",1,0,ifield,fieldm,tmaxfdAir,stemaxAir,deemaxAir,
462 Float_t tmaxfdSi = 0.1; // Degree
463 //Float_t stemaxSi = 0.0075; // cm
464 //Float_t deemaxSi = 0.1; // Fraction of particle's energy 0<deemax<=1
465 //Float_t stminSi = 0.0; // cm "Default value used"
466 //Float_t tmaxfdSi = 10; // Degree
467 Float_t stemaxSi = 0.01; // cm
468 Float_t deemaxSi = 0.1; // Fraction of particle's energy 0<deemax<=1
469 Float_t epsilSi = 1.0E-4;//
470 //Float_t epsilSi = 0.003;//
471 Float_t stminSi = 0.003; // cm "Default value used"
472 AliMaterial(2,"SSD SI$",0.28086E+02,0.14000E+02,0.23300E+01,
473 0.93600E+01,0.99900E+03);
474 AliMedium(2,"SSD SI$",2,0,ifield,fieldm,tmaxfdSi,stemaxSi,deemaxSi,
478 AliMaterial(5, "Kapton$", 12.011, 6., 1.3, 31.27, 999.);
479 AliMedium(5, "Kapton$", 5, 0,ifield,fieldm, 10., .01, .1, .003, .003);
481 //______________________________________________________________________
482 void AliITSvSSD03::InitAliITSgeom(){
490 const Int_t knlayers=1;
491 const TString kname="ALIC_1/ITSV_1/IGAR_1/IAIR_1/ITST_1";
492 const Int_t knlad[knlayers]={knlayers*1},kndet[knlayers]={knlayers*1};
495 Double_t trans[3]={3*0.0},rot[10]={10*0.0};
498 AliITSgeom* geom = new AliITSgeom(0,knlayers,knlad,kndet,1);
500 npar=3;par[0]=3.5;par[1]=0.5*300.0E-4;par[2]=2.0;
501 geom->ReSetShape(kSSD,new AliITSgeomSSD275and75(npar,par));
502 gMC->GetTransformation(kname.Data(),materix);
503 geom->CreateMatrix(0,1,1,1,kSSD,trans,rot);
504 geom->SetTrans(0,materix.GetTranslation());
505 geom->SetRotMatrix(0,materix.GetRotationMatrix());
506 geom->GetGeomMatrix(0)->SetPath(kname.Data());
509 //______________________________________________________________________
510 void AliITSvSSD03::Init(){
511 ////////////////////////////////////////////////////////////////////////
512 // Initialise the ITS after it has been created.
519 ////////////////////////////////////////////////////////////////////////
522 Info("Init","**********AliITSvSSD03 %d _Init *************",fMinorVersion);
524 AliDebug(1,Form("Init: Major version %d Minor version %d",fMajorVersion,
527 UpdateInternalGeometry();
529 if(fGeomDetOut) GetITSgeom()->WriteNewFile(fWrite);
532 fIDMother = gMC->VolId("ITSV"); // ITS Mother Volume ID.
535 //______________________________________________________________________
536 void AliITSvSSD03::SetDefaults(){
537 // sets the default segmentation, rerponse, digit and raw cluster classes
544 const Float_t kconv = 1.0e+04; // convert cm to microns
546 Info("SetDefaults","Setting up only SSD detector");
548 if(!fDetTypeSim) fDetTypeSim = new AliITSDetTypeSim();
549 fDetTypeSim->SetITSgeom(GetITSgeom());
551 fDetTypeSim->ResetCalibrationArray();
552 fDetTypeSim->ResetSegmentation();
556 // Get shape info. Do it this way for now.
557 s0 = (AliITSgeomSSD*) GetITSgeom()->GetShape(kSSD);
558 AliITSCalibration *resp0=new AliITSCalibrationSSD("simulated");
559 SetCalibrationModel(GetITSgeom()->GetStartSSD(),resp0);
561 AliITSsegmentationSSD *seg0=new AliITSsegmentationSSD();
562 seg0->SetDetSize(s0->GetDx()*2.*kconv, // base this on AliITSgeomSSD
563 s0->GetDz()*2.*kconv, // for now.
564 s0->GetDy()*2.*kconv); // x,z,y full width in microns.
565 //seg0->SetNPads(256,160);// Number of Bins in x and z
567 SetSegmentationModel(kSSD,seg0);
569 // set digit and raw cluster classes to be used
570 const char *kData0=(fDetTypeSim->GetCalibrationModel(GetITSgeom()->GetStartSSD()))->DataType();
571 if (strstr(kData0,"real")) fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigit");
572 else fDetTypeSim->SetDigitClassName(kSSD,"AliITSdigitSSD");
573 // SetSimulationModel(kSSD,new AliITSsimulationSSD(seg0,resp0));
574 // iDetType->ReconstructionModel(new AliITSClusterFinderSSD());
577 //SetResponseModel(kSPD,new AliITSCalibrationSPD());
578 //SetSegmentationModel(kSPD,new AliITSsegmentationSPD());
579 //fDetTypeSim->SetDigitClassName(kSPD,"AliITSdigitSPD");
581 //SetResponseModel(kSDD,new AliITSCalibrationSDD());
582 //SetSegmentationModel(kSDD,new AliITSsegmentationSDD());
583 //fDetTypeSim->SetDigitClassName(kSDD,"AliITSdigitSDD");
588 Warning("SetDefaults",
589 "Only the four basic detector types are initialised!");
593 //______________________________________________________________________
594 void AliITSvSSD03::SetDefaultSimulation(){
595 // sets the default simulation.
603 if(!fDetTypeSim) fDetTypeSim = new AliITSDetTypeSim();
605 AliITSsimulation *sim;
606 // AliITSsegmentation *seg;
607 // AliITSCalibration *res;
611 //sim = fDetTypeSim->GetSimulationModel(kSPD);
613 //seg = (AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSPD);
614 //res = (AliITSCalibration*)fDetTypeSim->GetResponseModel(nspd);
615 //sim = new AliITSsimulationSPDdubna(seg,res,1);
616 //SetSimulationModel(kSPD,sim);
617 //}else{ // simulation exists, make sure it is set up properly.
618 //sim->SetSegmentationModel((AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSPD));
619 //sim->SetResponseModel((AliITSCalibration*)fDetTypeSim->GetResponseModel(nspd));
620 //((AliITSsimulation*)sim)->Init();
621 // if(sim->GetResponseModel()==0) sim->SetResponseModel(
622 // (AliITSCalibration*)iDetType->GetResponseModel());
623 // if(sim->GetSegmentationModel()==0) sim->SetSegmentationModel(
624 // (AliITSsegmentation*)iDetType->GetSegmentationModel());
626 //} // end if !fDetTypeSim
630 //sim = fDetTypeSim->GetSimulationModel(kSDD);
632 //seg = (AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSDD);
633 //res = (AliITSCalibration*)fDetTypeSim->GetResponseModel(nsdd);
634 //sim = new AliITSsimulationSDD(seg,res);
635 //SetSimulationModel(kSDD,sim);
636 //}else{ // simulation exists, make sure it is set up properly.
637 //sim->SetSegmentationModel((AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSDD));
638 //sim->SetResponseModel((AliITSCalibration*)fDetTypeSim->GetResponseModel(nsdd));
640 //((AliITSsimulation*)sim)->Init();
641 // if(sim->GetResponseModel()==0) sim->SetResponseModel(
642 // (AliITSCalibration*)iDetType->GetResponseModel());
643 // if(sim->GetSegmentationModel()==0) sim->SetSegmentationModel(
644 // (AliITSsegmentation*)iDetType->GetSegmentationModel());
646 //} // end if !iDetType
649 sim = fDetTypeSim->GetSimulationModel(kSSD);
651 // seg = (AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSSD);
652 // res = (AliITSCalibration*)fDetTypeSim->GetResponseModel(GetITSgeom()->GetStartSSD());
653 sim = new AliITSsimulationSSD(fDetTypeSim);
654 SetSimulationModel(kSSD,sim);
655 }else{ // simulation exists, make sure it is set up properly.
656 sim->SetSegmentationModel(kSSD,(AliITSsegmentation*)fDetTypeSim->GetSegmentationModel(kSSD));
657 sim->SetCalibrationModel(GetITSgeom()->GetStartSSD(),(AliITSCalibration*)fDetTypeSim->GetCalibrationModel(GetITSgeom()->GetStartSSD()));
658 ((AliITSsimulation*)sim)->Init();
659 // if(sim->GetResponseModel()==0) sim->SetResponseModel(
660 // (AliITSCalibration*)iDetType->GetResponseModel());
661 // if(sim->GetSegmentationModel()==0) sim->SetSegmentationModel(
662 // (AliITSsegmentation*)iDetType->GetSegmentationModel());
664 } // end if !iDetType
667 //______________________________________________________________________
668 void AliITSvSSD03::DrawModule() const {
669 ////////////////////////////////////////////////////////////////////////
670 // Draw a shaded view of the ITS SSD test beam version 1.
677 ////////////////////////////////////////////////////////////////////////
679 gMC->Gsatt("*", "seen", -1);
680 gMC->Gsatt("ALIC","SEEN",0);
681 gMC->Gsatt("ITSV","SEEN",0);
682 gMC->Gsatt("ITSA","SEEN",1);
683 gMC->Gsatt("ITSS","SEEN",1);
684 gMC->Gsatt("IGAR","SEEN",1);
685 gMC->Gsatt("IAIR","SEEN",0);
686 gMC->Gsatt("ITST","SEEN",1);
687 gMC->Gsatt("IFRA","SEEN",1);
688 gMC->Gsatt("IFRS","SEEN",1);
690 //______________________________________________________________________
691 void AliITSvSSD03::StepManager(){
692 ////////////////////////////////////////////////////////////////////////
693 // Called for every step in the ITS SSD, then calles the
694 // AliITShit class creator with the information to be recoreded about
696 // The value of the macro ALIITSPRINTGEOM if set to 1 will allow the
697 // printing of information to a file which can be used to create a .det
698 // file read in by the routine CreateGeometry(). If set to 0 or any other
699 // value except 1, the default behavior, then no such file is created nor
700 // it the extra variables and the like used in the printing allocated.
707 ////////////////////////////////////////////////////////////////////////
708 if(!(this->IsActive())){
710 } // end if !Active volume.
711 if(!(gMC->TrackCharge())) return;
713 Int_t cpy0,mod,id,status;
714 TLorentzVector position, momentum;
715 static AliITShit hit;// Saves on calls to construtors
716 //TClonesArray &lhits = *(GetDetTypeSim()->GetHits());
717 TClonesArray &lhits = *(Hits());
722 if(gMC->IsTrackInside()) status += 1;
723 if(gMC->IsTrackEntering()) status += 2;
724 if(gMC->IsTrackExiting()) status += 4;
725 if(gMC->IsTrackOut()) status += 8;
726 if(gMC->IsTrackDisappeared()) status += 16;
727 if(gMC->IsTrackStop()) status += 32;
728 if(gMC->IsTrackAlive()) status += 64;
730 // Fill hit structure.
731 id = gMC->CurrentVolID(cpy0);
732 if(id==fIdSens[0]){ // Volume name "ITST"
733 mod=2; // Det, ladder
734 } else return; // end if
737 // Fill hit structure.
740 hit.SetTrack(gAlice->GetMCApp()->GetCurrentTrackNumber());
741 gMC->TrackPosition(position);
742 gMC->TrackMomentum(momentum);
743 hit.SetPosition(position);
744 hit.SetTime(gMC->TrackTime());
745 hit.SetMomentum(momentum);
746 hit.SetStatus(status);
747 hit.SetEdep(gMC->Edep());
748 hit.SetShunt(GetIshunt());
749 if(gMC->IsTrackEntering()){
750 hit.SetStartPosition(position);
751 hit.SetStartTime(gMC->TrackTime());
752 hit.SetStartStatus(status);
753 return; // don't save entering hit.
754 } // end if IsEntering
755 // Fill hit structure with this new hit.
756 //Info("StepManager","Calling Copy Constructor");
757 new(lhits[fNhits++]) AliITShit(hit); // Use Copy Construtor.
758 // Save old position... for next hit.
759 hit.SetStartPosition(position);
760 hit.SetStartTime(gMC->TrackTime());
761 hit.SetStartStatus(status);