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 **************************************************************************/
15 /////////////////////////////////////////////////////////////////////
17 // Forward Multiplicity detector based on Silicon version 0 //
21 <img src="gif/AliFMDv0Class.gif">
26 //////////////////////////////////////////////////////////////////////
29 #include <TGeometry.h>
32 #include <TLorentzVector.h>
38 #include "/afs/cern.ch/alice/offline/new/RALICE/AliRandom.h"
40 #include "AliFMDhit.h"
46 //--------------------------------------------------------------------
47 AliFMDv0::AliFMDv0(const char *name, const char *title):
51 // Standart constructor for Forward Multiplicity Detector version 0
54 // setBufferSize(128000);
56 //-------------------------------------------------------------------------
57 void AliFMDv0::CreateGeometry()
60 // Create the geometry of Forward Multiplicity Detector version 0
62 //Detector consists of 6 volumes:
63 // 1st covered pseudorapidity interval from 3.3 to 2.0
64 // and placed on 65cm in Z-direction;
65 // 2nd - from 2.0 to 1.6 and Z=85 cm;
66 // 3d - the same pseudorapidity interval as the 1st
67 // but on the other side from the interaction point z=-65cm;
68 // 4th - simmetricaly with the 2nd :
69 // pseudorapidity from 2.0 to 1.6, Z=-85cm
70 // 5th - from 3.6 to 4.7, Z=-270cm
71 // 6th - from 4.5 to 5.5 , Z=-630cm.
72 // Each part has 400mkm Si (sensetive area, detector itself),
73 // 0.75cm of plastic simulated electronics material,
74 // Al support ring 2cm thickness and 1cm width placed on
75 // the outer radius of each Si disk;
79 <img src="gif/AliFMDv0.gif">
83 Int_t *idtmed = fIdtmed->GetArray();
90 Float_t rin[6], rout[6],zpos;
91 Float_t etain[6]= {3.3, 2.0, 3.3, 2.0, 4.7, 5.5};
92 Float_t etaout[6]={2.0, 1.6, 2.0, 1.6, 3.6, 4.5};
93 Float_t z[6]={64., 85., -64., -85., -270., -630};
95 Float_t zElectronic=0.75;
98 //-------------------------------------------------------------------
100 //------------------------------------------------------------------
102 AliMatrix(idrotm[901], 90, 0, 90, 90, 180, 0);
104 gMC->Gsvolu("GFSI","TUBE", idtmed[1], par, 0);
105 gMC->Gsvolu("GEL ","TUBE", idtmed[4], par, 0);
106 gMC->Gsvolu("GSUP","TUBE", idtmed[2], par, 0);
108 for (ifmd =0; ifmd < 6; ifmd++){
110 sprintf(name,"FMD%d",ifmd);
112 printf("%s: %s",ClassName(),name);
114 zfmd=TMath::Abs(z[ifmd]);
115 if (fDebug) printf("zfmd %f z[ifmd] %f",zfmd,z[ifmd]);
116 AliFMD::Eta2Radius(etain[ifmd],zfmd,&rin[ifmd]);
117 AliFMD::Eta2Radius(etaout[ifmd],zfmd,&rout[ifmd]);
119 par[0]=rin[ifmd]; // pipe size
122 gMC->Gsvolu(name,"TUBE", idtmed[3], par, 3);
124 if (fDebug) printf ("rin %f rout %f ZFMD %f\n",par[0],par[1],z[ifmd]);
126 gMC->Gspos(name,1,"ALIC",0,0,z[ifmd],0, "ONLY");}
128 gMC->Gspos(name,1,"ALIC",0,0,z[ifmd],idrotm[901], "ONLY");}
132 gMC->Gsposp("GFSI",ifmd+1,name,0,0,zpos,0, "ONLY",par,3);
134 //Plastic slice for electronics
135 par[2]=zElectronic/2;
136 zpos=zpos-zDet/2-par[2];
137 gMC->Gsposp("GEL ",ifmd+1,name,0,0,zpos,0, "ONLY",par,3);
143 zpos=zpos-zElectronic/2-par[2];
144 gMC->Gsposp("GSUP",ifmd+1,name,0,0,zpos,0, "ONLY",par,3);
154 //------------------------------------------------------------------------
155 void AliFMDv0::CreateMaterials()
157 Int_t isxfld = gAlice->Field()->Integ();
158 Float_t sxmgmx = gAlice->Field()->Max();
161 Float_t aPlastic[2]={1.01,12.01};
162 Float_t zPlastic[2]={1,6};
163 Float_t wPlastic[2]={1,1};
164 Float_t denPlastic=1.03;
167 //*** Definition Of avaible FMD materials ***
168 AliMaterial(0, "Si chip$", 28.0855,14.,2.33,9.36,999);
169 AliMaterial(1, "Al supprt$", 26.980,13.,2.70,8.9,999);
170 AliMaterial(2, "FMD Air$", 14.61, 7.3, .001205, 30423.,999);
171 AliMixture( 5, "Plastic$",aPlastic,zPlastic,denPlastic,-2,wPlastic);
175 AliMedium(1, "Si chip$", 0, 1, isxfld, sxmgmx, 1., .001, 1., .001, .001);
176 AliMedium(2, "Al support$", 1, 0, isxfld, sxmgmx, 1., .001, 1., .001, .001);
177 AliMedium(3, "FMD air$", 2, 0, isxfld, sxmgmx, 1., .001, 1., .001, .001);
178 AliMedium(4, "Plastic$", 5, 0,isxfld, sxmgmx, 10., .01, 1., .003, .003);
183 //---------------------------------------------------------------------
184 void AliFMDv0::DrawDetector()
187 // Draw a shaded view of the Forward multiplicity detector version 0
190 AliMC* pMC = AliMC::GetMC();
192 //Set ALIC mother transparent
193 pMC->Gsatt("ALIC","SEEN",0);
195 //Set volumes visible
196 gMC->Gsatt("FMD0","SEEN",1);
197 gMC->Gsatt("FMD1","SEEN",1);
198 gMC->Gsatt("FMD2","SEEN",1);
199 gMC->Gsatt("FMD3","SEEN",1);
200 gMC->Gsatt("FMD4","SEEN",1);
201 gMC->Gsatt("FMD5","SEEN",1);
204 gMC->Gdopt("hide","on");
205 gMC->Gdopt("shad","on");
206 gMC->SetClipBox(".");
207 gMC->SetClipBox("*",0,1000,-1000,1000,-1000,1000);
209 gMC->Gdraw("alic",40,30,0,12,9.5,.2,0.2);
210 gMC->Gdhead(1111,"Forward multiplicity detector");
211 gMC->Gdopt("hide","off");
213 //-------------------------------------------------------------------
214 void AliFMDv0::Init()
216 // Initialises version 0 of the Forward Multiplicity Detector
218 AliMC* gMC=AliMC::GetMC();
220 fIdSens1=gMC->VolId("GFSI");
221 if (fDebug) printf("*** FMD version 0 initialized ***\n");
224 //-------------------------------------------------------------------
226 void AliFMDv0::StepManager()
229 // Called for every step in the Forward Multiplicity Detector
232 static Float_t hits[9];
239 TClonesArray &lhits = *fHits;
240 AliMC* gMC=AliMC::GetMC();
241 if(!gMC->IsTrackAlive()) return; // particle has disappeared
243 Float_t charge = gMC->TrackCharge();
244 if(TMath::Abs(charge)<=0.) return; //take only charged particles
246 // ((TGeant3*)gMC)->Gpcxyz();
248 id=gMC->CurrentVolID(copy);
250 // Check the sensetive volume
253 if(gMC->IsTrackEntering())
256 gMC->TrackPosition(pos);
261 gMC->TrackMomentum(mom);
266 Int_t iPart= gMC->TrackPid();
267 Int_t partId=gMC->IdFromPDG(iPart);
269 hits[8]=1e9*gMC->TrackTime();
272 if(gMC->IsTrackInside()){
273 de=de+1000.*gMC->Edep();
276 if(gMC->IsTrackExiting()
277 ||gMC->IsTrackDisappeared()||
280 hits[6]=de+1000.*gMC->Edep();
281 new(lhits[fNhits++]) AliFMDhit(fIshunt,gAlice->CurrentTrack(),vol,hits);
282 } // IsTrackExiting()