3 // AliRoot Configuration for running aliroot with Monte Carlo.
4 // Called from g4Config.C
6 Float_t EtaToTheta(Float_t arg);
7 static Int_t eventsPerRun = 100;
12 static PprGeo_t geo = kHoles;
14 void ConfigCommon(Bool_t interactiveSetup)
16 // =============================
18 // =============================
20 // Create the output file
22 rl = AliRunLoader::Open("galice.root",
23 AliConfig::GetDefaultEventFolderName(),
26 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
29 rl->SetCompressionLevel(2);
30 rl->SetNumberOfEventsPerFile(3);
31 gAlice->SetRunLoader(rl);
33 // Set External decayer
34 AliDecayer* decayer = new AliDecayerPythia();
35 decayer->SetForceDecay(kAll);
37 gMC->SetExternalDecayer(decayer);
39 // Physics process control
40 gMC ->SetProcess("DCAY",1);
41 gMC ->SetProcess("PAIR",1);
42 gMC ->SetProcess("COMP",1);
43 gMC ->SetProcess("PHOT",1);
44 gMC ->SetProcess("PFIS",0);
45 gMC ->SetProcess("DRAY",0);
46 gMC ->SetProcess("ANNI",1);
47 gMC ->SetProcess("BREM",1);
48 gMC ->SetProcess("MUNU",1);
49 //xx gMC ->SetProcess("CKOV",1);
50 gMC ->SetProcess("HADR",1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
51 gMC ->SetProcess("LOSS",2);
52 gMC ->SetProcess("MULS",1);
53 //xx gMC ->SetProcess("RAYL",1);
57 Float_t cut = 1.e-3; // 1MeV cut by default
58 Float_t tofmax = 1.e10;
60 gMC ->SetCut("CUTGAM",cut);
61 gMC ->SetCut("CUTELE",cut);
62 gMC ->SetCut("CUTNEU",cut);
63 gMC ->SetCut("CUTHAD",cut);
64 gMC ->SetCut("CUTMUO",cut);
65 gMC ->SetCut("BCUTE",cut);
66 gMC ->SetCut("BCUTM",cut);
67 gMC ->SetCut("DCUTE",cut);
68 gMC ->SetCut("DCUTM",cut);
69 gMC ->SetCut("PPCUTM",cut);
70 gMC ->SetCut("TOFMAX",tofmax);
72 // =============================
74 // =============================
76 // --- Specify event type to be tracked through the ALICE setup
77 // --- All positions are in cm, angles in degrees, and P and E in GeV
79 Int_t nParticles = 100;
80 if (gSystem->Getenv("CONFIG_NPARTICLES"))
81 nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
83 AliGenCocktail *gener = new AliGenCocktail();
84 gener->SetPhiRange(0, 360);
85 // Set pseudorapidity range from -8 to 8.
86 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
87 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
88 gener->SetThetaRange(thmin,thmax);
89 gener->SetOrigin(0, 0, 0); //vertex position
90 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
92 AliGenHIJINGpara *hijingparam = new AliGenHIJINGpara(nParticles);
93 hijingparam->SetMomentumRange(0.2, 999);
94 gener->AddGenerator(hijingparam,"HIJING PARAM",1);
96 // AliGenBox *genbox = new AliGenBox(nParticles);
97 // genbox->SetPart(22);
98 // genbox->SetPtRange(0.3, 10.00);
99 // gener->AddGenerator(genbox,"GENBOX GAMMA for PHOS",1);
102 // Activate this line if you want the vertex smearing to happen
105 //gener->SetVertexSmear(perTrack);
107 // =============================
109 // =============================
112 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1);
113 gAlice->SetField(field);
115 // Old magnetic field
116 //gAlice->SetField(-999,2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
118 // =============================
120 // =============================
122 if (!interactiveSetup) {
149 // Exclude detectors with temporary problem
153 // END OF ONLY FOR GEANT4
156 //=================== Alice BODY parameters =============================
157 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
162 //=================== MAG parameters ============================
163 // --- Start with Magnet since detector layouts may be depending ---
164 // --- on the selected Magnet dimensions ---
165 AliMAG *MAG = new AliMAG("MAG", "Magnet");
171 //=================== ABSO parameters ============================
172 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
177 //=================== DIPO parameters ============================
179 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
184 //=================== HALL parameters ============================
186 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
192 //=================== FRAME parameters ============================
194 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
204 //=================== SHIL parameters ============================
206 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
212 //=================== PIPE parameters ============================
214 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
219 //=================== ITS parameters ============================
221 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
222 // almost all other detectors. This involves the fact that the ITS geometry
223 // still has several options to be followed in parallel in order to determine
224 // the best set-up which minimizes the induced background. All the geometries
225 // available to date are described in the following. Read carefully the comments
226 // and use the default version (the only one uncommented) unless you are making
227 // comparisons and you know what you are doing. In this case just uncomment the
228 // ITS geometry you want to use and run Aliroot.
230 // Detailed geometries:
235 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","ITS PPR detailed version with asymmetric services");
236 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
237 ITS->SetReadDet(kTRUE); // don't touch this parameter if you're not an ITS developer
238 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
239 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
240 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
241 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
242 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
243 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
244 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
247 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
248 // for reconstruction !):
251 AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
252 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
253 ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
255 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
256 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
257 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
261 // Geant3 <-> EUCLID conversion
262 // ============================
264 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
265 // media to two ASCII files (called by default ITSgeometry.euc and
266 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
267 // The default (=0) means that you dont want to use this facility.
274 //============================ TPC parameters ================================
275 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
276 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
277 // --- sectors are specified, any value other than that requires at least one
278 // --- sector (lower or upper)to be specified!
279 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
280 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
281 // --- SecLows - number of lower sectors specified (up to 6)
282 // --- SecUps - number of upper sectors specified (up to 12)
283 // --- Sens - sensitive strips for the Slow Simulator !!!
284 // --- This does NOT work if all S or L-sectors are specified, i.e.
285 // --- if SecAL or SecAU < 0
288 //-----------------------------------------------------------------------------
290 // gROOT->LoadMacro("SetTPCParam.C");
291 // AliTPCParam *param = SetTPCParam();
292 AliTPC *TPC = new AliTPCv2("TPC", "Default");
294 // All sectors included
302 //=================== TOF parameters ============================
303 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
308 //=================== RICH parameters ===========================
309 AliRICH *RICH = new AliRICHv1("RICH", "normal RICH");
315 //=================== ZDC parameters ============================
317 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
322 //=================== TRD parameters ============================
324 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
326 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
329 // With hole in front of PHOS
331 // With hole in front of RICH
335 AliTRDsim *TRDsim = TRD->CreateTR();
340 //=================== FMD parameters ============================
342 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
347 //=================== MUON parameters ===========================
349 AliMUON *MUON = new AliMUONv1("MUON", "default");
350 MUON->AddGeometryBuilder(new AliMUONSt1GeometryBuilder(MUON));
351 MUON->AddGeometryBuilder(new AliMUONSt2GeometryBuilder(MUON));
352 MUON->AddGeometryBuilder(new AliMUONSlatGeometryBuilder(MUON));
353 MUON->AddGeometryBuilder(new AliMUONTriggerGeometryBuilder(MUON));
355 //=================== PHOS parameters ===========================
359 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
365 //=================== PMD parameters ============================
366 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
371 //=================== START parameters ============================
372 AliSTART *START = new AliSTARTv1("START", "START Detector");
377 //=================== EMCAL parameters ============================
378 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "EMCAL_55_25");
383 //=================== CRT parameters ============================
385 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
390 //=================== CRT parameters ============================
391 AliVZERO *VZERO = new AliVZEROv3("VZERO", "normal VZERO");
394 } // end (!isSetInteractively)
398 AliRunConfiguration::SwitchHoles(kTRUE);
400 AliRunConfiguration::SwitchHoles(kFALSE);
403 cout << "End of g4ConfigCommon.C" << endl;
406 Float_t EtaToTheta(Float_t arg){
407 return (180./TMath::Pi())*2.*atan(exp(-arg));