3 static Int_t eventsPerRun = 100;
8 static PprGeo_t geo = kHoles;
14 // Switch on Transition Radiation simulation. 6/12/00 18:00
15 // iZDC=1 7/12/00 09:00
16 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
17 // Theta range given through pseudorapidity limits 22/6/2001
19 // Set Random Number seed
20 // AliLoader::SetDebug(5) ;
21 gRandom->SetSeed(12345);
24 // libraries required by geant321
25 gSystem->Load("libgeant321");
27 new TGeant3("C++ Interface to Geant3");
29 if (!gSystem->Getenv("CONFIG_FILE"))
31 cout<<"Config.C: Creating Run Loader ..."<<endl;
32 AliRunLoader* rl = AliRunLoader::Open("galice.root",AliConfig::fgkDefaultEventFolderName,
36 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
39 rl->SetCompressionLevel(2);
40 rl->SetNumberOfEventsPerFile(1000);
41 gAlice->SetRunLoader(rl);
44 TGeant3 *geant3 = (TGeant3 *) gMC;
47 // Set External decayer
48 TVirtualMCDecayer *decayer = new AliDecayerPythia();
50 decayer->SetForceDecay(kAll);
52 gMC->SetExternalDecayer(decayer);
55 //=======================================================================
56 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
57 geant3->SetTRIG(1); //Number of events to be processed
58 geant3->SetSWIT(4, 10);
59 geant3->SetDEBU(0, 0, 1);
60 //geant3->SetSWIT(2,2);
71 geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
75 geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
76 geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
77 geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
78 geant3->SetERAN(5.e-7);
80 Float_t cut = 1.e-3; // 1MeV cut by default
81 Float_t tofmax = 1.e10;
83 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
84 geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut,
87 //=======================================================================
88 // ************* STEERING parameters FOR ALICE SIMULATION **************
89 // --- Specify event type to be tracked through the ALICE setup
90 // --- All positions are in cm, angles in degrees, and P and E in GeV
91 if (gSystem->Getenv("CONFIG_NPARTICLES"))
93 int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
98 // AliGenCocktail *gener = new AliGenCocktail();
99 // gener->SetPhiRange(220, 320);
100 // // Set pseudorapidity range from -8 to 8.
101 // Float_t thmin = EtaToTheta(0.12); // theta min. <---> eta max
102 // Float_t thmax = EtaToTheta(-0.12); // theta max. <---> eta min
103 // gener->SetThetaRange(thmin,thmax);
104 // gener->SetOrigin(0, 0, 0); //vertex position
105 // gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
107 // AliGenHIJINGpara *hijingparam = new AliGenHIJINGpara(nParticles);
108 // hijingparam->SetMomentumRange(0.2, 999);
109 // gener->AddGenerator(hijingparam,"HIJING PARAM",1);
111 // AliGenBox *genbox = new AliGenBox(nParticles);
112 // genbox->SetPart(kGamma);
113 // genbox->SetPtRange(0.3, 10.00);
114 // gener->AddGenerator(genbox,"GENBOX GAMMA for PHOS",1);
117 AliGenBox *gener = new AliGenBox(1);
118 gener->SetMomentumRange(10,11.);
119 gener->SetPhiRange(270.5,270.7);
120 gener->SetThetaRange(90.5,90.7);
122 gener->SetOrigin(0,0,0); //vertex position
123 gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
124 gener->SetPart(kGamma);
128 // Activate this line if you want the vertex smearing to happen
131 //gener->SetVertexSmear(perTrack);
133 TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 1., 1., AliMagF::k5kG));
157 //=================== Alice BODY parameters =============================
158 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
162 //=================== MAG parameters ============================
163 // --- Start with Magnet since detector layouts may be depending ---
164 // --- on the selected Magnet dimensions ---
165 AliMAG *MAG = new AliMAG("MAG", "Magnet");
171 //=================== ABSO parameters ============================
172 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
177 //=================== DIPO parameters ============================
179 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
184 //=================== HALL parameters ============================
186 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
192 //=================== FRAME parameters ============================
194 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
204 //=================== SHIL parameters ============================
206 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
212 //=================== PIPE parameters ============================
214 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
219 //=================== ITS parameters ============================
221 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
222 // almost all other detectors. This involves the fact that the ITS geometry
223 // still has several options to be followed in parallel in order to determine
224 // the best set-up which minimizes the induced background. All the geometries
225 // available to date are described in the following. Read carefully the comments
226 // and use the default version (the only one uncommented) unless you are making
227 // comparisons and you know what you are doing. In this case just uncomment the
228 // ITS geometry you want to use and run Aliroot.
230 // Detailed geometries:
233 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
235 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
237 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
238 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
239 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
240 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
241 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
242 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
243 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
244 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
245 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
246 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
248 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services");
249 //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
250 //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
251 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer
252 //ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
253 //ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
254 //ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
255 //ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
256 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
257 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
260 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
261 // for reconstruction !):
264 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
265 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
266 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
268 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
269 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
270 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
274 // Geant3 <-> EUCLID conversion
275 // ============================
277 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
278 // media to two ASCII files (called by default ITSgeometry.euc and
279 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
280 // The default (=0) means that you dont want to use this facility.
287 //============================ TPC parameters ================================
288 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
289 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
290 // --- sectors are specified, any value other than that requires at least one
291 // --- sector (lower or upper)to be specified!
292 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
293 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
294 // --- SecLows - number of lower sectors specified (up to 6)
295 // --- SecUps - number of upper sectors specified (up to 12)
296 // --- Sens - sensitive strips for the Slow Simulator !!!
297 // --- This does NOT work if all S or L-sectors are specified, i.e.
298 // --- if SecAL or SecAU < 0
301 //-----------------------------------------------------------------------------
303 // gROOT->LoadMacro("SetTPCParam.C");
304 // AliTPCParam *param = SetTPCParam();
305 AliTPC *TPC = new AliTPCv2("TPC", "Default");
307 // All sectors included
315 //=================== TOF parameters ============================
316 AliTOF *TOF = new AliTOFv2FHoles("TOF", "TOF with Holes");
318 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
325 //=================== HMPID parameters ===========================
326 AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");
333 //=================== ZDC parameters ============================
335 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
340 //=================== TRD parameters ============================
342 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
344 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
347 // With hole in front of PHOS
349 // With hole in front of HMPID
353 AliTRDsim *TRDsim = TRD->CreateTR();
358 //=================== FMD parameters ============================
359 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
360 FMD->SetRingsSi1(256);
361 FMD->SetRingsSi2(128);
362 FMD->SetSectorsSi1(20);
363 FMD->SetSectorsSi2(40);
368 //=================== MUON parameters ===========================
370 AliMUON *MUON = new AliMUONv1("MUON", "default");
372 //=================== PHOS parameters ===========================
376 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
382 //=================== PMD parameters ============================
383 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
388 //=================== T0 parameters ============================
389 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
394 //=================== EMCAL parameters ============================
395 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETE");
400 //=================== ACORDE parameters ============================
401 AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
406 //=================== ACORDE parameters ============================
407 AliVZERO *VZERO = new AliVZEROv2("VZERO", "normal VZERO");
412 Float_t EtaToTheta(Float_t arg){
413 return (180./TMath::Pi())*2.*atan(exp(-arg));