1 static Int_t eventsPerRun = 1;
2 static Int_t nParticles = 100;
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;
68 static MC_t smc = kGEANT3;
71 static TString comment;
74 Float_t EtaToTheta(Float_t arg);
79 cout << "==> Config.C..." << endl;
81 // Set Random Number seed
82 gRandom->SetSeed(12345);
83 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 new TFluka("C++ Interface to Fluka", 0/*verbosity*/);
102 // Libraries needed by GEANT 3.21
104 gSystem->Load("libgeant321");
109 new TGeant3("C++ Interface to Geant3");
112 gAlice->Fatal("Config.C", "No MC type chosen");
119 cout<<"Config.C: Creating Run Loader ..."<<endl;
120 AliRunLoader* rl = AliRunLoader::Open("galice.root",
121 AliConfig::GetDefaultEventFolderName(),
124 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
127 rl->SetCompressionLevel(2);
128 rl->SetNumberOfEventsPerFile(3);
129 gAlice->SetRunLoader(rl);
135 // Use kTRUE as argument to generate alice.pemf first
137 TString alice_pemf(gSystem->Which(".", "peg/mat17.pemf"));
138 if (!alice_pemf.IsNull())
139 ((TFluka*)gMC)->SetGeneratePemf(kFALSE);
141 ((TFluka*)gMC)->SetGeneratePemf(kTRUE);
148 // Set External decayer
150 AliDecayer *decayer = new AliDecayerPythia();
151 decayer->SetForceDecay(kAll);
153 gMC->SetExternalDecayer(decayer);
157 // Physics process control
159 gMC->SetProcess("DCAY",1);
160 gMC->SetProcess("PAIR",1);
161 gMC->SetProcess("COMP",1);
162 gMC->SetProcess("PHOT",1);
163 gMC->SetProcess("PFIS",0);
164 gMC->SetProcess("DRAY",1);
165 gMC->SetProcess("ANNI",1);
166 gMC->SetProcess("BREM",1);
167 gMC->SetProcess("MUNU",1);
168 gMC->SetProcess("CKOV",1);
169 gMC->SetProcess("HADR",1);
170 gMC->SetProcess("LOSS",2);
171 gMC->SetProcess("MULS",1);
172 gMC->SetProcess("RAYL",1);
174 Float_t cut = 1.e-3; // 1MeV cut by default
175 Float_t tofmax = 1.e10;
177 gMC->SetCut("CUTGAM", cut);
178 gMC->SetCut("CUTELE", cut);
179 gMC->SetCut("CUTNEU", cut);
180 gMC->SetCut("CUTHAD", cut);
181 gMC->SetCut("CUTMUO", cut);
182 gMC->SetCut("BCUTE", cut);
183 gMC->SetCut("BCUTM", cut);
184 gMC->SetCut("DCUTE", cut);
185 gMC->SetCut("DCUTM", cut);
186 gMC->SetCut("PPCUTM", cut);
187 gMC->SetCut("TOFMAX", tofmax);
190 //=======================================================================
191 // STEERING parameters FOR ALICE SIMULATION
193 // Specify event type to be tracked through the ALICE setup. All
194 // positions are in cm, angles in degrees, and P and E in GeV
196 if (gSystem->Getenv("CONFIG_NPARTICLES"))
197 nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
199 cout << "\t* Creating and configuring generator for " << nParticles
200 << " particles..." << endl;
201 AliGenHIJINGpara *gener = new AliGenHIJINGpara(nParticles);
202 gener->SetMomentumRange(0., 999);
203 gener->SetPhiRange(0, 360);
205 // Set pseudorapidity range from -6 to 6.
206 Float_t thmin = EtaToTheta( 6.); // theta min. <---> eta max
207 Float_t thmax = EtaToTheta(-6.); // theta max. <---> eta min
208 gener->SetThetaRange(thmin,thmax);
209 gener->SetOrigin(0, 0, 0); //vertex position
210 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
213 // Activate this line if you want the vertex smearing to happen
216 gAlice->SetDebug(10);
222 case k2kG: comment = comment.Append(" | L3 field 0.2 T"); break;
223 case k4kG: comment = comment.Append(" | L3 field 0.4 T"); break;
224 case k5kG: comment = comment.Append(" | L3 field 0.5 T"); break;
228 case kGluonRadiation:
229 comment = comment.Append(" | Gluon Radiation On"); break;
231 comment = comment.Append(" | Gluon Radiation Off"); break;
235 case kHoles: comment = comment.Append(" | Holes for PHOS/RICH"); break;
236 default: comment = comment.Append(" | No holes for PHOS/RICH"); break;
239 std::cout << "\n\n Comment: " << comment << "\n" << std::endl;
244 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., smag);
245 field->SetL3ConstField(0); //Using const. field in the barrel
247 gAlice->SetField(field);
252 Bool_t useABSO = kFALSE;
253 Bool_t useCRT = kFALSE;
254 Bool_t useDIPO = kFALSE;
255 Bool_t useFMD = kTRUE;
256 Bool_t useFRAME = kFALSE;
257 Bool_t useHALL = kFALSE;
258 Bool_t useITS = kFALSE;
259 Bool_t useMAG = kFALSE;
260 Bool_t useMUON = kFALSE;
261 Bool_t usePHOS = kFALSE;
262 Bool_t usePIPE = kFALSE;
263 Bool_t usePMD = kFALSE;
264 Bool_t useRICH = kFALSE;
265 Bool_t useSHIL = kFALSE;
266 Bool_t useSTART = kFALSE;
267 Bool_t useTOF = kFALSE;
268 Bool_t useTPC = kFALSE;
269 Bool_t useTRD = kFALSE;
270 Bool_t useZDC = kFALSE;
271 Bool_t useEMCAL = kFALSE;
272 Bool_t useVZERO = kFALSE;
274 cout << "\t* Creating the detectors ..." << endl;
275 //=================== Alice BODY parameters =============================
276 //=================== Alice BODY parameters =============================
277 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
281 //=================== MAG parameters ============================
282 // Start with Magnet since detector layouts may be depending on
283 // the selected Magnet dimensions
284 AliMAG *MAG = new AliMAG("MAG", "Magnet");
288 //=================== ABSO parameters ============================
289 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
293 //=================== DIPO parameters ============================
295 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
299 //=================== HALL parameters ============================
300 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
305 //=================== FRAME parameters ============================
306 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
308 case kHoles: FRAME->SetHoles(1); break;
309 default: FRAME->SetHoles(0); break;
314 //=================== SHIL parameters ============================
315 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
320 //=================== PIPE parameters ============================
321 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
325 //=================== ITS parameters ============================
327 // As the innermost detector in ALICE, the Inner Tracking System
328 // "impacts" on almost all other detectors. This involves the fact
329 // that the ITS geometry still has several options to be followed
330 // in parallel in order to determine the best set-up which
331 // minimizes the induced background. All the geometries available
332 // to date are described in the following. Read carefully the
333 // comments and use the default version (the only one uncommented)
334 // unless you are making comparisons and you know what you are
335 // doing. In this case just uncomment the ITS geometry you want to
336 // use and run Aliroot.
338 // Detailed geometries:
342 // new AliITSv5symm("ITS", "Updated ITS TDR detailed version "
343 // "with symmetric services");
345 // new AliITSv5asymm("ITS","Updates ITS TDR detailed version "
346 // "with asymmetric services");
348 AliITSvPPRasymmFMD *ITS =
349 new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version "
350 "with asymmetric services");
351 // don't touch this parameter if you're not an ITS developer
352 ITS->SetMinorVersion(2);
353 // don't touch this parameter if you're not an ITS developer
354 ITS->SetReadDet(kTRUE);
355 // don't touch this parameter if you're not an ITS developer
356 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det");
357 // detector thickness on layer 1 must be in the range [100,300]
358 ITS->SetThicknessDet1(200.);
359 // detector thickness on layer 2 must be in the range [100,300]
360 ITS->SetThicknessDet2(200.);
361 // chip thickness on layer 1 must be in the range [150,300]
362 ITS->SetThicknessChip1(200.);
363 // chip thickness on layer 2 must be in the range [150,300]
364 ITS->SetThicknessChip2(200.);
365 // 1 --> rails in ; 0 --> rails out
367 // 1 --> water ; 0 --> freon
368 ITS->SetCoolingFluid(1);
370 // Coarse geometries (warning: no hits are produced with these
371 // coarse geometries and they unuseful for reconstruction !):
374 // AliITSvPPRcoarseasymm *ITS =
375 // new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version "
376 // "with asymmetric services");
377 // 1 --> rails in ; 0 --> rails out
379 // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
380 // ITS->SetSupportMaterial(0);
383 // new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version "
384 // "with symmetric services");
385 // 1 --> rails in ; 0 --> rails out
387 // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
388 // ITS->SetSupportMaterial(0);
390 // Geant3 <-> EUCLID conversion
391 // ============================
393 // SetEUCLID is a flag to output (=1) or not to output (=0) both
394 // geometry and media to two ASCII files (called by default
395 // ITSgeometry.euc and ITSgeometry.tme) in a format understandable
396 // to the CAD system EUCLID. The default (=0) means that you dont
397 // want to use this facility.
403 //============================ TPC parameters ====================
405 // This allows the user to specify sectors for the SLOW (TPC
406 // geometry 2) Simulator. SecAL (SecAU) <0 means that ALL lower
407 // (upper) sectors are specified, any value other than that
408 // requires at least one sector (lower or upper)to be specified!
411 // sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
412 // sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
414 // SecLows - number of lower sectors specified (up to 6)
415 // SecUps - number of upper sectors specified (up to 12)
416 // Sens - sensitive strips for the Slow Simulator !!!
418 // This does NOT work if all S or L-sectors are specified, i.e.
419 // if SecAL or SecAU < 0
422 //----------------------------------------------------------------
423 // gROOT->LoadMacro("SetTPCParam.C");
424 // AliTPCParam *param = SetTPCParam();
425 AliTPC *TPC = new AliTPCv2("TPC", "Default");
427 // All sectors included
433 //=================== TOF parameters ============================
434 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
438 //=================== RICH parameters ===========================
439 AliRICH *RICH = new AliRICHv1("RICH", "normal RICH");
444 //=================== ZDC parameters ============================
445 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
449 //=================== TRD parameters ============================
450 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
452 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
454 if (sgeo == kHoles) {
455 // With hole in front of PHOS
457 // With hole in front of RICH
461 AliTRDsim *TRDsim = TRD->CreateTR();
465 //=================== FMD parameters ============================
466 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
470 //=================== MUON parameters ===========================
471 AliMUON *MUON = new AliMUONv1("MUON", "default");
472 MUON->AddGeometryBuilder(new AliMUONSt1GeometryBuilder(MUON));
473 MUON->AddGeometryBuilder(new AliMUONSt2GeometryBuilder(MUON));
474 MUON->AddGeometryBuilder(new AliMUONSlatGeometryBuilder(MUON));
475 MUON->AddGeometryBuilder(new AliMUONTriggerGeometryBuilder(MUON));
479 //=================== PHOS parameters ===========================
480 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
484 //=================== PMD parameters ============================
485 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
489 //=================== START parameters ============================
490 AliSTART *START = new AliSTARTv1("START", "START Detector");
494 //=================== EMCAL parameters ============================
495 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "EMCAL_55_25");
499 //=================== CRT parameters ============================
500 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
504 //=================== CRT parameters ============================
505 AliVZERO *VZERO = new AliVZEROv3("VZERO", "normal VZERO");
509 Float_t EtaToTheta(Float_t arg)
511 return (180./TMath::Pi())*2.*atan(exp(-arg));