ROOT logo
Podd » SRC » THaBeamInfo

class THaBeamInfo


 THaBeamInfo

 Utility class/structure for holding variable beam information.


Function Members (Methods)

public:
THaBeamInfo()
THaBeamInfo(const THaBeamInfo& t)
THaBeamInfo(const TVector3& pvect, const TVector3& position, Double_t pol = 0.0)
THaBeamInfo(Double_t p, const TVector3& vect, const TVector3& position, Double_t pol = 0.0)
virtual~THaBeamInfo()
static TClass*Class()
voidClear(Option_t* opt = "")
THaBeam*GetBeam() const
Double_tGetdE() const
Double_tGetE() const
Double_tGetM() const
Double_tGetP() const
Double_tGetPhi() const
Double_tGetPol() const
const TVector3&GetPosition() const
const TVector3&GetPvect() const
Double_tGetPx() const
Double_tGetPy() const
Double_tGetPz() const
Int_tGetQ() const
Double_tGetTheta() const
Double_tGetX() const
Double_tGetY() const
Double_tGetZ() const
virtual TClass*IsA() const
Bool_tIsOK() const
THaBeamInfo&operator=(const THaBeamInfo& rhs)
voidSet(const TVector3& pvect, const TVector3& position, Double_t pol = 0.0)
voidSet(Double_t p, const TVector3& vect, const TVector3& position, Double_t pol = 0.0)
voidSetBeam(THaBeam* obj)
voidSetP(Double_t p)
voidSetPol(Double_t pol)
virtual voidShowMembers(TMemberInspector&)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)

Data Members

protected:
THaBeam*fBeam! Beam apparatus for this beam information
Int_tfOKData ok (0:no 1:yes)
Double_tfPolBeam polarization
TVector3fPositionReference position in lab frame (m)
TVector3fPvectMomentum vector in lab (GeV/c)
private:
static const Double_tkBig

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

Double_t GetE() const
 Return beam energy. This is the energy corresponding to the
 current beam momentum and mass, not necessarily the same as
 the nominal beam energy in the run database.
Double_t GetM() const
 Return mass of beam particles
Int_t GetQ() const
 Return charge of beam particles (electrons: -1)
Double_t GetdE() const
 Return beam energy uncertainty
void Clear(Option_t* opt = "")
THaBeamInfo()
{}
THaBeamInfo(const TVector3& pvect, const TVector3& position, Double_t pol = 0.0)
{}
THaBeamInfo(Double_t p, const TVector3& vect, const TVector3& position, Double_t pol = 0.0)
{ SetP(p); }
THaBeamInfo(const THaBeamInfo& t)
{}
THaBeamInfo& operator=(const THaBeamInfo& rhs)
virtual ~THaBeamInfo()
{}
Bool_t IsOK() const
{ return fOK; }
Double_t GetPx() const
{ return fPvect.X(); }
Double_t GetPy() const
{ return fPvect.Y(); }
Double_t GetPz() const
{ return fPvect.Z(); }
Double_t GetP() const
{ return fPvect.Mag(); }
Double_t GetX() const
{ return fPosition.X(); }
Double_t GetY() const
{ return fPosition.Y(); }
Double_t GetZ() const
{ return fPosition.Z(); }
Double_t GetTheta() const
{ return (GetPz() != 0.0) ? GetPx()/GetPz():kBig;}
Double_t GetPhi() const
{ return (GetPz() != 0.0) ? GetPy()/GetPz():kBig;}
Double_t GetPol() const
{ return fPol; }
const TVector3& GetPvect() const
{ return fPvect; }
const TVector3& GetPosition() const
{ return fPosition; }
THaBeam* GetBeam() const
{ return fBeam; }
void SetP(Double_t p)
{ fPvect.SetMag(p); }
void SetPol(Double_t pol)
{ fPol = pol; }
void Set(const TVector3& pvect, const TVector3& position, Double_t pol = 0.0)
void Set(Double_t p, const TVector3& vect, const TVector3& position, Double_t pol = 0.0)
void SetBeam(THaBeam* obj)
{ fBeam = obj; }