]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RICH/ConfigSE.C
Adding event generator for e+e- pair production
[u/mrichter/AliRoot.git] / RICH / ConfigSE.C
CommitLineData
72d48638 1enum EGeneratorTypes {kHijing, kGun, kBox, kPythia, kParam, kCcocktail, kFluka, kHalo, kNtuple, kScan,
2 kDoubleScan};
8b004505 3
72d48638 4EGeneratorTypes gentype=kScan;
5Int_t ntracks=1;
8b004505 6
7void Config()
8{
72d48638 9 cout<<"RICH private Config.C> Start\n";
8b004505 10new AliGeant3("C++ Interface to Geant3");
11
12//=======================================================================
13// Create the output file
14
15TFile *rootfile = new TFile("galice.root","recreate");
16rootfile->SetCompressionLevel(2);
17TGeant3 *geant3 = (TGeant3*)gMC;
18
72d48638 19//
20// Set Random Number seed
21 gRandom->SetSeed(10);
8b004505 22
23//=======================================================================
24// ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
25geant3->SetTRIG(1); //Number of events to be processed
26geant3->SetSWIT(4,100);
27geant3->SetDEBU(0,0,1);
28//geant3->SetSWIT(2,2);
72d48638 29geant3->SetDCAY(0);
30geant3->SetPAIR(0);
31geant3->SetCOMP(0);
32geant3->SetPHOT(0);
8b004505 33geant3->SetPFIS(0);
72d48638 34geant3->SetDRAY(0);
35geant3->SetANNI(0);
36geant3->SetBREM(0);
37geant3->SetMUNU(0);
8b004505 38geant3->SetCKOV(1);
72d48638 39geant3->SetHADR(0); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
8b004505 40geant3->SetLOSS(1);
72d48638 41geant3->SetMULS(0);
8b004505 42geant3->SetRAYL(0);
43geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
44geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
45geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
46Float_t cut = 1.e-1; // 100MeV cut by default
47Float_t tofmax = 1.e10;
48// GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
49geant3->SetCUTS(1.e-5,5.e-5, 1.e-3, 1.e-4, cut, cut, cut, cut, cut, cut, tofmax);
50
51//
52//=======================================================================
53// ************* STEERING parameters FOR ALICE SIMULATION **************
54// --- Specify event type to be tracked through the ALICE setup
55// --- All positions are in cm, angles in degrees, and P and E in GeV
56
72d48638 57 switch(gentype){
58 case kGun:
8b004505 59 AliGenFixed *gener = new AliGenFixed(ntracks);
60 gener->SetMomentum(3);
61 gener->SetPhiRange(90);
72d48638 62 gener->SetThetaRange(101);
63 gener->SetOrigin(0,480,-20); //vertex position
8b004505 64 gener->SetPart(kPiPlus); //GEANT particle type
72d48638 65 break;
66 case kBox:
8b004505 67 AliGenBox *gener = new AliGenBox(ntracks);
72d48638 68 gener->SetMomentumRange(2,2);
69 //gener->SetPhiRange(30,30); //for inclined HMPID
8b004505 70 gener->SetPhiRange(82,98);
72d48638 71 gener->SetThetaRange(82,98);
8b004505 72 gener->SetOrigin(0,0,0);
73 gener->SetVertexSmear(kPerTrack);
74 //vertex position
75 gener->SetSigma(1.8, 1.8,0); //Sigma in (X,Y,Z) (cm) on IP position
76 gener->SetPart(kPiPlus); //GEANT particle type
72d48638 77 break;
78 case kScan:
8b004505 79 AliGenScan *gener = new AliGenScan(-1);
72d48638 80 gener->SetMomentumRange(2,2);
81 //gener->SetPhiRange(30,30); //for inclined HMPID
82 gener->SetPhiRange(90,90); //for normal HMPID
8b004505 83 gener->SetThetaRange(90,90);
84 //vertex position
85 gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
86 gener->SetPart(kPiPlus);
72d48638 87 //gener->SetRange(1, 415, 415, 1, 245, 245, 1, -20, -20); //for inclined HMPID
88 gener->SetRange(1, 0, 0, 1, 480, 480, 1, -20, -20); //for normal HMPID
89
90 break;
91 case kSoubleScan:
8b004505 92 AliGenDoubleScan *gener = new AliGenDoubleScan(-1);
93 gener->SetMomentumRange(3,3);
94 gener->SetPhiRange(0,360);
95 gener->SetThetaRange(0,0);
96 //vertex position
97 gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
98 gener->SetPart(kPiPlus);
99 gener->SetRange(20, -60, 60, 1, 480, 480, 20, -60, 60);
72d48638 100 gener->SetDistance(1);
101 break;
102 case kHijing:
8b004505 103 AliGenHIJINGpara *gener = new AliGenHIJINGpara(ntracks);
104 gener->SetMomentumRange(0,999);
105 gener->SetPhiRange(0,360);
106 gener->SetThetaRange(.77,179.23);
107 gener->SetOrigin(0,0,0); //vertex position
108 gener->SetSigma(0,0,5.6); //Sigma in (X,Y,Z) (cm) on IP position
72d48638 109 break;
110 case kPythia:
8b004505 111 AliGenPythia *gener = new AliGenPythia(ntracks);
112 gener->SetMomentumRange(0,999);
113 gener->SetPhiRange(0,360);
114 gener->SetThetaRange(0., 180.);
115 gener->SetYRange(-10,10);
116 gener->SetPtRange(0,100);
117 gener->SetOrigin(0,0,0); // vertex position
118 gener->SetVertexSmear(perEvent);
119 gener->SetSigma(0,0,5.6); // Sigma in (X,Y,Z) (cm) on IP position
120// gener->SetStrucFunc(DO_Set_1);
121 gener->SetProcess(mb);
122 gener->SetEnergyCMS(5500.);
72d48638 123 break;
124 case kParam:
8b004505 125 AliGenParam *gener = new AliGenParam(178,Eta,
126 AliGenPHOSlib::GetPt(Eta),
127 AliGenPHOSlib::GetY(Eta),
128 AliGenPHOSlib::GetIp(Eta) );
129
130 gener->SetMomentumRange(0,999);
131 gener->SetPhiRange(0,360);
132 gener->SetYRange(2.5,4);
133 gener->SetThetaRange(2,9);
134 gener->SetPtRange(0,10);
135 gener->SetOrigin(0,0,0); //vertex position
136 gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
137 gener->SetCutOnChild(1);
72d48638 138 break;
139 case kFluka:
8b004505 140 AliGenFLUKAsource *gener = new AliGenFLUKAsource(-1);
141 gener->AddFile("$(ALICE_ROOT)/data/all32.root");
142 rootfile->cd();
143 gener->SetPartFlag(9);
144 gener->SetMomentumRange(0,999);
145 gener->SetPhiRange(0,360);
146 gener->SetThetaRange(0., 180.);
147 gener->SetAgeMax(1.e-5);
148
149// 31.7 events
150 gener->SetFraction(0.0315);
72d48638 151 break;
152 case kNtuple:
8b004505 153 AliGenExtFile *gener = new AliGenExtFile(-1);
154 gener->SetFileName("$(ALICE_ROOT)/data/dtujet93.root");
155 gener->SetVertexSmear(perEvent);
156 gener->SetTrackingFlag(1);
72d48638 157 break;
158 case kHalo:
8b004505 159 AliGenHalo *gener = new AliGenHalo(ntracks);
160 gener->SetFileName("/h1/morsch/marsip/marsip5.mu");
72d48638 161 break;
162 case kCocktail:
8b004505 163 AliGenCocktail *gener = new AliGenCocktail();
164 gener->SetMomentumRange(0,10);
165 gener->SetPhiRange(0,360);
166 gener->SetThetaRange(45.,135);
167
168 pions = new AliGenParam(100, pion_p);
169// kaons = new AliGenParam(10 , kaon_p);
170// protons = new AliGenParam(10 , proton_p);
171 gener->AddGenerator(pions , "Pions" , 100);
172// gener->AddGenerator(kaons , "Kaons" , 10);
173// gener->AddGenerator(protons, "Protons", 10);
174//
175// test
176//
177
178 Float_t p2(Float_t);
179 Float_t (*f1)(Float_t);
180 Double_t (*f2)(Double_t);
181
182
183
184
185 Float_t p2(Float_t x)
186 {
187 return x*x;
188 }
189 f1=p2;
190 Float_t x = TMath::Sqrt(2);
191
192 f1=TMath::Sqrt;
193
194 printf("\n Result %f %f \n", (*f1)(2.), TMath::Sqrt(2));
195
196
197 break;
72d48638 198 }//switch
8b004505 199
200// Activate this line if you want the vertex smearing to happen
201// track by track
202//
72d48638 203 gener->SetVertexSmear(kPerTrack);
204 gener->Init();
205
206 gAlice->SetField(0,2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
8b004505 207
208Int_t iMAG=0;
209Int_t iITS=0;
210Int_t iTPC=0;
211Int_t iTOF=0;
212Int_t iRICH=1;
213Int_t iZDC=0;
214Int_t iCASTOR=0;
215Int_t iTRD=0;
216Int_t iABSO=0;
217Int_t iDIPO=0;
218Int_t iHALL=0;
219Int_t iFRAME=0;
220Int_t iSHIL=0;
221Int_t iPIPE=0;
222Int_t iFMD=0;
223Int_t iMUON=0;
224Int_t iPHOS=0;
225Int_t iPMD=0;
226Int_t iSTART=0;
227
228//=================== Alice BODY parameters =============================
229AliBODY *BODY = new AliBODY("BODY","Alice envelop");
230
231
232if(iMAG) {
233//=================== MAG parameters ============================
234// --- Start with Magnet since detector layouts may be depending ---
235// --- on the selected Magnet dimensions ---
236AliMAG *MAG = new AliMAG("MAG","Magnet");
237}
238
239
240if(iABSO) {
241//=================== ABSO parameters ============================
242AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber");
243}
244
245if(iDIPO) {
246//=================== DIPO parameters ============================
247
248AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
249}
250
251if(iHALL) {
252//=================== HALL parameters ============================
253
254AliHALL *HALL = new AliHALL("HALL","Alice Hall");
255}
256
257
258if(iFRAME) {
259//=================== FRAME parameters ============================
260
261AliFRAME *FRAME = new AliFRAMEv1("FRAME","Space Frame");
262
263}
264
265if(iSHIL) {
266//=================== SHIL parameters ============================
267
268AliSHIL *SHIL = new AliSHILv0("SHIL","Shielding");
269}
270
271
272if(iPIPE) {
273//=================== PIPE parameters ============================
274
275AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe");
276}
277
278
279if(iITS) {
72d48638 280 //=================== ITS parameters ===========================
281 //
282 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
283 // almost all other detectors. This involves the fact that the ITS geometry
284 // still has several options to be followed in parallel in order to determine
285 // the best set-up which minimizes the induced background. All the geometries
286 // available to date are described in the following. Read carefully the comments
287 // and use the default version (the only one uncommented) unless you are making
288 // comparisons and you know what you are doing. In this case just uncomment the
289 // ITS geometry you want to use and run Aliroot.
290 //
291 // Detailed geometries:
292 // ====================
293 //
294 //
295 //AliITS *ITS = new AliITSv3("ITS","Old ITS detailed version as of the ALICE TP");
296 //
297 //AliITS *ITS = new AliITSv5("ITS","Current ITS detailed version used for the ITS TDR");
298 //
299 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
300 //
301 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
302 //
303 //
304 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful for reconstruction !):
305 // ======================================================================================================================
306 //
307 //
308 //AliITS *ITS = new AliITSv1("ITS","Old ITS coarse version as of the ALICE TP");
309 //
310 AliITS *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS coarse version with asymmetric services");
311 //
312 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS coarse version with symmetric services");
313 //
314 //
315 // Geant3 <-> EUCLID conversion
316 // ============================
317 //
318 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
319 // media to two ASCII files (called by default ITSgeometry.euc and
320 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
321 // The default (=0) means that you dont want to use this facility.
322 //
323 ITS->SetEUCLID(0);
8b004505 324}
325
326
327if(iTPC) {
328//============================ TPC parameters ================================
329// --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
330// --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
331// --- sectors are specified, any value other than that requires at least one
332// --- sector (lower or upper)to be specified!
333// --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
334// --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
335// --- SecLows - number of lower sectors specified (up to 6)
336// --- SecUps - number of upper sectors specified (up to 12)
337// --- Sens - sensitive strips for the Slow Simulator !!!
338// --- This does NOT work if all S or L-sectors are specified, i.e.
339// --- if SecAL or SecAU < 0
340//
341//
342//-----------------------------------------------------------------------------
343
72d48638 344 /* gROOT->LoadMacro("SetTPCParam.C");
8b004505 345 AliTPCParam *param = SetTPCParam();
346 AliTPC *TPC = new AliTPCv0("TPC","Normal TPC"); //v1 is default
347 TPC->SetParam(param); // pass the parameter object to the TPC
72d48638 348
349 // set gas mixture
350
351 TPC->SetGasMixt(2,20,10,-1,0.9,0.1,0.);
352 TPC->SetSecAL(4);
353 TPC->SetSecAU(4);
354 TPC->SetSecLows(1, 2, 3, 19, 20, 21);
355 TPC->SetSecUps(37, 38, 39, 37+18, 38+18, 39+18, -1, -1, -1, -1, -1, -1);
356 TPC->SetSens(1);
357
358 if (TPC->IsVersion()==1) param->Write(param->GetTitle());*/
359
360 AliTPC *TPC = new AliTPCv0("TPC","Default");
361 // All sectors included
362 TPC->SetSecAL(-1);
363 TPC->SetSecAU(-1);
8b004505 364
8b004505 365}
366
367if(iTOF) {
368//=================== TOF parameters ============================
72d48638 369AliTOF *TOF = new AliTOFv2("TOF","normal TOF");
8b004505 370}
72d48638 371
372
373 gAlice->SetDebug(1);
8b004505 374
72d48638 375
376if(iRICH){
377//====================== RICH parameters =========================
378AliRICH *RICH = new AliRICHv3("RICH","normal RICH");
379}//if(iRICH)
8b004505 380
381
382if(iZDC) {
383//=================== ZDC parameters ============================
384
385AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC");
386}
387
388if(iCASTOR) {
389//=================== CASTOR parameters ============================
390
391AliCASTOR *CASTOR = new AliCASTORv1("CASTOR","normal CASTOR");
392}
393
394if(iTRD) {
395//=================== TRD parameters ============================
396
397AliTRD *TRD = new AliTRDv1("TRD","TRD version 0");
398// Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
399TRD->SetGasMix(1);
400// With hole in front of PHOS
401 TRD->SetPHOShole();
402 // With hole in front of RICH
403 TRD->SetRICHhole();
404
405}
406
407if(iFMD) {
408//=================== FMD parameters ============================
409
410AliFMD *FMD = new AliFMDv1("FMD","normal FMD");
411}
412
413if(iMUON) {
414//=================== MUON parameters ===========================
415
416AliMUON *MUON = new AliMUONv0("MUON","normal MUON");
417
418}
419
420//=================== PHOS parameters ===========================
421
422if(iPHOS) {
423 AliPHOS *PHOS = new AliPHOSv0("PHOS","GPS2");
424}
425
426
427if(iPMD) {
428//=================== PMD parameters ============================
429
430AliPMD *PMD = new AliPMDv0("PMD","normal PMD");
431PMD->SetPAR(1., 1., 0.8, 0.02);
432PMD->SetIN(6., 18., -580., 27., 27.);
433PMD->SetGEO(0.0, 0.2, 4.);
434PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
435
436}
437
438if(iSTART) {
439//=================== START parameters ============================
440AliSTART *START = new AliSTARTv0("START","START Detector");
441}
442
72d48638 443 cout<<"RICH private Config.C> End\n";
444}//void Config()