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