1 static Int_t eventsPerRun = 100;
4 cout << "==> Config.C..." << endl;
6 // Set Random Number seed
7 // gRandom->SetSeed(12345);
10 // libraries required by fluka21
11 cout << "\t* Loading TFluka..." << endl;
12 gSystem->Load("libTFluka");
14 cout << "\t* Instantiating TFluka..." << endl;
15 new TFluka("C++ Interface to Fluka", 3/*verbositylevel*/);
17 cout << "\t* Recreating galice.root if needed..." << endl;
18 if (!gSystem->Getenv("CONFIG_FILE")) {
19 TFile *rootfile = new TFile("galice.root", "recreate");
21 rootfile->SetCompressionLevel(2);
24 TFluka *fluka = (TFluka *) gMC;
25 fluka->SetInputFileName("alice.inp");
27 //cout << "<== Config.C..." << endl;
30 // Set External decayer
31 TVirtualMCDecayer *decayer = new AliDecayerPythia();
33 decayer->SetForceDecay(kAll);
35 gMC->SetExternalDecayer(decayer);
38 // Physics process control
39 gMC ->SetProcess("DCAY",1);
40 gMC ->SetProcess("PAIR",1);
41 gMC ->SetProcess("COMP",1);
42 gMC ->SetProcess("PHOT",1);
43 gMC ->SetProcess("PFIS",0);
44 gMC ->SetProcess("DRAY",0);
45 gMC ->SetProcess("ANNI",1);
46 gMC ->SetProcess("BREM",1);
47 gMC ->SetProcess("MUNU",1);
48 //xx gMC ->SetProcess("CKOV",1);
49 gMC ->SetProcess("HADR",1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
50 gMC ->SetProcess("LOSS",2);
51 gMC ->SetProcess("MULS",1);
52 //xx gMC ->SetProcess("RAYL",1);
56 Float_t cut = 1.e-3; // 1MeV cut by default
57 Float_t tofmax = 1.e10;
59 gMC ->SetCut("CUTGAM",cut);
60 gMC ->SetCut("CUTELE",cut);
61 gMC ->SetCut("CUTNEU",cut);
62 gMC ->SetCut("CUTHAD",cut);
63 gMC ->SetCut("CUTMUO",cut);
64 gMC ->SetCut("BCUTE",cut);
65 gMC ->SetCut("BCUTM",cut);
66 gMC ->SetCut("DCUTE",cut);
67 gMC ->SetCut("DCUTM",cut);
68 gMC ->SetCut("PPCUTM",cut);
69 gMC ->SetCut("TOFMAX",tofmax);
72 //=======================================================================
73 // ************* STEERING parameters FOR ALICE SIMULATION **************
74 // --- Specify event type to be tracked through the ALICE setup
75 // --- All positions are in cm, angles in degrees, and P and E in GeV
76 if (gSystem->Getenv("CONFIG_NPARTICLES"))
77 int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
80 cout << "\t* Creating and configuring generator for " << nParticles
81 << " particles..." << endl;
83 AliGenHIJINGpara *gener = new AliGenHIJINGpara(nParticles);
85 gener->SetMomentumRange(0, 999);
86 gener->SetPhiRange(0, 360);
87 // Set pseudorapidity range from -8 to 8.
88 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
89 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
90 gener->SetThetaRange(thmin,thmax);
91 gener->SetOrigin(0, 0, 0); //vertex position
92 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
95 // Activate this line if you want the vertex smearing to happen
98 //gener->SetVertexSmear(perTrack);
100 cout << "\t* Setting magnetic field..." << endl;
101 gAlice->SetField(-999, 2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
103 cout << "\t* Defining which detectors to load..." << endl;
126 cout << "\t* Creating the detectors ..." << endl;
127 //=================== Alice BODY parameters =============================
128 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
129 cout << "\t\t+ BODY..." << endl;
134 //=================== MAG parameters ============================
135 // --- Start with Magnet since detector layouts may be depending ---
136 // --- on the selected Magnet dimensions ---
137 cout << "\t\t+ Magnet..." << endl;
138 AliMAG *MAG = new AliMAG("MAG", "Magnet");
144 //=================== ABSO parameters ============================
145 cout << "\t\t+ ABSO..." << endl;
146 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
151 //=================== DIPO parameters ============================
152 cout << "\t\t+ DIPO..." << endl;
153 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
158 //=================== HALL parameters ============================
159 cout << "\t\t+ HALL..." << endl;
160 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
166 //=================== FRAME parameters ============================
168 cout << "\t\t+ FRAME..." << endl;
169 AliFRAME *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
175 //=================== SHIL parameters ============================
177 cout << "\t\t+ SHIL..." << endl;
178 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding");
184 //=================== PIPE parameters ============================
186 cout << "\t\t+ PIPE..." << endl;
187 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
191 cout << "\t\t+ ITS..." << endl;
193 //=================== ITS parameters ============================
195 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
196 // almost all other detectors. This involves the fact that the ITS geometry
197 // still has several options to be followed in parallel in order to determine
198 // the best set-up which minimizes the induced background. All the geometries
199 // available to date are described in the following. Read carefully the comments
200 // and use the default version (the only one uncommented) unless you are making
201 // comparisons and you know what you are doing. In this case just uncomment the
202 // ITS geometry you want to use and run Aliroot.
204 // Detailed geometries:
207 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
209 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
211 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
212 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
213 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
214 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
215 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
216 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
217 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
218 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
219 ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
220 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
222 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric 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_vPPRsymm2.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(1); // 1 --> rails in ; 0 --> rails out
231 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
234 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
235 // for reconstruction !):
238 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
239 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
240 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
242 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
243 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
244 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
248 // Geant3 <-> EUCLID conversion
249 // ============================
251 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
252 // media to two ASCII files (called by default ITSgeometry.euc and
253 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
254 // The default (=0) means that you dont want to use this facility.
262 cout << "\t\t+ TPC..." << endl;
263 //============================ TPC parameters ================================
264 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
265 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
266 // --- sectors are specified, any value other than that requires at least one
267 // --- sector (lower or upper)to be specified!
268 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
269 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
270 // --- SecLows - number of lower sectors specified (up to 6)
271 // --- SecUps - number of upper sectors specified (up to 12)
272 // --- Sens - sensitive strips for the Slow Simulator !!!
273 // --- This does NOT work if all S or L-sectors are specified, i.e.
274 // --- if SecAL or SecAU < 0
277 //-----------------------------------------------------------------------------
279 // gROOT->LoadMacro("SetTPCParam.C");
280 // AliTPCParam *param = SetTPCParam();
281 AliTPC *TPC = new AliTPCv2("TPC", "Default");
283 // All sectors included
291 cout << "\t\t+ TOF..." << endl;
292 //=================== TOF parameters ============================
293 AliTOF *TOF = new AliTOFv2("TOF", "normal TOF");
298 cout << "\t\t+ RICH..." << endl;
299 //=================== RICH parameters ===========================
300 AliRICH *RICH = new AliRICHv1("RICH", "normal RICH");
307 cout << "\t\t+ ZDC..." << endl;
308 //=================== ZDC parameters ============================
310 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
315 cout << "\t\t+ CRT..." << endl;
316 //=================== CRT parameters ============================
318 AliCRT *CRT = new AliCRTv0("CRT", "normal CRT");
323 cout << "\t\t+ TRD..." << endl;
324 //=================== TRD parameters ============================
326 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
328 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
331 // With hole in front of PHOS
333 // With hole in front of RICH
336 AliTRDsim *TRDsim = TRD->CreateTR();
341 cout << "\t\t+ FMD..." << endl;
342 //=================== FMD parameters ============================
344 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
345 FMD->SetRingsSi1(256);
346 FMD->SetRingsSi2(64);
347 FMD->SetSectorsSi1(20);
348 FMD->SetSectorsSi2(24);
353 cout << "\t\t+ MUON..." << endl;
354 //=================== MUON parameters ===========================
356 AliMUON *MUON = new AliMUONv1("MUON", "default");
358 //=================== PHOS parameters ===========================
362 cout << "\t\t+ PHOS..." << endl;
363 AliPHOS *PHOS = new AliPHOSv1("PHOS", "GPS2");
369 cout << "\t\t+ PMD..." << endl;
370 //=================== PMD parameters ============================
372 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
374 PMD->SetPAR(1., 1., 0.8, 0.02);
375 PMD->SetIN(6., 18., -580., 27., 27.);
376 PMD->SetGEO(0.0, 0.2, 4.);
377 PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
381 if (iEMCAL && !iRICH)
383 cout << "\t\t+ EMCAL (no RICH)..." << endl;
384 //=================== EMCAL parameters ============================
385 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "EMCALArch1a");
390 cout << "\t\t+ START..." << endl;
391 //=================== START parameters ============================
392 AliSTART *START = new AliSTARTv1("START", "START Detector");
396 cout << "<== Config.C..." << endl;
399 Float_t EtaToTheta(Float_t arg){
400 return (180./TMath::Pi())*2.*atan(exp(-arg));