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");
61 cout<<"Config.C: Creating Run Loader ..."<<endl;
62 rl = AliRunLoader::Open("galice.root",
63 AliConfig::GetDefaultEventFolderName(),
67 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
70 rl->SetCompressionLevel(2);
71 rl->SetNumberOfEventsPerFile(3);
72 gAlice->SetRunLoader(rl);
75 // Set External decayer
76 AliDecayer *decayer = new AliDecayerPythia();
78 decayer->SetForceDecay(kAll);
80 gMC->SetExternalDecayer(decayer);
85 // Physics process control
87 gMC->SetProcess("DCAY",1);
88 gMC->SetProcess("PAIR",1);
89 gMC->SetProcess("COMP",1);
90 gMC->SetProcess("PHOT",1);
91 gMC->SetProcess("PFIS",0);
92 gMC->SetProcess("DRAY",1);
93 gMC->SetProcess("ANNI",1);
94 gMC->SetProcess("BREM",1);
95 gMC->SetProcess("MUNU",1);
96 gMC->SetProcess("CKOV",1);
97 gMC->SetProcess("HADR",1);
98 gMC->SetProcess("LOSS",2);
99 gMC->SetProcess("MULS",1);
100 gMC->SetProcess("RAYL",1);
102 Float_t cut = 1.e-3; // 1MeV cut by default
103 Float_t tofmax = 1.e10;
105 gMC->SetCut("CUTGAM", cut);
106 gMC->SetCut("CUTELE", cut);
107 gMC->SetCut("CUTNEU", cut);
108 gMC->SetCut("CUTHAD", cut);
109 gMC->SetCut("CUTMUO", cut);
110 gMC->SetCut("BCUTE", cut);
111 gMC->SetCut("BCUTM", cut);
112 gMC->SetCut("DCUTE", cut);
113 gMC->SetCut("DCUTM", cut);
114 gMC->SetCut("PPCUTM", cut);
115 gMC->SetCut("TOFMAX", tofmax);
118 //=======================================================================
119 // ************* STEERING parameters FOR ALICE SIMULATION **************
120 // --- Specify event type to be tracked through the ALICE setup
121 // --- All positions are in cm, angles in degrees, and P and E in GeV
122 if (gSystem->Getenv("CONFIG_NPARTICLES"))
123 int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
125 int nParticles = 1000;
127 cout << "\t* Creating and configuring generator for " << nParticles
128 << " particles..." << endl;
130 AliGenHIJINGpara *gener = new AliGenHIJINGpara(nParticles);
132 gener->SetMomentumRange(0., 999);
133 gener->SetPhiRange(0, 360);
134 // Set pseudorapidity range from -3 to 3.
135 Float_t thmin = EtaToTheta( 3.); // theta min. <---> eta max
136 Float_t thmax = EtaToTheta(-3.); // theta max. <---> eta min
137 gener->SetThetaRange(thmin,thmax);
138 gener->SetOrigin(0, 0, 0); //vertex position
139 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
142 // Activate this line if you want the vertex smearing to happen
148 comment = comment.Append(" | L3 field 0.2 T");
149 } else if (smag == k4kG) {
150 comment = comment.Append(" | L3 field 0.4 T");
151 } else if (smag == k5kG) {
152 comment = comment.Append(" | L3 field 0.5 T");
156 if (srad == kGluonRadiation)
158 comment = comment.Append(" | Gluon Radiation On");
161 comment = comment.Append(" | Gluon Radiation Off");
166 comment = comment.Append(" | Holes for PHOS/RICH");
169 comment = comment.Append(" | No holes for PHOS/RICH");
172 printf("\n \n Comment: %s \n \n", comment.Data());
176 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., smag);
177 field->SetL3ConstField(0); //Using const. field in the barrel
179 gAlice->SetField(field);
203 cout << "\t* Creating the detectors ..." << endl;
204 //=================== Alice BODY parameters =============================
205 //=================== Alice BODY parameters =============================
206 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
211 //=================== MAG parameters ============================
212 // --- Start with Magnet since detector layouts may be depending ---
213 // --- on the selected Magnet dimensions ---
214 AliMAG *MAG = new AliMAG("MAG", "Magnet");
220 //=================== ABSO parameters ============================
221 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
226 //=================== DIPO parameters ============================
228 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
233 //=================== HALL parameters ============================
235 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
241 //=================== FRAME parameters ============================
243 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
244 if (sgeo == kHoles) {
253 //=================== SHIL parameters ============================
255 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
261 //=================== PIPE parameters ============================
263 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
268 //=================== ITS parameters ============================
270 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
271 // almost all other detectors. This involves the fact that the ITS geometry
272 // still has several options to be followed in parallel in order to determine
273 // the best set-up which minimizes the induced background. All the geometries
274 // available to date are described in the following. Read carefully the comments
275 // and use the default version (the only one uncommented) unless you are making
276 // comparisons and you know what you are doing. In this case just uncomment the
277 // ITS geometry you want to use and run Aliroot.
279 // Detailed geometries:
282 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
284 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
286 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version with asymmetric services");
287 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
288 ITS->SetReadDet(kTRUE); // don't touch this parameter if you're not an ITS developer
289 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
290 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
291 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
292 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
293 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
294 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
295 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
297 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
298 // for reconstruction !):
301 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
302 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
303 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
305 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
306 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
307 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
311 // Geant3 <-> EUCLID conversion
312 // ============================
314 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
315 // media to two ASCII files (called by default ITSgeometry.euc and
316 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
317 // The default (=0) means that you dont want to use this facility.
324 //============================ TPC parameters ================================
325 AliTPC *TPC = new AliTPCv2("TPC", "Default");
330 //=================== TOF parameters ============================
331 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
337 //=================== RICH parameters ===========================
338 AliRICH *RICH = new AliRICHv1("RICH", "normal RICH");
345 //=================== ZDC parameters ============================
347 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
352 //=================== TRD parameters ============================
354 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
356 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
358 if (sgeo == kHoles) {
359 // With hole in front of PHOS
361 // With hole in front of RICH
365 AliTRDsim *TRDsim = TRD->CreateTR();
370 //=================== FMD parameters ============================
371 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
376 //=================== MUON parameters ===========================
378 AliMUON *MUON = new AliMUONv1("MUON", "default");
380 //=================== PHOS parameters ===========================
384 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
390 //=================== PMD parameters ============================
391 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
396 //=================== START parameters ============================
397 AliSTART *START = new AliSTARTv1("START", "START Detector");
402 //=================== EMCAL parameters ============================
403 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "SHISH");
408 //=================== CRT parameters ============================
409 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
414 //=================== CRT parameters ============================
415 AliVZERO *VZERO = new AliVZEROv3("VZERO", "normal VZERO");
421 Float_t EtaToTheta(Float_t arg){
422 return (180./TMath::Pi())*2.*atan(exp(-arg));