BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
DumpDecayTreeAlg.cxx
Go to the documentation of this file.
1#include "GaudiKernel/MsgStream.h"
2#include "GaudiKernel/SmartDataPtr.h"
3#include "GaudiKernel/SmartRefVector.h"
4
6
8
10
11#include <vector>
12#include <string>
13#include <map>
14
15using namespace std;
16
17
18/////////////////////////////////////////////////////////////////////////////
19
20DumpDecayTreeAlg::DumpDecayTreeAlg(const std::string& name, ISvcLocator* pSvcLocator) :
21 Algorithm(name, pSvcLocator) {
22
23 //Declare the properties
24 declareProperty( "Frequency", m_freq = 1 );
25
26 declareProperty( "BesEvtGenOnly", m_BesEvtGenOnly = true );
27 declareProperty( "PrintParticles", m_PrintParticles = true );
28
29 declareProperty( "FindRunEvent", m_FindRunEvent = false );
30 declareProperty( "FindRun", m_FindRun = -5040 );
31 declareProperty( "FindEvent", m_FindEvent = 20 );
32}
33
34// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
36 MsgStream log(msgSvc(), name());
37
38 log << MSG::INFO << "in initialize()" << endmsg;
39
40 StatusCode status;
41
42 m_eventCounter = 0;
43
44 // Fill McIds with names (Created from pdt.table from perl script)
45 m_map.insert(make_pair(1,"d"));
46 m_map.insert(make_pair(-1,"anti-d"));
47 m_map.insert(make_pair(2,"u"));
48 m_map.insert(make_pair(-2,"anti-u"));
49 m_map.insert(make_pair(3,"s"));
50 m_map.insert(make_pair(-3,"anti-s"));
51 m_map.insert(make_pair(4,"c"));
52 m_map.insert(make_pair(-4,"anti-c"));
53 m_map.insert(make_pair(5,"b"));
54 m_map.insert(make_pair(-5,"anti-b"));
55 m_map.insert(make_pair(6,"t"));
56 m_map.insert(make_pair(-6,"anti-t"));
57 m_map.insert(make_pair(7,"b'"));
58 m_map.insert(make_pair(-7,"anti-b'"));
59 m_map.insert(make_pair(8,"t'"));
60 m_map.insert(make_pair(-8,"anti-t'"));
61 m_map.insert(make_pair(21,"g"));
62 m_map.insert(make_pair(11,"e-"));
63 m_map.insert(make_pair(-11,"e+"));
64 m_map.insert(make_pair(12,"nu_e"));
65 m_map.insert(make_pair(-12,"anti-nu_e"));
66 m_map.insert(make_pair(13,"mu-"));
67 m_map.insert(make_pair(-13,"mu+"));
68 m_map.insert(make_pair(14,"nu_mu"));
69 m_map.insert(make_pair(-14,"anti-nu_mu"));
70 m_map.insert(make_pair(15,"tau-"));
71 m_map.insert(make_pair(-15,"tau+"));
72 m_map.insert(make_pair(16,"nu_tau"));
73 m_map.insert(make_pair(-16,"anti-nu_tau"));
74 m_map.insert(make_pair(17,"L-"));
75 m_map.insert(make_pair(-17,"L+"));
76 m_map.insert(make_pair(18,"nu_L"));
77 m_map.insert(make_pair(-18,"anti-nu_L"));
78 m_map.insert(make_pair(22,"gamma"));
79 m_map.insert(make_pair(-22,"gammaFSR"));
80 m_map.insert(make_pair(10022,"vpho"));
81 m_map.insert(make_pair(20022,"Cerenkov"));
82 m_map.insert(make_pair(23,"Z0"));
83 m_map.insert(make_pair(24,"W+"));
84 m_map.insert(make_pair(-24,"W-"));
85 m_map.insert(make_pair(25,"Higgs0"));
86 m_map.insert(make_pair(28,"reggeon"));
87 m_map.insert(make_pair(29,"pomeron"));
88 m_map.insert(make_pair(32,"Z'0"));
89 m_map.insert(make_pair(33,"Z''0"));
90 m_map.insert(make_pair(34,"W'+"));
91 m_map.insert(make_pair(-34,"W'-"));
92 m_map.insert(make_pair(35,"Higgs'0"));
93 m_map.insert(make_pair(36,"A0"));
94 m_map.insert(make_pair(37,"Higgs+"));
95 m_map.insert(make_pair(-37,"Higgs-"));
96 m_map.insert(make_pair(40,"R0"));
97 m_map.insert(make_pair(-40,"anti-R0"));
98 m_map.insert(make_pair(41,"Xu0"));
99 m_map.insert(make_pair(42,"Xu+"));
100 m_map.insert(make_pair(-42,"Xu-"));
101 m_map.insert(make_pair(81,"specflav"));
102 m_map.insert(make_pair(82,"rndmflav"));
103 m_map.insert(make_pair(-82,"anti-rndmflav"));
104 m_map.insert(make_pair(83,"phasespa"));
105 m_map.insert(make_pair(84,"c-hadron"));
106 m_map.insert(make_pair(-84,"anti-c-hadron"));
107 m_map.insert(make_pair(85,"b-hadron"));
108 m_map.insert(make_pair(-85,"anti-b-hadron"));
109 m_map.insert(make_pair(86,"t-hadron"));
110 m_map.insert(make_pair(-86,"anti-t-hadron"));
111 m_map.insert(make_pair(87,"b'-hadron"));
112 m_map.insert(make_pair(-87,"anti-b'-hadron"));
113 m_map.insert(make_pair(88,"t'-hadron"));
114 m_map.insert(make_pair(-88,"anti-t'-hadron"));
115 m_map.insert(make_pair(89,"Wvirt+"));
116 m_map.insert(make_pair(-89,"Wvirt-"));
117 m_map.insert(make_pair(90,"diquark"));
118 m_map.insert(make_pair(-90,"anti-diquark"));
119 m_map.insert(make_pair(91,"cluster"));
120 m_map.insert(make_pair(92,"string"));
121 m_map.insert(make_pair(93,"indep"));
122 m_map.insert(make_pair(94,"CMshower"));
123 m_map.insert(make_pair(95,"SPHEaxis"));
124 m_map.insert(make_pair(96,"THRUaxis"));
125 m_map.insert(make_pair(97,"CLUSjet"));
126 m_map.insert(make_pair(98,"CELLjet"));
127 m_map.insert(make_pair(99,"table"));
128 m_map.insert(make_pair(111,"pi0"));
129 m_map.insert(make_pair(211,"pi+"));
130 m_map.insert(make_pair(-211,"pi-"));
131 m_map.insert(make_pair(210,"pi_diff+"));
132 m_map.insert(make_pair(-210,"pi_diff-"));
133 m_map.insert(make_pair(20111,"pi(2S)0"));
134 m_map.insert(make_pair(20211,"pi(2S)+"));
135 m_map.insert(make_pair(-20211,"pi(2S)-"));
136 m_map.insert(make_pair(221,"eta"));
137 m_map.insert(make_pair(20221,"eta(2S)"));
138 m_map.insert(make_pair(331,"eta'"));
139 m_map.insert(make_pair(113,"rho0"));
140 m_map.insert(make_pair(110,"rho_diff0"));
141 m_map.insert(make_pair(213,"rho+"));
142 m_map.insert(make_pair(-213,"rho-"));
143 m_map.insert(make_pair(30113,"rho(2S)0"));
144 m_map.insert(make_pair(30213,"rho(2S)+"));
145 m_map.insert(make_pair(-30213,"rho(2S)-"));
146 m_map.insert(make_pair(40113,"rho(3S)0"));
147 m_map.insert(make_pair(40213,"rho(3S)+"));
148 m_map.insert(make_pair(-40213,"rho(3S)-"));
149 m_map.insert(make_pair(223,"omega"));
150 m_map.insert(make_pair(220,"omega_diff"));
151 m_map.insert(make_pair(30223,"omega(2S)"));
152 m_map.insert(make_pair(333,"phi"));
153 m_map.insert(make_pair(330,"phi_diff"));
154 m_map.insert(make_pair(10111,"a_00"));
155 m_map.insert(make_pair(10211,"a_0+"));
156 m_map.insert(make_pair(-10211,"a_0-"));
157 m_map.insert(make_pair(9010221,"f_0"));
158 m_map.insert(make_pair(10221,"f'_0"));
159 m_map.insert(make_pair(10113,"b_10"));
160 m_map.insert(make_pair(10213,"b_1+"));
161 m_map.insert(make_pair(-10213,"b_1-"));
162 m_map.insert(make_pair(10223,"h_1"));
163 m_map.insert(make_pair(10333,"h'_1"));
164 m_map.insert(make_pair(20113,"a_10"));
165 m_map.insert(make_pair(20213,"a_1+"));
166 m_map.insert(make_pair(-20213,"a_1-"));
167 m_map.insert(make_pair(20223,"f_1"));
168 m_map.insert(make_pair(115,"a_20"));
169 m_map.insert(make_pair(215,"a_2+"));
170 m_map.insert(make_pair(-215,"a_2-"));
171 m_map.insert(make_pair(225,"f_2"));
172 m_map.insert(make_pair(50221,"f_0(1500)"));
173 m_map.insert(make_pair(335,"f'_2"));
174 m_map.insert(make_pair(9020221,"eta(1405)"));
175 m_map.insert(make_pair(10335,"eta2(1870)"));
176 m_map.insert(make_pair(10331,"f_0(1710)"));
177 m_map.insert(make_pair(229,"f_4(2050)"));
178 m_map.insert(make_pair(20333,"f'_1"));
179 m_map.insert(make_pair(8888888,"f_0(1790)"));
180 m_map.insert(make_pair(9000223,"f_1(1510)"));
181 m_map.insert(make_pair(9050225,"f_2(1950)"));
182 m_map.insert(make_pair(9080221,"eta(2225)"));
183 m_map.insert(make_pair(9040221,"eta(1760)"));
184 m_map.insert(make_pair(9999999,"x(1835)"));
185 m_map.insert(make_pair(311,"K0"));
186 m_map.insert(make_pair(-311,"anti-K0"));
187 m_map.insert(make_pair(310,"K_S0"));
188 m_map.insert(make_pair(130,"K_L0"));
189 m_map.insert(make_pair(321,"K+"));
190 m_map.insert(make_pair(-321,"K-"));
191 m_map.insert(make_pair(313,"K*0"));
192 m_map.insert(make_pair(-313,"anti-K*0"));
193 m_map.insert(make_pair(323,"K*+"));
194 m_map.insert(make_pair(-323,"K*-"));
195 m_map.insert(make_pair(10311,"K_0*0"));
196 m_map.insert(make_pair(-10311,"anti-K_0*0"));
197 m_map.insert(make_pair(10321,"K_0*+"));
198 m_map.insert(make_pair(-10321,"K_0*-"));
199 m_map.insert(make_pair(10313,"K_10"));
200 m_map.insert(make_pair(-10313,"anti-K_10"));
201 m_map.insert(make_pair(10323,"K_1+"));
202 m_map.insert(make_pair(-10323,"K_1-"));
203 m_map.insert(make_pair(315,"K_2*0"));
204 m_map.insert(make_pair(-315,"anti-K_2*0"));
205 m_map.insert(make_pair(325,"K_2*+"));
206 m_map.insert(make_pair(-325,"K_2*-"));
207 m_map.insert(make_pair(20313,"K'_10"));
208 m_map.insert(make_pair(-20313,"anti-K'_10"));
209 m_map.insert(make_pair(20323,"K'_1+"));
210 m_map.insert(make_pair(-20323,"K'_1-"));
211 m_map.insert(make_pair(100313,"K'*0"));
212 m_map.insert(make_pair(-100313,"anti-K'*0"));
213 m_map.insert(make_pair(100323,"K'*+"));
214 m_map.insert(make_pair(-100323,"K'*-"));
215 m_map.insert(make_pair(30313,"K''*0"));
216 m_map.insert(make_pair(-30313,"anti-K''*0"));
217 m_map.insert(make_pair(30323,"K''*+"));
218 m_map.insert(make_pair(-30323,"K''*-"));
219 m_map.insert(make_pair(317,"K_3*0"));
220 m_map.insert(make_pair(-317,"anti-K_3*0"));
221 m_map.insert(make_pair(327,"K_3*+"));
222 m_map.insert(make_pair(-327,"K_3*-"));
223 m_map.insert(make_pair(319,"K_4*0"));
224 m_map.insert(make_pair(-319,"anti-K_4*0"));
225 m_map.insert(make_pair(329,"K_4*+"));
226 m_map.insert(make_pair(-329,"K_4*-"));
227 m_map.insert(make_pair(411,"D+"));
228 m_map.insert(make_pair(-411,"D-"));
229 m_map.insert(make_pair(421,"D0"));
230 m_map.insert(make_pair(-421,"anti-D0"));
231 m_map.insert(make_pair(413,"D*+"));
232 m_map.insert(make_pair(-413,"D*-"));
233 m_map.insert(make_pair(423,"D*0"));
234 m_map.insert(make_pair(-423,"anti-D*0"));
235 m_map.insert(make_pair(10411,"D_0*+"));
236 m_map.insert(make_pair(-10411,"D_0*-"));
237 m_map.insert(make_pair(10421,"D_0*0"));
238 m_map.insert(make_pair(-10421,"anti-D_0*0"));
239 m_map.insert(make_pair(10413,"D_1+"));
240 m_map.insert(make_pair(-10413,"D_1-"));
241 m_map.insert(make_pair(10423,"D_10"));
242 m_map.insert(make_pair(-10423,"anti-D_10"));
243 m_map.insert(make_pair(415,"D_2*+"));
244 m_map.insert(make_pair(-415,"D_2*-"));
245 m_map.insert(make_pair(425,"D_2*0"));
246 m_map.insert(make_pair(-425,"anti-D_2*0"));
247 m_map.insert(make_pair(20413,"D'_1+"));
248 m_map.insert(make_pair(-20413,"D'_1-"));
249 m_map.insert(make_pair(20423,"D'_10"));
250 m_map.insert(make_pair(-20423,"anti-D'_10"));
251 m_map.insert(make_pair(431,"D_s+"));
252 m_map.insert(make_pair(-431,"D_s-"));
253 m_map.insert(make_pair(433,"D_s*+"));
254 m_map.insert(make_pair(-433,"D_s*-"));
255 m_map.insert(make_pair(10431,"D_s0*+"));
256 m_map.insert(make_pair(-10431,"D_s0*-"));
257 m_map.insert(make_pair(10433,"D_s1+"));
258 m_map.insert(make_pair(-10433,"D_s1-"));
259 m_map.insert(make_pair(435,"D_s2*+"));
260 m_map.insert(make_pair(-435,"D_s2*-"));
261 m_map.insert(make_pair(20433,"D'_s1+"));
262 m_map.insert(make_pair(-20433,"D'_s1-"));
263 m_map.insert(make_pair(30411,"D(2S)+"));
264 m_map.insert(make_pair(-30411,"D(2S)-"));
265 m_map.insert(make_pair(30421,"D(2S)0"));
266 m_map.insert(make_pair(-30421,"anti-D(2S)0"));
267 m_map.insert(make_pair(30413,"D*(2S)+"));
268 m_map.insert(make_pair(-30413,"D*(2S)-"));
269 m_map.insert(make_pair(30423,"D*(2S)0"));
270 m_map.insert(make_pair(-30423,"anti-D*(2S)0"));
271 m_map.insert(make_pair(511,"B0"));
272 m_map.insert(make_pair(-511,"anti-B0"));
273 m_map.insert(make_pair(150,"B0L"));
274 m_map.insert(make_pair(510,"B0H"));
275 m_map.insert(make_pair(521,"B+"));
276 m_map.insert(make_pair(-521,"B-"));
277 m_map.insert(make_pair(513,"B*0"));
278 m_map.insert(make_pair(-513,"anti-B*0"));
279 m_map.insert(make_pair(523,"B*+"));
280 m_map.insert(make_pair(-523,"B*-"));
281 m_map.insert(make_pair(10511,"B_0*0"));
282 m_map.insert(make_pair(-10511,"anti-B_0*0"));
283 m_map.insert(make_pair(10521,"B_0*+"));
284 m_map.insert(make_pair(-10521,"B_0*-"));
285 m_map.insert(make_pair(10513,"B_10"));
286 m_map.insert(make_pair(-10513,"anti-B_10"));
287 m_map.insert(make_pair(10523,"B_1+"));
288 m_map.insert(make_pair(-10523,"B_1-"));
289 m_map.insert(make_pair(515,"B_2*0"));
290 m_map.insert(make_pair(-515,"anti-B_2*0"));
291 m_map.insert(make_pair(525,"B_2*+"));
292 m_map.insert(make_pair(-525,"B_2*-"));
293 m_map.insert(make_pair(20513,"B'_10"));
294 m_map.insert(make_pair(-20513,"anti-B'_10"));
295 m_map.insert(make_pair(20523,"B'_1+"));
296 m_map.insert(make_pair(-20523,"B'_1-"));
297 m_map.insert(make_pair(531,"B_s0"));
298 m_map.insert(make_pair(-531,"anti-B_s0"));
299 m_map.insert(make_pair(350,"B_s0L"));
300 m_map.insert(make_pair(530,"B_s0H"));
301 m_map.insert(make_pair(533,"B_s*0"));
302 m_map.insert(make_pair(-533,"anti-B_s*0"));
303 m_map.insert(make_pair(10531,"B_s0*0"));
304 m_map.insert(make_pair(-10531,"anti-B_s0*0"));
305 m_map.insert(make_pair(10533,"B_s10"));
306 m_map.insert(make_pair(-10533,"anti-B_s10"));
307 m_map.insert(make_pair(535,"B_s2*0"));
308 m_map.insert(make_pair(-535,"anti-B_s2*0"));
309 m_map.insert(make_pair(20533,"B'_s10"));
310 m_map.insert(make_pair(-20533,"anti-B'_s10"));
311 m_map.insert(make_pair(541,"B_c+"));
312 m_map.insert(make_pair(-541,"B_c-"));
313 m_map.insert(make_pair(543,"B_c*+"));
314 m_map.insert(make_pair(-543,"B_c*-"));
315 m_map.insert(make_pair(10541,"B_c0*+"));
316 m_map.insert(make_pair(-10541,"B_c0*-"));
317 m_map.insert(make_pair(10543,"B_c1+"));
318 m_map.insert(make_pair(-10543,"B_c1-"));
319 m_map.insert(make_pair(545,"B_c2*+"));
320 m_map.insert(make_pair(-545,"B_c2*-"));
321 m_map.insert(make_pair(20543,"B'_c1+"));
322 m_map.insert(make_pair(-20543,"B'_c1-"));
323 m_map.insert(make_pair(441,"eta_c"));
324 m_map.insert(make_pair(20441,"eta_c(2S)"));
325 m_map.insert(make_pair(443,"J/psi"));
326 m_map.insert(make_pair(440,"psi_diff"));
327 m_map.insert(make_pair(100443,"psi(2S)"));
328 m_map.insert(make_pair(30443,"psi(3770)"));
329 m_map.insert(make_pair(9000443,"psi(4040)"));
330 m_map.insert(make_pair(9010443,"psi(4160)"));
331 m_map.insert(make_pair(9020443,"psi(4415)"));
332 m_map.insert(make_pair(10443,"h_c"));
333 m_map.insert(make_pair(10441,"chi_c0"));
334 m_map.insert(make_pair(20443,"chi_c1"));
335 m_map.insert(make_pair(445,"chi_c2"));
336 m_map.insert(make_pair(551,"eta_b"));
337 m_map.insert(make_pair(20551,"eta_b(2S)"));
338 m_map.insert(make_pair(40551,"eta_b(3S)"));
339 m_map.insert(make_pair(553,"Upsilon"));
340 m_map.insert(make_pair(30553,"Upsilon(2S)"));
341 m_map.insert(make_pair(60553,"Upsilon(3S)"));
342 m_map.insert(make_pair(70553,"Upsilon(4S)"));
343 m_map.insert(make_pair(80553,"Upsilon(5S)"));
344 m_map.insert(make_pair(10553,"h_b"));
345 m_map.insert(make_pair(40553,"h_b(2P)"));
346 m_map.insert(make_pair(100553,"h_b(3P)"));
347 m_map.insert(make_pair(10551,"chi_b0"));
348 m_map.insert(make_pair(20553,"chi_b1"));
349 m_map.insert(make_pair(555,"chi_b2"));
350 m_map.insert(make_pair(30551,"chi_b0(2P)"));
351 m_map.insert(make_pair(50553,"chi_b1(2P)"));
352 m_map.insert(make_pair(10555,"chi_b2(2P)"));
353 m_map.insert(make_pair(50551,"chi_b0(3P)"));
354 m_map.insert(make_pair(110553,"chi_b1(3P)"));
355 m_map.insert(make_pair(20555,"chi_b2(3P)"));
356 m_map.insert(make_pair(40555,"eta_b2(1D)"));
357 m_map.insert(make_pair(60555,"eta_b2(2D)"));
358 m_map.insert(make_pair(120553,"Upsilon_1(1D)"));
359 m_map.insert(make_pair(30555,"Upsilon_2(1D)"));
360 m_map.insert(make_pair(557,"Upsilon_3(1D)"));
361 m_map.insert(make_pair(130553,"Upsilon_1(2D)"));
362 m_map.insert(make_pair(50555,"Upsilon_2(2D)"));
363 m_map.insert(make_pair(10557,"Upsilon_3(2D)"));
364 m_map.insert(make_pair(10222,"sigma_0"));
365 m_map.insert(make_pair(1114,"Delta-"));
366 m_map.insert(make_pair(-1114,"anti-Delta+"));
367 m_map.insert(make_pair(2110,"n_diffr"));
368 m_map.insert(make_pair(-2110,"anti-n_diffr"));
369 m_map.insert(make_pair(2112,"n0"));
370 m_map.insert(make_pair(-2112,"anti-n0"));
371 m_map.insert(make_pair(2114,"Delta0"));
372 m_map.insert(make_pair(-2114,"anti-Delta0"));
373 m_map.insert(make_pair(2210,"p_diff+"));
374 m_map.insert(make_pair(-2210,"anti-p_diff-"));
375 m_map.insert(make_pair(2212,"p+"));
376 m_map.insert(make_pair(-2212,"anti-p-"));
377 m_map.insert(make_pair(2214,"Delta+"));
378 m_map.insert(make_pair(-2214,"anti-Delta-"));
379 m_map.insert(make_pair(2224,"Delta++"));
380 m_map.insert(make_pair(-2224,"anti-Delta--"));
381 m_map.insert(make_pair(3112,"Sigma-"));
382 m_map.insert(make_pair(-3112,"anti-Sigma+"));
383 m_map.insert(make_pair(3114,"Sigma*-"));
384 m_map.insert(make_pair(-3114,"anti-Sigma*+"));
385 m_map.insert(make_pair(3122,"Lambda0"));
386 m_map.insert(make_pair(-3122,"anti-Lambda0"));
387 m_map.insert(make_pair(13122,"Lambda(1405)0"));
388 m_map.insert(make_pair(-13122,"anti-Lambda(1405)0"));
389 m_map.insert(make_pair(3124,"Lambda(1520)0"));
390 m_map.insert(make_pair(-3124,"anti-Lambda(1520)0"));
391 m_map.insert(make_pair(23122,"Lambda(1600)0"));
392 m_map.insert(make_pair(-23122,"anti-Lambda(1600)0"));
393 m_map.insert(make_pair(33122,"Lambda(1670)0"));
394 m_map.insert(make_pair(-33122,"anti-Lambda(1670)0"));
395 m_map.insert(make_pair(13124,"Lambda(1690)0"));
396 m_map.insert(make_pair(-13124,"anti-Lambda(1690)0"));
397 m_map.insert(make_pair(43122,"Lambda(1800)0"));
398 m_map.insert(make_pair(-43122,"anti-Lambda(1800)0"));
399 m_map.insert(make_pair(53122,"Lambda(1810)0"));
400 m_map.insert(make_pair(-53122,"anti-Lambda(1810)0"));
401 m_map.insert(make_pair(3126,"Lambda(1820)0"));
402 m_map.insert(make_pair(-3126,"anti-Lambda(1820)0"));
403 m_map.insert(make_pair(13126,"Lambda(1830)0"));
404 m_map.insert(make_pair(-13126,"anti-Lambda(1830)0"));
405 m_map.insert(make_pair(13212,"Sigma(1660)0"));
406 m_map.insert(make_pair(-13212,"anti-Sigma(1660)0"));
407 m_map.insert(make_pair(13214,"Sigma(1670)0"));
408 m_map.insert(make_pair(-13214,"anti-Sigma(1670)0"));
409 m_map.insert(make_pair(23212,"Sigma(1750)0"));
410 m_map.insert(make_pair(-23212,"anti-Sigma(1750)0"));
411 m_map.insert(make_pair(3216,"Sigma(1775)0"));
412 m_map.insert(make_pair(-3216,"anti-Sigma(1775)0"));
413 m_map.insert(make_pair(3212,"Sigma0"));
414 m_map.insert(make_pair(-3212,"anti-Sigma0"));
415 m_map.insert(make_pair(3214,"Sigma*0"));
416 m_map.insert(make_pair(-3214,"anti-Sigma*0"));
417 m_map.insert(make_pair(3222,"Sigma+"));
418 m_map.insert(make_pair(-3222,"anti-Sigma-"));
419 m_map.insert(make_pair(3224,"Sigma*+"));
420 m_map.insert(make_pair(-3224,"anti-Sigma*-"));
421 m_map.insert(make_pair(3312,"Xi-"));
422 m_map.insert(make_pair(-3312,"anti-Xi+"));
423 m_map.insert(make_pair(3314,"Xi*-"));
424 m_map.insert(make_pair(-3314,"anti-Xi*+"));
425 m_map.insert(make_pair(3322,"Xi0"));
426 m_map.insert(make_pair(-3322,"anti-Xi0"));
427 m_map.insert(make_pair(3324,"Xi*0"));
428 m_map.insert(make_pair(-3324,"anti-Xi*0"));
429 m_map.insert(make_pair(3334,"Omega-"));
430 m_map.insert(make_pair(-3334,"anti-Omega+"));
431 m_map.insert(make_pair(14122,"Lambda_c(2593)+"));
432 m_map.insert(make_pair(-14122,"anti-Lambda_c(2593)-"));
433 m_map.insert(make_pair(14124,"Lambda_c(2625)+"));
434 m_map.insert(make_pair(-14124,"anti-Lambda_c(2625)-"));
435 m_map.insert(make_pair(4112,"Sigma_c0"));
436 m_map.insert(make_pair(-4112,"anti-Sigma_c0"));
437 m_map.insert(make_pair(4114,"Sigma_c*0"));
438 m_map.insert(make_pair(-4114,"anti-Sigma_c*0"));
439 m_map.insert(make_pair(4212,"Sigma_c+"));
440 m_map.insert(make_pair(-4212,"anti-Sigma_c-"));
441 m_map.insert(make_pair(4214,"Sigma_c*+"));
442 m_map.insert(make_pair(-4214,"anti-Sigma_c*-"));
443 m_map.insert(make_pair(4222,"Sigma_c++"));
444 m_map.insert(make_pair(-4222,"anti-Sigma_c--"));
445 m_map.insert(make_pair(4224,"Sigma_c*++"));
446 m_map.insert(make_pair(-4224,"anti-Sigma_c*--"));
447 m_map.insert(make_pair(4312,"Xi'_c0"));
448 m_map.insert(make_pair(-4312,"anti-Xi'_c0"));
449 m_map.insert(make_pair(4322,"Xi'_c+"));
450 m_map.insert(make_pair(-4322,"anti-Xi'_c-"));
451 m_map.insert(make_pair(4324,"Xi_c*+"));
452 m_map.insert(make_pair(-4324,"anti-Xi_c*-"));
453 m_map.insert(make_pair(4122,"Lambda_c+"));
454 m_map.insert(make_pair(-4122,"anti-Lambda_c-"));
455 m_map.insert(make_pair(4132,"Xi_c0"));
456 m_map.insert(make_pair(-4132,"anti-Xi_c0"));
457 m_map.insert(make_pair(4232,"Xi_c+"));
458 m_map.insert(make_pair(-4232,"anti-Xi_c-"));
459 m_map.insert(make_pair(4314,"Xi_c*0"));
460 m_map.insert(make_pair(-4314,"anti-Xi_c*0"));
461 m_map.insert(make_pair(4332,"Omega_c0"));
462 m_map.insert(make_pair(-4332,"anti-Omega_c0"));
463 m_map.insert(make_pair(4334,"Omega_c*0"));
464 m_map.insert(make_pair(-4334,"anti-Omega_c*0"));
465 m_map.insert(make_pair(5112,"Sigma_b-"));
466 m_map.insert(make_pair(-5112,"anti-Sigma_b+"));
467 m_map.insert(make_pair(5114,"Sigma_b*-"));
468 m_map.insert(make_pair(-5114,"anti-Sigma_b*+"));
469 m_map.insert(make_pair(5122,"Lambda_b0"));
470 m_map.insert(make_pair(-5122,"anti-Lambda_b0"));
471 m_map.insert(make_pair(5132,"Xi_b-"));
472 m_map.insert(make_pair(-5132,"anti-Xi_b+"));
473 m_map.insert(make_pair(5212,"Sigma_b0"));
474 m_map.insert(make_pair(-5212,"anti-Sigma_b0"));
475 m_map.insert(make_pair(5214,"Sigma_b*0"));
476 m_map.insert(make_pair(-5214,"anti-Sigma_b*0"));
477 m_map.insert(make_pair(5222,"Sigma_b+"));
478 m_map.insert(make_pair(-5222,"anti-Sigma_b-"));
479 m_map.insert(make_pair(5224,"Sigma_b*+"));
480 m_map.insert(make_pair(-5224,"anti-Sigma_b*-"));
481 m_map.insert(make_pair(5232,"Xi_b0"));
482 m_map.insert(make_pair(-5232,"anti-Xi_b0"));
483 m_map.insert(make_pair(5312,"Xi'_b-"));
484 m_map.insert(make_pair(-5312,"anti-Xi'_b+"));
485 m_map.insert(make_pair(5314,"Xi_b*-"));
486 m_map.insert(make_pair(-5314,"anti-Xi_b*+"));
487 m_map.insert(make_pair(5322,"Xi'_b0"));
488 m_map.insert(make_pair(-5322,"anti-Xi'_b0"));
489 m_map.insert(make_pair(5324,"Xi_b*0"));
490 m_map.insert(make_pair(-5324,"anti-Xi_b*0"));
491 m_map.insert(make_pair(5332,"Omega_b-"));
492 m_map.insert(make_pair(-5332,"anti-Omega_b+"));
493 m_map.insert(make_pair(5334,"Omega_b*-"));
494 m_map.insert(make_pair(-5334,"anti-Omega_b*+"));
495 m_map.insert(make_pair(1101,"dd_0"));
496 m_map.insert(make_pair(-1101,"anti-dd_0"));
497 m_map.insert(make_pair(2101,"ud_0"));
498 m_map.insert(make_pair(-2101,"anti-ud_0"));
499 m_map.insert(make_pair(2201,"uu_0"));
500 m_map.insert(make_pair(-2201,"anti-uu_0"));
501 m_map.insert(make_pair(3101,"sd_0"));
502 m_map.insert(make_pair(-3101,"anti-sd_0"));
503 m_map.insert(make_pair(3201,"su_0"));
504 m_map.insert(make_pair(-3201,"anti-su_0"));
505 m_map.insert(make_pair(3301,"ss_0"));
506 m_map.insert(make_pair(-3301,"anti-ss_0"));
507 m_map.insert(make_pair(4101,"cd_0"));
508 m_map.insert(make_pair(-4101,"anti-cd_0"));
509 m_map.insert(make_pair(4201,"cu_0"));
510 m_map.insert(make_pair(-4201,"anti-cu_0"));
511 m_map.insert(make_pair(4301,"cs_0"));
512 m_map.insert(make_pair(-4301,"anti-cs_0"));
513 m_map.insert(make_pair(4401,"cc_0"));
514 m_map.insert(make_pair(-4401,"anti-cc_0"));
515 m_map.insert(make_pair(5101,"bd_0"));
516 m_map.insert(make_pair(-5101,"anti-bd_0"));
517 m_map.insert(make_pair(5201,"bu_0"));
518 m_map.insert(make_pair(-5201,"anti-bu_0"));
519 m_map.insert(make_pair(5301,"bs_0"));
520 m_map.insert(make_pair(-5301,"anti-bs_0"));
521 m_map.insert(make_pair(5401,"bc_0"));
522 m_map.insert(make_pair(-5401,"anti-bc_0"));
523 m_map.insert(make_pair(5501,"bb_0"));
524 m_map.insert(make_pair(-5501,"anti-bb_0"));
525 m_map.insert(make_pair(1103,"dd_1"));
526 m_map.insert(make_pair(-1103,"anti-dd_1"));
527 m_map.insert(make_pair(2103,"ud_1"));
528 m_map.insert(make_pair(-2103,"anti-ud_1"));
529 m_map.insert(make_pair(2203,"uu_1"));
530 m_map.insert(make_pair(-2203,"anti-uu_1"));
531 m_map.insert(make_pair(3103,"sd_1"));
532 m_map.insert(make_pair(-3103,"anti-sd_1"));
533 m_map.insert(make_pair(3203,"su_1"));
534 m_map.insert(make_pair(-3203,"anti-su_1"));
535 m_map.insert(make_pair(3303,"ss_1"));
536 m_map.insert(make_pair(-3303,"anti-ss_1"));
537 m_map.insert(make_pair(4103,"cd_1"));
538 m_map.insert(make_pair(-4103,"anti-cd_1"));
539 m_map.insert(make_pair(4203,"cu_1"));
540 m_map.insert(make_pair(-4203,"anti-cu_1"));
541 m_map.insert(make_pair(4303,"cs_1"));
542 m_map.insert(make_pair(-4303,"anti-cs_1"));
543 m_map.insert(make_pair(4403,"cc_1"));
544 m_map.insert(make_pair(-4403,"anti-cc_1"));
545 m_map.insert(make_pair(5103,"bd_1"));
546 m_map.insert(make_pair(-5103,"anti-bd_1"));
547 m_map.insert(make_pair(5203,"bu_1"));
548 m_map.insert(make_pair(-5203,"anti-bu_1"));
549 m_map.insert(make_pair(5303,"bs_1"));
550 m_map.insert(make_pair(-5303,"anti-bs_1"));
551 m_map.insert(make_pair(5403,"bc_1"));
552 m_map.insert(make_pair(-5403,"anti-bc_1"));
553 m_map.insert(make_pair(5503,"bb_1"));
554 m_map.insert(make_pair(-5503,"anti-bb_1"));
555 m_map.insert(make_pair(1011,"deuteron"));
556 m_map.insert(make_pair(-1011,"anti-deuteron"));
557 m_map.insert(make_pair(1021,"tritium"));
558 m_map.insert(make_pair(-1021,"anti-tritium"));
559 m_map.insert(make_pair(1012,"He3"));
560 m_map.insert(make_pair(-1012,"anti-He3"));
561 m_map.insert(make_pair(1022,"alpha"));
562 m_map.insert(make_pair(-1022,"anti-alpha"));
563 m_map.insert(make_pair(100,"geantino"));
564 m_map.insert(make_pair(101,"chargedgeantino"));
565 m_map.insert(make_pair(30343,"Xsd"));
566 m_map.insert(make_pair(-30343,"anti-Xsd"));
567 m_map.insert(make_pair(30353,"Xsu"));
568 m_map.insert(make_pair(-30353,"anti-Xsu"));
569 m_map.insert(make_pair(30373,"Xdd"));
570 m_map.insert(make_pair(-30373,"anti-Xdd"));
571 m_map.insert(make_pair(30383,"Xdu"));
572 m_map.insert(make_pair(-30383,"anti-Xdu"));
573 m_map.insert(make_pair(30363,"Xss"));
574 m_map.insert(make_pair(-30363,"anti-Xss"));
575 m_map.insert(make_pair(51,"dummy00_1"));
576 m_map.insert(make_pair(52,"dummy10_1"));
577 m_map.insert(make_pair(53,"dummy01_1"));
578 m_map.insert(make_pair(54,"dummy11_1"));
579 m_map.insert(make_pair(-51,"anti-dummy00_1"));
580 m_map.insert(make_pair(-52,"anti-dummy10_1"));
581 m_map.insert(make_pair(-53,"anti-dummy01_1"));
582 m_map.insert(make_pair(-54,"anti-dummy11_1"));
583 m_map.insert(make_pair(55,"dummy00_2"));
584 m_map.insert(make_pair(56,"dummy10_2"));
585 m_map.insert(make_pair(57,"dummy01_2"));
586 m_map.insert(make_pair(58,"dummy11_2"));
587 m_map.insert(make_pair(-55,"anti-dummy00_2"));
588 m_map.insert(make_pair(-56,"anti-dummy10_2"));
589 m_map.insert(make_pair(-57,"anti-dummy01_2"));
590 m_map.insert(make_pair(-58,"anti-dummy11_2"));
591
592
593 //
594 //--------end of book--------
595 //
596
597 log << MSG::INFO << "successfully return from initialize()" <<endmsg;
598 return StatusCode::SUCCESS;
599
600}
601
602// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
604
605 MsgStream log(msgSvc(), name());
606 log << MSG::INFO << "in execute()" << endreq;
607
608
609 /// Get EventHeader
610 SmartDataPtr<Event::EventHeader> eventHeader(eventSvc(),"/Event/EventHeader");
611
612 if( !eventHeader ) {
613 log << MSG::FATAL << "Could not find EventHeader" << endreq;
614 return StatusCode::FAILURE;
615 }
616
617
618 //// "Event/MC/McParticleCol" does NOT work
619 SmartDataPtr<Event::McParticleCol> mcParticleCol(eventSvc(), EventModel::MC::McParticleCol);
620
621 if( !mcParticleCol ) {
622 log << MSG::FATAL << "Could not find McParticleCol" << endreq;
623 return StatusCode::FAILURE;
624 }
625
626
627 /// Begin counting events for frequency property
628 ++m_eventCounter;
629
630 if ( ((m_eventCounter % m_freq) == 0) || m_FindRunEvent ) {
631
632 /// Extract run and event number
633 int run = eventHeader->runNumber();
634 int event = eventHeader->eventNumber();
635
636 /// if m_FindRunEvent = true, determine if this is correct run and event
637 bool validEvent = false;
638 if(m_FindRunEvent && (run == m_FindRun) && (event == m_FindEvent)) validEvent = true;
639 if(!m_FindRunEvent) validEvent = true;
640
641 /// Only print out information when validEvent = true
642 if(validEvent) {
643
644 cout << endl << endl << "-------------------------" << endl;
645 cout << "Run: " << run << ", Event: " << event << endl;
646
647
648 //////////////////////////////
649 /// Dump vertices
650 cout << "Vertices: " << endl;
651
652 // "Cluster" is first particle before BesEvtGen particle
653 bool foundClusterAsMother = false;
654 if(!m_BesEvtGenOnly) foundClusterAsMother = true;
655
656 Event::McParticleCol::iterator iter_mc = mcParticleCol->begin();
657 for ( ; iter_mc != mcParticleCol->end(); iter_mc++) {
658
659 if(!(*iter_mc)->primaryParticle()) {
660 if((*iter_mc)->mother().particleProperty() == 91) foundClusterAsMother = true;
661 }
662 if(!foundClusterAsMother) continue;
663
664 const SmartRefVector<Event::McParticle>& gc = (*iter_mc)->daughterList();
665
666 if( gc.size() > 0) {
667 cout << " " << (m_map.find((*iter_mc)->particleProperty()))->second << " ["
668 << (*iter_mc)->trackIndex() << "] -> ";
669
670 for(unsigned int ii = 0; ii < gc.size(); ii++) {
671 if(ii != (gc.size()-1))
672 cout << (m_map.find(gc[ii]->particleProperty()))->second << " ["
673 << gc[ii]->trackIndex() << "], ";
674 else
675 cout << (m_map.find(gc[ii]->particleProperty()))->second
676 << " [" << gc[ii]->trackIndex() << "]" << endl;
677 }
678
679 } // End of "gc.size() > 0" IF
680
681 } // End of "McParticleCol" FOR LOOP
682
683
684 //////////////////////////////////////
685 /// Dump particles
686
687 if(m_PrintParticles) {
688
689 cout << endl << "Particles: [#Children, primParticle, leafParticle, decayFromGen, decayInFlight] " << endl;
690
691 foundClusterAsMother = false;
692 if(!m_BesEvtGenOnly) foundClusterAsMother = true;
693
694 bool firstDecayInFlight = true;
695 iter_mc = mcParticleCol->begin();
696 for ( ; iter_mc != mcParticleCol->end(); iter_mc++) {
697
698 if(!(*iter_mc)->primaryParticle()) {
699 if((*iter_mc)->mother().particleProperty() == 91) foundClusterAsMother = true;
700 }
701 if(!foundClusterAsMother) continue;
702
703 const SmartRefVector<Event::McParticle>& gc = (*iter_mc)->daughterList();
704 int numChildren = gc.size();
705
706 string primaryParticle = "F";
707 if((*iter_mc)->primaryParticle()) primaryParticle = "T";
708
709 string leafParticle = "F";
710 if((*iter_mc)->leafParticle()) leafParticle = "T";
711
712 string decayFromGen = "F";
713 if((*iter_mc)->decayFromGenerator()) decayFromGen = "T";
714
715 string decayInFlight = "F";
716 if((*iter_mc)->decayInFlight()) {
717 decayInFlight = "T";
718
719 if(firstDecayInFlight) {
720 cout << endl;
721 firstDecayInFlight = false;
722 }
723 }
724
725 cout << " " << (*iter_mc)->trackIndex() << ": "
726 << (m_map.find((*iter_mc)->particleProperty()))->second
727 << " p4 = " << (*iter_mc)->initialFourMomentum() << " ["
728 << numChildren << ", "
729 << primaryParticle << ", " << leafParticle << ", "
730 << decayFromGen << ", " << decayInFlight << "]"
731 << endl;
732
733 } // End of "McParticleCol" FOR LOOP
734 } // End of "m_PrintParticle" IF
735
736 } // End of "validEvent" IF
737 } // End of "m_freq" IF
738
739
740 return StatusCode::SUCCESS;
741}
742
743
744// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
746
747 MsgStream log(msgSvc(), name());
748 log << MSG::INFO << "in finalize()" << endmsg;
749
750 return StatusCode::SUCCESS;
751}
IMessageSvc * msgSvc()
StatusCode initialize()
DumpDecayTreeAlg(const std::string &name, ISvcLocator *pSvcLocator)
_EXTERN_ std::string McParticleCol
Definition: EventModel.h:41