XclsTag.h
Go to the documentation of this file.
1 //____________________________________________________________________________
2 /*!
3 
4 \class genie::XclsTag
5 
6 \brief Contains minimal information for tagging exclusive processes.
7 
8 \author Costas Andreopoulos <constantinos.andreopoulos \at cern.ch>
9  University of Liverpool & STFC Rutherford Appleton Laboratory
10 
11  Additions for single-\rho and single-\gamma processes were installed
12  by Marco Roda <mroda@liverpool.ac.uk>, University of Liverpool
13 
14 \created December 08, 2004
15 
16 \cpright Copyright (c) 2003-2020, The GENIE Collaboration
17  For the full text of the license visit http://copyright.genie-mc.org
18 */
19 //___________________________________________________________________________
20 
21 #ifndef _FINAL_STATE_H_
22 #define _FINAL_STATE_H_
23 
24 #include <iostream>
25 #include <string>
26 
27 #include <TObject.h>
28 
30 
31 using std::ostream;
32 using std::string;
33 
34 namespace genie {
35 
36 class XclsTag;
37 ostream & operator << (ostream& stream, const XclsTag & xcls);
38 
39 class XclsTag : public TObject {
40 
41 public:
42  using TObject::Print; // suppress clang 'hides overloaded virtual function [-Woverloaded-virtual]' warnings
43  using TObject::Copy;
44 
45  XclsTag();
46  XclsTag(const XclsTag & xcls);
47  ~XclsTag();
48 
49  // Getting exclusive intermediate and/or final state information
50  bool IsCharmEvent (void) const { return fIsCharmEvent; }
51  bool IsInclusiveCharm (void) const;
52  int CharmHadronPdg (void) const { return fCharmedHadronPdg; }
53  bool IsStrangeEvent (void) const { return fIsStrangeEvent; }
54  bool IsInclusiveStrange (void) const;
55  int StrangeHadronPdg (void) const { return fStrangeHadronPdg; }
56  int NProtons (void) const { return fNProtons; }
57  int NNeutrons (void) const { return fNNeutrons; }
58  int NPi0 (void) const { return fNPi0; }
59  int NPiPlus (void) const { return fNPiPlus; }
60  int NPiMinus (void) const { return fNPiMinus; }
61  int NNucleons (void) const { return fNNeutrons + fNProtons; }
62  int NPions (void) const { return fNPi0 + fNPiPlus + fNPiMinus; }
63  int NRhos (void) const { return fNRho0 + fNRhoPlus + fNRhoMinus; }
64  int NSingleGammas (void) const { return fNSingleGammas; }
65  int NRho0 (void) const { return fNRho0; }
66  int NRhoPlus (void) const { return fNRhoPlus; }
67  int NRhoMinus (void) const { return fNRhoMinus; }
68  bool KnownResonance (void) const { return (fResonance != kNoResonance); }
69  Resonance_t Resonance (void) const { return fResonance; }
70  int DecayMode (void) const { return fDecayMode; }
71  bool IsFinalQuarkEvent (void) const { return fIsFinalQuarkEvent; }
72  int FinalQuarkPdg (void) const { return fFinalQuarkPdg; }
73  bool IsFinalLeptonEvent (void) const { return fIsFinalLeptonEvent; }
74  int FinalLeptonPdg (void) const { return fFinalLeptonPdg; }
75 
76  // Ssetting exclusive final state information
77  void SetCharm (int charm_pdgc = 0);
78  void SetStrange (int strange_pdgc = 0);
79  void SetNPions (int npi_plus, int npi_0, int npi_minus);
80  void SetNNucleons (int np, int nn);
81  void SetNProtons (int np) { fNProtons = np; }
82  void SetNNeutrons (int nn) { fNNeutrons = nn; }
83  void SetNSingleGammas (int ng) { fNSingleGammas = ng ; }
84  void SetNRhos (int nrho_plus, int nrho_0, int nrho_minus);
85  void UnsetCharm (void);
86  void UnsetStrange (void);
87  void ResetNPions (void);
88  void ResetNNucleons (void);
89  void ResetNSingleGammas (void) { fNSingleGammas = 0 ;}
90  void ResetNRhos (void);
91  void SetResonance (Resonance_t res);
92  void SetDecayMode (int decay_mode);
93  void SetFinalQuark (int finalquark_pdgc = 0);
94  void SetFinalLepton (int finallepton_pdgc = 0);
95 
96  // Copy, reset, print itself and build string code
97  void Reset (void); ///< reset object
98  void Copy (const XclsTag & xcls); ///< copy input XclsTag object
99  string AsString (void) const; ///< pack into a string code
100  void Print (ostream & stream) const; ///< print
101 
102  XclsTag & operator = (const XclsTag & xcls); ///< copy
103  friend ostream & operator << (ostream& stream, const XclsTag & xcls); ///< print
104 
105 private:
106 
107  // Private data members
108  bool fIsStrangeEvent ; ///< true if we have strange production
109  bool fIsCharmEvent ; ///< true if we have charm production
110  int fStrangeHadronPdg; ///< strange hadron pdg-code
111  int fCharmedHadronPdg; ///< charmed hadron pdg-code
112  int fNProtons; ///< # of p's in the hadronic system after this Xcls reaction (before FSI)
113  int fNNeutrons; ///< # of n's in the hadronic system after this Xcls reaction (before FSI)
114  int fNPi0; ///< # of pi^0's in the hadronic system after this Xcls reaction (before FSI)
115  int fNPiPlus; ///< # of pi^+'s in the hadronic system after this Xcls reaction (before FSI)
116  int fNPiMinus; ///< # of pi^-'s in the hadronic system after this Xcls reaction (before FSI)
117  int fNSingleGammas; ///< # of single gammas in the hadronic system after this Xcls reaction (before FSI)
118  int fNRho0; ///< # of rho^0's in the hadronic system after this Xcls reaction (before FSI)
119  int fNRhoPlus; ///< # of rho^+'s in the hadronic system after this Xcls reaction (before FSI)
120  int fNRhoMinus; ///< # of rho^-'s in the hadronic system after this Xcls reaction (before FSI)
121  Resonance_t fResonance; ///< baryon resonance excited by probe
123  bool fIsFinalQuarkEvent; ///< true if we have define final quark
124  int fFinalQuarkPdg; ///< final quark pdg-code
125  bool fIsFinalLeptonEvent; ///< true if we have define final lepton
126  int fFinalLeptonPdg; ///< final lepton pdg-code
127 
128 ClassDef(XclsTag,5)
129 };
130 
131 } // namespace
132 
133 #endif // _FINAL_STATE_H_
void SetNPions(int npi_plus, int npi_0, int npi_minus)
Definition: XclsTag.cxx:88
int fNPiPlus
of pi^+&#39;s in the hadronic system after this Xcls reaction (before FSI)
Definition: XclsTag.h:115
bool IsFinalLeptonEvent(void) const
Definition: XclsTag.h:73
void ResetNNucleons(void)
Definition: XclsTag.cxx:115
bool IsFinalQuarkEvent(void) const
Definition: XclsTag.h:71
int FinalLeptonPdg(void) const
Definition: XclsTag.h:74
void ResetNRhos(void)
Definition: XclsTag.cxx:121
THE MAIN GENIE PROJECT NAMESPACE
Definition: AlgCmp.h:25
int fNSingleGammas
of single gammas in the hadronic system after this Xcls reaction (before FSI)
Definition: XclsTag.h:117
int fCharmedHadronPdg
charmed hadron pdg-code
Definition: XclsTag.h:111
int fFinalQuarkPdg
final quark pdg-code
Definition: XclsTag.h:124
std::string string
Definition: nybbler.cc:12
int NPions(void) const
Definition: XclsTag.h:62
int fNNeutrons
of n&#39;s in the hadronic system after this Xcls reaction (before FSI)
Definition: XclsTag.h:113
bool fIsCharmEvent
true if we have charm production
Definition: XclsTag.h:109
bool KnownResonance(void) const
Definition: XclsTag.h:68
int NRhoPlus(void) const
Definition: XclsTag.h:66
void UnsetStrange(void)
Definition: XclsTag.cxx:82
int CharmHadronPdg(void) const
Definition: XclsTag.h:52
bool IsStrangeEvent(void) const
Definition: XclsTag.h:53
int NNeutrons(void) const
Definition: XclsTag.h:57
bool fIsStrangeEvent
true if we have strange production
Definition: XclsTag.h:108
int NPiMinus(void) const
Definition: XclsTag.h:60
void Copy(const XclsTag &xcls)
copy input XclsTag object
Definition: XclsTag.cxx:173
void SetNSingleGammas(int ng)
Definition: XclsTag.h:83
int fStrangeHadronPdg
strange hadron pdg-code
Definition: XclsTag.h:110
XclsTag & operator=(const XclsTag &xcls)
copy
Definition: XclsTag.cxx:354
friend ostream & operator<<(ostream &stream, const XclsTag &xcls)
print
int NRho0(void) const
Definition: XclsTag.h:65
enum genie::EResonance Resonance_t
void SetResonance(Resonance_t res)
Definition: XclsTag.cxx:128
void Print(ostream &stream) const
print
Definition: XclsTag.cxx:269
Contains minimal information for tagging exclusive processes.
Definition: XclsTag.h:39
void SetCharm(int charm_pdgc=0)
Definition: XclsTag.cxx:59
bool IsCharmEvent(void) const
Definition: XclsTag.h:50
bool fIsFinalLeptonEvent
true if we have define final lepton
Definition: XclsTag.h:125
int NRhoMinus(void) const
Definition: XclsTag.h:67
int NSingleGammas(void) const
Definition: XclsTag.h:64
void ResetNSingleGammas(void)
Definition: XclsTag.h:89
void Reset(void)
reset object
Definition: XclsTag.cxx:150
int StrangeHadronPdg(void) const
Definition: XclsTag.h:55
int fNRhoPlus
of rho^+&#39;s in the hadronic system after this Xcls reaction (before FSI)
Definition: XclsTag.h:119
int fDecayMode
Definition: XclsTag.h:122
int fNPi0
of pi^0&#39;s in the hadronic system after this Xcls reaction (before FSI)
Definition: XclsTag.h:114
string AsString(void) const
pack into a string code
Definition: XclsTag.cxx:212
void SetStrange(int strange_pdgc=0)
Definition: XclsTag.cxx:76
void SetFinalLepton(int finallepton_pdgc=0)
Definition: XclsTag.cxx:144
int fNRho0
of rho^0&#39;s in the hadronic system after this Xcls reaction (before FSI)
Definition: XclsTag.h:118
int NPiPlus(void) const
Definition: XclsTag.h:59
int DecayMode(void) const
Definition: XclsTag.h:70
void SetNNeutrons(int nn)
Definition: XclsTag.h:82
int NNucleons(void) const
Definition: XclsTag.h:61
bool fIsFinalQuarkEvent
true if we have define final quark
Definition: XclsTag.h:123
int NPi0(void) const
Definition: XclsTag.h:58
int fNProtons
of p&#39;s in the hadronic system after this Xcls reaction (before FSI)
Definition: XclsTag.h:112
Resonance_t Resonance(void) const
Definition: XclsTag.h:69
void SetDecayMode(int decay_mode)
Definition: XclsTag.cxx:133
int FinalQuarkPdg(void) const
Definition: XclsTag.h:72
bool IsInclusiveStrange(void) const
Definition: XclsTag.cxx:71
int fNRhoMinus
of rho^-&#39;s in the hadronic system after this Xcls reaction (before FSI)
Definition: XclsTag.h:120
void SetNNucleons(int np, int nn)
Definition: XclsTag.cxx:95
int fFinalLeptonPdg
final lepton pdg-code
Definition: XclsTag.h:126
void ResetNPions(void)
Definition: XclsTag.cxx:108
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
void SetNRhos(int nrho_plus, int nrho_0, int nrho_minus)
Definition: XclsTag.cxx:101
bool IsInclusiveCharm(void) const
Definition: XclsTag.cxx:54
void UnsetCharm(void)
Definition: XclsTag.cxx:65
void SetFinalQuark(int finalquark_pdgc=0)
Definition: XclsTag.cxx:138
Resonance_t fResonance
baryon resonance excited by probe
Definition: XclsTag.h:121
int NRhos(void) const
Definition: XclsTag.h:63
void SetNProtons(int np)
Definition: XclsTag.h:81
int fNPiMinus
of pi^-&#39;s in the hadronic system after this Xcls reaction (before FSI)
Definition: XclsTag.h:116
int NProtons(void) const
Definition: XclsTag.h:56