// $Id: BrGeantTrack.h,v 1.3 1998/07/20 17:42:40 videbaek Exp $ // // $Log: BrGeantTrack.h,v $ // Revision 1.3 1998/07/20 17:42:40 videbaek // Added Pid hit to hit structure. Needed for effecient handling // of detector response. // // Revision 1.2 1998/04/06 21:12:09 videbaek // Clean up and additions for Win95 // // #ifndef _BRGEANTTRACK_H #define _BRGEANTTRACK_H /////////////////////////////////////////////////////////////////////// // // // BrGeantTrack // // // // BRAHMS Geant track class // // // // BrGeantTrack is a ROOT equivalent of the track structures used// // in the c-stream files. // // // // Author : Kris Hagel from a template by G.Roland // // Created : October 97 // // Version : 1.1 // // Changed : 31/12/97 fv; Major re-write // // // /////////////////////////////////////////////////////////////////////// // Root Classes #include "TObject.h" #include "TObjArray.h" // BRAHMS Classes #include "BrGeantHit.h" struct GeantStreamTracks { int trackno; int pid; int charge; float pvert[3]; float vert[3]; int ntbeam; int subvol; int fVolu; int fReason; }; class BrGeantTrack : public TObject { public: BrGeantTrack(); BrGeantTrack(GeantStreamTracks& ffTracks); virtual ~BrGeantTrack(); virtual Double_t Vx() { return fVx;} virtual Double_t Vy() { return fVy;} virtual Double_t Vz() { return fVz;} virtual Double_t Px() { return fPx;} virtual Double_t Py() { return fPy;} virtual Double_t Pz() { return fPz;} virtual Int_t TrackNo() { return fTrackno;} virtual Double_t Energy(); virtual Double_t P(); virtual Double_t Rap(Double_t mass); virtual Double_t Beta(); virtual Double_t Theta(); virtual Double_t Dip(); virtual void SetStatus(Int_t n) { fStatus = n; } virtual void SetVx(Double_t x) { fVx = x; } virtual void SetVy(Double_t x) { fVy = x; } virtual void SetVz(Double_t x) { fVz = x; } virtual void SetMass(Double_t x) { fMass = x; } virtual void SetPid(Int_t n) { fPid = n; } virtual void AddHit(BrGeantHit *hit); virtual TObjArray *HitListp() { return fHitList; } virtual Int_t NHits(); virtual Int_t Status() { return fStatus; } virtual Double_t Mass() { return fMass; } virtual Int_t Pid() { return fPid; } virtual BrGeantHit *NextHit(); virtual void ResetHitCounter() { fHitCounter = 0; } virtual void MakeHitList(); virtual void ListHits(); private: Int_t fStatus; // track status flag Double_t fVx; // X-origin of the track Double_t fVy; // Y-origin of the track Double_t fVz; // Z-origin of the track Double_t fMass; // Particle mass Double_t fCharge; // Charge of Track Double_t fPx; // Momentum in X at vertex Double_t fPy; // Momentum in Y at vertex Double_t fPz; // Momentum in Z at vertex Int_t fPid; // Particle GEANT ID Int_t fTrackno; // Geant Track Number Int_t fNtbeam; // Parent Track number (0 if none) TObjArray *fHitList; // List of hits on the track Int_t fHitCounter; //! Counter for GetNextHit member function public: ClassDef(BrGeantTrack,1) // BRAHMS Geant track class }; #endif