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);
20 // libraries required by geant321
21 gSystem->Load("libgeant321");
23 new TGeant3("C++ Interface to Geant3");
25 if (!gSystem->Getenv("CONFIG_FILE"))
27 TFile *rootfile = new TFile("galice.root", "recreate");
29 rootfile->SetCompressionLevel(2);
32 TGeant3 *geant3 = (TGeant3 *) gMC;
33 AliIonPDGCodes *PDGcodes = new AliIonPDGCodes();
34 PDGcodes->AddParticlesToPdgDataBase();
38 // Set External decayer
39 TVirtualMCDecayer *decayer = new AliDecayerPythia();
41 decayer->SetForceDecay(kAll);
43 gMC->SetExternalDecayer(decayer);
46 //=======================================================================
47 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
48 geant3->SetTRIG(1); //Number of events to be processed
49 geant3->SetSWIT(4, 10);
50 geant3->SetDEBU(0, 0, 1);
51 //geant3->SetSWIT(2,2);
62 geant3->SetHADR(0); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
66 geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
67 geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
68 geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
69 geant3->SetERAN(5.e-7);
71 Float_t cut = 1.e-3; // 1MeV cut by default
72 Float_t tofmax = 1.e10;
74 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
75 geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut,
78 //=======================================================================
79 // ************* STEERING parameters FOR ALICE SIMULATION **************
80 // --- Specify event type to be tracked through the ALICE setup
81 // --- All positions are in cm, angles in degrees, and P and E in GeV
82 // #### AliGenDPMjet generation ######################################
83 AliGenDPMjet *gener = new AliGenDPMjet(1);
84 gener->SetBeamEnergy(2700.);
85 gener->SetEnergyCMS(5400.);
86 gener->SetProjectile(208,82);
87 gener->SetTarget(208,82);
88 gener->SetImpactParameterRange(12.,16.);
89 gener->SetTrackingFlag(1);
92 // Activate this line if you want the vertex smearing to happen
95 //gener->SetVertexSmear(perTrack);
97 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1);
99 gAlice->SetField(field);
124 //=================== Alice BODY parameters =============================
125 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
129 //=================== MAG parameters ============================
130 // --- Start with Magnet since detector layouts may be depending ---
131 // --- on the selected Magnet dimensions ---
132 AliMAG *MAG = new AliMAG("MAG", "Magnet");
138 //=================== ABSO parameters ============================
139 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
144 //=================== DIPO parameters ============================
146 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
151 //=================== HALL parameters ============================
153 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
159 //=================== FRAME parameters ============================
161 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
171 //=================== SHIL parameters ============================
173 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
179 //=================== PIPE parameters ============================
181 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
186 //=================== ITS parameters ============================
188 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
189 // almost all other detectors. This involves the fact that the ITS geometry
190 // still has several options to be followed in parallel in order to determine
191 // the best set-up which minimizes the induced background. All the geometries
192 // available to date are described in the following. Read carefully the comments
193 // and use the default version (the only one uncommented) unless you are making
194 // comparisons and you know what you are doing. In this case just uncomment the
195 // ITS geometry you want to use and run Aliroot.
197 // Detailed geometries:
200 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
202 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
204 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
205 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
206 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
207 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
208 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
209 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
210 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
211 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
212 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
213 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
215 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services");
216 //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
217 //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
218 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer
219 //ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
220 //ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
221 //ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
222 //ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
223 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
224 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
227 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
228 // for reconstruction !):
231 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
232 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
233 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
235 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
236 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
237 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
241 // Geant3 <-> EUCLID conversion
242 // ============================
244 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
245 // media to two ASCII files (called by default ITSgeometry.euc and
246 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
247 // The default (=0) means that you dont want to use this facility.
254 //============================ TPC parameters ================================
255 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
256 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
257 // --- sectors are specified, any value other than that requires at least one
258 // --- sector (lower or upper)to be specified!
259 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
260 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
261 // --- SecLows - number of lower sectors specified (up to 6)
262 // --- SecUps - number of upper sectors specified (up to 12)
263 // --- Sens - sensitive strips for the Slow Simulator !!!
264 // --- This does NOT work if all S or L-sectors are specified, i.e.
265 // --- if SecAL or SecAU < 0
268 //-----------------------------------------------------------------------------
270 // gROOT->LoadMacro("SetTPCParam.C");
271 // AliTPCParam *param = SetTPCParam();
272 AliTPC *TPC = new AliTPCv2("TPC", "Default");
274 // All sectors included
283 //=================== TOF parameters ============================
284 AliTOF *TOF = new AliTOFv2FHoles("TOF", "TOF with Holes");
286 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
293 //=================== RICH parameters ===========================
294 AliRICH *RICH = new AliRICHv3("RICH", "normal RICH");
301 //=================== ZDC parameters ============================
303 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
309 //=================== TRD parameters ============================
311 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
313 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
316 // With hole in front of PHOS
318 // With hole in front of RICH
322 AliTRDsim *TRDsim = TRD->CreateTR();
327 //=================== FMD parameters ============================
328 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
329 FMD->SetRingsSi1(256);
330 FMD->SetRingsSi2(128);
331 FMD->SetSectorsSi1(20);
332 FMD->SetSectorsSi2(40);
337 //=================== MUON parameters ===========================
339 AliMUON *MUON = new AliMUONv1("MUON", "default");
341 //=================== PHOS parameters ===========================
345 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
351 //=================== PMD parameters ============================
352 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
357 //=================== START parameters ============================
358 AliSTART *START = new AliSTARTv1("START", "START Detector");
363 //=================== EMCAL parameters ============================
364 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "G56_2_55_19_104_14");
369 //=================== CRT parameters ============================
370 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
375 //=================== CRT parameters ============================
376 AliVZERO *VZERO = new AliVZEROv2("VZERO", "normal VZERO");