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