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 <costas.andreopoulos \at stfc.ac.uk>
9  University of Liverpool & STFC Rutherford Appleton Lab
10 
11 \created December 08, 2004
12 
13 \cpright Copyright (c) 2003-2019, The GENIE Collaboration
14  For the full text of the license visit http://copyright.genie-mc.org
15  or see $GENIE/LICENSE
16 */
17 //___________________________________________________________________________
18 
19 #ifndef _FINAL_STATE_H_
20 #define _FINAL_STATE_H_
21 
22 #include <iostream>
23 #include <string>
24 
25 #include <TObject.h>
26 
28 
29 using std::ostream;
30 using std::string;
31 
32 namespace genie {
33 
34 class XclsTag;
35 ostream & operator << (ostream& stream, const XclsTag & xcls);
36 
37 class XclsTag : public TObject {
38 
39 public:
40  using TObject::Print; // suppress clang 'hides overloaded virtual function [-Woverloaded-virtual]' warnings
41  using TObject::Copy;
42 
43  XclsTag();
44  XclsTag(const XclsTag & xcls);
45  ~XclsTag();
46 
47  // Getting exclusive intermediate and/or final state information
48  bool IsCharmEvent (void) const { return fIsCharmEvent; }
49  bool IsInclusiveCharm (void) const;
50  int CharmHadronPdg (void) const { return fCharmedHadronPdg; }
51  bool IsStrangeEvent (void) const { return fIsStrangeEvent; }
52  bool IsInclusiveStrange (void) const;
53  int StrangeHadronPdg (void) const {return fStrangeHadronPdg; }
54  int NProtons (void) const { return fNProtons; }
55  int NNeutrons (void) const { return fNNeutrons; }
56  int NPi0 (void) const { return fNPi0; }
57  int NPiPlus (void) const { return fNPiPlus; }
58  int NPiMinus (void) const { return fNPiMinus; }
59  int NNucleons (void) const { return fNNeutrons + fNProtons; }
60  int NPions (void) const { return fNPi0 + fNPiPlus + fNPiMinus; }
61  bool KnownResonance (void) const { return (fResonance != kNoResonance); }
62  Resonance_t Resonance (void) const { return fResonance; }
63  int DecayMode (void) const { return fDecayMode; }
64 
65  // Ssetting exclusive final state information
66  void SetCharm (int charm_pdgc = 0);
67  void SetStrange (int strange_pdgc = 0);
68  void SetNPions (int npi_plus, int npi_0, int npi_minus);
69  void SetNNucleons (int np, int nn);
70  void SetNProtons (int np) { fNProtons = np; }
71  void SetNNeutrons (int nn) { fNNeutrons = nn; }
72  void UnsetCharm (void);
73  void UnsetStrange (void);
74  void ResetNPions (void);
75  void ResetNNucleons (void);
76  void SetResonance (Resonance_t res);
77  void SetDecayMode (int decay_mode);
78 
79  // Copy, reset, print itself and build string code
80  void Reset (void); ///< reset object
81  void Copy (const XclsTag & xcls); ///< copy input XclsTag object
82  string AsString (void) const; ///< pack into a string code
83  void Print (ostream & stream) const; ///< print
84 
85  XclsTag & operator = (const XclsTag & xcls); ///< copy
86  friend ostream & operator << (ostream& stream, const XclsTag & xcls); ///< print
87 
88 private:
89 
90  // Private data members
91  bool fIsCharmEvent; ///< true if we have charm production
92  int fCharmedHadronPdg; ///< charmed hadron pdg-code
93  bool fIsStrangeEvent; ///< true if we have strange production
94  int fStrangeHadronPdg; ///< strange hadron pdg-code
95  int fNProtons; ///< # of p's in the hadronic system after this Xcls reaction (before FSI)
96  int fNNeutrons; ///< # of n's in the hadronic system after this Xcls reaction (before FSI)
97  int fNPi0; ///< # of pi^0's in the hadronic system after this Xcls reaction (before FSI)
98  int fNPiPlus; ///< # of pi^+'s in the hadronic system after this Xcls reaction (before FSI)
99  int fNPiMinus; ///< # of pi^-'s in the hadronic system after this Xcls reaction (before FSI)
100  Resonance_t fResonance; ///< baryon resonance excited by probe
102 
103 ClassDef(XclsTag,3)
104 };
105 
106 } // namespace
107 
108 #endif // _FINAL_STATE_H_
void SetNPions(int npi_plus, int npi_0, int npi_minus)
Definition: XclsTag.cxx:97
int fNPiPlus
of pi^+&#39;s in the hadronic system after this Xcls reaction (before FSI)
Definition: XclsTag.h:98
void ResetNNucleons(void)
Definition: XclsTag.cxx:117
THE MAIN GENIE PROJECT NAMESPACE
Definition: GeneratorBase.h:8
int fCharmedHadronPdg
charmed hadron pdg-code
Definition: XclsTag.h:92
int NPions(void) const
Definition: XclsTag.h:60
int fNNeutrons
of n&#39;s in the hadronic system after this Xcls reaction (before FSI)
Definition: XclsTag.h:96
bool fIsCharmEvent
true if we have charm production
Definition: XclsTag.h:91
bool KnownResonance(void) const
Definition: XclsTag.h:61
void UnsetStrange(void)
Definition: XclsTag.cxx:91
int CharmHadronPdg(void) const
Definition: XclsTag.h:50
bool IsStrangeEvent(void) const
Definition: XclsTag.h:51
int NNeutrons(void) const
Definition: XclsTag.h:55
bool fIsStrangeEvent
true if we have strange production
Definition: XclsTag.h:93
int NPiMinus(void) const
Definition: XclsTag.h:58
void Copy(const XclsTag &xcls)
copy input XclsTag object
Definition: XclsTag.cxx:148
int fStrangeHadronPdg
strange hadron pdg-code
Definition: XclsTag.h:94
XclsTag & operator=(const XclsTag &xcls)
copy
Definition: XclsTag.cxx:280
friend ostream & operator<<(ostream &stream, const XclsTag &xcls)
print
enum genie::EResonance Resonance_t
void SetResonance(Resonance_t res)
Definition: XclsTag.cxx:123
void Print(ostream &stream) const
print
Definition: XclsTag.cxx:223
Contains minimal information for tagging exclusive processes.
Definition: XclsTag.h:37
void SetCharm(int charm_pdgc=0)
Definition: XclsTag.cxx:68
bool IsCharmEvent(void) const
Definition: XclsTag.h:48
void Reset(void)
reset object
Definition: XclsTag.cxx:133
int StrangeHadronPdg(void) const
Definition: XclsTag.h:53
int fDecayMode
Definition: XclsTag.h:101
int fNPi0
of pi^0&#39;s in the hadronic system after this Xcls reaction (before FSI)
Definition: XclsTag.h:97
string AsString(void) const
pack into a string code
Definition: XclsTag.cxx:179
void SetStrange(int strange_pdgc=0)
Definition: XclsTag.cxx:85
int NPiPlus(void) const
Definition: XclsTag.h:57
int DecayMode(void) const
Definition: XclsTag.h:63
void SetNNeutrons(int nn)
Definition: XclsTag.h:71
int NNucleons(void) const
Definition: XclsTag.h:59
int NPi0(void) const
Definition: XclsTag.h:56
int fNProtons
of p&#39;s in the hadronic system after this Xcls reaction (before FSI)
Definition: XclsTag.h:95
Resonance_t Resonance(void) const
Definition: XclsTag.h:62
void SetDecayMode(int decay_mode)
Definition: XclsTag.cxx:128
void Print(std::string prefix, std::string name, std::string suffix="")
Definition: nue_pid_effs.C:68
bool IsInclusiveStrange(void) const
Definition: XclsTag.cxx:80
void SetNNucleons(int np, int nn)
Definition: XclsTag.cxx:104
void ResetNPions(void)
Definition: XclsTag.cxx:110
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
bool IsInclusiveCharm(void) const
Definition: XclsTag.cxx:63
void UnsetCharm(void)
Definition: XclsTag.cxx:74
Resonance_t fResonance
baryon resonance excited by probe
Definition: XclsTag.h:100
void SetNProtons(int np)
Definition: XclsTag.h:70
int fNPiMinus
of pi^-&#39;s in the hadronic system after this Xcls reaction (before FSI)
Definition: XclsTag.h:99
int NProtons(void) const
Definition: XclsTag.h:54
enum BeamMode string