18#ifndef _GHEP_PARTICLE_H_
19#define _GHEP_PARTICLE_H_
25#include <TLorentzVector.h>
43 using TObject::Compare;
51 int mother1,
int mother2,
int daughter1,
int daughter2,
52 const TLorentzVector & p,
const TLorentzVector & v);
55 int mother1,
int mother2,
int daughter1,
int daughter2,
56 double px,
double py,
double pz,
double E,
57 double x,
double y,
double z,
double t);
73 string Name (
void)
const;
74 double Mass (
void)
const;
75 double Charge (
void)
const;
78 const TLorentzVector *
P4 (
void)
const {
return fP4; }
79 const TLorentzVector *
X4 (
void)
const {
return fX4; }
80 TLorentzVector *
P4 (
void) {
return fP4; }
81 TLorentzVector *
X4 (
void) {
return fX4; }
84 TLorentzVector *
GetP4 (
void)
const;
85 TLorentzVector *
GetX4 (
void)
const;
88 double Px (
void)
const {
return (
fP4) ?
fP4->Px() : 0; }
89 double Py (
void)
const {
return (
fP4) ?
fP4->Py() : 0; }
90 double Pz (
void)
const {
return (
fP4) ?
fP4->Pz() : 0; }
91 double E (
void)
const {
return (
fP4) ?
fP4->Energy() : 0; }
92 double Energy (
void)
const {
return this->
E(); }
93 double KinE (
bool mass_from_pdg =
false)
const;
94 double Vx (
void)
const {
return (
fX4) ?
fX4->X() : 0; }
95 double Vy (
void)
const {
return (
fX4) ?
fX4->Y() : 0; }
96 double Vz (
void)
const {
return (
fX4) ?
fX4->Z() : 0; }
97 double Vt (
void)
const {
return (
fX4) ?
fX4->T() : 0; }
140 void SetMomentum (
double px,
double py,
double pz,
double E);
141 void SetPosition (
double x,
double y,
double z,
double t);
143 void SetPx (
double px);
144 void SetPy (
double py);
145 void SetPz (
double pz);
159 void Clear (Option_t * option);
161 void Print (ostream & stream)
const;
162 void Print (Option_t * opt)
const;
STDHEP-like event record entry that can fit a particle or a nucleus.
string Name(void) const
Name that corresponds to the PDG code.
GHepStatus_t fStatus
particle status
TLorentzVector * P4(void)
int FirstMother(void) const
double fPolzPhi
azimuthal polarization angle (rad)
void SetPosition(const TLorentzVector &v4)
int fLastDaughter
last daughter idx
void SetLastDaughter(int d)
void SetMomentum(const TLorentzVector &p4)
TLorentzVector * GetP4(void) const
bool operator==(const GHepParticle &p) const
void SetRescatterCode(int code)
bool IsOffMassShell(void) const
void Copy(const GHepParticle &particle)
void SetFirstMother(int m)
void SetLastMother(int m)
double Vy(void) const
Get production y.
void SetRemovalEnergy(double Erm)
bool ComparePdgCodes(const GHepParticle *p) const
void Clear(Option_t *option)
const TLorentzVector * P4(void) const
double Charge(void) const
Chrg that corresponds to the PDG code.
GHepParticle & operator=(const GHepParticle &p)
void AssertIsKnownParticle(void) const
double Mass(void) const
Mass that corresponds to the PDG code.
int LastMother(void) const
double PolzAzimuthAngle(void) const
double RemovalEnergy(void) const
Get removal energy.
const TLorentzVector * X4(void) const
int LastDaughter(void) const
double fPolzTheta
polar polarization angle (rad)
void Print(ostream &stream) const
int fFirstDaughter
first daughter idx
double PolzPolarAngle(void) const
TLorentzVector * GetX4(void) const
bool CompareFamily(const GHepParticle *p) const
void SetStatus(GHepStatus_t s)
bool IsOnMassShell(void) const
bool HasDaughters(void) const
double Px(void) const
Get Px.
double E(void) const
Get energy.
double Pz(void) const
Get Pz.
double Py(void) const
Get Py.
friend ostream & operator<<(ostream &stream, const GHepParticle &p)
bool fIsBound
'is it a bound particle?' flag
void SetPolarization(double theta, double phi)
TLorentzVector * fP4
momentum 4-vector (GeV)
void SetBound(bool bound)
double Vz(void) const
Get production z.
bool CompareStatusCodes(const GHepParticle *p) const
double Energy(void) const
Get energy.
TLorentzVector * fX4
position 4-vector (in the target nucleus coordinate system / x,y,z in fm / t from the moment of the p...
bool PolzIsSet(void) const
int RescatterCode(void) const
int fFirstMother
first mother idx
int fLastMother
last mother idx
int fPdgCode
particle PDG code
bool CompareMomentum(const GHepParticle *p) const
double fRemovalEnergy
removal energy for bound nucleons (GeV)
void SetFirstDaughter(int d)
double KinE(bool mass_from_pdg=false) const
Get kinetic energy.
GHepStatus_t Status(void) const
double Vx(void) const
Get production x.
double Vt(void) const
Get production time.
void GetPolarization(TVector3 &polz)
int fRescatterCode
rescattering code
int FirstDaughter(void) const
TLorentzVector * X4(void)
bool Compare(const GHepParticle *p) const
Utilities for improving the code readability when using PDG codes.
THE MAIN GENIE PROJECT NAMESPACE
enum genie::EGHepStatus GHepStatus_t
ostream & operator<<(ostream &stream, const AlgConfigPool &config_pool)