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 AliSimulation::Instance()->SetTriggerConfig("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 TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", 1., 1., AliMagF::k5kG));
129 // Exluded for problems
132 //=================== Alice BODY parameters =============================
133 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
137 //=================== MAG parameters ============================
138 // --- Start with Magnet since detector layouts may be depending ---
139 // --- on the selected Magnet dimensions ---
140 AliMAG *MAG = new AliMAG("MAG", "Magnet");
146 //=================== ABSO parameters ============================
147 AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
152 //=================== DIPO parameters ============================
154 AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
159 //=================== HALL parameters ============================
161 AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
167 //=================== FRAME parameters ============================
169 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
179 //=================== SHIL parameters ============================
181 AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3");
187 //=================== PIPE parameters ============================
189 AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
194 //=================== ITS parameters ============================
196 AliITS *ITS = new AliITSv11Hybrid("ITS","ITS v11Hybrid");
201 //============================ TPC parameters ===================
202 AliTPC *TPC = new AliTPCv2("TPC", "Default");
207 //=================== TOF parameters ============================
208 AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
214 //=================== HMPID parameters ===========================
215 AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");
222 //=================== ZDC parameters ============================
224 AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC");
229 //=================== TRD parameters ============================
231 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
236 //=================== FMD parameters ============================
237 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
242 //=================== MUON parameters ===========================
243 // New MUONv1 version (geometry defined via builders)
244 AliMUON *MUON = new AliMUONv1("MUON", "default");
246 //=================== PHOS parameters ===========================
250 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
256 //=================== PMD parameters ============================
257 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
262 //=================== T0 parameters ============================
263 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
268 //=================== EMCAL parameters ============================
269 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETE");
274 //=================== ACORDE parameters ============================
275 AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
280 //=================== ACORDE parameters ============================
281 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
284 AliLog::Message(AliLog::kInfo, "End of Config", "Config.C", "Config.C", "Config()"," Config.C", __LINE__);
286 cout << "Running ConfigCommon.C finished ... " << endl;
290 Float_t EtaToTheta(Float_t arg){
291 return (180./TMath::Pi())*2.*atan(exp(-arg));
296 // Load Pythia related libraries
297 gSystem->Load("liblhapdf.so"); // Parton density functions
298 gSystem->Load("libEGPythia6.so"); // TGenerator interface
299 gSystem->Load("libpythia6.so"); // Pythia
300 gSystem->Load("libAliPythia6.so"); // ALICE specific implementations