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 = 50;
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);
27 // gAlice->SetRootGeometry();
28 // gAlice->SetGeometryFileName("geometry.root");
30 // Set the trigger configuration
31 gAlice->SetTriggerDescriptor("Pb-Pb");
32 cout<<"Trigger configuration is set to Pb-Pb"<<endl;
34 // Set Random Number seed
35 gRandom->SetSeed(123456); // Set 0 to use the currecnt time
36 AliLog::Message(AliLog::kInfo, Form("Seed for random number generation = %d",gRandom->GetSeed()), "Config.C", "Config.C", "Config()","Config.C", __LINE__);
38 if (gSystem->Getenv("CONFIG_NPARTICLES"))
40 nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES"));
44 AliGenCocktail *gener = new AliGenCocktail();
45 gener->SetPhiRange(0, 360);
46 // Set pseudorapidity range from -8 to 8.
47 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
48 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
49 gener->SetThetaRange(thmin,thmax);
50 gener->SetOrigin(0, 0, 0); //vertex position
51 gener->SetSigma(0, 0, 0); //Sigma in (X,Y,Z) (cm) on IP position
53 AliGenHIJINGpara *hijingparam = new AliGenHIJINGpara(nParticles);
54 hijingparam->SetMomentumRange(0.2, 999);
55 gener->AddGenerator(hijingparam,"HIJING PARAM",1);
59 // Activate this line if you want the vertex smearing to happen
62 //gener->SetVertexSmear(perTrack);
64 // =============================
66 // =============================
69 AliMagFMaps* field = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1);
70 gAlice->SetField(field);
95 //=================== Alice BODY parameters =============================
96 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
100 //=================== MAG parameters ============================
101 // --- Start with Magnet since detector layouts may be depending ---
102 // --- on the selected Magnet dimensions ---
103 AliMAG *MAG = new AliMAG("MAG", "Magnet");
109 //=================== ABSO parameters ============================
110 AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
115 //=================== DIPO parameters ============================
117 AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
122 //=================== HALL parameters ============================
124 AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
130 //=================== FRAME parameters ============================
132 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
137 //=================== SHIL parameters ============================
139 AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3");
145 //=================== PIPE parameters ============================
147 AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
152 //=================== ITS parameters ============================
154 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
155 // almost all other detectors. This involves the fact that the ITS geometry
156 // still has several options to be followed in parallel in order to determine
157 // the best set-up which minimizes the induced background. All the geometries
158 // available to date are described in the following. Read carefully the comments
159 // and use the default version (the only one uncommented) unless you are making
160 // comparisons and you know what you are doing. In this case just uncomment the
161 // ITS geometry you want to use and run Aliroot.
163 // Detailed geometries:
166 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
168 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
170 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","New ITS PPR detailed version with asymmetric services");
171 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
172 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
173 // ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
174 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300]
175 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300]
176 ITS->SetThicknessChip1(150.); // chip thickness on layer 1 must be in the range [150,300]
177 ITS->SetThicknessChip2(150.); // chip thickness on layer 2 must be in the range [150,300]
178 ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
179 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
181 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
182 // for reconstruction !):
185 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
186 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
187 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
189 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
190 //ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out
191 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
195 // Geant3 <-> EUCLID conversion
196 // ============================
198 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
199 // media to two ASCII files (called by default ITSgeometry.euc and
200 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
201 // The default (=0) means that you dont want to use this facility.
208 //============================ TPC parameters ===================
209 AliTPC *TPC = new AliTPCv2("TPC", "Default");
214 //=================== TOF parameters ============================
215 AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
216 // Partial geometry: modules at 2,3,4,6,7,11,12,14,15,16
217 // starting at 6h in positive direction
218 // Int_t TOFSectors[18]={-1,-1,0,0,0,-1,0,0,-1,-1,-1,0,0,-1,0,0,0,0};
219 // Partial geometry: modules at 1,2,6,7,9,10,11,12,15,16,17
220 // (ALICE numbering convention)
221 Int_t TOFSectors[18]={-1,0,0,-1,-1,-1,0,0,-1,0,0,0,0,-1,-1,0,0,0};
222 TOF->SetTOFSectors(TOFSectors);
228 //=================== HMPID parameters ===========================
229 AliHMPID *HMPID = new AliHMPIDv2("HMPID", "normal HMPID");
236 //=================== ZDC parameters ============================
238 AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC");
243 //=================== TRD parameters ============================
245 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
250 //=================== FMD parameters ============================
251 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
256 //=================== MUON parameters ===========================
257 // New MUONv1 version (geometry defined via builders)
258 AliMUON *MUON = new AliMUONv1("MUON", "default");
260 //=================== PHOS parameters ===========================
264 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
270 //=================== PMD parameters ============================
271 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
276 //=================== T0 parameters ============================
277 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
282 //=================== EMCAL parameters ============================
283 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "SHISH_77_TRD1_2X2_FINAL_110DEG");
288 //=================== ACORDE parameters ============================
289 AliACORDE *ACORDE = new AliACORDEv0("ACORDE", "normal ACORDE");
294 //=================== ACORDE parameters ============================
295 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
298 AliLog::Message(AliLog::kInfo, "End of Config", "Config.C", "Config.C", "Config()"," Config.C", __LINE__);
302 Float_t EtaToTheta(Float_t arg){
303 return (180./TMath::Pi())*2.*atan(exp(-arg));