1 enum EGeneratorTypes {kHijing, kGun, kBox, kPythia, kParam, kCcocktail, kFluka, kHalo, kNtuple, kScan,
4 EGeneratorTypes gentype=kBox;
9 cout<<"RICH private Config.C> Start\n";
10 new AliGeant3("C++ Interface to Geant3");
12 //=======================================================================
13 // Create the output file
15 TFile *rootfile = new TFile("galice.root","recreate");
16 rootfile->SetCompressionLevel(2);
17 TGeant3 *geant3 = (TGeant3*)gMC;
20 // Set Random Number seed
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);
39 geant3->SetHADR(3); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
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);
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
59 AliGenFixed *gener = new AliGenFixed(ntracks);
60 gener->SetMomentum(3);
61 gener->SetPhiRange(90);
62 gener->SetThetaRange(101);
63 gener->SetOrigin(0,480,-20); //vertex position
64 gener->SetPart(kPiPlus); //GEANT particle type
67 AliGenBox *gener = new AliGenBox(ntracks);
68 gener->SetMomentumRange(2,2);
69 gener->SetPhiRange(90,120);
70 gener->SetThetaRange(85,95);
71 gener->SetOrigin(0,0,0);
72 gener->SetVertexSmear(kPerTrack);
74 gener->SetSigma(1.8, 1.8,0); //Sigma in (X,Y,Z) (cm) on IP position
75 gener->SetPart(kPiPlus); //GEANT particle type
78 AliGenScan *gener = new AliGenScan(-1);
79 gener->SetMomentumRange(3,3);
80 gener->SetPhiRange(90,90);
81 gener->SetThetaRange(90,90);
83 gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
84 gener->SetPart(kPiPlus);
85 gener->SetRange(1, 430, 430, 1, 430, 430, 1, 430, 430);
88 AliGenDoubleScan *gener = new AliGenDoubleScan(-1);
89 gener->SetMomentumRange(3,3);
90 gener->SetPhiRange(0,360);
91 gener->SetThetaRange(0,0);
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);
96 gener->SetDistance(1);
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
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
114 gener->SetVertexSmear(perEvent);
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.);
121 AliGenParam *gener = new AliGenParam(178,Eta,
122 AliGenPHOSlib::GetPt(Eta),
123 AliGenPHOSlib::GetY(Eta),
124 AliGenPHOSlib::GetIp(Eta) );
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);
136 AliGenFLUKAsource *gener = new AliGenFLUKAsource(-1);
137 gener->AddFile("$(ALICE_ROOT)/data/all32.root");
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);
146 gener->SetFraction(0.0315);
149 AliGenExtFile *gener = new AliGenExtFile(-1);
150 gener->SetFileName("$(ALICE_ROOT)/data/dtujet93.root");
151 gener->SetVertexSmear(perEvent);
152 gener->SetTrackingFlag(1);
155 AliGenHalo *gener = new AliGenHalo(ntracks);
156 gener->SetFileName("/h1/morsch/marsip/marsip5.mu");
159 AliGenCocktail *gener = new AliGenCocktail();
160 gener->SetMomentumRange(0,10);
161 gener->SetPhiRange(0,360);
162 gener->SetThetaRange(45.,135);
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);
175 Float_t (*f1)(Float_t);
176 Double_t (*f2)(Double_t);
181 Float_t p2(Float_t x)
186 Float_t x = TMath::Sqrt(2);
190 printf("\n Result %f %f \n", (*f1)(2.), TMath::Sqrt(2));
196 // Activate this line if you want the vertex smearing to happen
199 gener->SetVertexSmear(kPerTrack);
202 gAlice->SetField(0,2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
224 //=================== Alice BODY parameters =============================
225 AliBODY *BODY = new AliBODY("BODY","Alice envelop");
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");
237 //=================== ABSO parameters ============================
238 AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber");
242 //=================== DIPO parameters ============================
244 AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
248 //=================== HALL parameters ============================
250 AliHALL *HALL = new AliHALL("HALL","Alice Hall");
255 //=================== FRAME parameters ============================
257 AliFRAME *FRAME = new AliFRAMEv1("FRAME","Space Frame");
262 //=================== SHIL parameters ============================
264 AliSHIL *SHIL = new AliSHILv0("SHIL","Shielding");
269 //=================== PIPE parameters ============================
271 AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe");
276 //=================== ITS parameters ===========================
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.
287 // Detailed geometries:
288 // ====================
291 //AliITS *ITS = new AliITSv3("ITS","Old ITS detailed version as of the ALICE TP");
293 //AliITS *ITS = new AliITSv5("ITS","Current ITS detailed version used for the ITS TDR");
295 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
297 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
300 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful for reconstruction !):
301 // ======================================================================================================================
304 //AliITS *ITS = new AliITSv1("ITS","Old ITS coarse version as of the ALICE TP");
306 AliITS *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS coarse version with asymmetric services");
308 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS coarse version with symmetric services");
311 // Geant3 <-> EUCLID conversion
312 // ============================
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.
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
338 //-----------------------------------------------------------------------------
340 /* gROOT->LoadMacro("SetTPCParam.C");
341 AliTPCParam *param = SetTPCParam();
342 AliTPC *TPC = new AliTPCv0("TPC","Normal TPC"); //v1 is default
343 TPC->SetParam(param); // pass the parameter object to the TPC
347 TPC->SetGasMixt(2,20,10,-1,0.9,0.1,0.);
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);
354 if (TPC->IsVersion()==1) param->Write(param->GetTitle());*/
356 AliTPC *TPC = new AliTPCv0("TPC","Default");
357 // All sectors included
364 //=================== TOF parameters ============================
365 AliTOF *TOF = new AliTOFv2("TOF","normal TOF");
371 AliRICH *RICH = new AliRICHv3("RICH","normal RICH");
376 //=================== ZDC parameters ============================
378 AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC");
382 //=================== CASTOR parameters ============================
384 AliCASTOR *CASTOR = new AliCASTORv1("CASTOR","normal CASTOR");
388 //=================== TRD parameters ============================
390 AliTRD *TRD = new AliTRDv1("TRD","TRD version 0");
391 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
393 // With hole in front of PHOS
395 // With hole in front of RICH
401 //=================== FMD parameters ============================
403 AliFMD *FMD = new AliFMDv1("FMD","normal FMD");
407 //=================== MUON parameters ===========================
409 AliMUON *MUON = new AliMUONv0("MUON","normal MUON");
413 //=================== PHOS parameters ===========================
416 AliPHOS *PHOS = new AliPHOSv0("PHOS","GPS2");
421 //=================== PMD parameters ============================
423 AliPMD *PMD = new AliPMDv0("PMD","normal PMD");
424 PMD->SetPAR(1., 1., 0.8, 0.02);
425 PMD->SetIN(6., 18., -580., 27., 27.);
426 PMD->SetGEO(0.0, 0.2, 4.);
427 PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
432 //=================== START parameters ============================
433 AliSTART *START = new AliSTARTv0("START","START Detector");
436 cout<<"RICH private Config.C> End\n";