]> git.uio.no Git - u/mrichter/AliRoot.git/blame - macros/Config.C
Add configuration of external decayer.
[u/mrichter/AliRoot.git] / macros / Config.C
CommitLineData
fe4da5cc 1void Config()
2{
3
b13db077 4new AliGeant3("C++ Interface to Geant3");
fe4da5cc 5
6//=======================================================================
7// Create the output file
8
9TFile *rootfile = new TFile("galice.root","recreate");
10rootfile->SetCompressionLevel(2);
11TGeant3 *geant3 = (TGeant3*)gMC;
477b4477 12//
13// Set External decayer
14 AliDecayer* decayer = new AliDecayerPythia();
15 decayer->SetForceDecay(all);
16 decayer->Init();
17 gMC->SetExternalDecayer(decayer);
18//
19//
fe4da5cc 20//=======================================================================
21// ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
22geant3->SetTRIG(1); //Number of events to be processed
23geant3->SetSWIT(4,10);
24geant3->SetDEBU(0,0,1);
25//geant3->SetSWIT(2,2);
26geant3->SetDCAY(1);
27geant3->SetPAIR(1);
28geant3->SetCOMP(1);
29geant3->SetPHOT(1);
30geant3->SetPFIS(0);
31geant3->SetDRAY(0);
32geant3->SetANNI(1);
33geant3->SetBREM(1);
34geant3->SetMUNU(1);
35geant3->SetCKOV(1);
36geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
37geant3->SetLOSS(2);
38geant3->SetMULS(1);
39geant3->SetRAYL(1);
40geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
41geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
42geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
8c658074 43geant3->SetERAN(5.e-7);
44
fe4da5cc 45Float_t cut = 1.e-3; // 1MeV cut by default
46Float_t tofmax = 1.e10;
47// GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
48geant3->SetCUTS(cut,cut, cut, cut, cut, cut, cut, cut, cut, cut, tofmax);
49//
50//=======================================================================
51// ************* STEERING parameters FOR ALICE SIMULATION **************
52// --- Specify event type to be tracked through the ALICE setup
53// --- All positions are in cm, angles in degrees, and P and E in GeV
54AliGenHIJINGpara *gener = new AliGenHIJINGpara(50);
55gener->SetMomentumRange(0,999);
56gener->SetPhiRange(0,360);
57gener->SetThetaRange(10,170);
58gener->SetOrigin(0,0,0); //vertex position
59gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
60gener->Init();
61//
62// Activate this line if you want the vertex smearing to happen
63// track by track
64//
65//gener->SetVertexSmear(perTrack);
66
67gAlice->SetField(-999,2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
68
4326511c 69Int_t iMAG=1;
70Int_t iITS=1;
71Int_t iTPC=1;
72Int_t iTOF=1;
fe4da5cc 73Int_t iRICH=1;
44885bd6 74Int_t iZDC=0;
4326511c 75Int_t iCASTOR=1;
76Int_t iTRD=1;
77Int_t iABSO=1;
78Int_t iDIPO=1;
79Int_t iHALL=1;
80Int_t iFRAME=1;
81Int_t iSHIL=1;
82Int_t iPIPE=1;
4a67c433 83Int_t iFMD=1;
4326511c 84Int_t iMUON=1;
85Int_t iPHOS=1;
86Int_t iPMD=1;
4a67c433 87Int_t iSTART=0;
fe4da5cc 88
89//=================== Alice BODY parameters =============================
90AliBODY *BODY = new AliBODY("BODY","Alice envelop");
91
92
93if(iMAG) {
94//=================== MAG parameters ============================
95// --- Start with Magnet since detector layouts may be depending ---
96// --- on the selected Magnet dimensions ---
97AliMAG *MAG = new AliMAG("MAG","Magnet");
98}
99
4b11ac09 100
101if(iABSO) {
102//=================== ABSO parameters ============================
9eecec3c 103AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber");
4b11ac09 104}
105
106if(iDIPO) {
107//=================== DIPO parameters ============================
108
109AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
110}
111
112if(iHALL) {
113//=================== HALL parameters ============================
114
115AliHALL *HALL = new AliHALL("HALL","Alice Hall");
116}
117
118
119if(iFRAME) {
120//=================== FRAME parameters ============================
121
0d3d4381 122AliFRAME *FRAME = new AliFRAMEv1("FRAME","Space Frame");
1756964f 123
4b11ac09 124}
125
126if(iSHIL) {
127//=================== SHIL parameters ============================
128
9eecec3c 129AliSHIL *SHIL = new AliSHILv0("SHIL","Shielding");
4b11ac09 130}
131
132
133if(iPIPE) {
134//=================== PIPE parameters ============================
135
136AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe");
137}
138
139
fe4da5cc 140if(iITS) {
141//=================== ITS parameters ============================
142//
143// EUCLID is a flag to output (=1) both geometry and media to two ASCII files
144// (called by default ITSgeometry.euc and ITSgeometry.tme) in a format
145// understandable to the CAD system EUCLID. The default (=0) means that you
146// dont want to use this facility.
147//
8dfe31df 148AliITS *ITS = new AliITSv5("ITS","normal ITS");
149ITS->SetEUCLID(0);
fe4da5cc 150}
151
4d68a14a 152
fe4da5cc 153if(iTPC) {
154//============================ TPC parameters ================================
155// --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
156// --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
157// --- sectors are specified, any value other than that requires at least one
158// --- sector (lower or upper)to be specified!
159// --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
160// --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
161// --- SecLows - number of lower sectors specified (up to 6)
162// --- SecUps - number of upper sectors specified (up to 12)
163// --- Sens - sensitive strips for the Slow Simulator !!!
164// --- This does NOT work if all S or L-sectors are specified, i.e.
165// --- if SecAL or SecAU < 0
166//
167//
168//-----------------------------------------------------------------------------
169
4a67c433 170 // gROOT->LoadMacro("SetTPCParam.C");
171 // AliTPCParam *param = SetTPCParam();
172 AliTPC *TPC = new AliTPCv1("TPC","Default"); //v1 is default
173 // TPC->SetParam(param); // pass the parameter object to the TPC
f72f44b7 174
50e125f7 175// set gas mixture
176
4a67c433 177 //TPC->SetGasMixt(2,20,10,-1,0.9,0.1,0.);
178 //TPC->SetSecAL(4);
179 //TPC->SetSecAU(4);
180 //TPC->SetSecLows(1, 2, 3, 19, 20, 21);
181 //TPC->SetSecUps(37, 38, 39, 37+18, 38+18, 39+18, -1, -1, -1, -1, -1, -1);
182 //TPC->SetSens(1);
4d68a14a 183
4a67c433 184 //if (TPC->IsVersion()==1) param->Write(param->GetTitle());
fe4da5cc 185}
186
187if(iTOF) {
188//=================== TOF parameters ============================
2d1e19f5 189AliTOF *TOF = new AliTOFv1("TOF","normal TOF");
fe4da5cc 190}
191
192if(iRICH) {
193//=================== RICH parameters ===========================
4a67c433 194 AliRICH *RICH = new AliRICHv1("RICH","normal RICH");
8de40c27 195
fe4da5cc 196}
197
8de40c27 198
fe4da5cc 199if(iZDC) {
200//=================== ZDC parameters ============================
201
202AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC");
203}
204
205if(iCASTOR) {
206//=================== CASTOR parameters ============================
207
208AliCASTOR *CASTOR = new AliCASTORv1("CASTOR","normal CASTOR");
209}
210
211if(iTRD) {
212//=================== TRD parameters ============================
adc10334 213
214 AliTRD *TRD = new AliTRDv0("TRD","TRD fast simulator");
215 //TRD->SetHits();
216
217 //AliTRD *TRD = new AliTRDv1("TRD","TRD slow simulator");
218 //TRD->SetSensPlane(0);
219 //TRD->SetSensChamber(2);
220 //TRD->SetSensSector(17);
221
222 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
223 TRD->SetGasMix(1);
224
225 // With hole in front of PHOS
226 TRD->SetPHOShole();
227 // With hole in front of RICH
228 TRD->SetRICHhole();
fe4da5cc 229}
230
fe4da5cc 231if(iFMD) {
232//=================== FMD parameters ============================
233
234AliFMD *FMD = new AliFMDv1("FMD","normal FMD");
235}
236
237if(iMUON) {
238//=================== MUON parameters ===========================
239
240AliMUON *MUON = new AliMUONv0("MUON","normal MUON");
241
fe4da5cc 242}
0f5936af 243
fe4da5cc 244//=================== PHOS parameters ===========================
245
8dfe31df 246if(iPHOS) {
4a67c433 247 AliPHOS *PHOS = new AliPHOSv1("PHOS","GPS2");
fe4da5cc 248}
249
8dfe31df 250
fe4da5cc 251if(iPMD) {
252//=================== PMD parameters ============================
253
ecd5c1f7 254AliPMD *PMD = new AliPMDv0("PMD","normal PMD");
fe4da5cc 255PMD->SetPAR(1., 1., 0.8, 0.02);
ecd5c1f7 256PMD->SetIN(6., 18., -580., 27., 27.);
fe4da5cc 257PMD->SetGEO(0.0, 0.2, 4.);
ecd5c1f7 258PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
259
fe4da5cc 260}
b422f318 261
262if(iSTART) {
263//=================== START parameters ============================
264AliSTART *START = new AliSTARTv0("START","START Detector");
265}
266
fe4da5cc 267
268}