7 // libraries required by geant321
8 gSystem->Load("libgeant321");
10 new TGeant3TGeo("C++ Interface to Geant3");
12 // Create the output file
13 TFile *rootfile = new TFile("TRD_test.root","recreate");
14 rootfile->SetCompressionLevel(2);
16 // Define the monte carlo
17 TGeant3 *geant3 = (TGeant3*) gMC;
20 cout << "AliTRDconfig.C: Creating Run Loader ..." <<endl;
21 rl = AliRunLoader::Open("TRD_test.root"
22 ,AliConfig::GetDefaultEventFolderName()
25 gAlice->Fatal("AliTRDconfig.C","Can not instatiate the Run Loader");
28 rl->SetCompressionLevel(2);
29 rl->SetNumberOfEventsPerFile(3);
30 gAlice->SetRunLoader(rl);
32 // Set external decayer
33 TVirtualMCDecayer *decayer = new AliDecayerPythia();
34 decayer->SetForceDecay(kAll);
36 gMC->SetExternalDecayer(decayer);
38 // ******* GEANT STEERING parameters FOR ALICE SIMULATION *******
39 geant3->SetTRIG(1); // Number of events to be processed
40 geant3->SetSWIT(4,10);
41 geant3->SetDEBU(0,0,1);
42 //geant3->SetSWIT(2,2);
53 geant3->SetHADR(1); // Select pure GEANH (HADR 1) or GEANH/NUCRIN (HADR 3)
57 geant3->SetAUTO(1); // Select automatic STMIN etc... calc. (AUTO 1) or manual (AUTO 0)
58 geant3->SetABAN(0); // Restore 3.16 behaviour for abandoned tracks
59 geant3->SetOPTI(2); // Select optimisation level for GEANT geometry searches (0,1,2)
60 geant3->SetERAN(5.e-7);
62 Float_t cut = 1.e-3; // 1MeV cut by default
63 Float_t tofmax = 1.e10;
64 // GAM ELEC NHAD CHAD MUON EBREM MUHAB EDEL MUDEL MUPA TOFMAX
65 geant3->SetCUTS(cut,cut, cut, cut, cut, cut, cut, cut, cut, cut, tofmax);
67 // ************* STEERING parameters FOR ALICE SIMULATION **************
68 // --- Specify event type to be tracked through the ALICE setup
69 // --- All positions are in cm, angles in degrees, and P and E in GeV
71 AliGenCocktail *gener = new AliGenCocktail();
73 AliGenBox *genEl = new AliGenBox(100);
74 genEl->SetOrigin(0,0,0); // Vertex position
75 genEl->SetSigma(0,0,0); // Sigma in (X,Y,Z) (cm) on IP position
76 genEl->SetPart(kElectron); // Only electrons
78 AliGenBox *genPi = new AliGenBox(100);
79 genPi->SetOrigin(0,0,0); // Vertex position
80 genPi->SetSigma(0,0,0); // Sigma in (X,Y,Z) (cm) on IP position
81 genPi->SetPart(kPiMinus); // Only pions
83 gener->AddGenerator(genEl,"Electrons",1);
84 gener->AddGenerator(genPi,"Pions" ,1);
88 // With magnetic field on
89 AliGenerator *gg = gener->FirstGenerator()->Generator();
90 gg->SetMomentumRange(3.00,3.01);
91 gg->SetPhiRange(76.0,92.0);
92 gg->SetThetaRange(83.0,97.0);
93 gg = gener->NextGenerator()->Generator();
94 gg->SetMomentumRange(0.560,0.561);
95 gg->SetPhiRange(62.0,78.0);
96 gg->SetThetaRange(83.0,97.0);
100 // Specify maximum magnetic field in Tesla (neg. ==> default field)
102 gAlice->SetField(-999,2,2.0);
107 // With magnetic field off
108 AliGenerator *gg = gener->FirstGenerator()->Generator();
109 gg->SetMomentumRange(3.00,3.01);
110 gg->SetPhiRange(82.0,98.0);
111 gg->SetThetaRange(83.0,97.0);
112 gg = gener->NextGenerator()->Generator();
113 gg->SetMomentumRange(0.560,0.561);
114 gg->SetPhiRange(82.0,98.0);
115 gg->SetThetaRange(83.0,97.0);
119 // Specify maximum magnetic field in Tesla (neg. ==> default field)
138 //=================== Alice BODY parameters =============================
139 AliBODY *BODY = new AliBODY("BODY","Alice envelop");
142 //=================== MAG parameters ============================
143 // --- Start with Magnet since detector layouts may be depending ---
144 // --- on the selected Magnet dimensions ---
145 AliMAG *MAG = new AliMAG("MAG","Magnet");
149 //=================== ABSO parameters ============================
150 AliABSO *ABSO = new AliABSOv0("ABSO","Muon Absorber");
154 //=================== DIPO parameters ============================
155 AliDIPO *DIPO = new AliDIPOv2("DIPO","Dipole version 2");
159 //=================== HALL parameters ============================
160 AliHALL *HALL = new AliHALL("HALL","Alice Hall");
164 //=================== FRAME parameters ============================
165 AliFRAMEv2 *FRAME = new AliFRAMEv2("FRAME","Space Frame");
170 //=================== SHIL parameters ============================
171 AliSHIL *SHIL = new AliSHILv0("SHIL","Shielding");
175 //=================== PIPE parameters ============================
176 AliPIPE *PIPE = new AliPIPEv0("PIPE","Beam Pipe");
180 //=================== ITS parameters ============================
183 AliITSvPPRasymmFMD *ITS = new AliITSvPPRasymmFMD("ITS","ITS PPR");
184 ITS->SetMinorVersion(2);
185 ITS->SetReadDet(kTRUE);
186 ITS->SetThicknessDet1(200.);
187 ITS->SetThicknessDet2(200.);
188 ITS->SetThicknessChip1(200.);
189 ITS->SetThicknessChip2(200.);
191 ITS->SetCoolingFluid(1);
197 //============================ TPC parameters ================================
198 // --- This allows the user to specify sectors for the SLOW (TPC geometry 2)
199 // --- Simulator. SecAL (SecAU) <0 means that ALL lower (upper)
200 // --- sectors are specified, any value other than that requires at least one
201 // --- sector (lower or upper)to be specified!
202 // --- Reminder: sectors 1-24 are lower sectors (1-12 -> z>0, 13-24 -> z<0)
203 // --- sectors 25-72 are the upper ones (25-48 -> z>0, 49-72 -> z<0)
204 // --- SecLows - number of lower sectors specified (up to 6)
205 // --- SecUps - number of upper sectors specified (up to 12)
206 // --- Sens - sensitive strips for the Slow Simulator !!!
207 // --- This does NOT work if all S or L-sectors are specified, i.e.
208 // --- if SecAL or SecAU < 0
211 //-----------------------------------------------------------------------------
213 AliTPC *TPC = new AliTPCv2("TPC","Default");
218 //=================== TRD parameters ============================
220 AliTRD *TRD = new AliTRDv1("TRD","TRD slow simulator");
222 // Set to detailed display
223 TRD->SetDisplayType(1);