#ifndef ROOT_TEveVSDStructs
#define ROOT_TEveVSDStructs
#include "TObject.h"
#include "TMath.h"
#include "TParticle.h"
class TEveVector
{
public:
Float_t fX, fY, fZ;
TEveVector() : fX(0), fY(0), fZ(0) {}
TEveVector(const Float_t* v) : fX(v[0]), fY(v[1]), fZ(v[2]) {}
TEveVector(const Double_t* v) : fX(v[0]), fY(v[1]), fZ(v[2]) {}
TEveVector(Float_t x, Float_t y, Float_t z) : fX(x), fY(y), fZ(z) {}
virtual ~TEveVector() {}
void Dump() const;
operator const Float_t*() const { return &fX; }
operator Float_t*() { return &fX; }
TEveVector& operator *=(Float_t s) { fX *= s; fY *= s; fZ *= s; return *this; }
TEveVector& operator +=(const TEveVector& v) { fX += v.fX; fY += v.fY; fZ += v.fZ; return *this; }
TEveVector& operator -=(const TEveVector& v) { fX -= v.fX; fY -= v.fY; fZ -= v.fZ; return *this; }
TEveVector operator + (const TEveVector &) const;
TEveVector operator - (const TEveVector &) const;
TEveVector operator * (Float_t a) const;
Float_t& operator [] (Int_t indx);
Float_t operator [] (Int_t indx) const;
const Float_t* Arr() const { return &fX; }
Float_t* Arr() { return &fX; }
void Set(const Float_t* v) { fX = v[0]; fY = v[1]; fZ = v[2]; }
void Set(const Double_t* v) { fX = v[0]; fY = v[1]; fZ = v[2]; }
void Set(Float_t x, Float_t y, Float_t z) { fX = x; fY = y; fZ = z; }
void Set(Double_t x, Double_t y, Double_t z) { fX = x; fY = y; fZ = z; }
void Set(const TVector3& v) { fX = v.x(); fY = v.y(); fZ = v.z(); }
void Set(const TEveVector& v) { fX = v.fX; fY = v.fY; fZ = v.fZ; }
void NegateXYZ() { fX = - fX; fY = -fY; fZ = -fZ; }
void Normalize(Float_t length=1);
Float_t Phi() const;
Float_t Theta() const;
Float_t CosTheta() const;
Float_t Eta() const;
Float_t Mag() const { return TMath::Sqrt(fX*fX + fY*fY + fZ*fZ);}
Float_t Mag2() const { return fX*fX + fY*fY + fZ*fZ;}
Float_t Perp() const { return TMath::Sqrt(fX*fX + fY*fY);}
Float_t Perp2() const { return fX*fX + fY*fY;}
Float_t R() const { return Perp(); }
Float_t Distance(const TEveVector& v) const;
Float_t SquareDistance(const TEveVector& v) const;
Float_t Dot(const TEveVector&a) const;
TEveVector& Mult(const TEveVector& a, Float_t af)
{ fX = a.fX*af; fY = a.fY*af; fZ = a.fZ*af; return *this; }
TEveVector Orthogonal() const;
void OrthoNormBase(TEveVector& a, TEveVector& b) const;
ClassDef(TEveVector, 1);
};
inline Float_t TEveVector::Phi() const
{ return fX == 0.0 && fY == 0.0 ? 0.0 : TMath::ATan2(fY, fX); }
inline Float_t TEveVector::Theta() const
{ return fX == 0.0 && fY == 0.0 && fZ == 0.0 ? 0.0 : TMath::ATan2(Perp(), fZ); }
inline Float_t TEveVector::CosTheta() const
{ Float_t ptot = Mag(); return ptot == 0.0 ? 1.0 : fZ/ptot; }
inline Float_t TEveVector::Distance( const TEveVector& b) const
{
return TMath::Sqrt((fX - b.fX)*(fX - b.fX) +
(fY - b.fY)*(fY - b.fY) +
(fZ - b.fZ)*(fZ - b.fZ));
}
inline Float_t TEveVector::SquareDistance(const TEveVector& b) const
{
return ((fX - b.fX) * (fX - b.fX) +
(fY - b.fY) * (fY - b.fY) +
(fZ - b.fZ) * (fZ - b.fZ));
}
inline Float_t TEveVector::Dot(const TEveVector& a) const
{
return a.fX*fX + a.fY*fY + a.fZ*fZ;
}
inline Float_t& TEveVector::operator [] (Int_t idx)
{ return (&fX)[idx]; }
inline Float_t TEveVector::operator [] (Int_t idx) const
{ return (&fX)[idx]; }
class TEveVector4 : public TEveVector
{
public:
Float_t fT;
TEveVector4() : TEveVector(), fT(0) {}
TEveVector4(const TEveVector& v) : TEveVector(v), fT(0) {}
TEveVector4(Float_t x, Float_t y, Float_t z, Float_t t=0) :
TEveVector(x, y, z), fT(t) {}
virtual ~TEveVector4() {}
void Dump() const;
TEveVector4 operator + (const TEveVector4 & b)
{ return TEveVector4(fX + b.fX, fY + b.fY, fZ + b.fZ, fT + b.fT); }
TEveVector4 operator - (const TEveVector4 & b)
{ return TEveVector4(fX - b.fX, fY - b.fY, fZ - b.fZ, fT - b.fT); }
TEveVector4 operator * (Float_t a)
{ return TEveVector4(a*fX, a*fY, a*fZ, a*fT); }
TEveVector4& operator += (const TEveVector4 & b)
{ fX += b.fX; fY += b.fY; fZ += b.fZ; fT += b.fT; return *this; }
ClassDef(TEveVector4, 1);
};
class TEvePathMark
{
public:
enum EType_e { kReference, kDaughter, kDecay, kCluster2D };
EType_e fType;
TEveVector fV;
TEveVector fP;
TEveVector fE;
Float_t fTime;
TEvePathMark(EType_e type=kReference) :
fType(type), fV(), fP(), fE(), fTime(0) {}
TEvePathMark(EType_e type, const TEveVector& v, Float_t time=0) :
fType(type), fV(v), fP(), fE(), fTime(time) {}
TEvePathMark(EType_e type, const TEveVector& v, const TEveVector& p, Float_t time=0) :
fType(type), fV(v), fP(p), fE(), fTime(time) {}
TEvePathMark(EType_e type, const TEveVector& v, const TEveVector& p, const TEveVector& e, Float_t time=0) :
fType(type), fV(v), fP(p), fE(e), fTime(time) {}
virtual ~TEvePathMark() {}
const char* TypeName();
ClassDef(TEvePathMark, 1);
};
class TEveMCTrack : public TParticle
{
public:
Int_t fLabel;
Int_t fIndex;
Int_t fEvaLabel;
Bool_t fDecayed;
Float_t fTDecay;
TEveVector fVDecay;
TEveVector fPDecay;
TEveMCTrack() : fLabel(-1), fIndex(-1), fEvaLabel(-1),
fDecayed(kFALSE), fTDecay(0), fVDecay(), fPDecay() {}
virtual ~TEveMCTrack() {}
TEveMCTrack& operator=(const TParticle& p)
{ *((TParticle*)this) = p; return *this; }
void ResetPdgCode() { fPdgCode = 0; }
ClassDef(TEveMCTrack, 1);
};
class TEveHit : public TObject
{
public:
UShort_t fDetId;
UShort_t fSubdetId;
Int_t fLabel;
Int_t fEvaLabel;
TEveVector fV;
TEveHit() : fDetId(0), fSubdetId(0), fLabel(0), fEvaLabel(0), fV() {}
virtual ~TEveHit() {}
ClassDef(TEveHit, 1);
};
class TEveCluster : public TObject
{
public:
UShort_t fDetId;
UShort_t fSubdetId;
Int_t fLabel[3];
TEveVector fV;
TEveCluster() : fDetId(0), fSubdetId(0), fV() { fLabel[0] = fLabel[1] = fLabel[2] = 0; }
virtual ~TEveCluster() {}
ClassDef(TEveCluster, 1);
};
class TEveRecTrack : public TObject
{
public:
Int_t fLabel;
Int_t fIndex;
Int_t fStatus;
Int_t fSign;
TEveVector fV;
TEveVector fP;
Float_t fBeta;
TEveRecTrack() : fLabel(-1), fIndex(-1), fStatus(0), fSign(0), fV(), fP(), fBeta(0) {}
virtual ~TEveRecTrack() {}
Float_t Pt() { return fP.Perp(); }
ClassDef(TEveRecTrack, 1);
};
class TEveRecKink : public TEveRecTrack
{
public:
Int_t fLabelSec;
TEveVector fVEnd;
TEveVector fVKink;
TEveVector fPSec;
TEveRecKink() : TEveRecTrack(), fLabelSec(0), fVEnd(), fVKink(), fPSec() {}
virtual ~TEveRecKink() {}
ClassDef(TEveRecKink, 1);
};
class TEveRecV0 : public TObject
{
public:
Int_t fStatus;
TEveVector fVNeg;
TEveVector fPNeg;
TEveVector fVPos;
TEveVector fPPos;
TEveVector fVCa;
TEveVector fV0Birth;
Int_t fLabel;
Int_t fPdg;
Int_t fDLabel[2];
TEveRecV0() : fStatus(), fVNeg(), fPNeg(), fVPos(), fPPos(),
fVCa(), fV0Birth(), fLabel(0), fPdg(0)
{ fDLabel[0] = fDLabel[1] = 0; }
virtual ~TEveRecV0() {}
ClassDef(TEveRecV0, 1);
};
class TEveRecCascade : public TObject
{
public:
Int_t fStatus;
TEveVector fVBac;
TEveVector fPBac;
TEveVector fCascadeVCa;
TEveVector fCascadeBirth;
Int_t fLabel;
Int_t fPdg;
Int_t fDLabel;
TEveRecCascade() : fStatus(), fVBac(), fPBac(),
fCascadeVCa(), fCascadeBirth(),
fLabel(0), fPdg(0), fDLabel(0) {}
virtual ~TEveRecCascade() {}
ClassDef(TEveRecCascade, 1);
};
class TEveMCRecCrossRef : public TObject
{
public:
Bool_t fIsRec;
Bool_t fHasV0;
Bool_t fHasKink;
Int_t fLabel;
Int_t fNHits;
Int_t fNClus;
TEveMCRecCrossRef() : fIsRec(false), fHasV0(false), fHasKink(false),
fLabel(0), fNHits(0), fNClus(0) {}
virtual ~TEveMCRecCrossRef() {}
ClassDef(TEveMCRecCrossRef, 1);
};
#endif
Last change: Mon Oct 20 13:14:49 2008
Last generated: 2008-10-20 13:14
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.