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;
9 void ConfigCommon(Bool_t interactiveSetup)
11 // =============================
13 // =============================
15 // Create the output file
17 rl = AliRunLoader::Open("galice.root",
18 AliConfig::GetDefaultEventFolderName(),
21 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
24 rl->SetCompressionLevel(2);
25 rl->SetNumberOfEventsPerFile(3);
26 gAlice->SetRunLoader(rl);
28 // Set External decayer
29 AliDecayer* decayer = new AliDecayerPythia();
30 decayer->SetForceDecay(kAll);
32 gMC->SetExternalDecayer(decayer);
34 // Physics process control
35 gMC ->SetProcess("DCAY",1);
36 gMC ->SetProcess("PAIR",1);
37 gMC ->SetProcess("COMP",1);
38 gMC ->SetProcess("PHOT",1);
39 gMC ->SetProcess("PFIS",0);
40 gMC ->SetProcess("DRAY",0);
41 gMC ->SetProcess("ANNI",1);
42 gMC ->SetProcess("BREM",1);
43 gMC ->SetProcess("MUNU",1);
44 //xx gMC ->SetProcess("CKOV",1);
45 gMC ->SetProcess("HADR",1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
46 gMC ->SetProcess("LOSS",2);
47 gMC ->SetProcess("MULS",1);
48 //xx gMC ->SetProcess("RAYL",1);
52 Float_t cut = 1.e-3; // 1MeV cut by default
53 Float_t tofmax = 1.e10;
55 gMC ->SetCut("CUTGAM",cut);
56 gMC ->SetCut("CUTELE",cut);
57 gMC ->SetCut("CUTNEU",cut);
58 gMC ->SetCut("CUTHAD",cut);
59 gMC ->SetCut("CUTMUO",cut);
60 gMC ->SetCut("BCUTE",cut);
61 gMC ->SetCut("BCUTM",cut);
62 gMC ->SetCut("DCUTE",cut);
63 gMC ->SetCut("DCUTM",cut);
64 gMC ->SetCut("PPCUTM",cut);
65 gMC ->SetCut("TOFMAX",tofmax);
67 // =============================
69 // =============================
71 // --- Specify event type to be tracked through the ALICE setup
72 // --- All positions are in cm, angles in degrees, and P and E in GeV
74 Int_t nParticles = 100;
75 if (gSystem->Getenv("CONFIG_NPARTICLES"))
76 nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
78 AliGenCocktail *gener = new AliGenCocktail();
79 gener->SetPhiRange(0, 360);
80 // Set pseudorapidity range from -8 to 8.
81 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
82 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
83 gener->SetThetaRange(thmin,thmax);
84 gener->SetOrigin(0, 0, 0); //vertex position
85 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
87 AliGenHIJINGpara *hijingparam = new AliGenHIJINGpara(nParticles);
88 hijingparam->SetMomentumRange(0.2, 999);
89 gener->AddGenerator(hijingparam,"HIJING PARAM",1);
91 // AliGenBox *genbox = new AliGenBox(nParticles);
92 // genbox->SetPart(22);
93 // genbox->SetPtRange(0.3, 10.00);
94 // gener->AddGenerator(genbox,"GENBOX GAMMA for PHOS",1);
97 // Activate this line if you want the vertex smearing to happen
100 //gener->SetVertexSmear(perTrack);
102 // =============================
104 // =============================
107 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1);
108 gAlice->SetField(field);
110 // Old magnetic field
111 //gAlice->SetField(-999,2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
113 // =============================
115 // =============================
117 if (!interactiveSetup) {
144 // Exclude detectors with temporary problem
148 // END OF ONLY FOR GEANT4
151 //=================== Alice BODY parameters =============================
152 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
157 //=================== MAG parameters ============================
158 // --- Start with Magnet since detector layouts may be depending ---
159 // --- on the selected Magnet dimensions ---
160 AliMAG *MAG = new AliMAG("MAG", "Magnet");
166 //=================== ABSO parameters ============================
167 AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber");
172 //=================== DIPO parameters ============================
174 AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2");
179 //=================== HALL parameters ============================
181 AliHALL *HALL = new AliHALL("HALL", "Alice Hall");
187 //=================== FRAME parameters ============================
189 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
194 //=================== SHIL parameters ============================
196 AliSHIL *SHIL = new AliSHILv2("SHIL", "Shielding Version 2");
202 //=================== PIPE parameters ============================
204 AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe");
209 //=================== ITS parameters ============================
211 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
212 // almost all other detectors. This involves the fact that the ITS geometry
213 // still has several options to be followed in parallel in order to determine
214 // the best set-up which minimizes the induced background. All the geometries
215 // available to date are described in the following. Read carefully the comments
216 // and use the default version (the only one uncommented) unless you are making
217 // comparisons and you know what you are doing. In this case just uncomment the
218 // ITS geometry you want to use and run Aliroot.
220 // Detailed geometries:
225 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","ITS PPR detailed version with asymmetric services");
226 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
227 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
228 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
229 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
230 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
231 ITS->SetThicknessChip1(150.); // chip thickness on layer 1 must be in the range [150,300]
232 ITS->SetThicknessChip2(150.); // chip thickness on layer 2 must be in the range [150,300]
233 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
234 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
237 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
238 // for reconstruction !):
241 AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
242 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
243 ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
245 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
246 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
247 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
251 // Geant3 <-> EUCLID conversion
252 // ============================
254 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
255 // media to two ASCII files (called by default ITSgeometry.euc and
256 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
257 // The default (=0) means that you dont want to use this facility.
264 //============================ TPC parameters ===================
265 AliTPC *TPC = new AliTPCv2("TPC", "Default");
270 //=================== TOF parameters ============================
271 AliTOF *TOF = new AliTOFv5T0("TOF", "normal TOF");
276 //=================== HMPID parameters ===========================
277 AliHMPID *HMPID = new AliHMPIDv1("HMPID", "normal HMPID");
283 //=================== ZDC parameters ============================
285 AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC");
290 //=================== TRD parameters ============================
292 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
294 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
297 AliTRDsim *TRDsim = TRD->CreateTR();
302 //=================== FMD parameters ============================
304 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
309 //=================== MUON parameters ===========================
311 AliMUON *MUON = new AliMUONv1("MUON", "default");
313 //=================== PHOS parameters ===========================
317 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
323 //=================== PMD parameters ============================
324 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
329 //=================== T0 parameters ============================
330 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
335 //=================== EMCAL parameters ============================
336 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "SHISH_77_TRD1_2X2_FINAL_110DEG");
341 //=================== CRT parameters ============================
343 AliCRT *CRT = new AliCRTv0("CRT", "normal ACORDE");
348 //=================== CRT parameters ============================
349 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
352 } // end (!isSetInteractively)
354 cout << "End of g4ConfigCommon.C" << endl;
357 Float_t EtaToTheta(Float_t arg){
358 return (180./TMath::Pi())*2.*atan(exp(-arg));