4 static PprMag_t smag = k2kG; // k2kG->L3 field 0.2T
5 //static PprMag_t smag = k4kG; // k4kG->L3 field 0.4T
6 //static PprMag_t smag = k5kG; // k5kG->L3 field 0.5T
8 Float_t EtaToTheta(Float_t arg);
9 static Int_t eventsPerRun = 100;
13 static PprGeo_t sgeo = kHoles;
17 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
18 // Theta range given through pseudorapidity limits 22/6/2001
20 // Set Random Number seed
21 gRandom->SetSeed(9956646); // Set 0 to use the current time
22 cout<<"Seed for random number generation= "<<gRandom->GetSeed()<<endl;
25 // libraries required by geant321
27 gSystem->Load("libgeant321");
30 new TGeant3("C++ Interface to Geant3");
34 cout<<"Config.C: Creating Run Loader ..."<<endl;
35 rl = AliRunLoader::Open("galice.root",
36 AliConfig::GetDefaultEventFolderName(),
39 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
42 rl->SetCompressionLevel(2);
43 rl->SetNumberOfEventsPerFile(3);
44 gAlice->SetRunLoader(rl);
45 //gAlice->SetDebug(1);
48 // Set External decayer
49 AliDecayer *decayer = new AliDecayerPythia();
51 decayer->SetForceDecay(kAll);
53 gMC->SetExternalDecayer(decayer);
54 //=======================================================================
55 // ************* STEERING parameters FOR ALICE SIMULATION **************
56 // --- Specify event type to be tracked through the ALICE setup
57 // --- All positions are in cm, angles in degrees, and P and E in GeV
59 ((TGeant3*)gMC)->SetDEBU(1, 2, 1);
60 ((TGeant3*)gMC)->SetSWIT(4,10);
61 ((TGeant3*)gMC)->SetSWIT(2,2);
62 ((TGeant3*)gMC)->SetSWIT(2,1); // to draw tracks
64 gMC->SetProcess("DCAY",1);
65 gMC->SetProcess("PAIR",1);
66 gMC->SetProcess("COMP",1);
67 gMC->SetProcess("PHOT",1);
68 gMC->SetProcess("PFIS",0);
69 gMC->SetProcess("DRAY",0);
70 gMC->SetProcess("ANNI",1);
71 gMC->SetProcess("BREM",1);
72 gMC->SetProcess("MUNU",1);
73 gMC->SetProcess("CKOV",1);
74 //gMC->SetProcess("HADR",1);
75 gMC->SetProcess("HADR",0); // If option NoShower() is switched on
76 gMC->SetProcess("LOSS",2);
77 gMC->SetProcess("MULS",1);
78 gMC->SetProcess("RAYL",1);
80 Float_t cut = 1.e-3; // 1MeV cut by default
81 Float_t tofmax = 1.e10;
83 gMC->SetCut("CUTGAM", cut);
84 gMC->SetCut("CUTELE", cut);
85 gMC->SetCut("CUTNEU", cut);
86 gMC->SetCut("CUTHAD", cut);
87 gMC->SetCut("CUTMUO", cut);
88 gMC->SetCut("BCUTE", cut);
89 gMC->SetCut("BCUTM", cut);
90 gMC->SetCut("DCUTE", cut);
91 gMC->SetCut("DCUTM", cut);
92 gMC->SetCut("PPCUTM", cut);
93 gMC->SetCut("TOFMAX", tofmax);
97 if (gSystem->Getenv("CONFIG_NPARTICLES"))
98 nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
101 // #### AliGenZDC generation ######################################
102 AliGenZDC *gener = new AliGenZDC();
103 gener->SetOrigin(0, 0, 0); // vertex position
104 //gener->SetParticle(kNeutron);
105 gener->SetParticle(kProton);
106 gener->SetMomentum(2760.);
107 gener->SetDirection(0.,0.,0.,-1.);
108 gener->SetFermi(1); // Fermi momentum
109 //gener->SetDiv(0.,0.,2); // Divergence and crossing angle
110 gener->SetDiv(0.000032,0.0001,2); // Divergence and crossing angle
113 gener->SetTrackingFlag(1);
117 // Activate this line if you want the vertex smearing to happen
120 //gener->SetVertexSmear(perTrack);
122 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., smag);
123 field->SetL3ConstField(0); //Using const. field in the barrel
125 gAlice->SetField(field);
149 //=================== Alice BODY parameters =============================
150 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
155 //=================== MAG parameters ============================
156 // --- Start with Magnet since detector layouts may be depending ---
157 // --- on the selected Magnet dimensions ---
158 AliMAG *MAG = new AliMAG("MAG", "Magnet");
164 //=================== ABSO parameters ============================
165 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
170 //=================== DIPO parameters ============================
172 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
177 //=================== HALL parameters ============================
179 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
185 //=================== FRAME parameters ============================
187 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
188 if (sgeo == kHoles) {
197 //=================== SHIL parameters ============================
199 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
205 //=================== PIPE parameters ============================
207 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
212 //=================== ITS parameters ============================
214 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
215 // almost all other detectors. This involves the fact that the ITS geometry
216 // still has several options to be followed in parallel in order to determine
217 // the best set-up which minimizes the induced background. All the geometries
218 // available to date are described in the following. Read carefully the comments
219 // and use the default version (the only one uncommented) unless you are making
220 // comparisons and you know what you are doing. In this case just uncomment the
221 // ITS geometry you want to use and run Aliroot.
223 // Detailed geometries:
226 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
228 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
230 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version with asymmetric services");
231 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
232 ITS->SetReadDet(kTRUE); // don't touch this parameter if you're not an ITS developer
233 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
234 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
235 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
236 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
237 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
238 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
239 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
241 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
242 // for reconstruction !):
245 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
246 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
247 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
249 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
250 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
251 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
255 // Geant3 <-> EUCLID conversion
256 // ============================
258 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
259 // media to two ASCII files (called by default ITSgeometry.euc and
260 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
261 // The default (=0) means that you dont want to use this facility.
268 //============================ TPC parameters ================================
269 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
270 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
271 // --- sectors are specified, any value other than that requires at least one
272 // --- sector (lower or upper)to be specified!
273 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
274 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
275 // --- SecLows - number of lower sectors specified (up to 6)
276 // --- SecUps - number of upper sectors specified (up to 12)
277 // --- Sens - sensitive strips for the Slow Simulator !!!
278 // --- This does NOT work if all S or L-sectors are specified, i.e.
279 // --- if SecAL or SecAU < 0
282 //-----------------------------------------------------------------------------
284 // gROOT->LoadMacro("SetTPCParam.C");
285 // AliTPCParam *param = SetTPCParam();
286 AliTPC *TPC = new AliTPCv2("TPC", "Default");
288 // All sectors included
296 //=================== TOF parameters ============================
297 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
303 //=================== RICH parameters ===========================
304 AliRICH *RICH = new AliRICHv1("RICH", "normal RICH");
311 //=================== ZDC parameters ============================
313 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
319 //=================== TRD parameters ============================
321 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
323 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
325 if (sgeo == kHoles) {
326 // With hole in front of PHOS
328 // With hole in front of RICH
332 AliTRDsim *TRDsim = TRD->CreateTR();
337 //=================== FMD parameters ============================
338 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
343 //=================== MUON parameters ===========================
345 AliMUON *MUON = new AliMUONv1("MUON", "default");
346 MUON->AddGeometryBuilder(new AliMUONSt1GeometryBuilderV2(MUON));
347 MUON->AddGeometryBuilder(new AliMUONSt2GeometryBuilder(MUON));
348 MUON->AddGeometryBuilder(new AliMUONSlatGeometryBuilder(MUON));
349 MUON->AddGeometryBuilder(new AliMUONTriggerGeometryBuilder(MUON));
351 //=================== PHOS parameters ===========================
355 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
361 //=================== PMD parameters ============================
362 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
367 //=================== START parameters ============================
368 AliSTART *START = new AliSTARTv1("START", "START Detector");
373 //=================== EMCAL parameters ============================
374 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "EMCAL_55_25");
379 //=================== CRT parameters ============================
380 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
385 //=================== CRT parameters ============================
386 AliVZERO *VZERO = new AliVZEROv2("VZERO", "normal VZERO");
389 cout << "End of Config.C" << endl;
393 Float_t EtaToTheta(Float_t arg){
394 return (180./TMath::Pi())*2.*atan(exp(-arg));