3 // AliRoot Configuration for running aliroot with Monte Carlo.
4 // commonConfig() includes the common setting for all MCs
5 // which has to be called before MC is instantiated.
6 // Called from MC specific configs (g3Config.C, g4Config.C).
8 // Extracted from G3 specific Config.C
9 // by I. Hrivnacova, IPN Orsay
12 kDefaultPPTrig, kDefaultPbPbTrig
15 const char * pprTrigConfName[] = {
20 static AliMagF::BMap_t smag = AliMagF::k5kG;
21 static PprTrigConf_t strig = kDefaultPPTrig; // default PP trigger configuration
22 static TString comment;
27 void commonConfig(Bool_t setRootGeometry = kFALSE)
29 cout << "Running commonConfig.C ... " << endl;
31 // Set Random Number seed
32 gRandom->SetSeed(123456); // Set 0 to use the currecnt time
33 AliLog::Message(AliLog::kInfo, Form("Seed for random number generation = %d",gRandom->GetSeed()), "Config.C", "Config.C", "Config()","Config.C", __LINE__);
36 //=======================================================================
37 // Load Pythia libraries
38 //=======================================================================
42 //=======================================================================
43 // ALICE steering object (AliRunLoader)
44 //=======================================================================
46 // Set Root geometry file
47 if ( setRootGeometry ) {
48 AliSimulation::Instance()->SetGeometryFile("geometry.root");
52 = AliRunLoader::Open("galice.root",
53 AliConfig::GetDefaultEventFolderName(),
56 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
59 rl->SetCompressionLevel(2);
60 rl->SetNumberOfEventsPerFile(3);
61 gAlice->SetRunLoader(rl);
63 //======================================================================
64 // Trigger configuration
65 //=======================================================================
67 gAlice->SetTriggerDescriptor(pprTrigConfName[strig]);
68 cout << "Trigger configuration is set to " << pprTrigConfName[strig] << endl;
70 // =============================
72 // =============================
75 AliMagF* field = new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG);
76 TGeoGlobalMagField::Instance()->SetField(field);
78 printf("\n \n Comment: %s \n \n", comment.Data());
80 // =============================
82 // =============================
131 //=================== Alice BODY parameters =============================
132 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
136 //=================== MAG parameters ============================
137 // --- Start with Magnet since detector layouts may be depending ---
138 // --- on the selected Magnet dimensions ---
139 AliMAG *MAG = new AliMAG("MAG", "Magnet");
145 //=================== ABSO parameters ============================
146 AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
151 //=================== DIPO parameters ============================
153 AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
158 //=================== HALL parameters ============================
160 AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
166 //=================== FRAME parameters ============================
168 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
174 //=================== SHIL parameters ============================
176 AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3");
182 //=================== PIPE parameters ============================
184 AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
189 //=================== ITS parameters ============================
191 AliITS *ITS = new AliITSv11Hybrid("ITS","ITS v11Hybrid");
196 //============================ TPC parameters ===================
197 AliTPC *TPC = new AliTPCv2("TPC", "Default");
202 //=================== TOF parameters ============================
203 AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
209 //=================== HMPID parameters ===========================
210 AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");
217 //=================== ZDC parameters ============================
219 AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC");
224 //=================== TRD parameters ============================
226 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
231 //=================== FMD parameters ============================
232 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
237 //=================== MUON parameters ===========================
238 // New MUONv1 version (geometry defined via builders)
239 AliMUON *MUON = new AliMUONv1("MUON", "default");
241 //=================== PHOS parameters ===========================
245 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
251 //=================== PMD parameters ============================
252 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
257 //=================== T0 parameters ============================
258 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
263 //=================== EMCAL parameters ============================
264 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETE");
269 //=================== ACORDE parameters ============================
270 AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
275 //=================== ACORDE parameters ============================
276 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
279 AliLog::Message(AliLog::kInfo, "End of Config", "Config.C", "Config.C", "Config()"," Config.C", __LINE__);
281 cout << "Running commonConfig.C finished ... " << endl;
286 // Load Pythia related libraries
287 gSystem->Load("liblhapdf.so"); // Parton density functions
288 gSystem->Load("libEGPythia6.so"); // TGenerator interface
289 gSystem->Load("libpythia6.so"); // Pythia
290 gSystem->Load("libAliPythia6.so"); // ALICE specific implementations