#include "THaBeamInfo.h"
#include "THaBeam.h"
#include "THaRunParameters.h"
#include "TMath.h"
using namespace std;
const Double_t THaBeamInfo::kBig = 1e38;
Double_t THaBeamInfo::GetE() const
{
if( !fBeam )
return kBig;
Double_t m = GetM();
Double_t p = GetP();
return TMath::Sqrt( p*p + m*m );
}
Double_t THaBeamInfo::GetM() const
{
if( !fBeam )
return kBig;
THaRunParameters* rp = fBeam->GetRunParameters();
if( !rp )
return kBig;
return rp->GetBeamM();
}
Int_t THaBeamInfo::GetQ() const
{
if( !fBeam )
return 0;
THaRunParameters* rp = fBeam->GetRunParameters();
if( !rp )
return 0;
return rp->GetBeamQ();
}
Double_t THaBeamInfo::GetdE() const
{
if( !fBeam )
return kBig;
THaRunParameters* rp = fBeam->GetRunParameters();
if( !rp )
return kBig;
return rp->GetBeamdE();
}
ClassImp(THaBeamInfo)
Last change: Sat Nov 7 21:26:43 2009
Last generated: 2009-11-07 21:26
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.