1 static Int_t eventsPerRun = 100;
9 kGluonRadiation, kNoGluonRadiation
12 // This part for configuration
13 static PprGeo_t sgeo = kHoles;
14 static PprRad_t srad = kGluonRadiation;
15 static AliMagF::BMap_t smag = AliMagF::k5kG;
18 static TString comment;
21 Float_t EtaToTheta(Float_t arg);
25 cout << "==> Config.C..." << endl;
27 // Set Random Number seed
28 gRandom->SetSeed(12345);
29 cout<<"Seed for random number generation= "<<gRandom->GetSeed()<<endl;
31 gSystem->Load("liblhapdf.so"); // Parton density functions
32 gSystem->Load("libEGPythia6.so"); // TGenerator interface
33 gSystem->Load("libpythia6.so"); // Pythia
34 gSystem->Load("libAliPythia6.so"); // ALICE specific implementations
38 Bool_t isFluka = kTRUE;
40 gSystem->Load("libGeom");
41 cout << "\t* Loading TFluka..." << endl;
42 gSystem->Load("libfluka");
44 cout << "\t* Instantiating TFluka..." << endl;
45 new TFluka("C++ Interface to Fluka", 0/*verbositylevel*/);
48 cout << "\t* Loading Geant3..." << endl;
49 gSystem->Load("libgeant321");
51 cout << "\t* Instantiating Geant3TGeo..." << endl;
52 new TGeant3TGeo("C++ Interface to Geant3");
55 if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
56 AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
57 AliCDBManager::Instance()->SetRun(0);
63 cout<<"Config.C: Creating Run Loader ..."<<endl;
64 rl = AliRunLoader::Open("galice.root",
65 AliConfig::GetDefaultEventFolderName(),
69 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
72 rl->SetCompressionLevel(2);
73 rl->SetNumberOfEventsPerFile(3);
74 gAlice->SetRunLoader(rl);
77 // Set External decayer
78 AliDecayer *decayer = new AliDecayerPythia();
80 decayer->SetForceDecay(kAll);
82 gMC->SetExternalDecayer(decayer);
87 // Physics process control
89 gMC->SetProcess("DCAY",1);
90 gMC->SetProcess("PAIR",1);
91 gMC->SetProcess("COMP",1);
92 gMC->SetProcess("PHOT",1);
93 gMC->SetProcess("PFIS",0);
94 gMC->SetProcess("DRAY",1);
95 gMC->SetProcess("ANNI",1);
96 gMC->SetProcess("BREM",1);
97 gMC->SetProcess("MUNU",1);
98 gMC->SetProcess("CKOV",1);
99 gMC->SetProcess("HADR",1);
100 gMC->SetProcess("LOSS",2);
101 gMC->SetProcess("MULS",1);
102 gMC->SetProcess("RAYL",1);
104 Float_t cut = 1.e-3; // 1MeV cut by default
105 Float_t tofmax = 1.e10;
107 gMC->SetCut("CUTGAM", cut);
108 gMC->SetCut("CUTELE", cut);
109 gMC->SetCut("CUTNEU", cut);
110 gMC->SetCut("CUTHAD", cut);
111 gMC->SetCut("CUTMUO", cut);
112 gMC->SetCut("BCUTE", cut);
113 gMC->SetCut("BCUTM", cut);
114 gMC->SetCut("DCUTE", cut);
115 gMC->SetCut("DCUTM", cut);
116 gMC->SetCut("PPCUTM", cut);
117 gMC->SetCut("TOFMAX", tofmax);
120 //=======================================================================
121 // ************* STEERING parameters FOR ALICE SIMULATION **************
122 // --- Specify event type to be tracked through the ALICE setup
123 // --- All positions are in cm, angles in degrees, and P and E in GeV
124 if (gSystem->Getenv("CONFIG_NPARTICLES"))
125 int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
127 int nParticles = 1000;
129 cout << "\t* Creating and configuring generator for " << nParticles
130 << " particles..." << endl;
132 AliGenHIJINGpara *gener = new AliGenHIJINGpara(nParticles);
134 gener->SetMomentumRange(0., 999);
135 gener->SetPhiRange(0, 360);
136 // Set pseudorapidity range from -3 to 3.
137 Float_t thmin = EtaToTheta( 3.); // theta min. <---> eta max
138 Float_t thmax = EtaToTheta(-3.); // theta max. <---> eta min
139 gener->SetThetaRange(thmin,thmax);
140 gener->SetOrigin(0, 0, 0); //vertex position
141 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
144 // Activate this line if you want the vertex smearing to happen
149 if (smag == AliMagF::k2kG) {
150 comment = comment.Append(" | L3 field 0.2 T");
151 } else if (smag == AliMagF::k5kG) {
152 comment = comment.Append(" | L3 field 0.5 T");
156 if (srad == kGluonRadiation)
158 comment = comment.Append(" | Gluon Radiation On");
161 comment = comment.Append(" | Gluon Radiation Off");
166 comment = comment.Append(" | Holes for PHOS/HMPID");
169 comment = comment.Append(" | No holes for PHOS/HMPID");
172 printf("\n \n Comment: %s \n \n", comment.Data());
176 AliMagF *field = new AliMagF("Maps","Maps", 2, 1., 1., 10., smag);
177 field->SetL3ConstField(0); //Using const. field in the barrel
178 TGeoGlobalMagField::Instance()->SetField(field);
203 cout << "\t* Creating the detectors ..." << endl;
204 //=================== Alice BODY parameters =============================
205 //=================== Alice BODY parameters =============================
206 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
211 //=================== MAG parameters ============================
212 // --- Start with Magnet since detector layouts may be depending ---
213 // --- on the selected Magnet dimensions ---
214 AliMAG *MAG = new AliMAG("MAG", "Magnet");
220 //=================== ABSO parameters ============================
221 AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
226 //=================== DIPO parameters ============================
228 AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 2");
233 //=================== HALL parameters ============================
235 AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
241 //=================== FRAME parameters ============================
243 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
248 //=================== SHIL parameters ============================
250 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
256 //=================== PIPE parameters ============================
258 AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
263 //=================== ITS parameters ============================
265 AliITS *ITS = new AliITSv11Hybrid("ITS","ITS v11Hybrid");
271 //============================ TPC parameters =====================
272 AliTPC *TPC = new AliTPCv2("TPC", "Default");
277 //=================== TOF parameters ============================
278 AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
284 //=================== HMPID parameters ===========================
285 AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");
292 //=================== ZDC parameters ============================
294 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
299 //=================== TRD parameters ============================
301 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
302 AliTRDgeometry *geoTRD = TRD->GetGeometry();
303 // Partial geometry: modules at 2,3,4,6,11,12,14,15
304 // starting at 6h in positive direction
305 geoTRD->SetSMstatus(0,0);
306 geoTRD->SetSMstatus(1,0);
307 geoTRD->SetSMstatus(5,0);
308 geoTRD->SetSMstatus(7,0);
309 geoTRD->SetSMstatus(8,0);
310 geoTRD->SetSMstatus(9,0);
311 geoTRD->SetSMstatus(10,0);
312 geoTRD->SetSMstatus(13,0);
313 geoTRD->SetSMstatus(16,0);
314 geoTRD->SetSMstatus(17,0);
319 //=================== FMD parameters ============================
320 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
325 //=================== MUON parameters ===========================
326 // New MUONv1 version (geometry defined via builders)
327 AliMUON *MUON = new AliMUONv1("MUON", "default");
329 //=================== PHOS parameters ===========================
333 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
334 //Set simulation parameters different from the default ones.
335 AliPHOSSimParam* simEmc = AliPHOSSimParam::GetInstance() ;
337 // APD noise of warm (+20C) PHOS:
338 // a2 = a1*(Y1/Y2)*(M1/M2), where a1 = 0.012 is APD noise at -25C,
339 // Y1 = 4.3 photo-electrons/MeV, Y2 = 1.7 p.e/MeV - light yields at -25C and +20C,
340 // M1 = 50, M2 = 50 - APD gain factors chosen for t1 = -25C and t2 = +20C,
341 // Y = MeanLightYield*APDEfficiency.
343 Float_t apdNoise = 0.012*2.5;
344 simEmc->SetAPDNoise(apdNoise);
346 //Raw Light Yield at +20C
347 simEmc->SetMeanLightYield(18800);
349 //ADC channel width at +18C.
350 simEmc->SetADCchannelW(0.0125);
356 //=================== PMD parameters ============================
357 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
362 //=================== T0 parameters ============================
363 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
368 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "SHISH_77_TRD1_2X2_FINAL_110DEG");
373 //=================== ACORDE parameters ============================
374 AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
379 //=================== ACORDE parameters ============================
380 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
384 Float_t EtaToTheta(Float_t arg){
385 return (180./TMath::Pi())*2.*atan(exp(-arg));