02a71a71 |
1 | void Config(){ |
2 | // 7-DEC-2000 09:00 |
3 | // Switch on Transition Radiation simulation. 6/12/00 18:00 |
4 | // iZDC=1 7/12/00 09:00 |
5 | // ThetaRange is (0., 180.). It was (0.28,179.72) 7/12/00 09:00 |
6 | // Theta range given through pseudorapidity limits 22/6/2001 |
7 | |
8 | // Set Random Number seed |
9 | // gRandom->SetSeed(12345); |
10 | |
11 | new AliGeant3("C++ Interface to Geant3"); |
12 | |
13 | if (!gSystem->Getenv("CONFIG_FILE")) |
14 | { |
15 | TFile *rootfile = new TFile("galice.root", "recreate"); |
16 | |
17 | rootfile->SetCompressionLevel(2); |
18 | } |
19 | |
20 | TGeant3 *geant3 = (TGeant3 *) gMC; |
21 | |
22 | // |
23 | // Set External decayer |
24 | AliDecayer *decayer = new AliDecayerPythia(); |
25 | |
26 | decayer->SetForceDecay(kAll); |
27 | decayer->Init(); |
28 | gMC->SetExternalDecayer(decayer); |
29 | // |
30 | // |
31 | //======================================================================= |
32 | // ******* GEANT STEERING parameters FOR ALICE SIMULATION ******* |
33 | geant3->SetTRIG(1); //Number of events to be processed |
34 | geant3->SetSWIT(4, 10); |
35 | geant3->SetDEBU(0, 0, 1); |
36 | //geant3->SetSWIT(2,2); |
37 | geant3->SetDCAY(1); |
38 | geant3->SetPAIR(1); |
39 | geant3->SetCOMP(1); |
40 | geant3->SetPHOT(1); |
41 | geant3->SetPFIS(0); |
42 | geant3->SetDRAY(0); |
43 | geant3->SetANNI(1); |
44 | geant3->SetBREM(1); |
45 | geant3->SetMUNU(1); |
46 | geant3->SetCKOV(1); |
47 | geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3) |
48 | geant3->SetLOSS(2); |
49 | geant3->SetMULS(1); |
50 | geant3->SetRAYL(1); |
51 | geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0) |
52 | geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks |
53 | geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2) |
54 | geant3->SetERAN(5.e-7); |
55 | |
56 | Float_t cut = 1.e-3; // 1MeV cut by default |
57 | Float_t tofmax = 1.e10; |
58 | |
59 | // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX |
60 | geant3->SetCUTS(cut, cut, cut, cut, cut, cut, cut, cut, cut, cut, |
61 | tofmax); |
62 | // |
63 | //======================================================================= |
64 | // ************* STEERING parameters FOR ALICE SIMULATION ************** |
65 | // --- Specify event type to be tracked through the ALICE setup |
66 | // --- All positions are in cm, angles in degrees, and P and E in GeV |
67 | if (gSystem->Getenv("CONFIG_NPARTICLES")){ |
68 | int nParticles = atoi(gSystem->Getenv("CONFIG_NPARTICLES")); |
69 | }else{ |
70 | int nParticles = 2; |
71 | } // end if |
72 | //********************************************* |
73 | // Example for Fixed Particle Gun |
74 | //********************************************* |
75 | AliGenFixed *gener = new AliGenFixed(nParticles); |
76 | gener->SetMomentum(50); |
77 | gener->SetPhi(180.); |
78 | gener->SetTheta(95.); |
79 | gener->SetOrigin(0,0,0); //vertex position |
80 | gener->SetPart(13); //GEANT particle type |
81 | gener->Init(); |
82 | // |
83 | // Activate this line if you want the vertex smearing to happen |
84 | // track by track |
85 | // |
86 | //gener->SetVertexSmear(perTrack); |
87 | |
88 | gAlice->SetField(-999, 2); //Specify maximum magnetic field in Tesla (neg. ==> default field) |
89 | |
90 | Int_t iABSO = 1; |
91 | Int_t iDIPO = 1; |
92 | Int_t iFMD = 1; |
93 | Int_t iFRAME = 1; |
94 | Int_t iHALL = 1; |
95 | Int_t iITS = 1; |
96 | Int_t iMAG = 1; |
97 | Int_t iMUON = 1; |
98 | Int_t iPHOS = 1; |
99 | Int_t iPIPE = 1; |
100 | Int_t iPMD = 1; |
101 | Int_t iRICH = 1; |
102 | Int_t iSHIL = 1; |
103 | Int_t iSTART = 1; |
104 | Int_t iTOF = 1; |
105 | Int_t iTPC = 1; |
106 | Int_t iTRD = 1; |
107 | Int_t iZDC = 1; |
108 | Int_t iEMCAL = 1; |
109 | |
110 | //=================== Alice BODY parameters ============================= |
111 | AliBODY *BODY = new AliBODY("BODY", "Alice envelop"); |
112 | |
113 | if (iMAG){ |
114 | //=================== MAG parameters ============================ |
115 | // --- Start with Magnet since detector layouts may be depending --- |
116 | // --- on the selected Magnet dimensions --- |
117 | AliMAG *MAG = new AliMAG("MAG", "Magnet"); |
118 | } |
119 | if (iABSO){ |
120 | //=================== ABSO parameters ============================ |
121 | AliABSO *ABSO = new AliABSOv0("ABSO", "Muon Absorber"); |
122 | } |
123 | if (iDIPO){ |
124 | //=================== DIPO parameters ============================ |
125 | AliDIPO *DIPO = new AliDIPOv2("DIPO", "Dipole version 2"); |
126 | } |
127 | if (iHALL){ |
128 | //=================== HALL parameters ============================ |
129 | AliHALL *HALL = new AliHALL("HALL", "Alice Hall"); |
130 | } |
131 | if (iFRAME){ |
132 | //=================== FRAME parameters ============================ |
133 | AliFRAME *FRAME = new AliFRAMEv2("FRAME", "Space Frame"); |
134 | } |
135 | if (iSHIL){ |
136 | //=================== SHIL parameters ============================ |
137 | AliSHIL *SHIL = new AliSHILvF("SHIL", "Shielding"); |
138 | } |
139 | if (iPIPE){ |
140 | //=================== PIPE parameters ============================ |
141 | AliPIPE *PIPE = new AliPIPEv0("PIPE", "Beam Pipe"); |
142 | } |
143 | if(iITS) { |
144 | //=================== ITS parameters ============================ |
145 | // |
146 | // As the innermost detector in ALICE, the Inner Tracking System |
147 | // "impacts" on almost all other detectors. This involves the fact |
148 | // that the ITS geometry still has several options to be followed |
149 | //in parallel in order to determine the best set-up which minimizes |
150 | // the induced background. All the geometries available to date are |
151 | // described in the following. Read carefully the comments and use |
152 | // the default version (the only one uncommented) unless you are making |
153 | // comparisons and you know what you are doing. In this case just |
154 | // uncomment the ITS geometry you want to use and run Aliroot. |
155 | // Detailed geometries: |
156 | AliITSvPPRasymm *ITS = new AliITSvPPRasymm("ITS","New ITS PPR detailed version with asymmetric services"); |
157 | ITS->SetMinorVersion(2); // don't touch this parameter if you're not an ITS developer |
158 | ITS->SetReadDet(kFALSE); // don't touch this parameter if you're not an ITS developer |
159 | ITS->SetThicknessDet1(200.); // detector thickness on layer 1 must be in the range [100,300] |
160 | ITS->SetThicknessDet2(200.); // detector thickness on layer 2 must be in the range [100,300] |
161 | ITS->SetThicknessChip1(200.); // chip thickness on layer 1 must be in the range [150,300] |
162 | ITS->SetThicknessChip2(200.);// chip thickness on layer 2 must be in the range [150,300] |
163 | ITS->SetRails(1); // 1 --> rails in ; 0 --> rails out |
164 | ITS->SetCoolingFluid(1); // 1 --> water ; 0 --> freon |
165 | // Geant3 <-> EUCLID conversion |
166 | // ============================ |
167 | // SetEUCLID is a flag to output (=1) or not to output (=0) both |
168 | // geometry and media to two ASCII files (called by default |
169 | // ITSgeometry.euc and ITSgeometry.tme) in a format understandable |
170 | // to the CAD system EUCLID. The default (=0) means that you dont |
171 | // want to use this facility. |
172 | ITS->SetEUCLID(0); |
173 | } |
174 | if (iTPC){ |
175 | //============================ TPC parameters ========================= |
176 | // This allows the user to specify sectors for the SLOW (TPC geometry |
177 | // 2) Simulator. SecAL (SecAU) <0 means that ALL lower (upper) |
178 | // sectors are specified, any value other than that requires at least |
179 | // one sector (lower or upper)to be specified! |
180 | // Reminder: sectors 1-24 are lower sectors ( 1-12->z>0,13-24->z<0) |
181 | // sectors 25-72 are the upper ones (25-48->z>0,49-72->z<0) |
182 | // SecLows - number of lower sectors specified (up to 6) |
183 | // SecUps - number of upper sectors specified (up to 12) |
184 | // Sens - sensitive strips for the Slow Simulator !!! |
185 | // This does NOT work if all S or L-sectors are specified, i.e. |
186 | // if SecAL or SecAU < 0 |
187 | //--------------------------------------------------------------------- |
188 | // gROOT->LoadMacro("SetTPCParam.C"); |
189 | // AliTPCParam *param = SetTPCParam(); |
190 | AliTPC *TPC = new AliTPCv2("TPC", "Default"); |
191 | // All sectors included |
192 | TPC->SetSecAL(-1); |
193 | TPC->SetSecAU(-1); |
194 | } |
195 | if (iTOF){ |
196 | //=================== TOF parameters ============================ |
197 | AliTOF *TOF = new AliTOFv2("TOF", "normal TOF"); |
198 | } |
199 | if (iRICH){ |
200 | //=================== RICH parameters =========================== |
290acc32 |
201 | AliRICH *RICH = new AliRICHv3("RICH", "normal RICH"); |
02a71a71 |
202 | } |
203 | if (iZDC){ |
204 | //=================== ZDC parameters ============================ |
205 | AliZDC *ZDC = new AliZDCv2("ZDC", "normal ZDC"); |
206 | } |
207 | if (iTRD){ |
208 | //=================== TRD parameters ============================ |
209 | AliTRD *TRD = new AliTRDv1("TRD", "TRD slow simulator"); |
210 | // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + |
211 | // 10% CO2) |
212 | TRD->SetGasMix(1); |
213 | // With hole in front of PHOS |
214 | TRD->SetPHOShole(); |
215 | // With hole in front of RICH |
216 | TRD->SetRICHhole(); |
217 | // Switch on TR |
218 | AliTRDsim *TRDsim = TRD->CreateTR(); |
219 | } |
220 | if (iFMD){ |
221 | //=================== FMD parameters ============================ |
222 | AliFMD *FMD = new AliFMDv1("FMD", "normal FMD"); |
223 | FMD->SetRingsSi1(256); |
224 | FMD->SetRingsSi2(64); |
225 | FMD->SetSectorsSi1(20); |
226 | FMD->SetSectorsSi2(24); |
227 | } |
228 | if (iMUON){ |
229 | //=================== MUON parameters =========================== |
230 | AliMUON *MUON = new AliMUONv1("MUON", "default"); |
231 | } |
232 | if (iPHOS){ |
233 | //=================== PHOS parameters =========================== |
234 | AliPHOS *PHOS = new AliPHOSv1("PHOS", "GPS2"); |
235 | } |
236 | if (iPMD){ |
237 | //=================== PMD parameters ============================ |
238 | AliPMD *PMD = new AliPMDv1("PMD", "normal PMD"); |
239 | PMD->SetPAR(1., 1., 0.8, 0.02); |
240 | PMD->SetIN(6., 18., -580., 27., 27.); |
241 | PMD->SetGEO(0.0, 0.2, 4.); |
242 | PMD->SetPadSize(0.8, 1.0, 1.0, 1.5); |
243 | } |
244 | if (iEMCAL){ |
245 | //=================== EMCAL parameters ============================ |
246 | AliEMCAL *EMCAL = new AliEMCALv1("EMCAL", "EMCALArch1a"); |
247 | } |
248 | if (iSTART){ |
249 | //=================== START parameters ============================ |
250 | AliSTART *START = new AliSTARTv1("START", "START Detector"); |
251 | } |
252 | } |
253 | //---------------------------------------------------------------------- |
254 | Float_t EtaToTheta(Float_t arg){ |
255 | return (180./TMath::Pi())*2.*atan(exp(-arg)); |
256 | } |