1 static Int_t eventsPerRun = 100;
9 kGluonRadiation, kNoGluonRadiation
18 // This part for configuration
19 static PprGeo_t sgeo = kHoles;
20 static PprRad_t srad = kGluonRadiation;
21 static PprMag_t smag = k5kG;
24 static TString comment;
27 Float_t EtaToTheta(Float_t arg);
32 cout << "==> Config.C..." << endl;
34 // Set Random Number seed
35 gRandom->SetSeed(12345);
36 cout<<"Seed for random number generation= "<<gRandom->GetSeed()<<endl;
38 gSystem->Load("liblhapdf.so"); // Parton density functions
39 gSystem->Load("libEGPythia6.so"); // TGenerator interface
40 gSystem->Load("libpythia6.so"); // Pythia
41 gSystem->Load("libAliPythia6.so"); // ALICE specific implementations
45 Bool_t isFluka = kTRUE;
47 gSystem->Load("libGeom");
48 cout << "\t* Loading TFluka..." << endl;
49 gSystem->Load("libfluka");
51 cout << "\t* Instantiating TFluka..." << endl;
52 new TFluka("C++ Interface to Fluka", 0/*verbositylevel*/);
55 cout << "\t* Loading Geant3..." << endl;
56 gSystem->Load("libgeant321");
58 cout << "\t* Instantiating Geant3TGeo..." << endl;
59 new TGeant3TGeo("C++ Interface to Geant3");
62 if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
63 AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
64 AliCDBManager::Instance()->SetRun(0);
70 cout<<"Config.C: Creating Run Loader ..."<<endl;
71 rl = AliRunLoader::Open("galice.root",
72 AliConfig::GetDefaultEventFolderName(),
76 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
79 rl->SetCompressionLevel(2);
80 rl->SetNumberOfEventsPerFile(3);
81 gAlice->SetRunLoader(rl);
84 // Set External decayer
85 AliDecayer *decayer = new AliDecayerPythia();
87 decayer->SetForceDecay(kAll);
89 gMC->SetExternalDecayer(decayer);
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);
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(0., 999);
142 gener->SetPhiRange(0, 360);
143 // Set pseudorapidity range from -3 to 3.
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
157 comment = comment.Append(" | L3 field 0.2 T");
158 } else if (smag == k4kG) {
159 comment = comment.Append(" | L3 field 0.4 T");
160 } else if (smag == k5kG) {
161 comment = comment.Append(" | L3 field 0.5 T");
165 if (srad == kGluonRadiation)
167 comment = comment.Append(" | Gluon Radiation On");
170 comment = comment.Append(" | Gluon Radiation Off");
175 comment = comment.Append(" | Holes for PHOS/HMPID");
178 comment = comment.Append(" | No holes for PHOS/HMPID");
181 printf("\n \n Comment: %s \n \n", comment.Data());
185 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., smag);
186 field->SetL3ConstField(0); //Using const. field in the barrel
188 gAlice->SetField(field);
212 cout << "\t* Creating the detectors ..." << endl;
213 //=================== Alice BODY parameters =============================
214 //=================== Alice BODY parameters =============================
215 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
220 //=================== MAG parameters ============================
221 // --- Start with Magnet since detector layouts may be depending ---
222 // --- on the selected Magnet dimensions ---
223 AliMAG *MAG = new AliMAG("MAG", "Magnet");
229 //=================== ABSO parameters ============================
230 AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
235 //=================== DIPO parameters ============================
237 AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 2");
242 //=================== HALL parameters ============================
244 AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
250 //=================== FRAME parameters ============================
252 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
257 //=================== SHIL parameters ============================
259 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
265 //=================== PIPE parameters ============================
267 AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
272 //=================== ITS parameters ============================
274 AliITS *ITS = new AliITSv11Hybrid("ITS","ITS v11Hybrid");
280 //============================ TPC parameters =====================
281 AliTPC *TPC = new AliTPCv2("TPC", "Default");
286 //=================== TOF parameters ============================
287 AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
293 //=================== HMPID parameters ===========================
294 AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");
301 //=================== ZDC parameters ============================
303 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
308 //=================== TRD parameters ============================
310 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
311 AliTRDgeometry *geoTRD = TRD->GetGeometry();
312 // Partial geometry: modules at 2,3,4,6,11,12,14,15
313 // starting at 6h in positive direction
314 geoTRD->SetSMstatus(0,0);
315 geoTRD->SetSMstatus(1,0);
316 geoTRD->SetSMstatus(5,0);
317 geoTRD->SetSMstatus(7,0);
318 geoTRD->SetSMstatus(8,0);
319 geoTRD->SetSMstatus(9,0);
320 geoTRD->SetSMstatus(10,0);
321 geoTRD->SetSMstatus(13,0);
322 geoTRD->SetSMstatus(16,0);
323 geoTRD->SetSMstatus(17,0);
328 //=================== FMD parameters ============================
329 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
334 //=================== MUON parameters ===========================
335 // New MUONv1 version (geometry defined via builders)
336 AliMUON *MUON = new AliMUONv1("MUON", "default");
338 //=================== PHOS parameters ===========================
342 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
343 //Set simulation parameters different from the default ones.
344 AliPHOSSimParam* simEmc = AliPHOSSimParam::GetInstance() ;
346 // APD noise of warm (+20C) PHOS:
347 // a2 = a1*(Y1/Y2)*(M1/M2), where a1 = 0.012 is APD noise at -25C,
348 // Y1 = 4.3 photo-electrons/MeV, Y2 = 1.7 p.e/MeV - light yields at -25C and +20C,
349 // M1 = 50, M2 = 50 - APD gain factors chosen for t1 = -25C and t2 = +20C,
350 // Y = MeanLightYield*APDEfficiency.
352 Float_t apdNoise = 0.012*2.5;
353 simEmc->SetAPDNoise(apdNoise);
355 //Raw Light Yield at +20C
356 simEmc->SetMeanLightYield(18800);
358 //ADC channel width at +18C.
359 simEmc->SetADCchannelW(0.0125);
365 //=================== PMD parameters ============================
366 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
371 //=================== T0 parameters ============================
372 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
377 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "SHISH_77_TRD1_2X2_FINAL_110DEG");
382 //=================== ACORDE parameters ============================
383 AliACORDE *ACORDE = new AliACORDEv0("ACORDE", "normal ACORDE");
388 //=================== ACORDE parameters ============================
389 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
393 Float_t EtaToTheta(Float_t arg){
394 return (180./TMath::Pi())*2.*atan(exp(-arg));