4 new AliGeant3("C++ Interface to Geant3");
6 // Create the output file
7 TFile *rootfile = new TFile("TRD_test.root","recreate");
8 rootfile->SetCompressionLevel(2);
10 // Define the monte carlo
11 TGeant3 *geant3 = (TGeant3*) gMC;
13 // Set external decayer
14 AliDecayer* decayer = new AliDecayerPythia();
15 decayer->SetForceDecay(all);
17 gMC->SetExternalDecayer(decayer);
19 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
20 geant3->SetTRIG(1); // Number of events to be processed
21 geant3->SetSWIT(4,10);
22 geant3->SetDEBU(0,0,1);
23 //geant3->SetSWIT(2,2);
34 geant3->SetHADR(1); // Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
38 geant3->SetAUTO(1); // Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
39 geant3->SetABAN(0); // Restore 3.16 behaviour for abandoned tracks
40 geant3->SetOPTI(2); // Select optimisation level for GEANT geometry searches (0,1,2)
41 geant3->SetERAN(5.e-7);
43 Float_t cut = 1.e-3; // 1MeV cut by default
44 Float_t tofmax = 1.e10;
45 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
46 geant3->SetCUTS(cut,cut, cut, cut, cut, cut, cut, cut, cut, cut, tofmax);
48 // ************* STEERING parameters FOR ALICE SIMULATION **************
49 // --- Specify event type to be tracked through the ALICE setup
50 // --- All positions are in cm, angles in degrees, and P and E in GeV
51 //AliGenHIJINGpara *gener = new AliGenHIJINGpara(250);
52 AliGenBox *gener = new AliGenBox(100);
53 gener->SetMomentumRange(1.0,3.0);
54 gener->SetPhiRange(80.0,100.0);
55 gener->SetThetaRange(70.0,110.0);
56 gener->SetPart(11); // Only electrons
57 gener->SetOrigin(0,0,0); // Vertex position
58 gener->SetSigma(0,0,0); // Sigma in (X,Y,Z) (cm) on IP position
61 //Specify maximum magnetic field in Tesla (neg. ==> default field)
62 gAlice->SetField(-999,2);
75 //=================== Alice BODY parameters =============================
76 AliBODY *BODY = new AliBODY("BODY","Alice envelop");
79 //=================== MAG parameters ============================
80 // --- Start with Magnet since detector layouts may be depending ---
81 // --- on the selected Magnet dimensions ---
82 AliMAG *MAG = new AliMAG("MAG","Magnet");
86 //=================== ABSO parameters ============================
87 AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber");
91 //=================== DIPO parameters ============================
92 AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
96 //=================== HALL parameters ============================
97 AliHALL *HALL = new AliHALL("HALL","Alice Hall");
101 //=================== FRAME parameters ============================
102 AliFRAME *FRAME = new AliFRAMEv1("FRAME","Space Frame");
106 //=================== SHIL parameters ============================
107 AliSHIL *SHIL = new AliSHILv0("SHIL","Shielding");
111 //=================== PIPE parameters ============================
112 AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe");
116 //=================== ITS parameters ============================
118 // EUCLID is a flag to output (=1) both geometry and media to two ASCII files
119 // (called by default ITSgeometry.euc and ITSgeometry.tme) in a format
120 // understandable to the CAD system EUCLID. The default (=0) means that you
121 // dont want to use this facility.
123 //AliITS *ITS = new AliITSv5("ITS","normal ITS");
124 AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
129 //============================ TPC parameters ================================
130 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
131 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
132 // --- sectors are specified, any value other than that requires at least one
133 // --- sector (lower or upper)to be specified!
134 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
135 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
136 // --- SecLows - number of lower sectors specified (up to 6)
137 // --- SecUps - number of upper sectors specified (up to 12)
138 // --- Sens - sensitive strips for the Slow Simulator !!!
139 // --- This does NOT work if all S or L-sectors are specified, i.e.
140 // --- if SecAL or SecAU < 0
143 //-----------------------------------------------------------------------------
145 //gROOT->LoadMacro("SetTPCParam.C");
146 //AliTPCParam *param = SetTPCParam();
147 //AliTPC *TPC = new AliTPCv2("TPC","Default"); //v1 is default
148 //TPC->SetParam(param); // pass the parameter object to the TPC
151 //TPC->SetGasMixt(2,20,10,-1,0.9,0.1,0.);
154 //TPC->SetSecLows(1, 2, 3, 19, 20, 21);
155 //TPC->SetSecUps(37, 38, 39, 37+18, 38+18, 39+18, -1, -1, -1, -1, -1, -1);
158 //if (TPC->IsVersion()==1) param->Write(param->GetTitle());
160 AliTPC *TPC = new AliTPCv2("TPC","Default");
161 // All sectors included
168 //=================== TRD parameters ============================
170 AliTRD *TRD = new AliTRDv1("TRD","TRD slow simulator");
171 TRD->SetSensChamber(2);
172 TRD->SetSensSector(13);
174 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
177 // Set to detailed display
178 TRD->SetDisplayType(1);
181 AliTRDsim *TRDsim = TRD->CreateTR();