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 ///////////////////////////////////////////////////////////////////////////////
32 //_____________________________________________________________________________
33 AliITSv5::AliITSv5() : AliITS()
36 // Default constructor for the ITS
40 //_____________________________________________________________________________
41 AliITSv5::AliITSv5(const char *name, const char *title)
45 // Standard constructor for the ITS
47 fEuclidMaterial="$(ALICE_ROOT)/ITSgeometry_60.tme";
48 fEuclidGeometry="$(ALICE_ROOT)/ITSgeometry_60.euc";
52 //_____________________________________________________________________________
53 void AliITSv5::CreateMaterials()
56 // Read materials for the ITS
58 FILE *file = fopen(fEuclidMaterial.Data(),"r");
61 gAlice->ReadEuclidMedia(fEuclidMaterial.Data(),this);
63 Error("CreateMaterials"," THE MEDIA FILE %s DOES NOT EXIST !",fEuclidMaterial.Data());
68 //_____________________________________________________________________________
69 void AliITSv5::CreateGeometry()
72 // Read geometry for the ITS
75 AliMC* pMC = AliMC::GetMC();
80 filtmp=gSystem->ExpandPathName(fEuclidGeometry.Data());
81 FILE *file = fopen(filtmp,"r");
85 gAlice->ReadEuclid(fEuclidGeometry.Data(),this,topvol);
87 Error("CreateGeometry"," THE GEOM FILE %s DOES NOT EXIST !",fEuclidGeometry.Data());
91 // --- Place the ITS ghost volume ITSV in its mother volume (ALIC) and make it
94 pMC->Gspos("ITSV",1,"ALIC",0,0,0,0,"ONLY");
96 // --- Outputs the geometry tree in the EUCLID/CAD format
99 pMC->WriteEuclid("ITSgeometry", "ITSV", 1, 5);
103 //_____________________________________________________________________________
104 void AliITSv5::Init()
107 // Initialise the ITS after it has been created
112 //_____________________________________________________________________________
113 void AliITSv5::StepManager()
116 // Called for every step in the ITS
124 TClonesArray &lhits = *fHits;
125 AliMC* pMC = AliMC::GetMC();
127 if(pMC->TrackCharge() && pMC->Edep()) {
129 // Only entering charged tracks
130 if((id=pMC->CurrentVol(0,copy))==fIdSens1) {
132 id=pMC->CurrentVolOff(0,0,copy); //detector copy in the ladder = 1<->4 (ITS1)
134 pMC->CurrentVolOff(1,0,copy1); //ladder copy in the module = 1<->2 (I186)
135 pMC->CurrentVolOff(2,0,copy2); //module copy in the layer = 1<->10 (I132)
136 vol[2]=copy1+(copy2-1)*2; //# of ladders in one module = 2
137 } else if(id==fIdSens2) {
139 id=pMC->CurrentVolOff(0,0,copy); //detector copy in the ladder = 1<->4 (ITS2)
141 pMC->CurrentVolOff(1,0,copy1); //ladder copy in the module = 1<->4 (I131)
142 pMC->CurrentVolOff(2,0,copy2); //module copy in the layer = 1<->10 (I132)
143 vol[2]=copy1+(copy2-1)*4; //# of ladders in one module = 4
144 } else if(id==fIdSens3) {
146 id=pMC->CurrentVolOff(1,0,copy); //detector copy in the ladder = 1<->5 (ITS3 is inside I314)
148 id=pMC->CurrentVolOff(2,0,copy); //ladder copy in the layer = 1<->12 (I316)
150 } else if(id==fIdSens4) {
152 id=pMC->CurrentVolOff(1,0,copy); //detector copy in the ladder = 1<->8 (ITS4 is inside I414)
154 id=pMC->CurrentVolOff(2,0,copy); //ladder copy in the layer = 1<->22 (I417)
156 } else if(id==fIdSens5) {
158 id=pMC->CurrentVolOff(1,0,copy); //detector copy in the ladder = 1<->23 (ITS5 is inside I562)
160 id=pMC->CurrentVolOff(2,0,copy); //ladder copy in the layer = 1<->34 (I565)
162 } else if(id==fIdSens6) {
164 id=pMC->CurrentVolOff(1,0,copy); //detector copy in the ladder = 1<->26 (ITS6 is inside I566)
166 id=pMC->CurrentVolOff(2,0,copy); //ladder copy in the layer = 1<->38 (I569)
169 pMC->TrackPosition(position);
170 pMC->TrackMomentum(momentum);
174 hits[3]=momentum[0]*momentum[3];
175 hits[4]=momentum[1]*momentum[3];
176 hits[5]=momentum[2]*momentum[3];
178 new(lhits[fNhits++]) AliITShit(fIshunt,gAlice->CurrentTrack(),vol,hits);