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::fgkDefaultEventFolderName,
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
154 // END OF ONLY FOR GEANT4
157 //=================== Alice BODY parameters =============================
158 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
163 //=================== MAG parameters ============================
164 // --- Start with Magnet since detector layouts may be depending ---
165 // --- on the selected Magnet dimensions ---
166 AliMAG *MAG = new AliMAG("MAG", "Magnet");
172 //=================== ABSO parameters ============================
173 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
178 //=================== DIPO parameters ============================
180 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
185 //=================== HALL parameters ============================
187 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
193 //=================== FRAME parameters ============================
195 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
205 //=================== SHIL parameters ============================
207 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding");
213 //=================== PIPE parameters ============================
215 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
220 //=================== ITS parameters ============================
222 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
223 // almost all other detectors. This involves the fact that the ITS geometry
224 // still has several options to be followed in parallel in order to determine
225 // the best set-up which minimizes the induced background. All the geometries
226 // available to date are described in the following. Read carefully the comments
227 // and use the default version (the only one uncommented) unless you are making
228 // comparisons and you know what you are doing. In this case just uncomment the
229 // ITS geometry you want to use and run Aliroot.
231 // Detailed geometries:
236 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","ITS PPR detailed version with asymmetric services");
237 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
238 ITS->SetReadDet(kTRUE); // don't touch this parameter if you're not an ITS developer
239 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
240 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
241 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
242 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300]
243 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300]
244 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
245 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
248 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
249 // for reconstruction !):
252 AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
253 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
254 ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
256 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
257 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
258 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
262 // Geant3 <-> EUCLID conversion
263 // ============================
265 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
266 // media to two ASCII files (called by default ITSgeometry.euc and
267 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
268 // The default (=0) means that you dont want to use this facility.
275 //============================ TPC parameters ================================
276 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
277 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
278 // --- sectors are specified, any value other than that requires at least one
279 // --- sector (lower or upper)to be specified!
280 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
281 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
282 // --- SecLows - number of lower sectors specified (up to 6)
283 // --- SecUps - number of upper sectors specified (up to 12)
284 // --- Sens - sensitive strips for the Slow Simulator !!!
285 // --- This does NOT work if all S or L-sectors are specified, i.e.
286 // --- if SecAL or SecAU < 0
289 //-----------------------------------------------------------------------------
291 // gROOT->LoadMacro("SetTPCParam.C");
292 // AliTPCParam *param = SetTPCParam();
293 AliTPC *TPC = new AliTPCv2("TPC", "Default");
295 // All sectors included
303 //=================== TOF parameters ============================
304 AliTOF *TOF = new AliTOFv4T0("TOF", "normal TOF");
309 //=================== RICH parameters ===========================
310 AliRICH *RICH = new AliRICHv3("RICH", "normal RICH");
316 //=================== ZDC parameters ============================
318 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
323 //=================== TRD parameters ============================
325 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
327 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
330 // With hole in front of PHOS
332 // With hole in front of RICH
336 AliTRDsim *TRDsim = TRD->CreateTR();
341 //=================== FMD parameters ============================
343 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
348 //=================== MUON parameters ===========================
350 AliMUON *MUON = new AliMUONv1("MUON", "default");
352 //=================== PHOS parameters ===========================
356 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
362 //=================== PMD parameters ============================
363 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
368 //=================== START parameters ============================
369 AliSTART *START = new AliSTARTv1("START", "START Detector");
374 //=================== EMCAL parameters ============================
375 AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "EMCAL_55_25");
380 //=================== CRT parameters ============================
382 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
387 //=================== CRT parameters ============================
388 AliVZERO *VZERO = new AliVZEROv3("VZERO", "normal VZERO");
391 } // end (!isSetInteractively)
395 AliRunConfiguration::SwitchHoles(kTRUE);
397 AliRunConfiguration::SwitchHoles(kFALSE);
401 Float_t EtaToTheta(Float_t arg){
402 return (180./TMath::Pi())*2.*atan(exp(-arg));