3 // =============================
5 // =============================
7 // Create the output file
8 TFile *rootfile = new TFile("galice.root","recreate");
9 rootfile->SetCompressionLevel(2);
11 // =============================
13 // =============================
15 // load Geant4 and AliRoot steer libraries
16 if (!gInterpreter->IsLoaded("g4libs.C")) gROOT->LoadMacro("g4libs.C");
17 gInterpreter->ProcessLine("g4libs()");
18 gInterpreter->ProcessLine("steerlibs()");
21 if (!gInterpreter->IsLoaded("g4menu.C")) gROOT->LoadMacro("g4menu.C");
22 gInterpreter->ProcessLine("CreateGeant4()");
24 // Physics process control
26 gMC ->SetProcess("DCAY",1);
27 gMC ->SetProcess("PAIR",1);
28 gMC ->SetProcess("COMP",1);
29 gMC ->SetProcess("PHOT",1);
30 gMC ->SetProcess("PFIS",0);
31 gMC ->SetProcess("DRAY",0);
32 gMC ->SetProcess("ANNI",1);
33 gMC ->SetProcess("BREM",1);
34 gMC ->SetProcess("MUNU",1);
35 //xx gMC ->SetProcess("CKOV",1);
36 gMC ->SetProcess("HADR",1); //Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
37 gMC ->SetProcess("LOSS",2);
38 gMC ->SetProcess("MULS",1);
39 //xx gMC ->SetProcess("RAYL",1);
43 Float_t cut = 1.e-3; // 1MeV cut by default
44 gMC ->SetCut("CUTGAM",cut);
45 gMC ->SetCut("CUTELE",cut);
46 gMC ->SetCut("CUTNEU",cut);
47 gMC ->SetCut("CUTHAD",cut);
48 gMC ->SetCut("CUTMUO",cut);
49 gMC ->SetCut("BCUTE",cut);
50 gMC ->SetCut("BCUTM",cut);
51 gMC ->SetCut("DCUTE",cut);
52 gMC ->SetCut("DCUTM",cut);
53 //xx gMC ->SetCut("PPCUTM",cut);
55 // =============================
57 // =============================
59 // --- Specify event type to be tracked through the ALICE setup
60 // --- All positions are in cm, angles in degrees, and P and E in GeV
62 AliGenHIJINGpara *gener = new AliGenHIJINGpara(500);
63 gener->SetMomentumRange(0,999);
64 gener->SetPhiRange(0,360);
65 gener->SetThetaRange(10,170);
66 gener->SetOrigin(0,0,0); //vertex position
67 gener->SetSigma(0,0,0); //Sigma in (X,Y,Z) (cm) on IP position
70 // Activate this line if you want the vertex smearing to happen
73 //gener->SetVertexSmear(perTrack);
75 // =============================
77 // =============================
79 //?? gAlice->SetField(-999,2); //Specify maximum magnetic field in Tesla (neg. ==> default field)
81 // =============================
83 // =============================
85 //Bool_t isSetInteractively = false;
86 Bool_t isSetInteractively = true;
88 if (!isSetInteractively) {
90 // Load modules libraries
91 gInterpreter->ProcessLine("detlibs()");
115 // Exclude detectors that do not work with Geant4
117 // Detectors with temporary problem
121 // Without any modification
123 //=================== Alice BODY parameters =============================
124 AliBODY *BODY = new AliBODY("BODY","Alice envelop");
128 //=================== MAG parameters ============================
129 // --- Start with Magnet since detector layouts may be depending ---
130 // --- on the selected Magnet dimensions ---
131 AliMAG *MAG = new AliMAG("MAG","Magnet");
136 //=================== ABSO parameters ============================
137 AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber");
141 //=================== DIPO parameters ============================
143 AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
147 //=================== HALL parameters ============================
149 AliHALL *HALL = new AliHALL("HALL","Alice Hall");
154 //=================== FRAME parameters ============================
156 AliFRAME *FRAME = new AliFRAMEv1("FRAME","Space Frame");
161 //=================== SHIL parameters ============================
163 AliSHIL *SHIL = new AliSHILv0("SHIL","Shielding");
168 //=================== PIPE parameters ============================
170 AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe");
175 //=================== ITS parameters ============================
177 // EUCLID is a flag to output (=1) both geometry and media to two ASCII files
178 // (called by default ITSgeometry.euc and ITSgeometry.tme) in a format
179 // understandable to the CAD system EUCLID. The default (=0) means that you
180 // dont want to use this facility.
182 AliITS *ITS = new AliITSv5("ITS","normal ITS");
188 //============================ TPC parameters ================================
189 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
190 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
191 // --- sectors are specified, any value other than that requires at least one
192 // --- sector (lower or upper)to be specified!
193 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
194 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
195 // --- SecLows - number of lower sectors specified (up to 6)
196 // --- SecUps - number of upper sectors specified (up to 12)
197 // --- Sens - sensitive strips for the Slow Simulator !!!
198 // --- This does NOT work if all S or L-sectors are specified, i.e.
199 // --- if SecAL or SecAU < 0
202 //-----------------------------------------------------------------------------
204 // gROOT->LoadMacro("SetTPCParam.C");
205 // AliTPCParam *param = SetTPCParam();
206 AliTPC *TPC = new AliTPCv1("TPC","Default"); //v1 is default
207 // TPC->SetParam(param); // pass the parameter object to the TPC
211 //TPC->SetGasMixt(2,20,10,-1,0.9,0.1,0.);
214 //TPC->SetSecLows(1, 2, 3, 19, 20, 21);
215 //TPC->SetSecUps(37, 38, 39, 37+18, 38+18, 39+18, -1, -1, -1, -1, -1, -1);
218 //if (TPC->IsVersion()==1) param->Write(param->GetTitle());
222 //=================== TOF parameters ============================
223 AliTOF *TOF = new AliTOFv1("TOF","normal TOF");
227 //=================== RICH parameters ===========================
228 AliRICH *RICH = new AliRICHv1("RICH","normal RICH");
234 //=================== ZDC parameters ============================
236 AliZDC *ZDC = new AliZDCv1("ZDC","normal ZDC");
240 //=================== CASTOR parameters ============================
242 AliCASTOR *CASTOR = new AliCASTORv1("CASTOR","normal CASTOR");
246 //=================== TRD parameters ============================
248 AliTRD *TRD = new AliTRDv0("TRD","TRD fast simulator");
251 //AliTRD *TRD = new AliTRDv1("TRD","TRD slow simulator");
252 //TRD->SetSensPlane(0);
253 //TRD->SetSensChamber(2);
254 //TRD->SetSensSector(17);
256 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
259 // With hole in front of PHOS
261 // With hole in front of RICH
266 //=================== FMD parameters ============================
268 AliFMD *FMD = new AliFMDv1("FMD","normal FMD");
272 //=================== MUON parameters ===========================
274 AliMUON *MUON = new AliMUONv0("MUON","normal MUON");
278 //=================== PHOS parameters ===========================
281 AliPHOS *PHOS = new AliPHOSv1("PHOS","GPS2");
286 //=================== PMD parameters ============================
288 AliPMD *PMD = new AliPMDv0("PMD","normal PMD");
289 PMD->SetPAR(1., 1., 0.8, 0.02);
290 PMD->SetIN(6., 18., -580., 27., 27.);
291 PMD->SetGEO(0.0, 0.2, 4.);
292 PMD->SetPadSize(0.8, 1.0, 1.0, 1.5);
297 //=================== START parameters ============================
298 AliSTART *START = new AliSTARTv1("START","START Detector");
301 } // end (!isSetInteractively)