]> git.uio.no Git - u/mrichter/AliRoot.git/blame - macros/ConfigBeautyPPR.C
Minors
[u/mrichter/AliRoot.git] / macros / ConfigBeautyPPR.C
CommitLineData
de78d77f 1#if !defined(__CINT__) || defined(__MAKECINT__)
2#include <Riostream.h>
3#include <TRandom.h>
4#include <TDatime.h>
5#include <TSystem.h>
6#include <TVirtualMC.h>
7#include <TGeant3.h>
8#include "STEER/AliRunLoader.h"
9#include "STEER/AliRun.h"
10#include "STEER/AliConfig.h"
11#include "PYTHIA6/AliDecayerPythia.h"
12#include "PYTHIA6/AliGenPythia.h"
13#include "STEER/AliMagFCM.h"
14#include "STRUCT/AliBODY.h"
15#include "STRUCT/AliMAG.h"
96fb3353 16#include "STRUCT/AliABSOv3.h"
17#include "STRUCT/AliDIPOv3.h"
18#include "STRUCT/AliHALLv3.h"
de78d77f 19#include "STRUCT/AliFRAMEv2.h"
96fb3353 20#include "STRUCT/AliSHILv3.h"
21#include "STRUCT/AliPIPEv3.h"
de78d77f 22#include "ITS/AliITSvPPRasymm.h"
23#include "TPC/AliTPCv2.h"
0d7ef405 24#include "TOF/AliTOFv6T0.h"
55eb2b56 25#include "HMPID/AliHMPIDv2.h"
de78d77f 26#include "ZDC/AliZDCv1.h"
27#include "TRD/AliTRDv1.h"
28#include "FMD/AliFMDv0.h"
29#include "MUON/AliMUONv1.h"
30#include "PHOS/AliPHOSv1.h"
31#include "PMD/AliPMDv1.h"
ababa197 32#include "T0/AliT0v1.h"
b384f8a4 33#include "ACORDE/AliACORDEv1.h"
de78d77f 34#endif
35
642b80f3 36void Config()
37{
38
39 //
40 // Set Random Number seed
41 TDatime dt;
42 UInt_t curtime=dt.Get();
43 UInt_t procid=gSystem->GetPid();
44 UInt_t seed=curtime-procid;
45
de78d77f 46 // gRandom->SetSeed(seed);
47 gRandom->SetSeed(12345);
642b80f3 48 cerr<<"Seed for random number generation= "<<seed<<endl;
49
c8921088 50 // libraries required by geant321
de78d77f 51#if defined(__CINT__)
c8921088 52 gSystem->Load("libgeant321");
de78d77f 53#endif
c8921088 54
b0470150 55 new TGeant3TGeo("C++ Interface to Geant3");
642b80f3 56
57 //=======================================================================
58 // Create the output file
59
458041af 60 if(!AliCDBManager::Instance()->IsDefaultStorageSet()){
61 AliCDBManager::Instance()->SetDefaultStorage("local://$ALICE_ROOT");
62 AliCDBManager::Instance()->SetRun(0);
63 }
64
de78d77f 65 AliRunLoader* rl=0x0;
66
67 cout<<"Config.C: Creating Run Loader ..."<<endl;
68 rl = AliRunLoader::Open("galice.root",
f5a857b2 69 AliConfig::GetDefaultEventFolderName(),
de78d77f 70 "recreate");
71 if (rl == 0x0)
72 {
73 gAlice->Fatal("Config.C","Can not instatiate the Run Loader");
74 return;
75 }
76 rl->SetCompressionLevel(2);
77 rl->SetNumberOfEventsPerFile(3);
78 gAlice->SetRunLoader(rl);
458041af 79 // gAlice->SetGeometryFromFile("geometry.root");
80 // gAlice->SetGeometryFromCDB();
de78d77f 81
6521ae06 82 // Set the trigger configuration
83 gAlice->SetTriggerDescriptor("Pb-Pb");
84 cout<<"Trigger configuration is set to Pb-Pb"<<endl;
85
642b80f3 86 //
87 // Set External decayer
88 AliDecayer* decayer = new AliDecayerPythia();
89 decayer->SetForceDecay(kAll);
90 decayer->Init();
91 gMC->SetExternalDecayer(decayer);
92
642b80f3 93
642b80f3 94 //
95 //=======================================================================
96 // ************* STEERING parameters FOR ALICE SIMULATION **************
97 // --- Specify event type to be tracked through the ALICE setup
98 // --- All positions are in cm, angles in degrees, and P and E in GeV
6a3df6c9 99
100 gMC->SetProcess("DCAY",1);
101 gMC->SetProcess("PAIR",1);
102 gMC->SetProcess("COMP",1);
103 gMC->SetProcess("PHOT",1);
104 gMC->SetProcess("PFIS",0);
105 gMC->SetProcess("DRAY",0);
106 gMC->SetProcess("ANNI",1);
107 gMC->SetProcess("BREM",1);
108 gMC->SetProcess("MUNU",1);
109 gMC->SetProcess("CKOV",1);
110 gMC->SetProcess("HADR",1);
111 gMC->SetProcess("LOSS",2);
112 gMC->SetProcess("MULS",1);
113 gMC->SetProcess("RAYL",1);
114
115 Float_t cut = 1.e-3; // 1MeV cut by default
116 Float_t tofmax = 1.e10;
117
118 gMC->SetCut("CUTGAM", cut);
119 gMC->SetCut("CUTELE", cut);
120 gMC->SetCut("CUTNEU", cut);
121 gMC->SetCut("CUTHAD", cut);
122 gMC->SetCut("CUTMUO", cut);
123 gMC->SetCut("BCUTE", cut);
124 gMC->SetCut("BCUTM", cut);
125 gMC->SetCut("DCUTE", cut);
126 gMC->SetCut("DCUTM", cut);
127 gMC->SetCut("PPCUTM", cut);
128 gMC->SetCut("TOFMAX", tofmax);
129
130
642b80f3 131 // AliGenPythia *gener = new AliGenPythia(ntracks);
132 AliGenPythia *gener = new AliGenPythia(-1);
133
134 gener->SetMomentumRange(0,999);
0ac28de4 135 gener->SetPhiRange(0.,360.);
642b80f3 136 gener->SetThetaRange(0,180);
137 gener->SetYRange(-999,999);
138 //gener->SetPtRange(0,100);
139 gener->SetOrigin(0,0,0); // vertex position
140 //gener->SetVertexSmear(kPerEvent);
141 gener->SetSigma(0,0,5.3); // Sigma in (X,Y,Z) (cm) on IP position
142 gener->SetTrackingFlag(0);
143 // gener->SetForceDecay(kHadronicD);
144
145 //
146 // The following settings select the Pythia parameters tuned to agree
147 // with beauty NLO calculation for Pb-Pb @ 5.5 TeV with MNR code.
148 //
de78d77f 149 gener->SetProcess(kPyBeautyPbPbMNR);
642b80f3 150 gener->SetStrucFunc(kCTEQ4L);
151 gener->SetPtHard(2.75,-1.0);
152 gener->SetEnergyCMS(5500.);
153 gener->SetNuclei(208,208); // Pb-Pb collisions
154 // Force no decay heavy quark mesons
155 gener->SetForceDecay(kNoDecayHeavy);
156
157 gener->Init();
158 //
159 // Activate this line if you want the vertex smearing to happen
160 // track by track
161 //
162 //gener->SetVertexSmear(perTrack);
163
164 // Field (L3 0.4 T)
165 AliMagFCM* field = new AliMagFCM(
166 "Map2","$(ALICE_ROOT)/data/field01.dat", 2, 1., 10.);
167 field->SetSolenoidField(4.);
168 gAlice->SetField(field);
169
170 Int_t iABSO=0;
b384f8a4 171 Int_t iACORDE=0;
642b80f3 172 Int_t iDIPO=0;
173 Int_t iFMD=0;
174 Int_t iFRAME=0;
175 Int_t iHALL=0;
176 Int_t iITS=0;
177 Int_t iMAG=0;
178 Int_t iMUON=0;
179 Int_t iPHOS=0;
180 Int_t iPIPE=0;
181 Int_t iPMD=0;
de1857bb 182 Int_t iHMPID=0;
642b80f3 183 Int_t iSHIL=0;
ababa197 184 Int_t iT0=0;
642b80f3 185 Int_t iTOF=0;
186 Int_t iTPC=0;
187 Int_t iTRD=0;
188 Int_t iZDC=0;
189
190 //=================== Alice BODY parameters =============================
191 AliBODY *BODY = new AliBODY("BODY","Alice envelop");
192
193 if(iMAG) {
194 //=================== MAG parameters ============================
195 // --- Start with Magnet since detector layouts may be depending ---
196 // --- on the selected Magnet dimensions ---
197 AliMAG *MAG = new AliMAG("MAG","Magnet");
198 }
199
200
201 if(iABSO) {
202 //=================== ABSO parameters ============================
96fb3353 203 AliABSO *ABSO = new AliABSOv3("ABSO","Muon Absorber");
642b80f3 204 }
205
206 if(iDIPO) {
207 //=================== DIPO parameters ============================
208
96fb3353 209 AliDIPO *DIPO = new AliDIPOv3("DIPO","Dipole version 3");
642b80f3 210 }
211
212 if(iHALL) {
213 //=================== HALL parameters ============================
214
96fb3353 215 AliHALL *HALL = new AliHALLv3("HALL","Alice Hall");
642b80f3 216 }
217
218
219 if(iFRAME) {
220 //=================== FRAME parameters ============================
221
222 AliFRAME *FRAME = new AliFRAMEv2("FRAME","Space Frame");
223
224 }
225
226 if(iSHIL) {
227 //=================== SHIL parameters ============================
228
96fb3353 229 AliSHIL *SHIL = new AliSHILv3("SHIL","Shielding");
642b80f3 230 }
231
232
233 if(iPIPE) {
234 //=================== PIPE parameters ============================
235
96fb3353 236 AliPIPE *PIPE = new AliPIPEv3("PIPE","Beam Pipe");
642b80f3 237 }
238
239
240 if(iITS) {
e89fa83b 241 //=================== ITS parameters ============================
642b80f3 242
642b80f3 243 AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services");
642b80f3 244 }
245
246
247 if(iTPC) {
26ca4b4a 248 //============================ TPC parameters ===================
642b80f3 249 AliTPC *TPC = new AliTPCv2("TPC","Default");
642b80f3 250 }
251
252
253 if(iTOF) {
254 //=================== TOF parameters ============================
0d7ef405 255 AliTOF *TOF = new AliTOFv6T0("TOF","normal TOF");
642b80f3 256 }
257
de1857bb 258 if(iHMPID) {
259 //=================== HMPID parameters ===========================
55eb2b56 260 AliHMPID *HMPID = new AliHMPIDv2("HMPID","normal HMPID");
642b80f3 261
262 }
263
264
265 if(iZDC) {
266 //=================== ZDC parameters ============================
267
268 AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC");
269 }
270
b384f8a4 271 if(iACORDE) {
272 //=================== ACORDE parameters ============================
642b80f3 273
b384f8a4 274 AliACORDE *ACORDE = new AliACORDEv1("ACORDE","normal ACORDE");
642b80f3 275 }
276
277 if(iTRD) {
278 //=================== TRD parameters ============================
279
280 AliTRD *TRD = new AliTRDv1("TRD","TRD slow simulator");
642b80f3 281 }
282
283 if(iFMD) {
284 //=================== FMD parameters ============================
285
286 AliFMD *FMD = new AliFMDv0("FMD","normal FMD");
287 }
288
289 if(iMUON) {
290 //=================== MUON parameters ===========================
291 AliMUON *MUON = new AliMUONv1("MUON","default");
292 }
293
294 //=================== PHOS parameters ===========================
295
296 if(iPHOS) {
297 AliPHOS *PHOS = new AliPHOSv1("PHOS","GPS2");
298 }
299
300
301 if(iPMD) {
302 //=================== PMD parameters ============================
303
304 AliPMD *PMD = new AliPMDv1("PMD","normal PMD");
305 PMD->SetPAR(1., 1., 0.8, 0.02);
306 PMD->SetIN(6., 18., -580., 27., 27.);
307 PMD->SetGEO(0.0, 0.2, 4.);
308 PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
309
310 }
311
ababa197 312 if(iT0) {
313 //=================== T0 parameters ============================
314 AliT0 *T0 = new AliT0v1("T0","T0 Detector");
642b80f3 315 }
316
317
318}