1 static Int_t eventsPerRun = 100;
6 static PprGeo_t geo = kHoles;
11 // Switch on Transition Radiation simulation. 6/12/00 18:00
12 // iZDC=1 7/12/00 09:00
13 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
14 // Theta range given through pseudorapidity limits 22/6/2001
16 // Set Random Number seed
17 // gRandom->SetSeed(12345);
19 new AliGeant3("C++ Interface to Geant3");
21 if (!gSystem->Getenv("CONFIG_FILE"))
23 TFile *rootfile = new TFile("galice.root", "recreate");
25 rootfile->SetCompressionLevel(2);
28 TGeant3 *geant3 = (TGeant3 *) gMC;
31 // Set External decayer
32 AliDecayer *decayer = new AliDecayerPythia();
34 decayer->SetForceDecay(kAll);
36 gMC->SetExternalDecayer(decayer);
39 //=======================================================================
40 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
41 geant3->SetTRIG(1); //Number of events to be processed
42 geant3->SetSWIT(4, 10);
43 geant3->SetDEBU(0, 0, 1);
44 //geant3->SetSWIT(2,2);
55 geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
59 geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
60 geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
61 geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
62 geant3->SetERAN(5.e-7);
64 Float_t cut = 1.e-3; // 1MeV cut by default
65 Float_t tofmax = 1.e10;
67 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
68 geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut,
71 //=======================================================================
72 // ************* STEERING parameters FOR ALICE SIMULATION **************
73 // --- Specify event type to be tracked through the ALICE setup
74 // --- All positions are in cm, angles in degrees, and P and E in GeV
75 if (gSystem->Getenv("CONFIG_NPARTICLES"))
77 int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
82 AliGenHIJINGpara *gener = new AliGenHIJINGpara(nParticles);
84 gener->SetMomentumRange(0, 999);
85 gener->SetPhiRange(0, 360);
86 // Set pseudorapidity range from -8 to 8.
87 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
88 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
89 gener->SetThetaRange(thmin,thmax);
90 gener->SetOrigin(0, 0, 0); //vertex position
91 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
94 // Activate this line if you want the vertex smearing to happen
97 //gener->SetVertexSmear(perTrack);
99 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1);
101 gAlice->SetField(field);
126 //=================== Alice BODY parameters =============================
127 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
131 //=================== MAG parameters ============================
132 // --- Start with Magnet since detector layouts may be depending ---
133 // --- on the selected Magnet dimensions ---
134 AliMAG *MAG = new AliMAG("MAG", "Magnet");
140 //=================== ABSO parameters ============================
141 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
146 //=================== DIPO parameters ============================
148 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
153 //=================== HALL parameters ============================
155 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
161 //=================== FRAME parameters ============================
163 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
173 //=================== SHIL parameters ============================
175 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
181 //=================== PIPE parameters ============================
183 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
188 //=================== ITS parameters ============================
190 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
191 // almost all other detectors. This involves the fact that the ITS geometry
192 // still has several options to be followed in parallel in order to determine
193 // the best set-up which minimizes the induced background. All the geometries
194 // available to date are described in the following. Read carefully the comments
195 // and use the default version (the only one uncommented) unless you are making
196 // comparisons and you know what you are doing. In this case just uncomment the
197 // ITS geometry you want to use and run Aliroot.
199 // Detailed geometries:
202 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
204 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
206 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
207 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
208 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
209 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
210 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
211 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
212 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
213 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
214 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
215 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
217 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services");
218 //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
219 //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
220 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer
221 //ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
222 //ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
223 //ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
224 //ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
225 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
226 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
229 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
230 // for reconstruction !):
233 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
234 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
235 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
237 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
238 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
239 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
243 // Geant3 <-> EUCLID conversion
244 // ============================
246 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
247 // media to two ASCII files (called by default ITSgeometry.euc and
248 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
249 // The default (=0) means that you dont want to use this facility.
256 //============================ TPC parameters ================================
257 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
258 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
259 // --- sectors are specified, any value other than that requires at least one
260 // --- sector (lower or upper)to be specified!
261 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
262 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
263 // --- SecLows - number of lower sectors specified (up to 6)
264 // --- SecUps - number of upper sectors specified (up to 12)
265 // --- Sens - sensitive strips for the Slow Simulator !!!
266 // --- This does NOT work if all S or L-sectors are specified, i.e.
267 // --- if SecAL or SecAU < 0
270 //-----------------------------------------------------------------------------
272 // gROOT->LoadMacro("SetTPCParam.C");
273 // AliTPCParam *param = SetTPCParam();
274 AliTPC *TPC = new AliTPCv2("TPC", "Default");
276 // All sectors included
285 //=================== TOF parameters ============================
286 AliTOF *TOF = new AliTOFv2FHoles("TOF", "TOF with Holes");
288 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
295 //=================== RICH parameters ===========================
296 AliRICH *RICH = new AliRICHv3("RICH", "normal RICH");
303 //=================== ZDC parameters ============================
305 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
310 //=================== TRD parameters ============================
312 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
314 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
317 // With hole in front of PHOS
319 // With hole in front of RICH
323 AliTRDsim *TRDsim = TRD->CreateTR();
328 //=================== FMD parameters ============================
329 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
330 FMD->SetRingsSi1(256);
331 FMD->SetRingsSi2(128);
332 FMD->SetSectorsSi1(20);
333 FMD->SetSectorsSi2(40);
338 //=================== MUON parameters ===========================
340 AliMUON *MUON = new AliMUONv1("MUON", "default");
342 //=================== PHOS parameters ===========================
346 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
352 //=================== PMD parameters ============================
353 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
358 //=================== START parameters ============================
359 AliSTART *START = new AliSTARTv1("START", "START Detector");
364 //=================== EMCAL parameters ============================
365 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "EMCALArch1a");
370 //=================== CRT parameters ============================
371 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
376 //=================== CRT parameters ============================
377 AliVZERO *VZERO = new AliVZEROv2("VZERO", "normal VZERO");
382 Float_t EtaToTheta(Float_t arg){
383 return (180./TMath::Pi())*2.*atan(exp(-arg));