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(123456);
21 // libraries required by geant321
22 gSystem->Load("libgeant321");
23 gSystem->Load("libdpmjet");
24 gSystem->Load("libTDPMjet");
26 new TGeant3("C++ Interface to Geant3");
30 cout<<"Config.C: Creating Run Loader ..."<<endl;
31 rl = AliRunLoader::Open("galice.root",
32 AliConfig::GetDefaultEventFolderName(),
36 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
39 rl->SetCompressionLevel(2);
40 rl->SetNumberOfEventsPerFile(100);
41 gAlice->SetRunLoader(rl);
43 if (!gSystem->Getenv("CONFIG_FILE"))
45 TFile *rootfile = new TFile("galice.root", "recreate");
47 rootfile->SetCompressionLevel(2);
50 TGeant3 *geant3 = (TGeant3 *) gMC;
51 AliIonPDGCodes *PDGcodes = new AliIonPDGCodes();
53 PDGcodes->AddParticlesToPdgDataBase();
54 // geant3->DefineIons();
57 // Set External decayer
58 TVirtualMCDecayer *decayer = new AliDecayerPythia();
60 decayer->SetForceDecay(kAll);
62 gMC->SetExternalDecayer(decayer);
65 //=======================================================================
66 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
67 geant3->SetTRIG(1); //Number of events to be processed
68 geant3->SetSWIT(4, 10);
69 geant3->SetDEBU(0, 0, 1);
70 //geant3->SetSWIT(2,2);
81 geant3->SetHADR(0); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
85 geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
86 geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
87 geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
88 geant3->SetERAN(5.e-7);
90 Float_t cut = 1.e-3; // 1MeV cut by default
91 Float_t tofmax = 1.e10;
93 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
94 geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut,
97 //=======================================================================
98 // ************* STEERING parameters FOR ALICE SIMULATION **************
99 // --- Specify event type to be tracked through the ALICE setup
100 // --- All positions are in cm, angles in degrees, and P and E in GeV
101 // #### AliGenDPMjet generation ######################################
102 AliGenDPMjet *gener = new AliGenDPMjet(1);
103 gener->SetBeamEnergy(2700.);
104 gener->SetEnergyCMS(5500.);
105 gener->SetProjectile(1, 1);
106 gener->SetTarget(1, 1);
107 gener->SetImpactParameterRange(12.,16.);
108 gener->SetTrackingFlag(0);
111 // Activate this line if you want the vertex smearing to happen
114 //gener->SetVertexSmear(perTrack);
116 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1);
117 gAlice->SetField(field);
142 //=================== Alice BODY parameters =============================
143 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
147 //=================== MAG parameters ============================
148 // --- Start with Magnet since detector layouts may be depending ---
149 // --- on the selected Magnet dimensions ---
150 AliMAG *MAG = new AliMAG("MAG", "Magnet");
156 //=================== ABSO parameters ============================
157 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
162 //=================== DIPO parameters ============================
164 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
169 //=================== HALL parameters ============================
171 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
177 //=================== FRAME parameters ============================
179 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
189 //=================== SHIL parameters ============================
191 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
197 //=================== PIPE parameters ============================
199 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
204 //=================== ITS parameters ============================
206 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
207 // almost all other detectors. This involves the fact that the ITS geometry
208 // still has several options to be followed in parallel in order to determine
209 // the best set-up which minimizes the induced background. All the geometries
210 // available to date are described in the following. Read carefully the comments
211 // and use the default version (the only one uncommented) unless you are making
212 // comparisons and you know what you are doing. In this case just uncomment the
213 // ITS geometry you want to use and run Aliroot.
215 // Detailed geometries:
218 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
220 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
222 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
223 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
224 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
225 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
226 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
227 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
228 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
229 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
230 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
231 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
233 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services");
234 //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
235 //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
236 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer
237 //ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
238 //ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
239 //ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
240 //ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
241 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
242 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
245 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
246 // for reconstruction !):
249 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
250 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
251 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
253 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
254 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
255 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
259 // Geant3 <-> EUCLID conversion
260 // ============================
262 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
263 // media to two ASCII files (called by default ITSgeometry.euc and
264 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
265 // The default (=0) means that you dont want to use this facility.
272 //============================ TPC parameters ================================
273 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
274 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
275 // --- sectors are specified, any value other than that requires at least one
276 // --- sector (lower or upper)to be specified!
277 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
278 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
279 // --- SecLows - number of lower sectors specified (up to 6)
280 // --- SecUps - number of upper sectors specified (up to 12)
281 // --- Sens - sensitive strips for the Slow Simulator !!!
282 // --- This does NOT work if all S or L-sectors are specified, i.e.
283 // --- if SecAL or SecAU < 0
286 //-----------------------------------------------------------------------------
288 // gROOT->LoadMacro("SetTPCParam.C");
289 // AliTPCParam *param = SetTPCParam();
290 AliTPC *TPC = new AliTPCv2("TPC", "Default");
292 // All sectors included
301 //=================== TOF parameters ============================
302 AliTOF *TOF = new AliTOFv2FHoles("TOF", "TOF with Holes");
304 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
311 //=================== RICH parameters ===========================
312 AliRICH *RICH = new AliRICHv3("RICH", "normal RICH");
319 //=================== ZDC parameters ============================
321 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
327 //=================== TRD parameters ============================
329 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
331 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
334 // With hole in front of PHOS
336 // With hole in front of RICH
340 AliTRDsim *TRDsim = TRD->CreateTR();
345 //=================== FMD parameters ============================
346 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
347 FMD->SetRingsSi1(256);
348 FMD->SetRingsSi2(128);
349 FMD->SetSectorsSi1(20);
350 FMD->SetSectorsSi2(40);
355 //=================== MUON parameters ===========================
357 AliMUON *MUON = new AliMUONv1("MUON", "default");
359 //=================== PHOS parameters ===========================
363 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
369 //=================== PMD parameters ============================
370 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
375 //=================== START parameters ============================
376 AliSTART *START = new AliSTARTv1("START", "START Detector");
381 //=================== EMCAL parameters ============================
382 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "G56_2_55_19_104_14");
387 //=================== CRT parameters ============================
388 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
393 //=================== CRT parameters ============================
394 AliVZERO *VZERO = new AliVZEROv2("VZERO", "normal VZERO");