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