1 ///////////////////////////////////////////////////////////////////////////////
3 // Inner Traking System version 5 //
4 // This class contains the base procedures for the Inner Tracking System //
8 <img src="picts/AliITSv5Class.gif">
11 <font size=+2 color=red>
12 <p>The responsible person for this module is
13 <a href="mailto:roberto.barbera@ct.infn.it">Roberto Barbera</a>.
19 ///////////////////////////////////////////////////////////////////////////////
31 //_____________________________________________________________________________
32 AliITSv5::AliITSv5() : AliITS()
35 // Default constructor for the ITS
39 //_____________________________________________________________________________
40 AliITSv5::AliITSv5(const char *name, const char *title)
44 // Standard constructor for the ITS
46 fEuclidMaterial="$(ALICE_ROOT)/Euclid/ITSgeometry_60.tme";
47 fEuclidGeometry="$(ALICE_ROOT)/Euclid/ITSgeometry_60.euc";
51 //_____________________________________________________________________________
52 void AliITSv5::CreateMaterials()
55 // Read materials for the ITS
57 FILE *file = fopen(fEuclidMaterial.Data(),"r");
60 gAlice->ReadEuclidMedia(fEuclidMaterial.Data(),this);
62 Error("CreateMaterials"," THE MEDIA FILE %s DOES NOT EXIST !",fEuclidMaterial.Data());
67 //_____________________________________________________________________________
68 void AliITSv5::CreateGeometry()
71 // Read geometry for the ITS
77 filtmp=gSystem->ExpandPathName(fEuclidGeometry.Data());
78 FILE *file = fopen(filtmp,"r");
82 gAlice->ReadEuclid(fEuclidGeometry.Data(),this,topvol);
84 Error("CreateGeometry"," THE GEOM FILE %s DOES NOT EXIST !",fEuclidGeometry.Data());
88 // --- Place the ITS ghost volume ITSV in its mother volume (ALIC) and make it
91 gMC->Gspos("ITSV",1,"ALIC",0,0,0,0,"ONLY");
93 // --- Outputs the geometry tree in the EUCLID/CAD format
96 gMC->WriteEuclid("ITSgeometry", "ITSV", 1, 5);
100 //_____________________________________________________________________________
101 void AliITSv5::Init()
104 // Initialise the ITS after it has been created
109 //_____________________________________________________________________________
110 void AliITSv5::StepManager()
113 // Called for every step in the ITS
119 TLorentzVector position, momentum;
120 TClonesArray &lhits = *fHits;
122 if(gMC->TrackCharge() && gMC->Edep()) {
124 // Only entering charged tracks
125 if((id=gMC->CurrentVolID(copy))==fIdSens1) {
127 id=gMC->CurrentVolOffID(0,copy); //detector copy in the ladder = 1<->4 (ITS1)
129 gMC->CurrentVolOffID(1,copy1); //ladder copy in the module = 1<->2 (I186)
130 gMC->CurrentVolOffID(2,copy2); //module copy in the layer = 1<->10 (I132)
131 vol[2]=copy1+(copy2-1)*2; //# of ladders in one module = 2
132 } else if(id==fIdSens2) {
134 id=gMC->CurrentVolOffID(0,copy); //detector copy in the ladder = 1<->4 (ITS2)
136 gMC->CurrentVolOffID(1,copy1); //ladder copy in the module = 1<->4 (I131)
137 gMC->CurrentVolOffID(2,copy2); //module copy in the layer = 1<->10 (I132)
138 vol[2]=copy1+(copy2-1)*4; //# of ladders in one module = 4
139 } else if(id==fIdSens3) {
141 id=gMC->CurrentVolOffID(1,copy); //detector copy in the ladder = 1<->5 (ITS3 is inside I314)
143 id=gMC->CurrentVolOffID(2,copy); //ladder copy in the layer = 1<->12 (I316)
145 } else if(id==fIdSens4) {
147 id=gMC->CurrentVolOffID(1,copy); //detector copy in the ladder = 1<->8 (ITS4 is inside I414)
149 id=gMC->CurrentVolOffID(2,copy); //ladder copy in the layer = 1<->22 (I417)
151 } else if(id==fIdSens5) {
153 id=gMC->CurrentVolOffID(1,copy); //detector copy in the ladder = 1<->23 (ITS5 is inside I562)
155 id=gMC->CurrentVolOffID(2,copy); //ladder copy in the layer = 1<->34 (I565)
157 } else if(id==fIdSens6) {
159 id=gMC->CurrentVolOffID(1,copy); //detector copy in the ladder = 1<->26 (ITS6 is inside I566)
161 id=gMC->CurrentVolOffID(2,copy); //ladder copy in the layer = 1<->38 (I569)
164 gMC->TrackPosition(position);
165 gMC->TrackMomentum(momentum);
173 new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->CurrentTrack(),vol,hits);