GENIEGenerator
Loading...
Searching...
No Matches
InitialState.h
Go to the documentation of this file.
1//____________________________________________________________________________
2/*!
3
4\class genie::InitialState
5
6\brief Initial State information
7
8\author Costas Andreopoulos <c.andreopoulos \at cern.ch>
9 University of Liverpool
10
11 Changes required to implement the GENIE Boosted Dark Matter module
12 were installed by Josh Berger (Univ. of Wisconsin)
13
14 Other minor changes / additions and fixes were installed by:
15 Andy Furmanski (Univ. of Manchester)
16 Joe Johnston (Univ of Pittsburgh)
17
18\created May 02, 2004
19
20\cpright Copyright (c) 2003-2025, The GENIE Collaboration
21 For the full text of the license visit http://copyright.genie-mc.org
22*/
23//____________________________________________________________________________
24
25#ifndef _INITIAL_STATE_H_
26#define _INITIAL_STATE_H_
27
28#include <iostream>
29#include <string>
30
31#include <TParticlePDG.h>
32#include <TLorentzVector.h>
33#include <TObject.h>
34
37
38using std::ostream;
39using std::string;
40
41class TRootIOCtor;
42
43namespace genie {
44
45class InitialState;
46ostream & operator << (ostream & stream, const InitialState & i);
47
48class InitialState : public TObject {
49
50public:
51 using TObject::Print; // suppress clang 'hides overloaded virtual function [-Woverloaded-virtual]' warnings
52 using TObject::Copy; //
53 using TObject::Compare; //
54
56 InitialState(int tgt_pdgc, int probe_pdgc);
57 InitialState(int Z, int A, int probe_pdgc);
58 InitialState(const Target & tgt, int probe_pdgc);
59 InitialState(const InitialState & initial_state);
60 InitialState(TRootIOCtor*);
62
63 TParticlePDG * Probe (void) const;
64 int ProbePdg (void) const { return fProbePdg; }
65 int TgtPdg (void) const;
66 const Target & Tgt (void) const { return *fTgt; }
67 Target * TgtPtr (void) const { return fTgt; }
68 TLorentzVector * GetTgtP4 (RefFrame_t rf = kRfLab) const;
69 TLorentzVector * GetProbeP4 (RefFrame_t rf = kRfHitNucRest) const;
70 double ProbeE (RefFrame_t rf) const;
71 double CMEnergy () const; ///< centre-of-mass energy (sqrt s)
72
73 void SetPdgs (int tgt_pdgc, int probe_pdgc);
74 void SetProbePdg (int pdg_code);
75 void SetTgtPdg (int pdg_code);
76 void SetTgtP4 (const TLorentzVector & P4); // in LAB-frame
77 void SetProbeP4 (const TLorentzVector & P4); // in LAB-frame
78 void SetProbeE (double E); // in LAB-frame (0,0,E,E)
79
80 bool IsNuP (void) const; ///< is neutrino + proton?
81 bool IsNuN (void) const; ///< is neutrino + neutron?
82 bool IsNuBarP (void) const; ///< is anti-neutrino + proton?
83 bool IsNuBarN (void) const; ///< is anti-neutrino + neutron?
84 bool IsDMP (void) const; ///< is dark matter + proton?
85 bool IsDMN (void) const; ///< is dark matter + neutron?
86 bool IsDMBP (void) const; ///< is anti-dark matter + proton?
87 bool IsDMBN (void) const; ///< is anti-dark matter + neutron?
88
89 //-- Copy, reset, compare, print itself and build string code
90 void Reset (void);
91 void Copy (const InitialState & init_state);
92 bool Compare (const InitialState & init_state) const;
93 string AsString (void) const;
94 void Print (ostream & stream) const;
95
96 //-- Overloaded operators
97 bool operator == (const InitialState & i) const; ///< equal?
98 InitialState & operator = (const InitialState & i); ///< copy
99 friend ostream & operator << (ostream & stream, const InitialState & i); ///< print
100
101private:
102
103 //-- Methods for InitialState initialization and clean up
104 void Init (void);
105 void Init (int target_pdgc, int probe_pdgc);
106 void CleanUp (void);
107
108 //-- Private data members
109 int fProbePdg; ///< probe PDG code
110 Target * fTgt; ///< nuclear target
111 TLorentzVector * fProbeP4; ///< probe 4-momentum in LAB-frame
112 TLorentzVector * fTgtP4; ///< nuclear target 4-momentum in LAB-frame
113
114ClassDef(InitialState,1)
115};
116
117} // namespace
118
119#endif // _INITIAL_STATE_H_
Initial State information.
int TgtPdg(void) const
bool IsDMBN(void) const
is anti-dark matter + neutron?
void SetProbeE(double E)
void SetProbePdg(int pdg_code)
int fProbePdg
probe PDG code
void SetPdgs(int tgt_pdgc, int probe_pdgc)
TLorentzVector * GetProbeP4(RefFrame_t rf=kRfHitNucRest) const
friend ostream & operator<<(ostream &stream, const InitialState &i)
print
Target * fTgt
nuclear target
bool IsNuBarN(void) const
is anti-neutrino + neutron?
const Target & Tgt(void) const
bool operator==(const InitialState &i) const
equal?
bool IsNuP(void) const
is neutrino + proton?
string AsString(void) const
InitialState & operator=(const InitialState &i)
copy
bool IsNuN(void) const
is neutrino + neutron?
void Print(ostream &stream) const
void Copy(const InitialState &init_state)
void SetProbeP4(const TLorentzVector &P4)
TParticlePDG * Probe(void) const
bool IsDMN(void) const
is dark matter + neutron?
void SetTgtP4(const TLorentzVector &P4)
int ProbePdg(void) const
double CMEnergy() const
centre-of-mass energy (sqrt s)
TLorentzVector * fTgtP4
nuclear target 4-momentum in LAB-frame
double ProbeE(RefFrame_t rf) const
TLorentzVector * GetTgtP4(RefFrame_t rf=kRfLab) const
bool Compare(const InitialState &init_state) const
bool IsNuBarP(void) const
is anti-neutrino + proton?
bool IsDMBP(void) const
is anti-dark matter + proton?
TLorentzVector * fProbeP4
probe 4-momentum in LAB-frame
void SetTgtPdg(int pdg_code)
Target * TgtPtr(void) const
bool IsDMP(void) const
is dark matter + proton?
A Neutrino Interaction Target. Is a transparent encapsulation of quite different physical systems suc...
Definition Target.h:40
THE MAIN GENIE PROJECT NAMESPACE
Definition AlgCmp.h:25
@ kRfHitNucRest
Definition RefFrame.h:30
@ kRfLab
Definition RefFrame.h:26
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)
enum genie::ERefFrame RefFrame_t