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 AliABSOv0("ABSO", "Muon Absorber");
235 //=================== DIPO parameters ============================
237 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
242 //=================== HALL parameters ============================
244 AliHALL *HALL = new AliHALL("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 AliPIPEv0("PIPE", "Beam Pipe");
272 //=================== ITS parameters ============================
274 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
275 // almost all other detectors. This involves the fact that the ITS geometry
276 // still has several options to be followed in parallel in order to determine
277 // the best set-up which minimizes the induced background. All the geometries
278 // available to date are described in the following. Read carefully the comments
279 // and use the default version (the only one uncommented) unless you are making
280 // comparisons and you know what you are doing. In this case just uncomment the
281 // ITS geometry you want to use and run Aliroot.
283 // Detailed geometries:
286 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
288 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
290 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version with asymmetric services");
291 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
292 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
293 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
294 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
295 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
296 ITS->SetThicknessChip1(150.); // chip thickness on layer 1 must be in the range [150,300]
297 ITS->SetThicknessChip2(150.); // chip thickness on layer 2 must be in the range [150,300]
298 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
299 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
301 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
302 // for reconstruction !):
305 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
306 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
307 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
309 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
310 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
311 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
315 // Geant3 <-> EUCLID conversion
316 // ============================
318 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
319 // media to two ASCII files (called by default ITSgeometry.euc and
320 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
321 // The default (=0) means that you dont want to use this facility.
328 //============================ TPC parameters =====================
329 AliTPC *TPC = new AliTPCv2("TPC", "Default");
334 //=================== TOF parameters ============================
335 AliTOF *TOF = new AliTOFv5T0("TOF", "normal TOF");
336 // Partial geometry: modules at 2,3,4,6,7,11,12,14,15,16
337 // starting at 6h in positive direction
338 // Int_t TOFSectors[18]={-1,-1,0,0,0,-1,0,0,-1,-1,-1,0,0,-1,0,0,0,0};
339 // Partial geometry: modules at 1,2,6,7,9,10,11,12,15,16,17
340 // (ALICE numbering convention)
341 Int_t TOFSectors[18]={-1,0,0,-1,-1,-1,0,0,-1,0,0,0,0,-1,-1,0,0,0};
342 TOF->SetTOFSectors(TOFSectors);
348 //=================== HMPID parameters ===========================
349 AliHMPID *HMPID = new AliHMPIDv1("HMPID", "normal HMPID");
356 //=================== ZDC parameters ============================
358 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
363 //=================== TRD parameters ============================
365 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
366 AliTRDgeometry *geoTRD = TRD->GetGeometry();
367 // Partial geometry: modules at 2,3,4,6,11,12,14,15
368 // starting at 6h in positive direction
369 geoTRD->SetSMstatus(0,0);
370 geoTRD->SetSMstatus(1,0);
371 geoTRD->SetSMstatus(5,0);
372 geoTRD->SetSMstatus(7,0);
373 geoTRD->SetSMstatus(8,0);
374 geoTRD->SetSMstatus(9,0);
375 geoTRD->SetSMstatus(10,0);
376 geoTRD->SetSMstatus(13,0);
377 geoTRD->SetSMstatus(16,0);
378 geoTRD->SetSMstatus(17,0);
383 //=================== FMD parameters ============================
384 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
389 //=================== MUON parameters ===========================
390 // New MUONv1 version (geometry defined via builders)
391 AliMUON *MUON = new AliMUONv1("MUON", "default");
393 //=================== PHOS parameters ===========================
397 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
403 //=================== PMD parameters ============================
404 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
409 //=================== T0 parameters ============================
410 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
415 //=================== EMCAL parameters ============================
416 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "SHISH_77_TRD1_2X2_FINAL_110DEG");
421 //=================== ACORDE parameters ============================
422 AliACORDE *ACORDE = new AliACORDEv0("ACORDE", "normal ACORDE");
427 //=================== ACORDE parameters ============================
428 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
432 Float_t EtaToTheta(Float_t arg){
433 return (180./TMath::Pi())*2.*atan(exp(-arg));