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
52 AliGenCocktail *gener = new AliGenCocktail();
54 AliGenBox *genEl = new AliGenBox(100);
55 genEl->SetOrigin(0,0,0); // Vertex position
56 genEl->SetSigma(0,0,0); // Sigma in (X,Y,Z) (cm) on IP position
57 genEl->SetPart(11); // Only electrons
59 AliGenBox *genPi = new AliGenBox(100);
60 genPi->SetOrigin(0,0,0); // Vertex position
61 genPi->SetSigma(0,0,0); // Sigma in (X,Y,Z) (cm) on IP position
62 genPi->SetPart(-211); // Only pions
64 gener->AddGenerator(genEl,"Electrons",1);
65 gener->AddGenerator(genPi,"Pions" ,1);
67 AliGenerator *gg = gener->FirstGenerator()->Generator();
68 gg->SetMomentumRange(1.0,3.0);
69 gg->SetPhiRange(75.0,95.0);
70 gg->SetThetaRange(70.0,110.0);
71 gg = gener->NextGenerator()->Generator();
72 gg->SetMomentumRange(2.5,3.0);
73 gg->SetPhiRange(75.0,95.0);
74 gg->SetThetaRange(70.0,110.0);
78 // Specify maximum magnetic field in Tesla (neg. ==> default field)
80 gAlice->SetField(-999,2,2.0);
93 //=================== Alice BODY parameters =============================
94 AliBODY *BODY = new AliBODY("BODY","Alice envelop");
97 //=================== MAG parameters ============================
98 // --- Start with Magnet since detector layouts may be depending ---
99 // --- on the selected Magnet dimensions ---
100 AliMAG *MAG = new AliMAG("MAG","Magnet");
104 //=================== ABSO parameters ============================
105 AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber");
109 //=================== DIPO parameters ============================
110 AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
114 //=================== HALL parameters ============================
115 AliHALL *HALL = new AliHALL("HALL","Alice Hall");
119 //=================== FRAME parameters ============================
120 AliFRAME *FRAME = new AliFRAMEv1("FRAME","Space Frame");
124 //=================== SHIL parameters ============================
125 AliSHIL *SHIL = new AliSHILv0("SHIL","Shielding");
129 //=================== PIPE parameters ============================
130 AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe");
134 //=================== ITS parameters ============================
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.
141 //AliITS *ITS = new AliITSv5("ITS","normal ITS");
142 AliITS *ITS = new AliITSv5asymm("ITS","Updates ITS TDR detailed version with asymmetric services");
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
161 //-----------------------------------------------------------------------------
163 //gROOT->LoadMacro("SetTPCParam.C");
164 //AliTPCParam *param = SetTPCParam();
165 //AliTPC *TPC = new AliTPCv2("TPC","Default"); //v1 is default
166 //TPC->SetParam(param); // pass the parameter object to the TPC
169 //TPC->SetGasMixt(2,20,10,-1,0.9,0.1,0.);
172 //TPC->SetSecLows(1, 2, 3, 19, 20, 21);
173 //TPC->SetSecUps(37, 38, 39, 37+18, 38+18, 39+18, -1, -1, -1, -1, -1, -1);
176 //if (TPC->IsVersion()==1) param->Write(param->GetTitle());
178 AliTPC *TPC = new AliTPCv2("TPC","Default");
179 // All sectors included
186 //=================== TRD parameters ============================
188 AliTRD *TRD = new AliTRDv1("TRD","TRD slow simulator");
189 TRD->SetSensChamber(2);
190 TRD->SetSensSector(13);
192 // Get the pointer to the geometry object
193 AliTRDgeometry *TRDgeometry = TRD->GetGeometry();
195 // The number of timebins
196 TRDgeometry->SetNTimeBin(15);
198 // Select the gas mixture (0: 97% Xe + 3% isobutane, 1: 90% Xe + 10% CO2)
201 // Set to detailed display
202 TRD->SetDisplayType(1);
205 AliTRDsim *TRDsim = TRD->CreateTR();