#ifndef __HVIRTULCAND_H__
#define __HVIRTULCAND_H__
#include "TLorentzVector.h"
typedef Float16_t SmallFloat;
class HVirtualCand : public TLorentzVector
{
protected:
SmallFloat fBeta;
SmallFloat fMomentum;
SmallFloat fMass2;
Short_t fCharge;
Short_t fTofRec;
SmallFloat fPhi;
SmallFloat fTheta;
SmallFloat fR;
SmallFloat fZ;
SmallFloat fChi2;
SmallFloat fPhi2;
SmallFloat fTheta2;
SmallFloat fR2;
SmallFloat fZ2;
public:
HVirtualCand() :
fBeta(-1), fMomentum(-1), fMass2(-1), fCharge(0), fTofRec(0),
fPhi(-1), fTheta(-1), fR(-1), fZ(-1),fChi2(-1),
fPhi2(-1), fTheta2(-1), fR2(-1), fZ2(-1)
{
}
virtual ~HVirtualCand();
void setBeta(Float_t b) { fBeta = b; }
void setMomentum(Float_t m) { fMomentum = m; }
void setMass2(Float_t m) { fMass2 = m; }
void setCharge(Short_t c) { fCharge = c; }
void setTofRec(Short_t tr) { fTofRec = tr; }
void setPhi(Float_t p) { fPhi = p; }
void setTheta(Float_t t) { fTheta = t; }
void setR(Float_t r) { fR = r; }
void setZ(Float_t z) { fZ = z; }
void setChi2(Float_t c) { fChi2 = c; }
void setPhi2(Float_t p) { fPhi2 = p; }
void setTheta2(Float_t t) { fTheta2 = t; }
void setR2(Float_t r) { fR2 = r; }
void setZ2(Float_t z) { fZ2 = z; }
Float_t getBeta() const { return fBeta; }
Float_t getMomentum() const { return fMomentum; }
Float_t getMass2() const { return fMass2; }
Float_t getMass () const { return fMass2 == -1 ? -1 : ( fMass2 < 0 ? TMath::Sqrt(-fMass2) : TMath::Sqrt(fMass2) ) ; }
Short_t getCharge() const { return fCharge; }
Short_t getTofRec() const { return fTofRec; }
Float_t getPhi() const { return fPhi; }
Float_t getTheta() const { return fTheta; }
Float_t getR() const { return fR; }
Float_t getZ() const { return fZ; }
Float_t getChi2() const { return fChi2; }
Float_t getPhi2() const { return fPhi2; }
Float_t getTheta2() const { return fTheta2; }
Float_t getR2() const { return fR2; }
Float_t getZ2() const { return fZ2; }
Float_t getMomentumPID (Int_t pid);
void calc4vectorProperties(Double_t mass = 0.51099892)
{
SetXYZM( TMath::Abs(fMomentum) * TMath::Sin( TMath::DegToRad() * fTheta )
* TMath::Cos( TMath::DegToRad() * fPhi ),
TMath::Abs(fMomentum) * TMath::Sin( TMath::DegToRad() * fTheta )
* TMath::Sin( TMath::DegToRad() * fPhi ),
TMath::Abs(fMomentum) * TMath::Cos( TMath::DegToRad() * fTheta ),
mass );
}
virtual void print(UInt_t selection=31);
ClassDef(HVirtualCand,2)
};
#endif // __HVIRTUALCAND_H__