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