Belle II Software development
CheckDecayUtils.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <vector>
12#include <algorithm>
13
14namespace Belle2 {
19 namespace CheckDecay {
20
24 inline bool CheckDecay(std::vector<int> MCDAU, int a0 = -987656789,
25 int a1 = -987656789, int a2 = -987656789,
26 int a3 = -987656789, int a4 = -987656789,
27 int a5 = -987656789, int a6 = -987656789,
28 int a7 = -987656789, int a8 = -987656789,
29 int a9 = -987656789, int a10 = -987656789,
30 int a11 = -987656789, int a12 = -987656789,
31 int a13 = -987656789, int a14 = -987656789,
32 int a15 = -987656789, int a16 = -987656789,
33 int a17 = -987656789, int a18 = -987656789)
34 {
35 std::vector<int> genDAU;
36 if (a0 != -987656789) genDAU.push_back(a0);
37 if (a1 != -987656789) genDAU.push_back(a1);
38 if (a2 != -987656789) genDAU.push_back(a2);
39 if (a3 != -987656789) genDAU.push_back(a3);
40 if (a4 != -987656789) genDAU.push_back(a4);
41 if (a5 != -987656789) genDAU.push_back(a5);
42 if (a6 != -987656789) genDAU.push_back(a6);
43 if (a7 != -987656789) genDAU.push_back(a7);
44 if (a8 != -987656789) genDAU.push_back(a8);
45 if (a9 != -987656789) genDAU.push_back(a9);
46 if (a10 != -987656789) genDAU.push_back(a10);
47 if (a11 != -987656789) genDAU.push_back(a11);
48 if (a12 != -987656789) genDAU.push_back(a12);
49 if (a13 != -987656789) genDAU.push_back(a13);
50 if (a14 != -987656789) genDAU.push_back(a14);
51 if (a15 != -987656789) genDAU.push_back(a15);
52 if (a16 != -987656789) genDAU.push_back(a16);
53 if (a17 != -987656789) genDAU.push_back(a17);
54 if (a18 != -987656789) genDAU.push_back(a18);
55 std::sort(MCDAU.begin(), MCDAU.end());
56 std::sort(genDAU.begin(), genDAU.end());
57 return MCDAU == genDAU;
58 }
59 } // end namespace CheckDecay
61} // end namespace Belle2
Abstract base class for different kinds of events.