]> git.uio.no Git - u/mrichter/AliRoot.git/blame - macros/Config.C
Check of bounds of RP arrays is added
[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;
12
13//=======================================================================
14// ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
15geant3->SetTRIG(1); //Number of events to be processed
16geant3->SetSWIT(4,10);
17geant3->SetDEBU(0,0,1);
18//geant3->SetSWIT(2,2);
19geant3->SetDCAY(1);
20geant3->SetPAIR(1);
21geant3->SetCOMP(1);
22geant3->SetPHOT(1);
23geant3->SetPFIS(0);
24geant3->SetDRAY(0);
25geant3->SetANNI(1);
26geant3->SetBREM(1);
27geant3->SetMUNU(1);
28geant3->SetCKOV(1);
29geant3->SetHADR(1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
30geant3->SetLOSS(2);
31geant3->SetMULS(1);
32geant3->SetRAYL(1);
33geant3->SetAUTO(1); //Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
34geant3->SetABAN(0); //Restore 3.16 behaviour for abandoned tracks
35geant3->SetOPTI(2); //Select optimisation level for GEANT geometry searches (0,1,2)
8c658074 36geant3->SetERAN(5.e-7);
37
fe4da5cc 38Float_t cut = 1.e-3; // 1MeV cut by default
39Float_t tofmax = 1.e10;
40// GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
41geant3->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
47AliGenHIJINGpara *gener = new AliGenHIJINGpara(50);
48gener->SetMomentumRange(0,999);
49gener->SetPhiRange(0,360);
50gener->SetThetaRange(10,170);
51gener->SetOrigin(0,0,0); //vertex position
52gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
53gener->Init();
54//
55// Activate this line if you want the vertex smearing to happen
56// track by track
57//
58//gener->SetVertexSmear(perTrack);
59
60gAlice->SetField(-999,2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
61
4326511c 62Int_t iMAG=1;
63Int_t iITS=1;
64Int_t iTPC=1;
65Int_t iTOF=1;
fe4da5cc 66Int_t iRICH=1;
44885bd6 67Int_t iZDC=0;
4326511c 68Int_t iCASTOR=1;
69Int_t iTRD=1;
70Int_t iABSO=1;
71Int_t iDIPO=1;
72Int_t iHALL=1;
73Int_t iFRAME=1;
74Int_t iSHIL=1;
75Int_t iPIPE=1;
4a67c433 76Int_t iFMD=1;
4326511c 77Int_t iMUON=1;
78Int_t iPHOS=1;
79Int_t iPMD=1;
4a67c433 80Int_t iSTART=0;
fe4da5cc 81
82//=================== Alice BODY parameters =============================
83AliBODY *BODY = new AliBODY("BODY","Alice envelop");
84
85
86if(iMAG) {
87//=================== MAG parameters ============================
88// --- Start with Magnet since detector layouts may be depending ---
89// --- on the selected Magnet dimensions ---
90AliMAG *MAG = new AliMAG("MAG","Magnet");
91}
92
4b11ac09 93
94if(iABSO) {
95//=================== ABSO parameters ============================
9eecec3c 96AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber");
4b11ac09 97}
98
99if(iDIPO) {
100//=================== DIPO parameters ============================
101
102AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
103}
104
105if(iHALL) {
106//=================== HALL parameters ============================
107
108AliHALL *HALL = new AliHALL("HALL","Alice Hall");
109}
110
111
112if(iFRAME) {
113//=================== FRAME parameters ============================
114
0d3d4381 115AliFRAME *FRAME = new AliFRAMEv1("FRAME","Space Frame");
1756964f 116
4b11ac09 117}
118
119if(iSHIL) {
120//=================== SHIL parameters ============================
121
9eecec3c 122AliSHIL *SHIL = new AliSHILv0("SHIL","Shielding");
4b11ac09 123}
124
125
126if(iPIPE) {
127//=================== PIPE parameters ============================
128
129AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe");
130}
131
132
fe4da5cc 133if(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//
8dfe31df 141AliITS *ITS = new AliITSv5("ITS","normal ITS");
142ITS->SetEUCLID(0);
fe4da5cc 143}
144
4d68a14a 145
fe4da5cc 146if(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
4a67c433 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
f72f44b7 167
50e125f7 168// set gas mixture
169
4a67c433 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);
4d68a14a 176
4a67c433 177 //if (TPC->IsVersion()==1) param->Write(param->GetTitle());
fe4da5cc 178}
179
180if(iTOF) {
181//=================== TOF parameters ============================
2d1e19f5 182AliTOF *TOF = new AliTOFv1("TOF","normal TOF");
fe4da5cc 183}
184
185if(iRICH) {
186//=================== RICH parameters ===========================
4a67c433 187 AliRICH *RICH = new AliRICHv1("RICH","normal RICH");
8de40c27 188
fe4da5cc 189}
190
8de40c27 191
fe4da5cc 192if(iZDC) {
193//=================== ZDC parameters ============================
194
195AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC");
196}
197
198if(iCASTOR) {
199//=================== CASTOR parameters ============================
200
201AliCASTOR *CASTOR = new AliCASTORv1("CASTOR","normal CASTOR");
202}
203
204if(iTRD) {
205//=================== TRD parameters ============================
adc10334 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();
fe4da5cc 222}
223
fe4da5cc 224if(iFMD) {
225//=================== FMD parameters ============================
226
227AliFMD *FMD = new AliFMDv1("FMD","normal FMD");
228}
229
230if(iMUON) {
231//=================== MUON parameters ===========================
232
233AliMUON *MUON = new AliMUONv0("MUON","normal MUON");
234
fe4da5cc 235}
0f5936af 236
fe4da5cc 237//=================== PHOS parameters ===========================
238
8dfe31df 239if(iPHOS) {
4a67c433 240 AliPHOS *PHOS = new AliPHOSv1("PHOS","GPS2");
fe4da5cc 241}
242
8dfe31df 243
fe4da5cc 244if(iPMD) {
245//=================== PMD parameters ============================
246
ecd5c1f7 247AliPMD *PMD = new AliPMDv0("PMD","normal PMD");
fe4da5cc 248PMD->SetPAR(1., 1., 0.8, 0.02);
ecd5c1f7 249PMD->SetIN(6., 18., -580., 27., 27.);
fe4da5cc 250PMD->SetGEO(0.0, 0.2, 4.);
ecd5c1f7 251PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
252
fe4da5cc 253}
b422f318 254
255if(iSTART) {
256//=================== START parameters ============================
257AliSTART *START = new AliSTARTv0("START","START Detector");
258}
259
fe4da5cc 260
261}