Belle II Software development
TauDecayModeModule.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 <framework/core/Module.h>
12#include <mdst/dataobjects/MCParticle.h>
13#include <framework/datastore/StoreArray.h>
14#include <framework/datastore/StoreObjPtr.h>
15#include <framework/dataobjects/EventMetaData.h>
16#include <string>
17#include <analysis/dataobjects/TauPairDecay.h>
18namespace Belle2 {
23
28 class TauDecayModeModule : public Module {
29
30 public:
31
36
38 virtual void initialize() override;
39
41 virtual void event() override;
42
43 protected:
44
45 std::string m_printmode;
46
47 private:
48
51
55
59 std::map<std::string, int> mode_decay_minus;
61 std::map<std::string, int> mode_decay_plus;
65 std::string m_tauplusdecaymode;
66
68 Int_t m_mmode;
70 Int_t m_pmode;
71
73 Int_t m_mprong;
75 Int_t m_pprong;
76
78 double m_megstar;
79
81 double m_pegstar;
82
84 bool tauPair;
94 std::string m_file_minus;
96 std::string m_file_plus;
97
99 static constexpr std::array<int, 5> finalStatePDGs = { 11, 13, 211, 321, 2212 };
100
102 static constexpr std::array<int, 3> Neutrinos = { 12, 14, 16 };
103
105 static constexpr std::array<int, 46> OrderedList = {
106 16, -16, 14, -14, 12, -12, // neutrinos
107 11, -11, 13, -13, -211, 211, -321, 321, -2212, 2212, // charged final state particles
108 111, 310, 130, 221, 223, 331, 333, //neutral mesons
109 -213, 213, 113, //rho
110 -323, 323, 313, -313, //Kstar
111 -20213, 20213, //a1
112 -9000211, 9000211, 9000111, -10211, 10211, 10111, //a0
113 -10213, 10213, //b1
114 20223, 9010221, //f1,f0
115 3122, -3122, //lambda
116 94144,//alpha
117 22//gamma
118 };
119
124
129
130 //
131 std::vector<int> vec_radgam_taum;
132 std::vector<int> vec_radgam_taup;
133 std::vector<int> vec_dau_tauminus;
134 std::vector<int> vec_dau_tauplus;
135
137 void AnalyzeTauPairEvent();
139 int TauolaBelle2DecayMode(const std::string& s, int chg);
141 static int getRecursiveMotherCharge(const MCParticle* mc);
143 void IdentifyTauPair();
145 static int getProngOfDecay(const MCParticle& mc);
147 double getEgstar(const std::vector<int>& vec_radgam, const MCParticle& mc);
148 };
149
151}
A Class to store the Monte Carlo particle information.
Definition MCParticle.h:32
Module()
Constructor.
Definition Module.cc:30
Accessor to arrays stored in the data store.
Definition StoreArray.h:113
Type-safe access to single objects in the data store.
Definition StoreObjPtr.h:96
Int_t m_mprong
Prong of the decay channel of tau-.
int numOfTauPlus
Number of tau+ in the event.
Int_t m_pprong
Prong of the decay channel of tau+.
StoreObjPtr< EventMetaData > m_event_metadata
event number
void IdentifyTauPair()
Identifies if the event is a generated tau pair.
double getEgstar(const std::vector< int > &vec_radgam, const MCParticle &mc)
Energy of the radiative photon in tau rest frame.
std::vector< int > vec_radgam_taum
Variable name of the vector where particles identified in the event are stored.
StoreArray< MCParticle > MCParticles
StoreArray of MCParticles.
virtual void initialize() override
Initializes the module.
std::string m_file_plus
Alternative mapping for tau+.
static constexpr std::array< int, 46 > OrderedList
PDG codes of ORDERED particles.
virtual void event() override
Method is called for each event.
bool m_isEtaPizPizPizFromTauMinus
Flag for eta->pi0pi0pi0 decays from tau-.
static constexpr std::array< int, 3 > Neutrinos
PDG codes of neutrinos in final state particles in generation: {nu_e, nu_mu, mu_tau}...
double m_pegstar
Energy of radiative photon from tau+.
Int_t m_mmode
ID of the decay channel of tau-.
void AnalyzeTauPairEvent()
Analyze a generated tau pair event.
bool m_isOmegaPimPipFromTauMinus
Flag for omega->pi-pi+ decays from tau-.
static int getRecursiveMotherCharge(const MCParticle *mc)
Identifies particles coming from tau decays.
int m_taum_no
number of tau- unclassified events
std::string m_tauminusdecaymode
Variable name for the decay mode of the tau-.
bool m_isOmegaPimPipFromTauPlus
Flag for omega->pi-pi+ decays from tau+.
bool tauPair
Boolean variable used to identify tau event.
int TauolaBelle2DecayMode(const std::string &s, int chg)
Classifies the decays of the event and assigns a decay mode.
int idOfTauMinus
Index of the generated tau-.
Int_t m_pmode
ID of the decay channel of tau+.
int numOfTauMinus
Number of tau- in the event.
std::vector< int > vec_radgam_taup
Variable name of the vector where particles identified in the event are stored.
static int getProngOfDecay(const MCParticle &mc)
Identifies the number of charged final state particles in the decay.
int idOfTauPlus
Index of the generated tau+.
StoreObjPtr< TauPairDecay > m_tauDecay
pointer to tau pair decay objects
std::string m_printmode
Parameter passed by the user to indicate the information to be printed.
bool m_isEtaPizPizPizFromTauPlus
Flag for eta->pi0pi0pi0 decays from tau+.
std::string m_tauplusdecaymode
Variable name for the decay mode of the tau+.
double m_megstar
Energy of radiative photon from tau-.
TauDecayModeModule()
Constructor: Sets the description, the properties and the parameters of the module.
std::vector< int > vec_dau_tauplus
Variable name of the vector where particles identified in the event are stored.
std::string m_file_minus
Alternative mapping for tau-.
int m_taup_no
number of tau+ unclassified events
std::vector< int > vec_dau_tauminus
Variable name of the vector where particles identified in the event are stored.
static constexpr std::array< int, 5 > finalStatePDGs
PDG codes accepted as charged final state particles in generation: {e, mu, pi, K, p}...
std::map< std::string, int > mode_decay_minus
Mapping for tau- decays.
std::map< std::string, int > mode_decay_plus
Mapping for tau+ decays.
Abstract base class for different kinds of events.