3 // AliRoot Configuration for running aliroot with Monte Carlo.
4 // Called from g4Config.C
6 static Int_t eventsPerRun = 100;
11 static PprGeo_t geo = kHoles;
13 void ConfigCommon(Bool_t interactiveSetup)
15 // =============================
17 // =============================
19 // Create the output file
20 TFile *rootfile = new TFile("galice.root","recreate");
21 rootfile->SetCompressionLevel(2);
23 // Set External decayer
24 AliDecayer* decayer = new AliDecayerPythia();
25 decayer->SetForceDecay(kAll);
27 gMC->SetExternalDecayer(decayer);
29 // Physics process control
30 gMC ->SetProcess("DCAY",1);
31 gMC ->SetProcess("PAIR",1);
32 gMC ->SetProcess("COMP",1);
33 gMC ->SetProcess("PHOT",1);
34 gMC ->SetProcess("PFIS",0);
35 gMC ->SetProcess("DRAY",0);
36 gMC ->SetProcess("ANNI",1);
37 gMC ->SetProcess("BREM",1);
38 gMC ->SetProcess("MUNU",1);
39 //xx gMC ->SetProcess("CKOV",1);
40 gMC ->SetProcess("HADR",1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
41 gMC ->SetProcess("LOSS",2);
42 gMC ->SetProcess("MULS",1);
43 //xx gMC ->SetProcess("RAYL",1);
47 Float_t cut = 1.e-3; // 1MeV cut by default
48 Float_t tofmax = 1.e10;
50 gMC ->SetCut("CUTGAM",cut);
51 gMC ->SetCut("CUTELE",cut);
52 gMC ->SetCut("CUTNEU",cut);
53 gMC ->SetCut("CUTHAD",cut);
54 gMC ->SetCut("CUTMUO",cut);
55 gMC ->SetCut("BCUTE",cut);
56 gMC ->SetCut("BCUTM",cut);
57 gMC ->SetCut("DCUTE",cut);
58 gMC ->SetCut("DCUTM",cut);
59 gMC ->SetCut("PPCUTM",cut);
60 gMC ->SetCut("TOFMAX",tofmax);
62 // =============================
64 // =============================
66 // --- Specify event type to be tracked through the ALICE setup
67 // --- All positions are in cm, angles in degrees, and P and E in GeV
70 if (gSystem->Getenv("CONFIG_NPARTICLES"))
71 nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
76 AliGenHIJINGpara *gener = new AliGenHIJINGpara(nParticles);
77 gener->SetMomentumRange(0,999);
78 gener->SetPhiRange(0,360);
79 // Set pseudorapidity range from -8 to 8.
80 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
81 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
82 gener->SetThetaRange(thmin, thmax);
83 gener->SetOrigin(0,0,0); //vertex position
84 gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
87 // Activate this line if you want the vertex smearing to happen
90 //gener->SetVertexSmear(perTrack);
92 // =============================
94 // =============================
97 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1);
99 gAlice->SetField(field);
101 // Old magnetic field
102 //gAlice->SetField(-999,2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
104 // =============================
106 // =============================
108 if (!interactiveSetup) {
135 // Exclude detectors with temporary problem
139 // END OF ONLY FOR GEANT4
142 //=================== Alice BODY parameters =============================
143 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
148 //=================== MAG parameters ============================
149 // --- Start with Magnet since detector layouts may be depending ---
150 // --- on the selected Magnet dimensions ---
151 AliMAG *MAG = new AliMAG("MAG", "Magnet");
157 //=================== ABSO parameters ============================
158 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
163 //=================== DIPO parameters ============================
165 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
170 //=================== HALL parameters ============================
172 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
178 //=================== FRAME parameters ============================
180 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
190 //=================== SHIL parameters ============================
192 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding");
198 //=================== PIPE parameters ============================
200 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
205 //=================== ITS parameters ============================
207 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
208 // almost all other detectors. This involves the fact that the ITS geometry
209 // still has several options to be followed in parallel in order to determine
210 // the best set-up which minimizes the induced background. All the geometries
211 // available to date are described in the following. Read carefully the comments
212 // and use the default version (the only one uncommented) unless you are making
213 // comparisons and you know what you are doing. In this case just uncomment the
214 // ITS geometry you want to use and run Aliroot.
216 // Detailed geometries:
219 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
221 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
224 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
225 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
226 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
227 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
228 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
229 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
230 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
231 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
232 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
233 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
235 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services");
236 //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
237 //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
238 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer
239 //ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
240 //ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
241 //ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
242 //ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
243 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
244 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
247 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
248 // for reconstruction !):
252 AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
253 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
254 ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
256 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
257 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
258 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
262 // Geant3 <-> EUCLID conversion
263 // ============================
265 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
266 // media to two ASCII files (called by default ITSgeometry.euc and
267 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
268 // The default (=0) means that you dont want to use this facility.
276 //============================ TPC parameters ================================
277 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
278 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
279 // --- sectors are specified, any value other than that requires at least one
280 // --- sector (lower or upper)to be specified!
281 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
282 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
283 // --- SecLows - number of lower sectors specified (up to 6)
284 // --- SecUps - number of upper sectors specified (up to 12)
285 // --- Sens - sensitive strips for the Slow Simulator !!!
286 // --- This does NOT work if all S or L-sectors are specified, i.e.
287 // --- if SecAL or SecAU < 0
290 //-----------------------------------------------------------------------------
292 // gROOT->LoadMacro("SetTPCParam.C");
293 // AliTPCParam *param = SetTPCParam();
294 AliTPC *TPC = new AliTPCv2("TPC", "Default");
296 // All sectors included
305 //=================== TOF parameters ============================
306 AliTOF *TOF = new AliTOFv2FHoles("TOF", "TOF with Holes");
308 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
314 //=================== RICH parameters ===========================
315 AliRICH *RICH = new AliRICHv3("RICH", "normal RICH");
321 //=================== ZDC parameters ============================
323 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
328 //=================== TRD parameters ============================
330 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
332 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
335 // With hole in front of PHOS
337 // With hole in front of RICH
341 AliTRDsim *TRDsim = TRD->CreateTR();
346 //=================== FMD parameters ============================
348 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
349 FMD->SetRingsSi1(256);
350 FMD->SetRingsSi2(128);
351 FMD->SetSectorsSi1(20);
352 FMD->SetSectorsSi2(24);
357 //=================== MUON parameters ===========================
359 AliMUON *MUON = new AliMUONv1("MUON", "default");
361 //=================== PHOS parameters ===========================
365 AliPHOS *PHOS = new AliPHOSv1("PHOS", "GPS2");
371 //=================== PMD parameters ============================
372 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
377 //=================== START parameters ============================
378 AliSTART *START = new AliSTARTv1("START", "START Detector");
383 //=================== EMCAL parameters ============================
384 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "EMCALArch1a");
389 //=================== CRT parameters ============================
391 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
396 //=================== CRT parameters ============================
397 AliVZERO *VZERO = new AliVZEROv2("VZERO", "normal VZERO");
400 } // end (!isSetInteractively)
404 AliRunConfiguration::SwitchHoles(kTRUE);
406 AliRunConfiguration::SwitchHoles(kFALSE);
410 Float_t EtaToTheta(Float_t arg){
411 return (180./TMath::Pi())*2.*atan(exp(-arg));