]>
Commit | Line | Data |
---|---|---|
4f71be4a | 1 | enum EGeneratorTypes {kHijing, kGun, kBox, kPythia, kParam, kCcocktail, kFluka, kHalo, kNtuple, kScan, |
2 | kDoubleScan}; | |
e32e4cb8 | 3 | |
4f71be4a | 4 | EGeneratorTypes gentype=kBox; |
5 | Int_t ntracks=50; | |
e32e4cb8 | 6 | |
7 | void Config() | |
8 | { | |
4f71be4a | 9 | cout<<"RICH private Config.C> Start\n"; |
e32e4cb8 | 10 | new AliGeant3("C++ Interface to Geant3"); |
11 | ||
12 | //======================================================================= | |
13 | // Create the output file | |
14 | ||
15 | TFile *rootfile = new TFile("galice.root","recreate"); | |
16 | rootfile->SetCompressionLevel(2); | |
17 | TGeant3 *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 ******* | |
25 | geant3->SetTRIG(1); //Number of events to be processed | |
26 | geant3->SetSWIT(4,100); | |
27 | geant3->SetDEBU(0,0,1); | |
28 | //geant3->SetSWIT(2,2); | |
29 | geant3->SetDCAY(1); | |
30 | geant3->SetPAIR(1); | |
31 | geant3->SetCOMP(1); | |
32 | geant3->SetPHOT(1); | |
33 | geant3->SetPFIS(0); | |
34 | geant3->SetDRAY(1); | |
35 | geant3->SetANNI(1); | |
36 | geant3->SetBREM(1); | |
3d88b846 | 37 | geant3->SetMUNU(1); |
e32e4cb8 | 38 | geant3->SetCKOV(1); |
39 | geant3->SetHADR(3); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3) | |
40 | geant3->SetLOSS(1); | |
41 | geant3->SetMULS(1); | |
42 | geant3->SetRAYL(0); | |
43 | geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0) | |
44 | geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks | |
45 | geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2) | |
46 | Float_t cut = 1.e-1; // 100MeV cut by default | |
47 | Float_t tofmax = 1.e10; | |
48 | // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX | |
49 | geant3->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 | |
204 | Int_t iMAG=0; | |
764a75a4 | 205 | Int_t iITS=0; |
4f71be4a | 206 | Int_t iTPC=1; |
764a75a4 | 207 | Int_t iTOF=0; |
e32e4cb8 | 208 | Int_t iRICH=1; |
209 | Int_t iZDC=0; | |
210 | Int_t iCASTOR=0; | |
764a75a4 | 211 | Int_t iTRD=0; |
e32e4cb8 | 212 | Int_t iABSO=0; |
213 | Int_t iDIPO=0; | |
214 | Int_t iHALL=0; | |
764a75a4 | 215 | Int_t iFRAME=0; |
e32e4cb8 | 216 | Int_t iSHIL=0; |
764a75a4 | 217 | Int_t iPIPE=0; |
e32e4cb8 | 218 | Int_t iFMD=0; |
219 | Int_t iMUON=0; | |
220 | Int_t iPHOS=0; | |
221 | Int_t iPMD=0; | |
4f71be4a | 222 | Int_t iSTART=1; |
e32e4cb8 | 223 | |
224 | //=================== Alice BODY parameters ============================= | |
225 | AliBODY *BODY = new AliBODY("BODY","Alice envelop"); | |
226 | ||
227 | ||
228 | if(iMAG) { | |
229 | //=================== MAG parameters ============================ | |
230 | // --- Start with Magnet since detector layouts may be depending --- | |
231 | // --- on the selected Magnet dimensions --- | |
232 | AliMAG *MAG = new AliMAG("MAG","Magnet"); | |
233 | } | |
234 | ||
06a0df24 | 235 | |
236 | if(iABSO) { | |
237 | //=================== ABSO parameters ============================ | |
238 | AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber"); | |
239 | } | |
240 | ||
241 | if(iDIPO) { | |
242 | //=================== DIPO parameters ============================ | |
243 | ||
244 | AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2"); | |
245 | } | |
246 | ||
247 | if(iHALL) { | |
248 | //=================== HALL parameters ============================ | |
249 | ||
250 | AliHALL *HALL = new AliHALL("HALL","Alice Hall"); | |
251 | } | |
252 | ||
253 | ||
e32e4cb8 | 254 | if(iFRAME) { |
255 | //=================== FRAME parameters ============================ | |
06a0df24 | 256 | |
e32e4cb8 | 257 | AliFRAME *FRAME = new AliFRAMEv1("FRAME","Space Frame"); |
06a0df24 | 258 | |
259 | } | |
260 | ||
261 | if(iSHIL) { | |
262 | //=================== SHIL parameters ============================ | |
263 | ||
264 | AliSHIL *SHIL = new AliSHILv0("SHIL","Shielding"); | |
265 | } | |
266 | ||
267 | ||
268 | if(iPIPE) { | |
269 | //=================== PIPE parameters ============================ | |
270 | ||
271 | AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe"); | |
e32e4cb8 | 272 | } |
273 | ||
06a0df24 | 274 | |
e32e4cb8 | 275 | if(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 | 323 | if(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 | ||
363 | if(iTOF) { | |
364 | //=================== TOF parameters ============================ | |
4a8166bc | 365 | AliTOF *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 | 375 | if(iZDC) { |
376 | //=================== ZDC parameters ============================ | |
377 | ||
378 | AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC"); | |
379 | } | |
380 | ||
381 | if(iCASTOR) { | |
382 | //=================== CASTOR parameters ============================ | |
383 | ||
384 | AliCASTOR *CASTOR = new AliCASTORv1("CASTOR","normal CASTOR"); | |
385 | } | |
386 | ||
387 | if(iTRD) { | |
388 | //=================== TRD parameters ============================ | |
389 | ||
764a75a4 | 390 | AliTRD *TRD = new AliTRDv1("TRD","TRD version 0"); |
06a0df24 | 391 | // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2) |
764a75a4 | 392 | TRD->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 | 400 | if(iFMD) { |
401 | //=================== FMD parameters ============================ | |
402 | ||
403 | AliFMD *FMD = new AliFMDv1("FMD","normal FMD"); | |
404 | } | |
405 | ||
406 | if(iMUON) { | |
407 | //=================== MUON parameters =========================== | |
408 | ||
409 | AliMUON *MUON = new AliMUONv0("MUON","normal MUON"); | |
410 | ||
e32e4cb8 | 411 | } |
412 | ||
e32e4cb8 | 413 | //=================== PHOS parameters =========================== |
414 | ||
06a0df24 | 415 | if(iPHOS) { |
416 | AliPHOS *PHOS = new AliPHOSv0("PHOS","GPS2"); | |
e32e4cb8 | 417 | } |
418 | ||
06a0df24 | 419 | |
e32e4cb8 | 420 | if(iPMD) { |
421 | //=================== PMD parameters ============================ | |
422 | ||
06a0df24 | 423 | AliPMD *PMD = new AliPMDv0("PMD","normal PMD"); |
e32e4cb8 | 424 | PMD->SetPAR(1., 1., 0.8, 0.02); |
06a0df24 | 425 | PMD->SetIN(6., 18., -580., 27., 27.); |
e32e4cb8 | 426 | PMD->SetGEO(0.0, 0.2, 4.); |
06a0df24 | 427 | PMD->SetPadSize(0.8, 1.0, 1.0, 1.5); |
e32e4cb8 | 428 | |
06a0df24 | 429 | } |
e32e4cb8 | 430 | |
06a0df24 | 431 | if(iSTART) { |
432 | //=================== START parameters ============================ | |
433 | AliSTART *START = new AliSTARTv0("START","START Detector"); | |
434 | } | |
e32e4cb8 | 435 | |
4f71be4a | 436 | cout<<"RICH private Config.C> End\n"; |
437 | }//void Config() |