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);
46 cout << "==> Config.C..." << endl;
48 // Set Random Number seed
49 gRandom->SetSeed(12345);
50 cout<<"Seed for random number generation= "<<gRandom->GetSeed()<<endl;
54 // libraries required by fluka21
56 gSystem->Load("libGeom");
57 cout << "\t* Loading TFluka..." << endl;
58 gSystem->Load("libTFluka");
60 cout << "\t* Instantiating TFluka..." << endl;
61 new TFluka("C++ Interface to Fluka", 0/*verbositylevel*/);
65 cout<<"Config.C: Creating Run Loader ..."<<endl;
66 rl = AliRunLoader::Open("galice.root",
67 AliConfig::GetDefaultEventFolderName(),
71 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
74 rl->SetCompressionLevel(2);
75 rl->SetNumberOfEventsPerFile(3);
76 gAlice->SetRunLoader(rl);
79 // Set External decayer
80 AliDecayer *decayer = new AliDecayerPythia();
82 decayer->SetForceDecay(kAll);
84 gMC->SetExternalDecayer(decayer);
89 // Physics process control
91 gMC->SetProcess("DCAY",1);
92 gMC->SetProcess("PAIR",1);
93 gMC->SetProcess("COMP",1);
94 gMC->SetProcess("PHOT",1);
95 gMC->SetProcess("PFIS",0);
96 gMC->SetProcess("DRAY",1);
97 gMC->SetProcess("ANNI",1);
98 gMC->SetProcess("BREM",1);
99 gMC->SetProcess("MUNU",1);
100 gMC->SetProcess("CKOV",1);
101 gMC->SetProcess("HADR",1);
102 gMC->SetProcess("LOSS",2);
103 gMC->SetProcess("MULS",1);
104 gMC->SetProcess("RAYL",1);
106 Float_t cut = 1.e-3; // 1MeV cut by default
107 Float_t tofmax = 1.e10;
109 gMC->SetCut("CUTGAM", cut);
110 gMC->SetCut("CUTELE", cut);
111 gMC->SetCut("CUTNEU", cut);
112 gMC->SetCut("CUTHAD", cut);
113 gMC->SetCut("CUTMUO", cut);
114 gMC->SetCut("BCUTE", cut);
115 gMC->SetCut("BCUTM", cut);
116 gMC->SetCut("DCUTE", cut);
117 gMC->SetCut("DCUTM", cut);
118 gMC->SetCut("PPCUTM", cut);
119 gMC->SetCut("TOFMAX", tofmax);
122 //=======================================================================
123 // ************* STEERING parameters FOR ALICE SIMULATION **************
124 // --- Specify event type to be tracked through the ALICE setup
125 // --- All positions are in cm, angles in degrees, and P and E in GeV
126 if (gSystem->Getenv("CONFIG_NPARTICLES"))
127 int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
129 int nParticles = 1000;
131 cout << "\t* Creating and configuring generator for " << nParticles
132 << " particles..." << endl;
134 AliGenHIJINGpara *gener = new AliGenHIJINGpara(nParticles);
136 gener->SetMomentumRange(0., 999);
137 gener->SetPhiRange(0, 360);
138 // Set pseudorapidity range from -3 to 3.
139 Float_t thmin = EtaToTheta( 3.); // theta min. <---> eta max
140 Float_t thmax = EtaToTheta(-3.); // theta max. <---> eta min
141 gener->SetThetaRange(thmin,thmax);
142 gener->SetOrigin(0, 0, 0); //vertex position
143 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
146 // Activate this line if you want the vertex smearing to happen
151 // gAlice->SetDebug(10);
153 comment = comment.Append(" | L3 field 0.2 T");
154 } else if (smag == k4kG) {
155 comment = comment.Append(" | L3 field 0.4 T");
156 } else if (smag == k5kG) {
157 comment = comment.Append(" | L3 field 0.5 T");
161 if (srad == kGluonRadiation)
163 comment = comment.Append(" | Gluon Radiation On");
166 comment = comment.Append(" | Gluon Radiation Off");
171 comment = comment.Append(" | Holes for PHOS/RICH");
174 comment = comment.Append(" | No holes for PHOS/RICH");
177 printf("\n \n Comment: %s \n \n", comment.Data());
181 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., smag);
182 field->SetL3ConstField(0); //Using const. field in the barrel
184 gAlice->SetField(field);
208 cout << "\t* Creating the detectors ..." << endl;
209 //=================== Alice BODY parameters =============================
210 //=================== Alice BODY parameters =============================
211 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
216 //=================== MAG parameters ============================
217 // --- Start with Magnet since detector layouts may be depending ---
218 // --- on the selected Magnet dimensions ---
219 AliMAG *MAG = new AliMAG("MAG", "Magnet");
225 //=================== ABSO parameters ============================
226 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
231 //=================== DIPO parameters ============================
233 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
238 //=================== HALL parameters ============================
240 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
246 //=================== FRAME parameters ============================
248 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
249 if (sgeo == kHoles) {
258 //=================== SHIL parameters ============================
260 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
266 //=================== PIPE parameters ============================
268 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
273 //=================== ITS parameters ============================
275 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
276 // almost all other detectors. This involves the fact that the ITS geometry
277 // still has several options to be followed in parallel in order to determine
278 // the best set-up which minimizes the induced background. All the geometries
279 // available to date are described in the following. Read carefully the comments
280 // and use the default version (the only one uncommented) unless you are making
281 // comparisons and you know what you are doing. In this case just uncomment the
282 // ITS geometry you want to use and run Aliroot.
284 // Detailed geometries:
287 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
289 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
291 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version with asymmetric services");
292 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
293 ITS->SetReadDet(kTRUE); // don't touch this parameter if you're not an ITS developer
294 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
295 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
296 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
297 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
298 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
299 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
300 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
302 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
303 // for reconstruction !):
306 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
307 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
308 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
310 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
311 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
312 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
316 // Geant3 <-> EUCLID conversion
317 // ============================
319 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
320 // media to two ASCII files (called by default ITSgeometry.euc and
321 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
322 // The default (=0) means that you dont want to use this facility.
329 //============================ TPC parameters ================================
330 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
331 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
332 // --- sectors are specified, any value other than that requires at least one
333 // --- sector (lower or upper)to be specified!
334 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
335 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
336 // --- SecLows - number of lower sectors specified (up to 6)
337 // --- SecUps - number of upper sectors specified (up to 12)
338 // --- Sens - sensitive strips for the Slow Simulator !!!
339 // --- This does NOT work if all S or L-sectors are specified, i.e.
340 // --- if SecAL or SecAU < 0
343 //-----------------------------------------------------------------------------
345 // gROOT->LoadMacro("SetTPCParam.C");
346 // AliTPCParam *param = SetTPCParam();
347 AliTPC *TPC = new AliTPCv2("TPC", "Default");
349 // All sectors included
357 //=================== TOF parameters ============================
358 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
364 //=================== RICH parameters ===========================
365 AliRICH *RICH = new AliRICHv1("RICH", "normal RICH");
372 //=================== ZDC parameters ============================
374 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
379 //=================== TRD parameters ============================
381 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
383 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
385 if (sgeo == kHoles) {
386 // With hole in front of PHOS
388 // With hole in front of RICH
392 AliTRDsim *TRDsim = TRD->CreateTR();
397 //=================== FMD parameters ============================
398 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
403 //=================== MUON parameters ===========================
405 AliMUON *MUON = new AliMUONv1("MUON", "default");
406 MUON->AddGeometryBuilder(new AliMUONSt1GeometryBuilder(MUON));
407 MUON->AddGeometryBuilder(new AliMUONSt2GeometryBuilder(MUON));
408 MUON->AddGeometryBuilder(new AliMUONSlatGeometryBuilder(MUON));
409 MUON->AddGeometryBuilder(new AliMUONTriggerGeometryBuilder(MUON));
411 //=================== PHOS parameters ===========================
415 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
421 //=================== PMD parameters ============================
422 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
427 //=================== START parameters ============================
428 AliSTART *START = new AliSTARTv1("START", "START Detector");
433 //=================== EMCAL parameters ============================
434 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "EMCAL_55_25");
439 //=================== CRT parameters ============================
440 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
445 //=================== CRT parameters ============================
446 AliVZERO *VZERO = new AliVZEROv3("VZERO", "normal VZERO");
452 Float_t EtaToTheta(Float_t arg){
453 return (180./TMath::Pi())*2.*atan(exp(-arg));