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;
40 // libraries required by fluka21
42 Bool_t isFluka = kTRUE;
44 gSystem->Load("libGeom");
45 cout << "\t* Loading TFluka..." << endl;
46 gSystem->Load("libTFluka");
48 cout << "\t* Instantiating TFluka..." << endl;
49 new TFluka("C++ Interface to Fluka", 0/*verbositylevel*/);
52 cout << "\t* Loading Geant3..." << endl;
53 gSystem->Load("libgeant321");
55 cout << "\t* Instantiating Geant3TGeo..." << endl;
56 new TGeant3TGeo("C++ Interface to Geant3");
59 if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
60 AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
61 AliCDBManager::Instance()->SetRun(0);
67 cout<<"Config.C: Creating Run Loader ..."<<endl;
68 rl = AliRunLoader::Open("galice.root",
69 AliConfig::GetDefaultEventFolderName(),
73 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
76 rl->SetCompressionLevel(2);
77 rl->SetNumberOfEventsPerFile(3);
78 gAlice->SetRunLoader(rl);
81 // Set External decayer
82 AliDecayer *decayer = new AliDecayerPythia();
84 decayer->SetForceDecay(kAll);
86 gMC->SetExternalDecayer(decayer);
91 // Physics process control
93 gMC->SetProcess("DCAY",1);
94 gMC->SetProcess("PAIR",1);
95 gMC->SetProcess("COMP",1);
96 gMC->SetProcess("PHOT",1);
97 gMC->SetProcess("PFIS",0);
98 gMC->SetProcess("DRAY",1);
99 gMC->SetProcess("ANNI",1);
100 gMC->SetProcess("BREM",1);
101 gMC->SetProcess("MUNU",1);
102 gMC->SetProcess("CKOV",1);
103 gMC->SetProcess("HADR",1);
104 gMC->SetProcess("LOSS",2);
105 gMC->SetProcess("MULS",1);
106 gMC->SetProcess("RAYL",1);
108 Float_t cut = 1.e-3; // 1MeV cut by default
109 Float_t tofmax = 1.e10;
111 gMC->SetCut("CUTGAM", cut);
112 gMC->SetCut("CUTELE", cut);
113 gMC->SetCut("CUTNEU", cut);
114 gMC->SetCut("CUTHAD", cut);
115 gMC->SetCut("CUTMUO", cut);
116 gMC->SetCut("BCUTE", cut);
117 gMC->SetCut("BCUTM", cut);
118 gMC->SetCut("DCUTE", cut);
119 gMC->SetCut("DCUTM", cut);
120 gMC->SetCut("PPCUTM", cut);
121 gMC->SetCut("TOFMAX", tofmax);
124 //=======================================================================
125 // ************* STEERING parameters FOR ALICE SIMULATION **************
126 // --- Specify event type to be tracked through the ALICE setup
127 // --- All positions are in cm, angles in degrees, and P and E in GeV
128 if (gSystem->Getenv("CONFIG_NPARTICLES"))
129 int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
131 int nParticles = 1000;
133 cout << "\t* Creating and configuring generator for " << nParticles
134 << " particles..." << endl;
136 AliGenHIJINGpara *gener = new AliGenHIJINGpara(nParticles);
138 gener->SetMomentumRange(0., 999);
139 gener->SetPhiRange(0, 360);
140 // Set pseudorapidity range from -3 to 3.
141 Float_t thmin = EtaToTheta( 3.); // theta min. <---> eta max
142 Float_t thmax = EtaToTheta(-3.); // theta max. <---> eta min
143 gener->SetThetaRange(thmin,thmax);
144 gener->SetOrigin(0, 0, 0); //vertex position
145 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
148 // Activate this line if you want the vertex smearing to happen
154 comment = comment.Append(" | L3 field 0.2 T");
155 } else if (smag == k4kG) {
156 comment = comment.Append(" | L3 field 0.4 T");
157 } else if (smag == k5kG) {
158 comment = comment.Append(" | L3 field 0.5 T");
162 if (srad == kGluonRadiation)
164 comment = comment.Append(" | Gluon Radiation On");
167 comment = comment.Append(" | Gluon Radiation Off");
172 comment = comment.Append(" | Holes for PHOS/HMPID");
175 comment = comment.Append(" | No holes for PHOS/HMPID");
178 printf("\n \n Comment: %s \n \n", comment.Data());
182 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., smag);
183 field->SetL3ConstField(0); //Using const. field in the barrel
185 gAlice->SetField(field);
209 cout << "\t* Creating the detectors ..." << endl;
210 //=================== Alice BODY parameters =============================
211 //=================== Alice BODY parameters =============================
212 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
217 //=================== MAG parameters ============================
218 // --- Start with Magnet since detector layouts may be depending ---
219 // --- on the selected Magnet dimensions ---
220 AliMAG *MAG = new AliMAG("MAG", "Magnet");
226 //=================== ABSO parameters ============================
227 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
232 //=================== DIPO parameters ============================
234 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
239 //=================== HALL parameters ============================
241 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
247 //=================== FRAME parameters ============================
249 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
254 //=================== SHIL parameters ============================
256 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
262 //=================== PIPE parameters ============================
264 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
269 //=================== ITS parameters ============================
271 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
272 // almost all other detectors. This involves the fact that the ITS geometry
273 // still has several options to be followed in parallel in order to determine
274 // the best set-up which minimizes the induced background. All the geometries
275 // available to date are described in the following. Read carefully the comments
276 // and use the default version (the only one uncommented) unless you are making
277 // comparisons and you know what you are doing. In this case just uncomment the
278 // ITS geometry you want to use and run Aliroot.
280 // Detailed geometries:
283 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
285 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
287 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version with asymmetric services");
288 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
289 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
290 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
291 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
292 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
293 ITS->SetThicknessChip1(150.); // chip thickness on layer 1 must be in the range [150,300]
294 ITS->SetThicknessChip2(150.); // chip thickness on layer 2 must be in the range [150,300]
295 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
296 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
298 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
299 // for reconstruction !):
302 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
303 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
304 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
306 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
307 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
308 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
312 // Geant3 <-> EUCLID conversion
313 // ============================
315 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
316 // media to two ASCII files (called by default ITSgeometry.euc and
317 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
318 // The default (=0) means that you dont want to use this facility.
325 //============================ TPC parameters =====================
326 AliTPC *TPC = new AliTPCv2("TPC", "Default");
331 //=================== TOF parameters ============================
332 AliTOF *TOF = new AliTOFv5T0("TOF", "normal TOF");
333 // Partial geometry: modules at 2,3,4,6,7,11,12,14,15,16
334 // starting at 6h in positive direction
335 // Int_t TOFSectors[18]={-1,-1,0,0,0,-1,0,0,-1,-1,-1,0,0,-1,0,0,0,0};
336 // Partial geometry: modules at 1,2,6,7,9,10,11,12,15,16,17
337 // (ALICE numbering convention)
338 Int_t TOFSectors[18]={-1,0,0,-1,-1,-1,0,0,-1,0,0,0,0,-1,-1,0,0,0};
339 TOF->SetTOFSectors(TOFSectors);
345 //=================== HMPID parameters ===========================
346 AliHMPID *HMPID = new AliHMPIDv1("HMPID", "normal HMPID");
353 //=================== ZDC parameters ============================
355 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
360 //=================== TRD parameters ============================
362 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
363 AliTRDgeometry *geoTRD = TRD->GetGeometry();
364 // Partial geometry: modules at 2,3,4,6,11,12,14,15
365 // starting at 6h in positive direction
366 geoTRD->SetSMstatus(0,0);
367 geoTRD->SetSMstatus(1,0);
368 geoTRD->SetSMstatus(5,0);
369 geoTRD->SetSMstatus(7,0);
370 geoTRD->SetSMstatus(8,0);
371 geoTRD->SetSMstatus(9,0);
372 geoTRD->SetSMstatus(10,0);
373 geoTRD->SetSMstatus(13,0);
374 geoTRD->SetSMstatus(16,0);
375 geoTRD->SetSMstatus(17,0);
380 //=================== FMD parameters ============================
381 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
386 //=================== MUON parameters ===========================
387 // New MUONv1 version (geometry defined via builders)
388 AliMUON *MUON = new AliMUONv1("MUON", "default");
390 //=================== PHOS parameters ===========================
394 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
400 //=================== PMD parameters ============================
401 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
406 //=================== T0 parameters ============================
407 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
412 //=================== EMCAL parameters ============================
413 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "SHISH_77_TRD1_2X2_FINAL_110DEG");
418 //=================== ACORDE parameters ============================
419 AliACORDE *ACORDE = new AliACORDEv0("ACORDE", "normal ACORDE");
424 //=================== ACORDE parameters ============================
425 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
429 Float_t EtaToTheta(Float_t arg){
430 return (180./TMath::Pi())*2.*atan(exp(-arg));