Removal
[u/mrichter/AliRoot.git] / macros / ConfigCharmPPR.C
CommitLineData
f2afc421 1void Config()
2{
3
4 //
5 // Set Random Number seed
6 TDatime dt;
7 UInt_t curtime=dt.Get();
8 UInt_t procid=gSystem->GetPid();
9 UInt_t seed=curtime-procid;
10
11 gRandom->SetSeed(seed);
12 cerr<<"Seed for random number generation= "<<seed<<endl;
13
b9d0a01d 14 new TGeant3("C++ Interface to Geant3");
f2afc421 15
16 //=======================================================================
17 // Create the output file
18
19 TFile *rootfile = new TFile("galice.root","recreate");
20 rootfile->SetCompressionLevel(2);
f2afc421 21
22 //
23 // Set External decayer
24 AliDecayer* decayer = new AliDecayerPythia();
25 decayer->SetForceDecay(kAll);
26 decayer->Init();
27 gMC->SetExternalDecayer(decayer);
28
f2afc421 29
f2afc421 30 //
31 //=======================================================================
32 // ************* STEERING parameters FOR ALICE SIMULATION **************
33 // --- Specify event type to be tracked through the ALICE setup
34 // --- All positions are in cm, angles in degrees, and P and E in GeV
6a3df6c9 35
36
37 gMC->SetProcess("DCAY",1);
38 gMC->SetProcess("PAIR",1);
39 gMC->SetProcess("COMP",1);
40 gMC->SetProcess("PHOT",1);
41 gMC->SetProcess("PFIS",0);
42 gMC->SetProcess("DRAY",0);
43 gMC->SetProcess("ANNI",1);
44 gMC->SetProcess("BREM",1);
45 gMC->SetProcess("MUNU",1);
46 gMC->SetProcess("CKOV",1);
47 gMC->SetProcess("HADR",1);
48 gMC->SetProcess("LOSS",2);
49 gMC->SetProcess("MULS",1);
50 gMC->SetProcess("RAYL",1);
51
52 Float_t cut = 1.e-3; // 1MeV cut by default
53 Float_t tofmax = 1.e10;
54
55 gMC->SetCut("CUTGAM", cut);
56 gMC->SetCut("CUTELE", cut);
57 gMC->SetCut("CUTNEU", cut);
58 gMC->SetCut("CUTHAD", cut);
59 gMC->SetCut("CUTMUO", cut);
60 gMC->SetCut("BCUTE", cut);
61 gMC->SetCut("BCUTM", cut);
62 gMC->SetCut("DCUTE", cut);
63 gMC->SetCut("DCUTM", cut);
64 gMC->SetCut("PPCUTM", cut);
65 gMC->SetCut("TOFMAX", tofmax);
66
67
f2afc421 68 // AliGenPythia *gener = new AliGenPythia(ntracks);
69 AliGenPythia *gener = new AliGenPythia(-1);
70
71 gener->SetMomentumRange(0,999);
88cb7938 72 gener->SetPhiRange(-180.,180.);
f2afc421 73 gener->SetThetaRange(0,180);
74 gener->SetYRange(-999,999);
75 //gener->SetPtRange(0,100);
76 gener->SetOrigin(0,0,0); // vertex position
77 //gener->SetVertexSmear(kPerEvent);
78 gener->SetSigma(0,0,5.3); // Sigma in (X,Y,Z) (cm) on IP position
79 gener->SetTrackingFlag(0);
80 // gener->SetForceDecay(kHadronicD);
81
82 //
83 // The following settings select the Pythia parameters tuned to agree
84 // with charm NLO calculation for Pb-Pb @ 5.5 TeV with MNR code.
85 //
86 gener->SetProcess(kPyCharmPbMNR);
402c423c 87 gener->SetStrucFunc(kCTEQ4L);
f2afc421 88 gener->SetPtHard(2.1,-1.0);
89 gener->SetEnergyCMS(5500.);
90 gener->SetNuclei(208,208); // Pb-Pb collisions
91
92 gener->Init();
93 //
94 // Activate this line if you want the vertex smearing to happen
95 // track by track
96 //
97 //gener->SetVertexSmear(perTrack);
98
99 // Field (L3 0.4 T)
100 AliMagFCM* field = new AliMagFCM(
101 "Map2","$(ALICE_ROOT)/data/field01.dat", 2, 1., 10.);
102 field->SetSolenoidField(4.);
103 gAlice->SetField(field);
104
105 Int_t iABSO=0;
b9d0a01d 106 Int_t iCRT=0;
f2afc421 107 Int_t iDIPO=0;
108 Int_t iFMD=0;
109 Int_t iFRAME=0;
110 Int_t iHALL=0;
111 Int_t iITS=0;
112 Int_t iMAG=0;
113 Int_t iMUON=0;
114 Int_t iPHOS=0;
115 Int_t iPIPE=0;
116 Int_t iPMD=0;
117 Int_t iRICH=0;
118 Int_t iSHIL=0;
119 Int_t iSTART=0;
120 Int_t iTOF=0;
121 Int_t iTPC=0;
122 Int_t iTRD=0;
123 Int_t iZDC=0;
124
125 //=================== Alice BODY parameters =============================
126 AliBODY *BODY = new AliBODY("BODY","Alice envelop");
127
128 if(iMAG) {
129 //=================== MAG parameters ============================
130 // --- Start with Magnet since detector layouts may be depending ---
131 // --- on the selected Magnet dimensions ---
132 AliMAG *MAG = new AliMAG("MAG","Magnet");
133 }
134
135
136 if(iABSO) {
137 //=================== ABSO parameters ============================
138 AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber");
139 }
140
141 if(iDIPO) {
142 //=================== DIPO parameters ============================
143
144 AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
145 }
146
147 if(iHALL) {
148 //=================== HALL parameters ============================
149
150 AliHALL *HALL = new AliHALL("HALL","Alice Hall");
151 }
152
153
154 if(iFRAME) {
155 //=================== FRAME parameters ============================
156
157 AliFRAME *FRAME = new AliFRAMEv2("FRAME","Space Frame");
158
159 }
160
161 if(iSHIL) {
162 //=================== SHIL parameters ============================
163
e0559846 164 AliSHIL *SHIL = new AliSHILv2("SHIL","Shielding");
f2afc421 165 }
166
167
168 if(iPIPE) {
169 //=================== PIPE parameters ============================
170
171 AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe");
172 }
173
174
175 if(iITS) {
176
177//=================== ITS parameters ============================
178 //
179 // As the innermost detector in ALICE, the Inner Tracking System "impacts" on
180 // almost all other detectors. This involves the fact that the ITS geometry
181 // still has several options to be followed in parallel in order to determine
182 // the best set-up which minimizes the induced background. All the geometries
183 // available to date are described in the following. Read carefully the comments
184 // and use the default version (the only one uncommented) unless you are making
185 // comparisons and you know what you are doing. In this case just uncomment the
186 // ITS geometry you want to use and run Aliroot.
187 //
188 // Detailed geometries:
189 //
190 //
191 //AliITS *ITS = new AliITSv5symm("ITS","Updated ITS TDR detailed version with symmetric services");
192 //
193 //AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
194 //
195 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
196 ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
197 ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
198 ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRasymm2.det"); // don't touch this parameter if you're not an ITS developer
199 ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [150,300]
200 ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [150,300]
201 ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [100,300]
202 ITS->SetThicknessChip2(200.); // chip thickness on layer 2 must be in the range [100,300]
203 ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
204 ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
205 //
206 //AliITSvPPRsymm *ITS = new AliITSvPPRsymm("ITS","New ITS PPR detailed version with symmetric services");
207 //ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer
208 //ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer
209 //ITS->SetWriteDet("$ALICE_ROOT/ITS/ITSgeometry_vPPRsymm2.det"); // don't touch this parameter if you're not an ITS developer
210 //ITS->SetThicknessDet1(300.); // detector thickness on layer 1 must be in the range [150,300]
211 //ITS->SetThicknessDet2(300.); // detector thickness on layer 2 must be in the range [150,300]
212 //ITS->SetThicknessChip1(300.); // chip thickness on layer 1 must be in the range [100,300]
213 //ITS->SetThicknessChip2(300.); // chip thickness on layer 2 must be in the range [100,300]
214 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
215 //ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon
216 //
217 //
218 // Coarse geometries (warning: no hits are produced with these coarse geometries and they unuseful
219 // for reconstruction !):
220 //
221 //
222 //AliITSvPPRcoarseasymm *ITS = new AliITSvPPRcoarseasymm("ITS","New ITS PPR coarse version with asymmetric services");
223 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
224 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
225 //
226 //AliITS *ITS = new AliITSvPPRcoarsesymm("ITS","New ITS PPR coarse version with symmetric services");
227 //ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out
228 //ITS->SetSupportMaterial(0); // 0 --> Copper ; 1 --> Aluminum ; 2 --> Carbon
229 //
230 //
231 //
232 // Geant3 <-> EUCLID conversion
233 // ============================
234 //
235 // SetEUCLID is a flag to output (=1) or not to output (=0) both geometry and
236 // media to two ASCII files (called by default ITSgeometry.euc and
237 // ITSgeometry.tme) in a format understandable to the CAD system EUCLID.
238 // The default (=0) means that you dont want to use this facility.
239 //
240 ITS->SetEUCLID(0);
241 }
242
243
244 if(iTPC) {
245 //============================ TPC parameters ================================
246 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
247 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
248 // --- sectors are specified, any value other than that requires at least one
249 // --- sector (lower or upper)to be specified!
250 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
251 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
252 // --- SecLows - number of lower sectors specified (up to 6)
253 // --- SecUps - number of upper sectors specified (up to 12)
254 // --- Sens - sensitive strips for the Slow Simulator !!!
255 // --- This does NOT work if all S or L-sectors are specified, i.e.
256 // --- if SecAL or SecAU < 0
257 //
258 //
259 //-----------------------------------------------------------------------------
260
261 // gROOT->LoadMacro("SetTPCParam.C");
262 // AliTPCParam *param = SetTPCParam();
263 AliTPC *TPC = new AliTPCv2("TPC","Default");
264 // All sectors included
265 TPC->SetSecAL(-1);
266 TPC->SetSecAU(-1);
267
268 }
269
270
271 if(iTOF) {
272 //=================== TOF parameters ============================
273 AliTOF *TOF = new AliTOFv2("TOF","normal TOF");
274 }
275
276 if(iRICH) {
277 //=================== RICH parameters ===========================
278 AliRICH *RICH = new AliRICHv1("RICH","normal RICH");
279
280 }
281
282
283 if(iZDC) {
284 //=================== ZDC parameters ============================
285
286 AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC");
287 }
288
b9d0a01d 289 if(iCRT) {
290 //=================== CRT parameters ============================
f2afc421 291
b9d0a01d 292 AliCRT *CRT = new AliCRTv1("CRT","normal CRT");
f2afc421 293 }
294
295 if(iTRD) {
296 //=================== TRD parameters ============================
297
298 AliTRD *TRD = new AliTRDv1("TRD","TRD slow simulator");
299
300 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
301 TRD->SetGasMix(1);
302
303 // With hole in front of PHOS
304 TRD->SetPHOShole();
305 // With hole in front of RICH
306 TRD->SetRICHhole();
307 // Switch on TR
308 AliTRDsim *TRDsim = TRD->CreateTR();
309 }
310
311 if(iFMD) {
312 //=================== FMD parameters ============================
313
314 AliFMD *FMD = new AliFMDv0("FMD","normal FMD");
315 }
316
317 if(iMUON) {
318 //=================== MUON parameters ===========================
319 AliMUON *MUON = new AliMUONv1("MUON","default");
320 }
321
322 //=================== PHOS parameters ===========================
323
324 if(iPHOS) {
325 AliPHOS *PHOS = new AliPHOSv1("PHOS","GPS2");
326 }
327
328
b9d0a01d 329 //=================== CRT parameters ===========================
330
331 if(iCRT) {
332 AliCRT *CRT = new AliCRTv1("CRT","Normal CRTGPS2");
333 }
334
335
f2afc421 336 if(iPMD) {
337 //=================== PMD parameters ============================
338
339 AliPMD *PMD = new AliPMDv1("PMD","normal PMD");
340 PMD->SetPAR(1., 1., 0.8, 0.02);
341 PMD->SetIN(6., 18., -580., 27., 27.);
342 PMD->SetGEO(0.0, 0.2, 4.);
343 PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
344
345 }
346
347 if(iSTART) {
348 //=================== START parameters ============================
349 AliSTART *START = new AliSTARTv1("START","START Detector");
350 }
351
352
353}