]>
Commit | Line | Data |
---|---|---|
fe4da5cc | 1 | void Config() |
2 | { | |
3 | ||
b13db077 | 4 | new AliGeant3("C++ Interface to Geant3"); |
fe4da5cc | 5 | |
6 | //======================================================================= | |
7 | // Create the output file | |
8 | ||
9 | TFile *rootfile = new TFile("galice.root","recreate"); | |
10 | rootfile->SetCompressionLevel(2); | |
11 | TGeant3 *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 ******* | |
22 | geant3->SetTRIG(1); //Number of events to be processed | |
23 | geant3->SetSWIT(4,10); | |
24 | geant3->SetDEBU(0,0,1); | |
25 | //geant3->SetSWIT(2,2); | |
26 | geant3->SetDCAY(1); | |
27 | geant3->SetPAIR(1); | |
28 | geant3->SetCOMP(1); | |
29 | geant3->SetPHOT(1); | |
30 | geant3->SetPFIS(0); | |
31 | geant3->SetDRAY(0); | |
32 | geant3->SetANNI(1); | |
33 | geant3->SetBREM(1); | |
34 | geant3->SetMUNU(1); | |
35 | geant3->SetCKOV(1); | |
36 | geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3) | |
37 | geant3->SetLOSS(2); | |
38 | geant3->SetMULS(1); | |
39 | geant3->SetRAYL(1); | |
40 | geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0) | |
41 | geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks | |
42 | geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2) | |
8c658074 | 43 | geant3->SetERAN(5.e-7); |
44 | ||
fe4da5cc | 45 | Float_t cut = 1.e-3; // 1MeV cut by default |
46 | Float_t tofmax = 1.e10; | |
47 | // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX | |
48 | geant3->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 | |
54 | AliGenHIJINGpara *gener = new AliGenHIJINGpara(50); | |
55 | gener->SetMomentumRange(0,999); | |
56 | gener->SetPhiRange(0,360); | |
57 | gener->SetThetaRange(10,170); | |
58 | gener->SetOrigin(0,0,0); //vertex position | |
59 | gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position | |
60 | gener->Init(); | |
61 | // | |
62 | // Activate this line if you want the vertex smearing to happen | |
63 | // track by track | |
64 | // | |
65 | //gener->SetVertexSmear(perTrack); | |
66 | ||
67 | gAlice->SetField(-999,2); //Specify maximum magnetic field in Tesla (neg. ==> default field) | |
68 | ||
4326511c | 69 | Int_t iMAG=1; |
70 | Int_t iITS=1; | |
71 | Int_t iTPC=1; | |
72 | Int_t iTOF=1; | |
fe4da5cc | 73 | Int_t iRICH=1; |
44885bd6 | 74 | Int_t iZDC=0; |
4326511c | 75 | Int_t iCASTOR=1; |
76 | Int_t iTRD=1; | |
77 | Int_t iABSO=1; | |
78 | Int_t iDIPO=1; | |
79 | Int_t iHALL=1; | |
80 | Int_t iFRAME=1; | |
81 | Int_t iSHIL=1; | |
82 | Int_t iPIPE=1; | |
4a67c433 | 83 | Int_t iFMD=1; |
4326511c | 84 | Int_t iMUON=1; |
85 | Int_t iPHOS=1; | |
86 | Int_t iPMD=1; | |
4a67c433 | 87 | Int_t iSTART=0; |
fe4da5cc | 88 | |
89 | //=================== Alice BODY parameters ============================= | |
90 | AliBODY *BODY = new AliBODY("BODY","Alice envelop"); | |
91 | ||
92 | ||
93 | if(iMAG) { | |
94 | //=================== MAG parameters ============================ | |
95 | // --- Start with Magnet since detector layouts may be depending --- | |
96 | // --- on the selected Magnet dimensions --- | |
97 | AliMAG *MAG = new AliMAG("MAG","Magnet"); | |
98 | } | |
99 | ||
4b11ac09 | 100 | |
101 | if(iABSO) { | |
102 | //=================== ABSO parameters ============================ | |
9eecec3c | 103 | AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber"); |
4b11ac09 | 104 | } |
105 | ||
106 | if(iDIPO) { | |
107 | //=================== DIPO parameters ============================ | |
108 | ||
109 | AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2"); | |
110 | } | |
111 | ||
112 | if(iHALL) { | |
113 | //=================== HALL parameters ============================ | |
114 | ||
115 | AliHALL *HALL = new AliHALL("HALL","Alice Hall"); | |
116 | } | |
117 | ||
118 | ||
119 | if(iFRAME) { | |
120 | //=================== FRAME parameters ============================ | |
121 | ||
0d3d4381 | 122 | AliFRAME *FRAME = new AliFRAMEv1("FRAME","Space Frame"); |
1756964f | 123 | |
4b11ac09 | 124 | } |
125 | ||
126 | if(iSHIL) { | |
127 | //=================== SHIL parameters ============================ | |
128 | ||
9eecec3c | 129 | AliSHIL *SHIL = new AliSHILv0("SHIL","Shielding"); |
4b11ac09 | 130 | } |
131 | ||
132 | ||
133 | if(iPIPE) { | |
134 | //=================== PIPE parameters ============================ | |
135 | ||
136 | AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe"); | |
137 | } | |
138 | ||
139 | ||
fe4da5cc | 140 | if(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 | 148 | AliITS *ITS = new AliITSv5("ITS","normal ITS"); |
149 | ITS->SetEUCLID(0); | |
fe4da5cc | 150 | } |
151 | ||
4d68a14a | 152 | |
fe4da5cc | 153 | if(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 | ||
187 | if(iTOF) { | |
188 | //=================== TOF parameters ============================ | |
2d1e19f5 | 189 | AliTOF *TOF = new AliTOFv1("TOF","normal TOF"); |
fe4da5cc | 190 | } |
191 | ||
192 | if(iRICH) { | |
193 | //=================== RICH parameters =========================== | |
4a67c433 | 194 | AliRICH *RICH = new AliRICHv1("RICH","normal RICH"); |
8de40c27 | 195 | |
fe4da5cc | 196 | } |
197 | ||
8de40c27 | 198 | |
fe4da5cc | 199 | if(iZDC) { |
200 | //=================== ZDC parameters ============================ | |
201 | ||
202 | AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC"); | |
203 | } | |
204 | ||
205 | if(iCASTOR) { | |
206 | //=================== CASTOR parameters ============================ | |
207 | ||
208 | AliCASTOR *CASTOR = new AliCASTORv1("CASTOR","normal CASTOR"); | |
209 | } | |
210 | ||
211 | if(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 | 231 | if(iFMD) { |
232 | //=================== FMD parameters ============================ | |
233 | ||
234 | AliFMD *FMD = new AliFMDv1("FMD","normal FMD"); | |
235 | } | |
236 | ||
237 | if(iMUON) { | |
238 | //=================== MUON parameters =========================== | |
239 | ||
240 | AliMUON *MUON = new AliMUONv0("MUON","normal MUON"); | |
241 | ||
fe4da5cc | 242 | } |
0f5936af | 243 | |
fe4da5cc | 244 | //=================== PHOS parameters =========================== |
245 | ||
8dfe31df | 246 | if(iPHOS) { |
4a67c433 | 247 | AliPHOS *PHOS = new AliPHOSv1("PHOS","GPS2"); |
fe4da5cc | 248 | } |
249 | ||
8dfe31df | 250 | |
fe4da5cc | 251 | if(iPMD) { |
252 | //=================== PMD parameters ============================ | |
253 | ||
ecd5c1f7 | 254 | AliPMD *PMD = new AliPMDv0("PMD","normal PMD"); |
fe4da5cc | 255 | PMD->SetPAR(1., 1., 0.8, 0.02); |
ecd5c1f7 | 256 | PMD->SetIN(6., 18., -580., 27., 27.); |
fe4da5cc | 257 | PMD->SetGEO(0.0, 0.2, 4.); |
ecd5c1f7 | 258 | PMD->SetPadSize(0.8, 1.0, 1.0, 1.5); |
259 | ||
fe4da5cc | 260 | } |
b422f318 | 261 | |
262 | if(iSTART) { | |
263 | //=================== START parameters ============================ | |
07730102 | 264 | AliSTART *START = new AliSTARTv1("START","START Detector"); |
b422f318 | 265 | } |
266 | ||
fe4da5cc | 267 | |
268 | } |