1 static Int_t eventsPerRun = 100;
5 kParam_8000, kParam_4000, kParam_2000,
6 kHijing_cent1, kHijing_cent2,
7 kHijing_per1, kHijing_per2, kHijing_per3, kHijing_per4, kHijing_per5,
8 kHijing_jj25, kHijing_jj50, kHijing_jj75, kHijing_jj100, kHijing_jj200,
9 kHijing_gj25, kHijing_gj50, kHijing_gj75, kHijing_gj100, kHijing_gj200,
10 kHijing_pA, kPythia6, kPythia6Jets, kD0PbPb5500, kD_TRD, kB_TRD, kJpsi_TRD,
21 kGluonRadiation, kNoGluonRadiation
30 // This part for configuration
31 //static PprRun_t srun = test50;
32 static PprRun_t srun = kPythia6;
33 static PprGeo_t sgeo = kHoles;
34 static PprRad_t srad = kGluonRadiation;
35 static PprMag_t smag = k5kG;
38 static TString comment;
41 Float_t EtaToTheta(Float_t arg);
42 //AliGenerator* GeneratorFactory(PprRun_t srun);
43 //AliGenHijing* HijingStandard();
47 cout << "==> Config.C..." << endl;
49 // Set Random Number seed
50 gRandom->SetSeed(12345);
51 cout<<"Seed for random number generation= "<<gRandom->GetSeed()<<endl;
55 // libraries required by fluka21
57 gSystem->Load("libGeom");
58 cout << "\t* Loading TFluka..." << endl;
59 gSystem->Load("libTFluka");
61 cout << "\t* Instantiating TFluka..." << endl;
62 new TFluka("C++ Interface to Fluka", 0/*verbositylevel*/);
66 cout<<"Config.C: Creating Run Loader ..."<<endl;
67 rl = AliRunLoader::Open("galice.root",
68 AliConfig::GetDefaultEventFolderName(),
72 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
75 rl->SetCompressionLevel(2);
76 rl->SetNumberOfEventsPerFile(3);
77 gAlice->SetRunLoader(rl);
80 // Set External decayer
81 AliDecayer *decayer = new AliDecayerPythia();
83 decayer->SetForceDecay(kAll);
85 gMC->SetExternalDecayer(decayer);
87 TFluka *fluka = (TFluka *) gMC;
88 fluka->SetCoreInputFileName("corealice.inp");
89 fluka->SetInputFileName("alice.inp");
90 fluka->SetGeneratePemf(kFALSE);
94 // Physics process control
96 gMC->SetProcess("DCAY",1);
97 gMC->SetProcess("PAIR",1);
98 gMC->SetProcess("COMP",1);
99 gMC->SetProcess("PHOT",1);
100 gMC->SetProcess("PFIS",0);
101 gMC->SetProcess("DRAY",1);
102 gMC->SetProcess("ANNI",1);
103 gMC->SetProcess("BREM",1);
104 gMC->SetProcess("MUNU",1);
105 gMC->SetProcess("CKOV",1); // 1
106 gMC->SetProcess("HADR",1);
107 gMC->SetProcess("LOSS",2);
108 gMC->SetProcess("MULS",1);
109 gMC->SetProcess("RAYL",1);
111 Float_t cut = 1.e-3; // 1MeV cut by default
112 Float_t tofmax = 1.e10;
114 gMC->SetCut("CUTGAM", cut);
115 gMC->SetCut("CUTELE", cut);
116 gMC->SetCut("CUTNEU", cut);
117 gMC->SetCut("CUTHAD", cut);
118 gMC->SetCut("CUTMUO", cut);
119 gMC->SetCut("BCUTE", cut);
120 gMC->SetCut("BCUTM", cut);
121 gMC->SetCut("DCUTE", cut);
122 gMC->SetCut("DCUTM", cut);
123 gMC->SetCut("PPCUTM", cut);
124 gMC->SetCut("TOFMAX", tofmax);
127 //=======================================================================
128 // ************* STEERING parameters FOR ALICE SIMULATION **************
129 // --- Specify event type to be tracked through the ALICE setup
130 // --- All positions are in cm, angles in degrees, and P and E in GeV
131 if (gSystem->Getenv("CONFIG_NPARTICLES"))
132 int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
134 int nParticles = 1000;
136 cout << "\t* Creating and configuring generator for " << nParticles
137 << " particles..." << endl;
139 AliGenHIJINGpara *gener = new AliGenHIJINGpara(nParticles);
141 gener->SetMomentumRange(2, 999);
142 gener->SetPhiRange(0, 360);
143 // Set pseudorapidity range from -8 to 8.
144 Float_t thmin = EtaToTheta( 3.); // theta min. <---> eta max
145 Float_t thmax = EtaToTheta(-3.); // theta max. <---> eta min
146 gener->SetThetaRange(thmin,thmax);
147 gener->SetOrigin(0, 0, 0); //vertex position
148 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
151 // Activate this line if you want the vertex smearing to happen
156 gAlice->SetDebug(10);
158 comment = comment.Append(" | L3 field 0.2 T");
159 } else if (smag == k4kG) {
160 comment = comment.Append(" | L3 field 0.4 T");
161 } else if (smag == k5kG) {
162 comment = comment.Append(" | L3 field 0.5 T");
166 if (srad == kGluonRadiation)
168 comment = comment.Append(" | Gluon Radiation On");
171 comment = comment.Append(" | Gluon Radiation Off");
176 comment = comment.Append(" | Holes for PHOS/RICH");
179 comment = comment.Append(" | No holes for PHOS/RICH");
182 printf("\n \n Comment: %s \n \n", comment.Data());
186 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., smag);
187 field->SetL3ConstField(0); //Using const. field in the barrel
189 gAlice->SetField(field);
192 Int_t iCRT = 0; //Not good ?
195 Int_t iFRAME = 0; //1
199 Int_t iMUON = 0; //1. Not good (newFlagLttc=10000 is outside array bounds)
202 Int_t iPMD = 0; //Not good (too many regions)
203 Int_t iRICH = 1; //1. Not good (no tracking with FRAME)
204 Int_t iSHIL = 0; //1. Not good (no tracking) (it works alone)
205 Int_t iSTART = 0; //1. Not good (no tracking) (it works alone)
206 Int_t iTOF = 0; //1. Not good (no tracking) (newFlagLttc=10000 is outside array bounds if alone)
208 Int_t iTRD = 0; //1. Not good (no tracking) (Crash alone with FRAME)
209 Int_t iZDC = 0; //1. Needs SHIL and others
210 Int_t iEMCAL = 0; //Not good (Crash)
213 cout << "\t* Creating the detectors ..." << endl;
214 //=================== Alice BODY parameters =============================
215 //=================== Alice BODY parameters =============================
216 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
221 //=================== MAG parameters ============================
222 // --- Start with Magnet since detector layouts may be depending ---
223 // --- on the selected Magnet dimensions ---
224 AliMAG *MAG = new AliMAG("MAG", "Magnet");
230 //=================== ABSO parameters ============================
231 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
236 //=================== DIPO parameters ============================
238 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
243 //=================== HALL parameters ============================
245 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
251 //=================== FRAME parameters ============================
253 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
254 if (sgeo == kHoles) {
263 //=================== SHIL parameters ============================
265 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
271 //=================== PIPE parameters ============================
273 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
278 //=================== ITS parameters ============================
280 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
281 // almost all other detectors. This involves the fact that the ITS geometry
282 // still has several options to be followed in parallel in order to determine
283 // the best set-up which minimizes the induced background. All the geometries
284 // available to date are described in the following. Read carefully the comments
285 // and use the default version (the only one uncommented) unless you are making
286 // comparisons and you know what you are doing. In this case just uncomment the
287 // ITS geometry you want to use and run Aliroot.
289 // Detailed geometries:
292 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
294 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
296 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version with asymmetric services");
297 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
298 ITS->SetReadDet(kTRUE); // don't touch this parameter if you're not an ITS developer
299 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
300 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
301 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
302 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
303 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
304 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
305 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
307 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
308 // for reconstruction !):
311 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
312 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
313 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
315 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
316 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
317 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
321 // Geant3 <-> EUCLID conversion
322 // ============================
324 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
325 // media to two ASCII files (called by default ITSgeometry.euc and
326 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
327 // The default (=0) means that you dont want to use this facility.
334 //============================ TPC parameters ================================
335 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
336 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
337 // --- sectors are specified, any value other than that requires at least one
338 // --- sector (lower or upper)to be specified!
339 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
340 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
341 // --- SecLows - number of lower sectors specified (up to 6)
342 // --- SecUps - number of upper sectors specified (up to 12)
343 // --- Sens - sensitive strips for the Slow Simulator !!!
344 // --- This does NOT work if all S or L-sectors are specified, i.e.
345 // --- if SecAL or SecAU < 0
348 //-----------------------------------------------------------------------------
350 // gROOT->LoadMacro("SetTPCParam.C");
351 // AliTPCParam *param = SetTPCParam();
352 AliTPC *TPC = new AliTPCv2("TPC", "Default");
354 // All sectors included
362 //=================== TOF parameters ============================
363 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
369 //=================== RICH parameters ===========================
370 AliRICH *RICH = new AliRICHv1("RICH", "normal RICH");
377 //=================== ZDC parameters ============================
379 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
384 //=================== TRD parameters ============================
386 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
388 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
390 if (sgeo == kHoles) {
391 // With hole in front of PHOS
393 // With hole in front of RICH
397 AliTRDsim *TRDsim = TRD->CreateTR();
402 //=================== FMD parameters ============================
403 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
408 //=================== MUON parameters ===========================
410 AliMUON *MUON = new AliMUONv1("MUON", "default");
411 MUON->AddGeometryBuilder(new AliMUONSt1GeometryBuilder(MUON));
412 MUON->AddGeometryBuilder(new AliMUONSt2GeometryBuilder(MUON));
413 MUON->AddGeometryBuilder(new AliMUONSlatGeometryBuilder(MUON));
414 MUON->AddGeometryBuilder(new AliMUONTriggerGeometryBuilder(MUON));
416 //=================== PHOS parameters ===========================
420 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
426 //=================== PMD parameters ============================
427 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
432 //=================== START parameters ============================
433 AliSTART *START = new AliSTARTv1("START", "START Detector");
438 //=================== EMCAL parameters ============================
439 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "EMCAL_55_25");
444 //=================== CRT parameters ============================
445 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
450 //=================== CRT parameters ============================
451 AliVZERO *VZERO = new AliVZEROv3("VZERO", "normal VZERO");
457 Float_t EtaToTheta(Float_t arg){
458 return (180./TMath::Pi())*2.*atan(exp(-arg));