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