]>
Commit | Line | Data |
---|---|---|
c64f7552 | 1 | const static Int_t iRICH = 3;//0-1-3 |
2 | const static Bool_t IsRichUp=kFALSE; | |
9e23b054 | 3 | const static Int_t kEventsPerFile=50; |
4c1f23a0 | 4 | |
c292f886 | 5 | enum EGenTypes {kGun0,kGun1,kGun7,kPP7,kPara}; |
6 | const static EGenTypes kGen=kPara; | |
4c1f23a0 | 7 | |
8 | Int_t iPIPE = 0;//central before RICH | |
9 | Int_t iITS = 0; | |
10 | Int_t iTPC = 0; | |
11 | Int_t iTRD = 0; | |
12 | Int_t iTOF = 0; | |
13 | Int_t iFRAME = 0; | |
14 | ||
15 | Int_t iMAG = 0;//central after RICH | |
16 | Int_t iCRT = 0; | |
17 | Int_t iHALL = 0; | |
18 | ||
19 | Int_t iPHOS = 0; | |
20 | ||
21 | Int_t iSTART = 0;//forward | |
22 | Int_t iFMD = 0; | |
23 | Int_t iSHIL = 0; | |
24 | Int_t iABSO = 1; | |
25 | Int_t iPMD = 0; | |
26 | Int_t iDIPO = 0; | |
27 | Int_t iEMCAL = 0; | |
28 | Int_t iVZERO = 0; | |
29 | Int_t iMUON = 0; | |
30 | Int_t iZDC = 0; | |
31 | ||
32 | AliRICH *gRICH; | |
33 | ||
34 | void Config() | |
35 | { | |
36 | ::Info("kir","Start RICH VERSION %i debug %i",iRICH,gAlice->GetDebug()); | |
37 | ||
38 | int n,pid,chamber; | |
39 | double p; | |
40 | Geant3(); File(); Decayer(); Field(); Other(); | |
9e23b054 | 41 | |
42 | ||
43 | if(IsRichUp) AliRICHParam::AngleRot(0); | |
4c1f23a0 | 44 | AliRICH *pRICH; |
45 | switch(iRICH){ | |
46 | case 0: | |
47 | gRICH=new AliRICHv0("RICH","coarse RICH for material budget"); | |
48 | break; | |
49 | case 1: | |
50 | gRICH=new AliRICHv1("RICH","detailed RICH for full simulation"); | |
51 | break; | |
52 | case 3: | |
53 | gRICH=new AliRICHv3("RICH","old parametrised RICH with rotation"); | |
54 | break; | |
55 | } | |
4c1f23a0 | 56 | switch(kGen){ |
57 | case kPP7: Pythia7(pid=kPiPlus,p=4); break; | |
ed3ceb24 | 58 | case kGun7: Gun7(pid=kProton); break; |
4c1f23a0 | 59 | case kGun1: Gun1(n=1,pid=kPiPlus,p=4,chamber=4); break; |
9e23b054 | 60 | case kGun0: Gun1(n=1,pid=kNeutron,p=4,chamber=4); break; |
c292f886 | 61 | case kPara: Para(); break; |
4c1f23a0 | 62 | default: Fatal("Config","No generator"); break; |
63 | } | |
64 | ::Info("kir","Stop."); | |
65 | }//void Config() | |
66 | ||
67 | void Gun1(Int_t iNprim,Int_t iPID,Double_t p,Int_t iChamber) | |
68 | { | |
9e23b054 | 69 | Double_t theta=gRICH->C(iChamber)->ThetaD(); |
70 | Double_t phi =gRICH->C(iChamber)->PhiD(); | |
71 | theta-=2; | |
72 | ::Info("kir-Gun1","%i primarie(s) of %i PID with p=%f GeV at (%f,%f)",iNprim,iPID,p,theta,phi); | |
4c1f23a0 | 73 | |
74 | AliGenFixed *pGen=new AliGenFixed(iNprim); | |
75 | pGen->SetMomentum(p); | |
9e23b054 | 76 | pGen->SetPhiRange(phi); |
77 | pGen->SetThetaRange(theta); | |
4c1f23a0 | 78 | pGen->SetOrigin(0,0,0); |
79 | pGen->SetPart(iPID); | |
80 | pGen->Init(); | |
81 | }//Gun() | |
82 | ||
83 | void Para() | |
84 | { | |
85 | Int_t iNprim=85700; | |
86 | ::Info("kir-Para","%i primaries",iNprim); | |
87 | ||
88 | AliGenHIJINGpara *pGen=new AliGenHIJINGpara(iNprim); | |
89 | pGen->SetMomentumRange(0,999); //GeV | |
90 | pGen->SetPhiRange(0,360); //degree | |
91 | pGen->SetThetaRange(Eta2Theta(8),Eta2Theta(-8)); //degree | |
92 | pGen->SetOrigin(0,0,0); //IP, cm | |
93 | pGen->SetSigma(0,0,0); //IP sigma, cm | |
94 | pGen->Init(); | |
95 | } | |
96 | ||
97 | ||
ed3ceb24 | 98 | void Gun7(Int_t iPID) |
4c1f23a0 | 99 | { |
ed3ceb24 | 100 | ::Info("kir-Gun7","7 primaries of %i PID with 1.5 < p < 4.5 GeV/c",iPID); |
4c1f23a0 | 101 | AliGenCocktail *pCocktail=new AliGenCocktail(); |
102 | for(int i=1;i<=7;i++){ | |
103 | AliGenFixed *pFixed=new AliGenFixed(1); | |
ed3ceb24 | 104 | pFixed->SetMomentum(1.5+(i-1)*0.5); |
105 | pFixed->SetPhiRange(gRICH->C(i)->PhiD()+3); | |
4c1f23a0 | 106 | pFixed->SetThetaRange(gRICH->C(i)->ThetaD()+2); |
107 | pFixed->SetOrigin(0,0,0); | |
108 | pFixed->SetPart(iPID); | |
109 | pCocktail->AddGenerator(pFixed,Form("Fixed %i",i),1); | |
110 | } | |
111 | pCocktail->Init(); | |
112 | } | |
113 | ||
114 | void Pythia7(Int_t iPID,Double_t p) | |
115 | { | |
116 | ::Info("kir-Pythia","7 primaries of %i PID with p=%f GeV plus Pythia",iPID,p); | |
117 | AliGenCocktail *pCocktail=new AliGenCocktail(); | |
118 | for(int i=1;i<=7;i++){ | |
119 | AliGenFixed *pFixed=new AliGenFixed(1); | |
120 | pFixed->SetMomentum(p); | |
121 | pFixed->SetPhiRange(gRICH->C(i)->PhiD()); | |
122 | pFixed->SetThetaRange(gRICH->C(i)->ThetaD()+2); | |
123 | pFixed->SetOrigin(0,0,0); | |
124 | pFixed->SetPart(iPID); | |
125 | pCocktail->AddGenerator(pFixed,Form("Fixed %i",i),1); | |
126 | } | |
127 | ||
128 | AliGenPythia *pPythia = new AliGenPythia(-1); | |
129 | pPythia->SetMomentumRange(0,999999); | |
130 | pPythia->SetPhiRange(0,360); | |
131 | pPythia->SetThetaRange(0., 180.); | |
132 | pPythia->SetYRange(-12,12); | |
133 | pPythia->SetPtRange(0,1000); | |
134 | pPythia->SetStrucFunc(kCTEQ4L); | |
135 | pPythia->SetProcess(kPyMb); | |
136 | pPythia->SetEnergyCMS(14000.); | |
137 | ||
138 | pCocktail->AddGenerator(pPythia,"Pythia",1); | |
139 | pCocktail->Init(); | |
140 | } | |
141 | ||
142 | ||
143 | ||
144 | void Scan() | |
145 | { | |
146 | } | |
147 | ||
148 | ||
149 | void File() | |
150 | { | |
151 | ::Info("kir-File","Create galice.root, %i events per file",kEventsPerFile); | |
152 | ||
153 | AliRunLoader *pRL = AliRunLoader::Open("galice.root",AliConfig::fgkDefaultEventFolderName,"recreate"); | |
154 | if(!pRL) | |
155 | Fatal("my/AliceConfig.C::File","Can not instatiate the Run Loader"); | |
156 | ||
157 | pRL->SetCompressionLevel(2); | |
158 | pRL->SetNumberOfEventsPerFile(kEventsPerFile); | |
159 | gAlice->SetRunLoader(pRL); | |
160 | } | |
161 | ||
162 | void Geant3() | |
163 | { | |
164 | ::Info("kir-Geant3","Initialize the actual MC code."); | |
165 | ||
166 | gSystem->Load("libgeant321.so"); | |
167 | new TGeant3("C++ Interface to Geant"); | |
168 | }//void Geant3() | |
169 | ||
170 | void Decayer() | |
171 | { | |
172 | ::Info("kir-Decayer","Initialise external decayer."); | |
173 | TVirtualMCDecayer *pDecayer = new AliDecayerPythia(); | |
174 | pDecayer->SetForceDecay(kAll); | |
175 | pDecayer->Init(); | |
176 | gMC->SetExternalDecayer(pDecayer); | |
177 | ||
178 | gMC->SetProcess("DCAY",1); | |
179 | gMC->SetProcess("PAIR",1); | |
180 | gMC->SetProcess("COMP",1); | |
181 | gMC->SetProcess("PHOT",1); | |
182 | gMC->SetProcess("PFIS",0); | |
183 | gMC->SetProcess("DRAY",0); | |
184 | gMC->SetProcess("ANNI",1); | |
185 | gMC->SetProcess("BREM",1); | |
186 | gMC->SetProcess("MUNU",1); | |
187 | gMC->SetProcess("CKOV",1); | |
188 | gMC->SetProcess("HADR",1); | |
189 | gMC->SetProcess("LOSS",2); | |
190 | gMC->SetProcess("MULS",1); | |
191 | gMC->SetProcess("RAYL",1); | |
192 | ||
193 | Float_t cut = 1.e-3; // 1MeV cut by default | |
194 | Float_t tofmax = 1.e10; | |
195 | ||
196 | gMC->SetCut("CUTGAM", cut); | |
197 | gMC->SetCut("CUTELE", cut); | |
198 | gMC->SetCut("CUTNEU", cut); | |
199 | gMC->SetCut("CUTHAD", cut); | |
200 | gMC->SetCut("CUTMUO", cut); | |
201 | gMC->SetCut("BCUTE", cut); | |
202 | gMC->SetCut("BCUTM", cut); | |
203 | gMC->SetCut("DCUTE", cut); | |
204 | gMC->SetCut("DCUTM", cut); | |
205 | gMC->SetCut("PPCUTM", cut); | |
206 | gMC->SetCut("TOFMAX", tofmax); | |
207 | } | |
208 | ||
209 | void Field() | |
210 | { | |
211 | ::Info("kir-Field","Set default magnetic field L3 0.4T."); | |
212 | //AliMagFMaps* pField = new AliMagFMaps("Maps","Maps", 2, 1., 10., 1); | |
213 | gAlice->SetField(); | |
214 | } | |
215 | ||
216 | void Other() | |
217 | { | |
218 | ::Info("kir-Other","Init all other detectors"); | |
219 | AliBODY *BODY = new AliBODY("BODY", "Alice envelop"); | |
220 | ||
221 | if(iMAG){ | |
222 | new AliMAG("MAG", "Magnet"); | |
223 | } | |
224 | ||
225 | if(iABSO){ | |
226 | new AliABSOv0("ABSO", "Muon Absorber"); | |
227 | } | |
228 | ||
229 | if(iDIPO){ | |
230 | new AliDIPOv2("DIPO", "Dipole version 2"); | |
231 | } | |
232 | ||
233 | if(iHALL){ | |
234 | new AliHALL("HALL", "Alice Hall"); | |
235 | } | |
236 | ||
237 | if(iFRAME){ | |
238 | AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME", "Space Frame"); | |
239 | FRAME->SetHoles(1); | |
240 | } | |
241 | ||
242 | if(iSHIL){ | |
243 | new AliSHILv2("SHIL", "Shielding Version 2"); | |
244 | } | |
245 | ||
246 | if(iPIPE){ | |
247 | AliPIPEv0("PIPE", "Beam Pipe"); | |
248 | } | |
249 | ||
250 | if(iITS){ | |
251 | AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services"); | |
252 | ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer | |
253 | ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer | |
254 | ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300] | |
255 | ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300] | |
256 | ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300] | |
257 | ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [150,300] | |
258 | ITS->SetRails(0); // 1 --> rails in ; 0 --> rails out | |
259 | ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon | |
260 | ITS->SetEUCLID(0); | |
261 | } | |
262 | ||
263 | if(iTPC){ | |
264 | AliTPC *TPC = new AliTPCv2("TPC", "Default"); | |
265 | TPC->SetSecAU(-1); | |
266 | TPC->SetSecAL(-1); | |
267 | } | |
268 | ||
269 | if(iTOF){ | |
270 | new AliTOFv2FHoles("TOF", "TOF with Holes"); | |
271 | } | |
272 | ||
273 | if(iZDC){ | |
274 | new AliZDCv2("ZDC", "normal ZDC"); | |
275 | } | |
276 | ||
277 | if(iTRD){ | |
278 | AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator"); | |
279 | TRD->SetGasMix(1); | |
280 | TRD->SetPHOShole(); | |
281 | TRD->SetRICHhole(); | |
282 | AliTRDsim *TRDsim = TRD->CreateTR(); | |
283 | } | |
284 | ||
285 | if(iFMD){ | |
286 | AliFMD *FMD = new AliFMDv1("FMD", "normal FMD"); | |
287 | FMD->SetRingsSi1(256); | |
288 | FMD->SetRingsSi2(128); | |
289 | FMD->SetSectorsSi1(20); | |
290 | FMD->SetSectorsSi2(40); | |
291 | } | |
292 | ||
293 | if(iMUON){ | |
294 | new AliMUONv1("MUON", "default"); | |
295 | } | |
296 | if(iPHOS){ | |
297 | new AliPHOSv1("PHOS", "IHEP"); | |
298 | } | |
299 | ||
300 | if(iPMD){ | |
301 | new AliPMDv1("PMD", "normal PMD"); | |
302 | } | |
303 | ||
304 | if(iSTART){ | |
305 | new AliSTARTv1("START", "START Detector"); | |
306 | } | |
307 | ||
308 | if(iEMCAL){ | |
309 | new AliEMCALv1("EMCAL", "EMCALArch1a"); | |
310 | } | |
311 | ||
312 | if(iCRT){ | |
313 | new AliCRTv0("CRT", "normal ACORDE"); | |
314 | } | |
315 | ||
316 | if(iVZERO){ | |
317 | new AliVZEROv2("VZERO", "normal VZERO"); | |
318 | } | |
319 | ||
320 | ::Info("kir-Other","Stop."); | |
321 | }//Other() | |
322 | ||
323 | Float_t Eta2Theta(Float_t arg) | |
324 | { | |
325 | return (180./TMath::Pi())*2.*atan(exp(-arg)); | |
326 | } | |
327 |