3 // AliRoot Configuration for running aliroot with Monte Carlo.
4 // Called from g4Config.C
6 // By I. Hrivnacova, IPN Orsay
12 static PprGeo_t geo = kHoles;
14 Float_t EtaToTheta(Float_t arg);
16 static Int_t eventsPerRun = 50;
18 void ConfigCommon(Bool_t setRootGeometry = kTRUE)
20 cout << "Running ConfigCommon.C ... " << endl;
22 // Load Pythia libraries
25 // Create the output file
27 rl = AliRunLoader::Open("galice.root",
28 AliConfig::GetDefaultEventFolderName(),
31 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
34 rl->SetCompressionLevel(2);
35 rl->SetNumberOfEventsPerFile(3);
36 gAlice->SetRunLoader(rl);
38 // Set Root geometry file
40 if ( setRootGeometry ) {
41 gAlice->SetRootGeometry();
42 gAlice->SetGeometryFromFile("geometry.root");
45 // Set the trigger configuration
46 gAlice->SetTriggerDescriptor("Pb-Pb");
47 cout<<"Trigger configuration is set to Pb-Pb"<<endl;
49 // Set Random Number seed
50 gRandom->SetSeed(123456); // Set 0 to use the currecnt time
51 AliLog::Message(AliLog::kInfo, Form("Seed for random number generation = %d",gRandom->GetSeed()), "Config.C", "Config.C", "Config()","Config.C", __LINE__);
53 if (gSystem->Getenv("CONFIG_NPARTICLES"))
55 nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
58 AliGenCocktail *gener = new AliGenCocktail();
59 gener->SetPhiRange(0, 360);
60 // Set pseudorapidity range from -8 to 8.
61 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
62 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
63 gener->SetThetaRange(thmin,thmax);
64 gener->SetOrigin(0, 0, 0); //vertex position
65 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
67 AliGenHIJINGpara *hijingparam = new AliGenHIJINGpara(nParticles);
68 hijingparam->SetMomentumRange(0.2, 999);
69 gener->AddGenerator(hijingparam,"HIJING PARAM",1);
73 // Activate this line if you want the vertex smearing to happen
76 //gener->SetVertexSmear(perTrack);
78 // =============================
80 // =============================
83 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1);
84 gAlice->SetField(field);
130 // Exluded for problems
133 //=================== Alice BODY parameters =============================
134 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
138 //=================== MAG parameters ============================
139 // --- Start with Magnet since detector layouts may be depending ---
140 // --- on the selected Magnet dimensions ---
141 AliMAG *MAG = new AliMAG("MAG", "Magnet");
147 //=================== ABSO parameters ============================
148 AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
153 //=================== DIPO parameters ============================
155 AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
160 //=================== HALL parameters ============================
162 AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
168 //=================== FRAME parameters ============================
170 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
180 //=================== SHIL parameters ============================
182 AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3");
188 //=================== PIPE parameters ============================
190 AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
195 //=================== ITS parameters ============================
197 AliITS *ITS = new AliITSv11Hybrid("ITS","ITS v11Hybrid");
202 //============================ TPC parameters ===================
203 AliTPC *TPC = new AliTPCv2("TPC", "Default");
208 //=================== TOF parameters ============================
209 AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
215 //=================== HMPID parameters ===========================
216 AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");
223 //=================== ZDC parameters ============================
225 AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC");
230 //=================== TRD parameters ============================
232 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
237 //=================== FMD parameters ============================
238 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
243 //=================== MUON parameters ===========================
244 // New MUONv1 version (geometry defined via builders)
245 AliMUON *MUON = new AliMUONv1("MUON", "default");
247 //=================== PHOS parameters ===========================
251 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
257 //=================== PMD parameters ============================
258 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
263 //=================== T0 parameters ============================
264 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
269 //=================== EMCAL parameters ============================
270 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETE");
275 //=================== ACORDE parameters ============================
276 AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
281 //=================== ACORDE parameters ============================
282 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
285 AliLog::Message(AliLog::kInfo, "End of Config", "Config.C", "Config.C", "Config()"," Config.C", __LINE__);
287 cout << "Running ConfigCommon.C finished ... " << endl;
291 Float_t EtaToTheta(Float_t arg){
292 return (180./TMath::Pi())*2.*atan(exp(-arg));
297 // Load Pythia related libraries
298 gSystem->Load("liblhapdf.so"); // Parton density functions
299 gSystem->Load("libEGPythia6.so"); // TGenerator interface
300 gSystem->Load("libpythia6.so"); // Pythia
301 gSystem->Load("libAliPythia6.so"); // ALICE specific implementations