pipe, abso and shil on again.
[u/mrichter/AliRoot.git] / MUON / Config.C
CommitLineData
2102e462 1enum gentype_t {hijing, gun, box, pythia, param, cocktail, fluka, halo, ntuple, scan, doublescan, hijing_g};
2
bdad9037 3gentype_t gentype=param;
2102e462 4Int_t ntracks=1;
5
6void Config()
7
8{
9new AliGeant3("C++ Interface to Geant3");
10
11//=======================================================================
12// Create the output file
13
14 TFile *rootfile = new TFile("galice.root","recreate");
15 rootfile->SetCompressionLevel(2);
16 TGeant3 *geant3 = (TGeant3*)gMC;
17 AliDecayer* decayer = new AliDecayerPythia();
d5ca3e62 18 decayer->SetForceDecay(kAll);
2102e462 19 decayer->Init();
20 gMC->SetExternalDecayer(decayer);
21
22//=======================================================================
23// ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
24geant3->SetTRIG(1); //Number of events to be processed
25geant3->SetSWIT(4,100);
26geant3->SetDEBU(0,0,1);
27geant3->SetDCAY(1);
28geant3->SetPAIR(1);
29geant3->SetCOMP(1);
30geant3->SetPHOT(1);
31geant3->SetPFIS(0);
32geant3->SetDRAY(0);
33geant3->SetANNI(1);
34geant3->SetBREM(1);
35geant3->SetMUNU(1);
36geant3->SetCKOV(0);
37geant3->SetHADR(4); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
38geant3->SetLOSS(1);
39geant3->SetMULS(1);
40geant3->SetRAYL(0);
41geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
42geant3->SetABAN(1); //Restore 3.16 behaviour for abandoned tracks
43geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
44Float_t cut = 1.e-4; // 100MeV cut by default
45Float_t tofmax = 1.e10;
46// GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
47geant3->SetCUTS(1.e-4, 1.e-4, 1.e-3, 1.e-4, 1.e-3, cut, cut, cut, cut, cut, 1.e-5);
48
4ec16dd1 49gAlice->TrackingLimits(700, 2000);
2102e462 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
57 switch(gentype)
58 {
59 case gun:
60//*********************************************
61// Example for Fixed Particle Gun *
62//*********************************************
63 AliGenFixed *gener = new AliGenFixed(ntracks);
64 gener->SetMomentum(10);
65 gener->SetPhiRange(0);
66 gener->SetThetaRange(0.);
67 gener->SetOrigin(30,30,1200); //vertex position
68 gener->SetPart(kProton); //GEANT particle type
69 break;
70 case box:
71//*********************************************
72// Example for Moving Particle Gun *
73//*********************************************
74 AliGenBox *gener = new AliGenBox(ntracks);
75 gener->SetMomentumRange(33,34);
76 gener->SetPhiRange(-180,180);
77 gener->SetThetaRange(2., 9.);
78 gener->SetOrigin(0,0,0);
79 gener->SetVertexSmear(kPerTrack);
80 //vertex position
81 gener->SetSigma(0, 0, 0); // Sigma in (X,Y,Z) (cm) on IP position
82 gener->SetPart(kMuonPlus); // GEANT particle type
83 break;
84 case scan:
85//*********************************************
86// Scanning on a grid *
87//*********************************************
88 AliGenScan *gener = new AliGenScan(-1);
89 gener->SetMomentumRange(20,20);
90 gener->SetPhiRange(90,90);
91 gener->SetThetaRange(0,0);
92 //vertex position
93 gener->SetSigma(1,1,0); //Sigma in (X,Y,Z) (cm) on IP position
94 gener->SetPart(kMuonMinus);
4ec16dd1 95 gener->SetRange(100, -300., 300., 100, -300., 300., 1, 900, 900);
2102e462 96 break;
97 case doublescan:
98//*********************************************
99// Scanning on a grid *
100//*********************************************
101 AliGenDoubleScan *gener = new AliGenDoubleScan(-1);
102 gener->SetMomentumRange(4,4);
103 gener->SetPhiRange(0,360);
104 gener->SetThetaRange(0,0);
105 //vertex position
106 gener->SetSigma(3,3,0); //Sigma in (X,Y,Z) (cm) on IP position
107 gener->SetPart(8);
108 gener->SetRange(20, -100, 100, 20, -100, 100, 1, 500, 500);
109 gener->SetDistance(1);
110 break;
111
112 case hijing:
113 AliGenHIJINGpara *gener = new AliGenHIJINGpara(ntracks);
114 gener->SetMomentumRange(0,999);
115 gener->SetPtRange(0,999);
116 gener->SetPhiRange(0,360);
117// gener->SetThetaRange(0.104,33.52);
118 gener->SetThetaRange(0.104,90.0);
119// gener->SetThetaRange(2.,9.);
120 gener->SetOrigin(0., 0.0 ,0); // vertex position
121 gener->SetSigma(0,0,5.3); // Sigma in (X,Y,Z) (cm) on IP position
122 gener->SetVertexSmear(kPerTrack);
123 gener->SetTrackingFlag(0);
124 break;
125 case hijing_g:
126 AliGenHijing *gener = new AliGenHijing(-1);
127
128 gener->SetEnergyCMS(5600.);
129 gener->SetReferenceFrame("CMS");
130 gener->SetProjectile("A", 208, 82);
131 gener->SetTarget ("A", 208, 82);
132 gener->SetImpactParameterRange(0, 5.);
133 gener->SetEvaluate(0);
134 gener->KeepFullEvent();
135 gener->SetJetQuenching(1);
136 gener->SetShadowing(1);
137 gener->SetDecaysOff(1);
138 gener->SetTrigger(0);
139 gener->SetSelectAll(1);
140 gener->SetMomentumRange(0,9999);
141 gener->SetPhiRange(-180,180);
142 gener->SetThetaRange(0.104,90.0);
143// gener->SetFlavor(4);
144 gener->SetOrigin(0., 0.0 ,0);
145 gener->SetSigma(0,0,5.3);
146 gener->SetVertexSmear(kPerEvent);
147 gener->SetTrackingFlag(0);
148
149 break;
150
151 case pythia:
152//********************************************
153// Example for Charm Production with Pythia *
154//********************************************
155AliGenPythia *gener = new AliGenPythia(ntracks);
156 gener->SetMomentumRange(0,999);
157 gener->SetPhiRange(0,360);
158 gener->SetThetaRange(0., 180.);
159 gener->SetYRange(-10,10);
160 gener->SetPtRange(0,100);
161 //gener->SetOrigin(0,0,0); // vertex position
162 //gener->SetVertexSmear(kPerEvent);
163 //gener->SetSigma(0,0,5.6); // Sigma in (X,Y,Z) (cm) on IP
164position
4ec16dd1 165 gener->SetStrucFunc(kDO_Set_1);
166 gener->SetProcess(kPyCharm);
2102e462 167 gener->SetEnergyCMS(5500.);
168 break;
169/*
170 AliGenPythia *gener = new AliGenPythia(ntracks);
171 gener->SetMomentumRange(0,999);
172 gener->SetPhiRange(0,360);
173 gener->SetThetaRange(0., 180.);
174 gener->SetYRange(-10,10);
175 gener->SetPtRange(0,100);
176 gener->SetOrigin(0,0,0); // vertex position
177 gener->SetVertexSmear(kPerEvent);
178 gener->SetSigma(0,0,5.6); // Sigma in (X,Y,Z) (cm) on IP position
179 gener->SetStrucFunc(DO_Set_1);
180 gener->SetProcess(charm);
181 gener->SetForceDecay(dimuon);
182 gener->SetEnergyCMS(5500.);
183 gener->SetTrackingFlag(0);
184
185 break;
186 */
187 case param:
188//*******************************************************
189// Example for J/psi or Upsilon Production from Parameterisation *
190//*******************************************************
d5ca3e62 191 AliGenParam *gener = new AliGenParam(ntracks, AliGenMUONlib::kUpsilon);
2102e462 192 gener->SetMomentumRange(0,999);
193 gener->SetPhiRange(-180, 180);
194 gener->SetYRange(2.5,4);
195 gener->SetCutOnChild(1);
bdad9037 196 gener->SetChildThetaRange(2.0,9);
2102e462 197 gener->SetOrigin(0,0,0); //vertex position
198 gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
d5ca3e62 199 gener->SetForceDecay(kDiMuon);
2102e462 200 gener->SetTrackingFlag(1);
201
202 break;
203
204 case fluka:
205//*******************************************************
206// Example for a FLUKA Boundary Source *
207//*******************************************************
208 AliGenFLUKAsource *gener = new AliGenFLUKAsource(-1);
209 gener->AddFile("$(ALICE_ROOT)/data/alice.root");
210 rootfile->cd();
211 gener->SetPartFlag(7);
212 gener->SetMomentumRange(0,999);
213 gener->SetPhiRange(0,360);
214 gener->SetThetaRange(0., 180.);
215 gener->SetAgeMax(1.e-5);
216
217// 31.7 events
218 gener->SetFraction(1.);
219 break;
220
221 case ntuple:
222//*******************************************************
223// Example for reading from a external file *
224//*******************************************************
225 AliGenExtFileCH *gener = new AliGenExtFileCH(-1);
226 gener->SetFileName("$(ALICE_ROOT)/data/pbpb.root");
227 gener->SetThetaRange(0.104,90.);
228 gener->SetOrigin(0,0,0); //vertex position
229 gener->SetSigma(0,0,5.6); //Sigma in (X,Y,Z) (cm) on IP position
230 gener->SetVertexSmear(kPerTrack);
231 gener->SetTrackingFlag(1);
232 break;
233
234 case halo:
235//*******************************************************
236// Example for Tunnel Halo Source *
237//*******************************************************
238 AliGenHalo *gener = new AliGenHalo(ntracks);
239 gener->SetFileName("/h1/morsch/marsip/marsip5.mu");
240 break;
241
242 case cocktail:
243//*******************************************************
244// Example for a Cocktail *
245//*******************************************************
246 AliGenCocktail *gener = new AliGenCocktail();
247 gener->SetMomentumRange(0,10);
248 gener->SetPhiRange(0,360);
249 gener->SetThetaRange(2.,9.);
250 gener->SetTrackingFlag(0);
4ec16dd1 251 AliGenParam *Pi0 = new AliGenParam(100, new AliGenPMDlib(), AliGenPMDlib::kPion);
252 AliGenParam *Eta = new AliGenParam( 10, new AliGenPMDlib(), AliGenPMDlib::kEta);
2102e462 253 gener->AddGenerator(Pi0, "neutral pions" , 1.);
254 gener->AddGenerator(Eta, "neutral etas" , 1.);
255 break;
256 }
257
258
259gener->Init();
260gAlice->SetField(2,1); //Specify maximum magnetic field in Tesla (neg. ==> default field)
261
262Int_t iFRAME =0;
263Int_t iMAG =0;
264Int_t iITS =0;
fa13d8fe 265Int_t iABSO =1;
be3bb6c1 266Int_t iDIPO =0;
2102e462 267Int_t iHALL =0;
fa13d8fe 268Int_t iSHIL =1;
269Int_t iPIPE =1;
2102e462 270Int_t iFMD =0;
271Int_t iMUON =1;
272
273//=================== Alice BODY parameters =============================
274AliBODY *BODY = new AliBODY("BODY","Alice envelop");
275
276if(iFRAME) {
277//=================== FRAME parameters ============================
278AliFRAME *FRAME = new AliFRAMEv0("FRAME","Space Frame");
279}
280
281if(iMAG) {
282//=================== MAG parameters ============================
283// --- Start with Magnet since detector layouts may be depending ---
284// --- on the selected Magnet dimensions ---
285AliMAG *MAG = new AliMAG("MAG","Magnet");
286}
287
288if(iABSO) {
289//=================== ABSO parameters ============================
290 AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber");
291}
292
293if(iDIPO) {
294//=================== DIPO parameters ============================
295
296 AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
297}
298
299if(iHALL) {
300//=================== HALL parameters ============================
301 AliHALL *HALL = new AliHALL("HALL","Alice Hall");
302}
303
304
305
306if(iSHIL) {
307//=================== SHIL parameters ============================
308// AliSHIL *SHIL = new AliSAROV("SHIL","Shielding");
bdad9037 309 AliSHILvF *SHIL = new AliSHILvF("SHIL","Shielding");
2102e462 310 SHIL->SetPbCone(1);
311// AliSAROV *SHIL = new AliSAROV("SHIL","Shielding");
312}
313
314
315if(iPIPE) {
316//=================== PIPE parameters ============================
317 AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe");
318}
319
320
321if(iFMD) {
322//=================== FMD parameters ============================
323 AliFMD *FMD = new AliFMDv1("FMD","normal FMD");
324}
325
326if(iMUON) {
327//=================== MUON parameters ===========================
328
be3bb6c1 329 AliMUON *MUON = new AliMUONv1("MUON","default");
330
2102e462 331}
be3bb6c1 332
2102e462 333}
334
335
336
337
338