// $Id: BrGeantHit.h,v 1.6 1998/07/28 21:30:59 videbaek Exp $ // // $Log: BrGeantHit.h,v $ // Revision 1.6 1998/07/28 21:30:59 videbaek // Change units to MeV // // Revision 1.5 1998/07/20 17:42:39 videbaek // Added Pid hit to hit structure. Needed for effecient handling // of detector response. // // Revision 1.4 1998/06/19 20:03:48 videbaek // Add parameteer description // // Revision 1.3 1998/06/06 21:45:10 hagel // Add ostream capabilities to some objects // // Revision 1.2 1998/04/06 21:12:08 videbaek // Clean up and additions for Win95 // // #ifndef _BRGEANTHIT_H #define _BRGEANTHIT_H /////////////////////////////////////////////////////////////////////// // // // BrGeantHit // // // // BRAHMS Hit class // // // // BrGeantHit is the GBRAHMS hit class which is a ROOT class // // equivalent to data structs in the stream files. // // programs // // // // Author : Kris Hagel // // Created : October 97 // // Version : 1.0 // // Changed : 31/12/97 fv // // // /////////////////////////////////////////////////////////////////////// #include "iostream.h" // Root Classes #include "TObject.h" // Brahms Classes struct GeantStreamHits { int trackno; int DetectorId; float LocalPositionIn[3]; float LocalPositionOut[3]; float GlobalPositionIn[3]; float GlobalPositionOut[3]; float Tof; float dedx; float Etot; int Isub; int Pid; }; class BrGeantHit : public TObject { public: BrGeantHit(); BrGeantHit(GeantStreamHits& fHits); virtual ~BrGeantHit() { }; virtual Int_t TrackNo() {return fTrackNo; } virtual Int_t DetectorID() {return fDetectorID; } virtual Float_t *LocalPosIn() {return fLocalPosIn; } virtual Float_t *LocalPosOut() {return fLocalPosOut; } virtual Float_t *GlobalPosIn() {return fGlobalPosIn; } virtual Float_t *GlobalPosOut(){return fGlobalPosOut;} virtual Float_t LocalYPosIn() {return fLocalPosIn[1];} virtual Float_t LocalXPosIn() {return fLocalPosIn[0];} virtual Float_t LocalZPosIn() {return fLocalPosIn[2];} virtual Float_t LocalYPosOut() {return fLocalPosOut[1];} virtual Float_t LocalXPosOut() {return fLocalPosOut[0];} virtual Float_t LocalZPosOut() {return fLocalPosOut[2];} virtual Float_t Tof() {return fTof; } virtual Float_t Dedx(){return fDedx;} virtual Float_t Pdet(){return fPdet;} virtual Int_t Isub(){return fIsub; } virtual Int_t Pid() {return fPid; } virtual void SetTrackNo(Int_t i ) {fTrackNo = i;} virtual void SetDetectorID(Int_t i) {fDetectorID = i; } virtual void SetLocalPosIn(Float_t x[3]) { fLocalPosIn[0] = x[0]; fLocalPosIn[1] = x[1]; fLocalPosIn[2] = x[2]; } virtual void SetLocalPosOut(Float_t x[3]) { fLocalPosOut[0] = x[0]; fLocalPosOut[1] = x[1]; fLocalPosOut[2] = x[2]; } virtual void SetGlobalPosIn(Float_t x[3]) { fGlobalPosIn[0] = x[0]; fGlobalPosIn[1] = x[1]; fGlobalPosIn[2] = x[2]; } virtual void SetGlobalPosOut(Float_t x[3]) { fGlobalPosOut[0] = x[0]; fGlobalPosOut[1] = x[1]; fGlobalPosOut[2] = x[2]; } virtual void SetTof(Float_t x) {fTof = x;} virtual void SetDedx(Float_t x){fDedx = x;} virtual void SetPdet(Float_t x){fPdet = x;} virtual void SetIsub(Int_t i) {fIsub = i;} virtual void SetPid(Int_t i) {fPid = i;} private: Int_t fTrackNo; // Trackno of generating Hit Int_t fDetectorID; // Detector number for hit Float_t fLocalPosIn[3]; // Coordinates for hit entrance (in local system) Float_t fLocalPosOut[3]; // Coordinates for hit exit (in local system) Float_t fGlobalPosIn[3]; Float_t fGlobalPosOut[3]; Float_t fTof; // Time-Of-Flight (nsec) Float_t fDedx; // Dedx (KeV) Float_t fPdet; // particle momentum at detector Int_t fIsub; // Detector number (slat, padrow, volume no etc) Int_t fPid; // Geant Particle ID code. public: friend ostream& operator<< (ostream& os,BrGeantHit* ghit); ClassDef(BrGeantHit,1) // BRAHMS hit data class }; #endif