3 static Int_t eventsPerRun = 100;
11 kGluonRadiation, kNoGluonRadiation
14 // This part for configuration
15 static PprGeo_t sgeo = kNoHoles;
16 static PprRad_t srad = kGluonRadiation;
17 static AliMagF::BMap_t smag = AliMagF::k5kG;
20 static TString comment;
23 Float_t EtaToTheta(Float_t arg);
29 cout << "==> Config.C..." << endl;
31 // Set Random Number seed
32 UInt_t at = (UInt_t) gSystem->Now() ;
33 UInt_t seed = ((gSystem->GetPid()*111)%at)*137 ;
34 // gRandom->SetSeed(seed);
35 gRandom->SetSeed(12345);
36 printf("MySeed: %d\n",seed) ;
37 cout<<"Seed for random number generation= "<<gRandom->GetSeed()<<endl;
41 // libraries required by fluka21
43 Bool_t isFluka = kFALSE;
45 gSystem->Load("libGeom");
46 cout << "\t* Loading TFluka..." << endl;
47 gSystem->Load("libTFluka");
49 cout << "\t* Instantiating TFluka..." << endl;
50 new TFluka("C++ Interface to Fluka", 0/*verbositylevel*/);
53 cout << "\t* Loading Geant3..." << endl;
54 gSystem->Load("libgeant321");
56 cout << "\t* Instantiating Geant3TGeo..." << endl;
57 new TGeant3TGeo("C++ Interface to Geant3");
62 cout<<"Config.C: Creating Run Loader ..."<<endl;
63 rl = AliRunLoader::Open("galice.root",
64 AliConfig::GetDefaultEventFolderName(),
68 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
71 rl->SetCompressionLevel(2);
72 rl->SetNumberOfEventsPerFile(1000);
73 gAlice->SetRunLoader(rl);
76 // Set External decayer
77 AliDecayer *decayer = new AliDecayerPythia();
79 decayer->SetForceDecay(kAll);
81 gMC->SetExternalDecayer(decayer);
86 // Physics process control
88 gMC->SetProcess("DCAY",1);
89 gMC->SetProcess("PAIR",1);
90 gMC->SetProcess("COMP",1);
91 gMC->SetProcess("PHOT",1);
92 gMC->SetProcess("PFIS",0);
93 gMC->SetProcess("DRAY",0); //AZ 1);
94 gMC->SetProcess("ANNI",1);
95 gMC->SetProcess("BREM",1);
96 gMC->SetProcess("MUNU",1);
97 gMC->SetProcess("CKOV",1);
98 gMC->SetProcess("HADR",1);
99 gMC->SetProcess("LOSS",2);
100 gMC->SetProcess("MULS",1);
101 gMC->SetProcess("RAYL",1);
103 Float_t cut = 1.e-3; // 1MeV cut by default
104 Float_t tofmax = 1.e10;
106 gMC->SetCut("CUTGAM", cut);
107 gMC->SetCut("CUTELE", cut);
108 gMC->SetCut("CUTNEU", cut);
109 gMC->SetCut("CUTHAD", cut);
110 gMC->SetCut("CUTMUO", cut);
111 gMC->SetCut("BCUTE", cut);
112 gMC->SetCut("BCUTM", cut);
113 gMC->SetCut("DCUTE", cut);
114 gMC->SetCut("DCUTM", cut);
115 gMC->SetCut("PPCUTM", cut);
116 gMC->SetCut("TOFMAX", tofmax);
118 ((AliMC*)gMC)->SetTransPar("./galice.cuts") ;
120 //=======================================================================
121 // ************* STEERING parameters FOR ALICE SIMULATION **************
122 // --- Specify event type to be tracked through the ALICE setup
123 // --- All positions are in cm, angles in degrees, and P and E in GeV
125 AliGenBox *gener = new AliGenBox(5);
126 gener->SetMomentumRange(0.5, 5.);
127 gener->SetPhiRange(260., 280.);
128 gener->SetThetaRange(82.,98.);
129 gener->SetPart(kGamma);
131 gener->SetOrigin(0, 0, 0); //vertex position
132 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
136 // Activate this line if you want the vertex smearing to happen
139 // gener->SetVertexSmear(kPerEvent) ;
143 if (smag == AliMagF::k2kG) {
144 comment = comment.Append(" | L3 field 0.2 T");
145 } else if (smag == AliMagF::k5kG) {
146 comment = comment.Append(" | L3 field 0.5 T");
150 if (srad == kGluonRadiation)
152 comment = comment.Append(" | Gluon Radiation On");
155 comment = comment.Append(" | Gluon Radiation Off");
160 comment = comment.Append(" | Holes for PHOS/RICH");
163 comment = comment.Append(" | No holes for PHOS/RICH");
166 printf("\n \n Comment: %s \n \n", comment.Data());
170 //Zero magnetic field
171 AliMagF* field = new AliMagF("Maps","Maps", 2, 0., 1., 10., AliMagF::k5kG);
172 field->SetL3ConstField(0); //Using const. field in the barrel
173 TGeoGlobalMagField::Instance()->SetField(field);
199 cout << "\t* Creating the detectors ..." << endl;
200 //=================== Alice BODY parameters =============================
201 //=================== Alice BODY parameters =============================
202 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
207 //=================== MAG parameters ============================
208 // --- Start with Magnet since detector layouts may be depending ---
209 // --- on the selected Magnet dimensions ---
210 AliMAG *MAG = new AliMAG("MAG", "Magnet");
216 //=================== ABSO parameters ============================
217 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
222 //=================== DIPO parameters ============================
224 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
229 //=================== HALL parameters ============================
231 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
237 //=================== FRAME parameters ============================
239 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
240 if (sgeo == kHoles) {
249 //=================== SHIL parameters ============================
251 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
257 //=================== PIPE parameters ============================
259 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
264 //=================== ITS parameters ============================
266 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
267 // almost all other detectors. This involves the fact that the ITS geometry
268 // still has several options to be followed in parallel in order to determine
269 // the best set-up which minimizes the induced background. All the geometries
270 // available to date are described in the following. Read carefully the comments
271 // and use the default version (the only one uncommented) unless you are making
272 // comparisons and you know what you are doing. In this case just uncomment the
273 // ITS geometry you want to use and run Aliroot.
275 // Detailed geometries:
278 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
280 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
282 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version with asymmetric services");
283 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
284 ITS->SetReadDet(kTRUE); // don't touch this parameter if you're not an ITS developer
285 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
286 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
287 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
288 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
289 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
290 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
291 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
293 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
294 // for reconstruction !):
297 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
298 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
299 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
301 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
302 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
303 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
307 // Geant3 <-> EUCLID conversion
308 // ============================
310 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
311 // media to two ASCII files (called by default ITSgeometry.euc and
312 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
313 // The default (=0) means that you dont want to use this facility.
320 //============================ TPC parameters ================================
321 // AliTPC *TPC = new AliTPCv0("TPC", "Default");
322 AliTPC *TPC = new AliTPCv2("TPC", "Default");
327 //=================== TOF parameters ============================
328 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
334 //=================== RICH parameters ===========================
335 AliRICH *RICH = new AliRICHv1("RICH", "normal RICH");
342 //=================== ZDC parameters ============================
344 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
349 //=================== TRD parameters ============================
351 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
353 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
355 if (sgeo == kHoles) {
356 // With hole in front of PHOS
358 // With hole in front of RICH
362 AliTRDsim *TRDsim = TRD->CreateTR();
367 //=================== FMD parameters ============================
368 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
373 //=================== MUON parameters ===========================
375 AliMUON *MUON = new AliMUONv1("MUON", "default");
377 //=================== PHOS parameters ===========================
381 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
382 // AliPHOS *PHOS = new AliPHOSv1("PHOS", "noCPV");
388 //=================== PMD parameters ============================
389 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
394 //=================== START parameters ============================
395 AliSTART *START = new AliSTARTv1("START", "START Detector");
400 //=================== EMCAL parameters ============================
401 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETE");
406 //=================== CRT parameters ============================
407 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
412 //=================== CRT parameters ============================
413 AliVZERO *VZERO = new AliVZEROv3("VZERO", "normal VZERO");
419 Float_t EtaToTheta(Float_t arg){
420 return (180./TMath::Pi())*2.*atan(exp(-arg));