1 static Int_t eventsPerRun = 1;
2 static Int_t nParticles = 1000;
61 // This part for configuration
62 //static PprRun_t srun = test50;
63 static PprRun_t srun = kPythia6;
64 static PprGeo_t sgeo = kHoles;
65 static PprRad_t srad = kGluonRadiation;
66 static PprMag_t smag = k5kG;
67 static MC_t smc = kFLUKA;
70 static TString comment;
73 Float_t EtaToTheta(Float_t arg);
78 cout << "==> Config.C..." << endl;
80 // Set Random Number seed
81 gRandom->SetSeed(12345);
82 cout<<"Seed for random number generation= "<<gRandom->GetSeed()<<endl;
88 // libraries required by fluka21
90 gSystem->Load("libGeom");
91 cout << "\t* Loading TFluka..." << endl;
92 gSystem->Load("libTFluka");
97 cout << "\t* Instantiating TFluka..." << endl;
98 TFluka* fluka = new TFluka("C++ Interface to Fluka", 0/*verbosity*/);
100 // Use kTRUE as argument to generate alice.pemf first
102 TString alice_pemf(gSystem->Which(".", "FlukaVmc.pemf"));
103 if (!alice_pemf.IsNull())
104 fluka->SetGeneratePemf(kFALSE);
106 fluka->SetGeneratePemf(kTRUE);
112 // Libraries needed by GEANT 3.21
114 gSystem->Load("libgeant321");
119 TGeant3* geant3 = new TGeant3("C++ Interface to Geant3");
123 gAlice->Fatal("Config.C", "No MC type chosen");
130 cout<<"Config.C: Creating Run Loader ..."<<endl;
131 AliRunLoader* rl = AliRunLoader::Open("galice.root",
132 AliConfig::GetDefaultEventFolderName(),
135 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
138 rl->SetCompressionLevel(2);
139 rl->SetNumberOfEventsPerFile(3);
140 gAlice->SetRunLoader(rl);
143 // Set External decayer
145 AliDecayer *decayer = new AliDecayerPythia();
146 decayer->SetForceDecay(kAll);
148 gMC->SetExternalDecayer(decayer);
152 // Physics process control
154 gMC->SetProcess("DCAY",1);
155 gMC->SetProcess("PAIR",1);
156 gMC->SetProcess("COMP",1);
157 gMC->SetProcess("PHOT",1);
158 gMC->SetProcess("PFIS",0);
159 gMC->SetProcess("DRAY",1);
160 gMC->SetProcess("ANNI",1);
161 gMC->SetProcess("BREM",1);
162 gMC->SetProcess("MUNU",1);
163 gMC->SetProcess("CKOV",1);
164 gMC->SetProcess("HADR",1);
165 gMC->SetProcess("LOSS",2);
166 gMC->SetProcess("MULS",1);
167 gMC->SetProcess("RAYL",1);
169 Float_t cut = 1.e-3; // 1MeV cut by default
170 Float_t tofmax = 1.e10;
172 gMC->SetCut("CUTGAM", cut);
173 gMC->SetCut("CUTELE", cut);
174 gMC->SetCut("CUTNEU", cut);
175 gMC->SetCut("CUTHAD", cut);
176 gMC->SetCut("CUTMUO", cut);
177 gMC->SetCut("BCUTE", cut);
178 gMC->SetCut("BCUTM", cut);
179 gMC->SetCut("DCUTE", cut);
180 gMC->SetCut("DCUTM", cut);
181 gMC->SetCut("PPCUTM", cut);
182 gMC->SetCut("TOFMAX", tofmax);
185 //=======================================================================
186 // STEERING parameters FOR ALICE SIMULATION
188 // Specify event type to be tracked through the ALICE setup. All
189 // positions are in cm, angles in degrees, and P and E in GeV
191 if (gSystem->Getenv("CONFIG_NPARTICLES"))
192 nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
194 cout << "\t* Creating and configuring generator for " << nParticles
195 << " particles..." << endl;
196 AliGenHIJINGpara *gener = new AliGenHIJINGpara(nParticles);
197 gener->SetMomentumRange(0., 999);
198 gener->SetPhiRange(0, 360);
200 // Set pseudorapidity range from -6 to 6.
201 Float_t thmin = EtaToTheta( 6.); // theta min. <---> eta max
202 Float_t thmax = EtaToTheta(-6.); // theta max. <---> eta min
203 gener->SetThetaRange(thmin,thmax);
204 gener->SetOrigin(0, 0, 0); //vertex position
205 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
208 // Activate this line if you want the vertex smearing to happen
211 gAlice->SetDebug(10);
217 case k2kG: comment = comment.Append(" | L3 field 0.2 T"); break;
218 case k4kG: comment = comment.Append(" | L3 field 0.4 T"); break;
219 case k5kG: comment = comment.Append(" | L3 field 0.5 T"); break;
223 case kGluonRadiation:
224 comment = comment.Append(" | Gluon Radiation On"); break;
226 comment = comment.Append(" | Gluon Radiation Off"); break;
230 case kHoles: comment = comment.Append(" | Holes for PHOS/RICH"); break;
231 default: comment = comment.Append(" | No holes for PHOS/RICH"); break;
234 std::cout << "\n\n Comment: " << comment << "\n" << std::endl;
239 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., smag);
240 field->SetL3ConstField(0); //Using const. field in the barrel
242 gAlice->SetField(field);
247 Bool_t useABSO = kFALSE;
248 Bool_t useCRT = kFALSE;
249 Bool_t useDIPO = kFALSE;
250 Bool_t useFMD = kTRUE;
251 Bool_t useFRAME = kFALSE;
252 Bool_t useHALL = kFALSE;
253 Bool_t useITS = kFALSE;
254 Bool_t useMAG = kFALSE;
255 Bool_t useMUON = kFALSE;
256 Bool_t usePHOS = kFALSE;
257 Bool_t usePIPE = kFALSE;
258 Bool_t usePMD = kFALSE;
259 Bool_t useRICH = kFALSE;
260 Bool_t useSHIL = kFALSE;
261 Bool_t useSTART = kFALSE;
262 Bool_t useTOF = kFALSE;
263 Bool_t useTPC = kFALSE;
264 Bool_t useTRD = kFALSE;
265 Bool_t useZDC = kFALSE;
266 Bool_t useEMCAL = kFALSE;
267 Bool_t useVZERO = kFALSE;
269 cout << "\t* Creating the detectors ..." << endl;
270 //=================== Alice BODY parameters =============================
271 //=================== Alice BODY parameters =============================
272 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
276 //=================== MAG parameters ============================
277 // Start with Magnet since detector layouts may be depending on
278 // the selected Magnet dimensions
279 AliMAG *MAG = new AliMAG("MAG", "Magnet");
283 //=================== ABSO parameters ============================
284 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
288 //=================== DIPO parameters ============================
290 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
294 //=================== HALL parameters ============================
295 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
300 //=================== FRAME parameters ============================
301 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
303 case kHoles: FRAME->SetHoles(1); break;
304 default: FRAME->SetHoles(0); break;
309 //=================== SHIL parameters ============================
310 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
315 //=================== PIPE parameters ============================
316 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
320 //=================== ITS parameters ============================
322 // As the innermost detector in ALICE, the Inner Tracking System
323 // "impacts" on almost all other detectors. This involves the fact
324 // that the ITS geometry still has several options to be followed
325 // in parallel in order to determine the best set-up which
326 // minimizes the induced background. All the geometries available
327 // to date are described in the following. Read carefully the
328 // comments and use the default version (the only one uncommented)
329 // unless you are making comparisons and you know what you are
330 // doing. In this case just uncomment the ITS geometry you want to
331 // use and run Aliroot.
333 // Detailed geometries:
337 // new AliITSv5symm("ITS", "Updated ITS TDR detailed version "
338 // "with symmetric services");
340 // new AliITSv5asymm("ITS","Updates ITS TDR detailed version "
341 // "with asymmetric services");
343 AliITSvPPRasymmFMD *ITS =
344 new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version "
345 "with asymmetric services");
346 // don't touch this parameter if you're not an ITS developer
347 ITS->SetMinorVersion(2);
348 // don't touch this parameter if you're not an ITS developer
349 ITS->SetReadDet(kTRUE);
350 // don't touch this parameter if you're not an ITS developer
351 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det");
352 // detector thickness on layer 1 must be in the range [100,300]
353 ITS->SetThicknessDet1(200.);
354 // detector thickness on layer 2 must be in the range [100,300]
355 ITS->SetThicknessDet2(200.);
356 // chip thickness on layer 1 must be in the range [150,300]
357 ITS->SetThicknessChip1(200.);
358 // chip thickness on layer 2 must be in the range [150,300]
359 ITS->SetThicknessChip2(200.);
360 // 1 --> rails in ; 0 --> rails out
362 // 1 --> water ; 0 --> freon
363 ITS->SetCoolingFluid(1);
365 // Coarse geometries (warning: no hits are produced with these
366 // coarse geometries and they unuseful for reconstruction !):
369 // AliITSvPPRcoarseasymm *ITS =
370 // new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version "
371 // "with asymmetric services");
372 // 1 --> rails in ; 0 --> rails out
374 // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
375 // ITS->SetSupportMaterial(0);
378 // new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version "
379 // "with symmetric services");
380 // 1 --> rails in ; 0 --> rails out
382 // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
383 // ITS->SetSupportMaterial(0);
385 // Geant3 <-> EUCLID conversion
386 // ============================
388 // SetEUCLID is a flag to output (=1) or not to output (=0) both
389 // geometry and media to two ASCII files (called by default
390 // ITSgeometry.euc and ITSgeometry.tme) in a format understandable
391 // to the CAD system EUCLID. The default (=0) means that you dont
392 // want to use this facility.
398 //============================ TPC parameters ====================
400 // This allows the user to specify sectors for the SLOW (TPC
401 // geometry 2) Simulator. SecAL (SecAU) <0 means that ALL lower
402 // (upper) sectors are specified, any value other than that
403 // requires at least one sector (lower or upper)to be specified!
406 // sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
407 // sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
409 // SecLows - number of lower sectors specified (up to 6)
410 // SecUps - number of upper sectors specified (up to 12)
411 // Sens - sensitive strips for the Slow Simulator !!!
413 // This does NOT work if all S or L-sectors are specified, i.e.
414 // if SecAL or SecAU < 0
417 //----------------------------------------------------------------
418 // gROOT->LoadMacro("SetTPCParam.C");
419 // AliTPCParam *param = SetTPCParam();
420 AliTPC *TPC = new AliTPCv2("TPC", "Default");
422 // All sectors included
428 //=================== TOF parameters ============================
429 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
433 //=================== RICH parameters ===========================
434 AliRICH *RICH = new AliRICHv1("RICH", "normal RICH");
439 //=================== ZDC parameters ============================
440 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
444 //=================== TRD parameters ============================
445 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
447 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
449 if (sgeo == kHoles) {
450 // With hole in front of PHOS
452 // With hole in front of RICH
456 AliTRDsim *TRDsim = TRD->CreateTR();
460 //=================== FMD parameters ============================
461 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
465 //=================== MUON parameters ===========================
466 AliMUON *MUON = new AliMUONv1("MUON", "default");
467 MUON->AddGeometryBuilder(new AliMUONSt1GeometryBuilder(MUON));
468 MUON->AddGeometryBuilder(new AliMUONSt2GeometryBuilder(MUON));
469 MUON->AddGeometryBuilder(new AliMUONSlatGeometryBuilder(MUON));
470 MUON->AddGeometryBuilder(new AliMUONTriggerGeometryBuilder(MUON));
474 //=================== PHOS parameters ===========================
475 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
479 //=================== PMD parameters ============================
480 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
484 //=================== START parameters ============================
485 AliSTART *START = new AliSTARTv1("START", "START Detector");
489 //=================== EMCAL parameters ============================
490 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "EMCAL_55_25");
494 //=================== CRT parameters ============================
495 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
499 //=================== CRT parameters ============================
500 AliVZERO *VZERO = new AliVZEROv3("VZERO", "normal VZERO");
504 Float_t EtaToTheta(Float_t arg)
506 return (180./TMath::Pi())*2.*atan(exp(-arg));