]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/UPGRADE/Config.C
Added version tailored for pp (AliTrackletTaskMultipp) with additional
[u/mrichter/AliRoot.git] / ITS / UPGRADE / Config.C
CommitLineData
fabd12c1 1/// One can use the configuration macro in compiled mode by
2// root [0] gSystem->Load("libgeant321");
3// root [0] gSystem->SetIncludePath("-I$ROOTSYS/include -I$ALICE_ROOT/include\
4// -I$ALICE_ROOT -I$ALICE/geant3/TGeant3");
5// root [0] .x grun.C(1,"Config.C++"
6
7#if !defined(__CINT__) || defined(__MAKECINT__)
8#include <Riostream.h>
9#include <TPDGCode.h>
10#include <TRandom.h>
11#include <TSystem.h>
12#include <TVirtualMC.h>
13#include <TGeant3TGeo.h>
14#include "STEER/AliRunLoader.h"
15#include "STEER/AliRun.h"
16#include "STEER/AliConfig.h"
17#include "PYTHIA6/AliDecayerPythia.h"
18#include "EVGEN/AliGenCocktail.h"
19#include "EVGEN/AliGenHIJINGpara.h"
20#include "EVGEN/AliGenFixed.h"
21#include "EVGEN/AliGenBox.h"
22#include "STEER/AliMagWrapCheb.h"
23#include "STRUCT/AliBODY.h"
24#include "STRUCT/AliMAG.h"
25#include "STRUCT/AliABSOv3.h"
26#include "STRUCT/AliDIPOv3.h"
27#include "STRUCT/AliHALLv3.h"
28#include "STRUCT/AliFRAMEv2.h"
29#include "STRUCT/AliSHILv3.h"
30#include "STRUCT/AliPIPEv3.h"
31#include "ITS/AliITSv11Hybrid.h"
32#include "TPC/AliTPCv2.h"
33#include "TOF/AliTOFv6T0.h"
34#include "HMPID/AliHMPIDv3.h"
35#include "ZDC/AliZDCv3.h"
36#include "TRD/AliTRDv1.h"
37#include "TRD/AliTRDgeometry.h"
38#include "FMD/AliFMDv1.h"
39#include "MUON/AliMUONv1.h"
40#include "PHOS/AliPHOSv1.h"
41#include "PMD/AliPMDv1.h"
42#include "T0/AliT0v1.h"
43#include "EMCAL/AliEMCALv2.h"
44#include "ACORDE/AliACORDEv1.h"
45#include "VZERO/AliVZEROv7.h"
46#include <TVirtualMagField.h>
47#endif
48
49/* $Id$ */
50enum PprTrigConf_t
51{
52 kDefaultPPTrig, kDefaultPbPbTrig
53};
54
55const char * pprTrigConfName[] = {
56 "p-p","Pb-Pb"
57};
58
59Float_t EtaToTheta(Float_t arg);
60
61static PprTrigConf_t strig = kDefaultPPTrig;// default PP trigger configuration
62
63void Config()
64{
65 // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00
66 // Theta range given through pseudorapidity limits 22/6/2001
67
68 // Set Random Number seed
69 gRandom->SetSeed(0); // Set 0 to use the currecnt time
70
71
72 // libraries required by geant321
73#if defined(__CINT__)
74 gSystem->Load("liblhapdf");
75 gSystem->Load("libEGPythia6");
76 gSystem->Load("libpythia6");
77 gSystem->Load("libAliPythia6");
78 gSystem->Load("libgeant321");
79#endif
80
81 new TGeant3TGeo("C++ Interface to Geant3");
82
83 AliRunLoader* rl=0x0;
84
85
86 rl = AliRunLoader::Open("galice.root",
87 AliConfig::GetDefaultEventFolderName(),
88 "recreate");
89 if (rl == 0x0)
90 {
91 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
92 return;
93 }
94 rl->SetCompressionLevel(2);
95 rl->SetNumberOfEventsPerFile(2000);
96 gAlice->SetRunLoader(rl);
97
98 // Set the trigger configuration
99 // gAlice->SetTriggerDescriptor(pprTrigConfName[strig]);
100 //cout<<"Trigger configuration is set to "<<pprTrigConfName[strig]<<endl;
101 AliSimulation::Instance()->SetTriggerConfig(pprTrigConfName[strig]);
102 cout<<"Trigger configuration is set to pprTrigConfName[strig] "<<endl;
103
104 //
105 // Set External decayer
106 TVirtualMCDecayer *decayer = new AliDecayerPythia();
107
108 decayer->SetForceDecay(kAll);
109 decayer->Init();
110 gMC->SetExternalDecayer(decayer);
111 //=======================================================================
112 // ************* STEERING parameters FOR ALICE SIMULATION **************
113 // --- Specify event type to be tracked through the ALICE setup
114 // --- All positions are in cm, angles in degrees, and P and E in GeV
115
116
117 gMC->SetProcess("DCAY",1);
118 gMC->SetProcess("PAIR",1);
119 gMC->SetProcess("COMP",1);
120 gMC->SetProcess("PHOT",1);
121 gMC->SetProcess("PFIS",0);
122 gMC->SetProcess("DRAY",0);
123 gMC->SetProcess("ANNI",1);
124 gMC->SetProcess("BREM",1);
125 gMC->SetProcess("MUNU",1);
126 gMC->SetProcess("CKOV",1);
127 gMC->SetProcess("HADR",0);
128 gMC->SetProcess("LOSS",2);
129 gMC->SetProcess("MULS",1);
130 gMC->SetProcess("RAYL",1);
131
132 Float_t cut = 1.e-3; // 1MeV cut by default
133 Float_t tofmax = 1.e10;
134
135 gMC->SetCut("CUTGAM", cut);
136 gMC->SetCut("CUTELE", cut);
137 gMC->SetCut("CUTNEU", cut);
138 gMC->SetCut("CUTHAD", cut);
139 gMC->SetCut("CUTMUO", cut);
140 gMC->SetCut("BCUTE", cut);
141 gMC->SetCut("BCUTM", cut);
142 gMC->SetCut("DCUTE", cut);
143 gMC->SetCut("DCUTM", cut);
144 gMC->SetCut("PPCUTM", cut);
145 gMC->SetCut("TOFMAX", tofmax);
146
147 // Special generation for Valgrind tests
148 // Each detector is fired by few particles selected
149 // to cover specific cases
150
151
152 // The cocktail itself
153
154 AliGenCocktail *gener = new AliGenCocktail();
155 gener->SetPhiRange(0, 360);
156 // Set pseudorapidity range from -8 to 8.
157 Float_t thmin = EtaToTheta(8); // theta min. <---> eta max
158 Float_t thmax = EtaToTheta(-8); // theta max. <---> eta min
159 gener->SetThetaRange(thmin,thmax);
160 gener->SetOrigin(0., 0., 0); //vertex position
161 gener->SetSigma(0., 0., 0); //Sigma in (X,Y,Z) (cm) on IP position
162
163 AliGenBox *gbox2 = new AliGenBox(1);
164 gbox2->SetPtRange(0.99,1.0001); //
165 gbox2->SetPhiRange(0,360.);
166 gbox2->SetThetaRange(40.,140.);
167 gbox2->SetPart(kPiMinus);
168 gener->AddGenerator(gbox2,"GENBOX PIONS for ITS",1);
169
170
171
172 gener->Init();
173
174
175 //
176 // Activate this line if you want the vertex smearing to happen
177 // track by track
178 //
179 //VertexSmear_t perTrack;
180 //gener->SetVertexSmear(perTrack);
181 // Field (L3 0.5 T)
182 //AliMagF* field = new AliMagF("map","map",2, -1.,1., 15, AliMagF::k5kGUniform);
183 //TGeoGlobalMagField::Instance()->SetField(field);
184 TGeoGlobalMagField::Instance()->SetField(new AliMagF("Maps","Maps", -1., -1., AliMagF::k5kG));
185
186 Int_t iABSO = 0;
187 Int_t iDIPO = 0;
188 Int_t iFMD = 0;
189 Int_t iFRAME = 0;
190 Int_t iHALL = 0;
191 Int_t iITS = 1;
192 Int_t iMAG = 0;
193 Int_t iMUON = 0;
194 Int_t iPHOS = 0;
195 Int_t iPIPE = 1;
196 Int_t iPMD = 0;
197 Int_t iHMPID = 0;
198 Int_t iSHIL = 0;
199 Int_t iT0 = 0;
200 Int_t iTOF = 0;
201 Int_t iTPC = 0;
202 Int_t iTRD = 0;
203 Int_t iZDC = 0;
204 Int_t iEMCAL = 0;
205 Int_t iACORDE = 0;
206 Int_t iVZERO = 0;
207 rl->CdGAFile();
208 //=================== Alice BODY parameters =============================
209 AliBODY *BODY = new AliBODY("BODY", "Alice envelop");
210
211 if (iMAG)
212 {
213 //=================== MAG parameters ============================
214 // --- Start with Magnet since detector layouts may be depending ---
215 // --- on the selected Magnet dimensions ---
216 AliMAG *MAG = new AliMAG("MAG", "Magnet");
217 }
218
219
220 if (iABSO)
221 {
222 //=================== ABSO parameters ============================
223 AliABSO *ABSO = new AliABSOv3("ABSO", "Muon Absorber");
224 }
225
226 if (iDIPO)
227 {
228 //=================== DIPO parameters ============================
229
230 AliDIPO *DIPO = new AliDIPOv3("DIPO", "Dipole version 3");
231 }
232
233 if (iHALL)
234 {
235 //=================== HALL parameters ============================
236
237 AliHALL *HALL = new AliHALLv3("HALL", "Alice Hall");
238 }
239
240
241 if (iFRAME)
242 {
243 //=================== FRAME parameters ============================
244
245 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame");
246 FRAME->SetHoles(1);
247 }
248
249 if (iSHIL)
250 {
251 //=================== SHIL parameters ============================
252
253 AliSHIL *SHIL = new AliSHILv3("SHIL", "Shielding Version 3");
254 }
255
256
257 if (iPIPE)
258 {
259 //=================== PIPE parameters ============================
260
261 AliPIPE *PIPE = new AliPIPEv3("PIPE", "Beam Pipe");
262 }
263
264 if (iITS)
265 {
266 //=================== ITS parameters ============================
84ab81bf 267 Bool_t isUpgrade = kTRUE;
268 AliITS *ITS = 0x0;
269 if(isUpgrade) ITS = new AliITSupgrade("ITS","ITS Upgrade");
270 else ITS = new AliITSv11Hybrid("ITS","ITS v11Hybrid");
271
fabd12c1 272 }
273
274
275 if (iTPC)
276 {
277 //============================ TPC parameters ===================
278 AliTPC *TPC = new AliTPCv2("TPC", "Default");
279 }
280
281
282 if (iTOF) {
283 //=================== TOF parameters ============================
284 AliTOF *TOF = new AliTOFv6T0("TOF", "normal TOF");
285 }
286
287
288 if (iHMPID)
289 {
290 //=================== HMPID parameters ===========================
291 AliHMPID *HMPID = new AliHMPIDv3("HMPID", "normal HMPID");
292
293 }
294
295
296 if (iZDC)
297 {
298 //=================== ZDC parameters ============================
299
300 AliZDC *ZDC = new AliZDCv3("ZDC", "normal ZDC");
301 }
302
303 if (iTRD)
304 {
305 //=================== TRD parameters ============================
306
307 AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator");
308 AliTRDgeometry *geoTRD = TRD->GetGeometry();
309 // Partial geometry: modules at 2,3,4,6,11,12,14,15
310 // starting at 6h in positive direction
311 geoTRD->SetSMstatus(0,0);
312 geoTRD->SetSMstatus(1,0);
313 geoTRD->SetSMstatus(5,0);
314 geoTRD->SetSMstatus(7,0);
315 geoTRD->SetSMstatus(8,0);
316 geoTRD->SetSMstatus(9,0);
317 geoTRD->SetSMstatus(10,0);
318 geoTRD->SetSMstatus(13,0);
319 geoTRD->SetSMstatus(16,0);
320 geoTRD->SetSMstatus(17,0);
321 }
322
323 if (iFMD)
324 {
325 //=================== FMD parameters ============================
326 AliFMD *FMD = new AliFMDv1("FMD", "normal FMD");
327 }
328
329 if (iMUON)
330 {
331 //=================== MUON parameters ===========================
332 // New MUONv1 version (geometry defined via builders)
333 AliMUON *MUON = new AliMUONv1("MUON","default");
334 }
335 //=================== PHOS parameters ===========================
336
337 if (iPHOS)
338 {
339 AliPHOS *PHOS = new AliPHOSv1("PHOS", "IHEP");
340 }
341
342
343 if (iPMD)
344 {
345 //=================== PMD parameters ============================
346 AliPMD *PMD = new AliPMDv1("PMD", "normal PMD");
347 }
348
349 if (iT0)
350 {
351 //=================== T0 parameters ============================
352 AliT0 *T0 = new AliT0v1("T0", "T0 Detector");
353 }
354
355 if (iEMCAL)
356 {
357 //=================== EMCAL parameters ============================
c76b9217 358 AliEMCAL *EMCAL = new AliEMCALv2("EMCAL", "EMCAL_COMPLETEV1");
fabd12c1 359 }
360
361 if (iACORDE)
362 {
363 //=================== ACORDE parameters ============================
364 AliACORDE *ACORDE = new AliACORDEv1("ACORDE", "normal ACORDE");
365 }
366
367 if (iVZERO)
368 {
369 //=================== VZERO parameters ============================
370 AliVZERO *VZERO = new AliVZEROv7("VZERO", "normal VZERO");
371 }
372
373
374}
375
376Float_t EtaToTheta(Float_t arg){
377 return (180./TMath::Pi())*2.*atan(exp(-arg));
378}