00001
00002
00003
00004
00005 #ifndef FROOT_TFndHit
00006 #define FROOT_TFndHit
00007
00009
00010
00011
00012
00013
00015
00016 #include <Riostream.h>
00017 #include "TObject.h"
00018 #include "TFndDB.h"
00019 #include "TFndGeometry.h"
00020
00021 #include "FROOT.h"
00022 using namespace FROOT;
00023
00024 class TFndHit : public TObject {
00025
00026 protected:
00027 Int_t fChannel;
00028 Double_t fPosLRS[3];
00029 Double_t fPosMRS[3];
00030
00031 public:
00032 enum E_FndHit_BothChan_Flag { E_HIT_NO_CH=0, E_HIT_E_CH=1,E_HIT_P_CH=2,E_HIT_BOTH_CH=3 };
00033 TString GetBothFlagStr(E_FndHit_BothChan_Flag flag){
00034 switch(flag){
00035 case E_HIT_NO_CH : return "no-hit";
00036 case E_HIT_E_CH : return "e-side";
00037 case E_HIT_P_CH : return "p-side";
00038 case E_HIT_BOTH_CH : return "both";
00039 default: TerminateFroot(0,"BUG: wrong call for TFndHit::GetBothFlagStr");
00040 }
00041 }
00042
00043
00044 TFndHit(const Int_t &channel = -1);
00045 ~TFndHit();
00046
00047 void SetChannel(const Int_t &channel) { fChannel = channel; }
00048 Int_t GetChannel() { return fChannel; }
00049
00050 void SetLocalPosition(Double_t x,Double_t y,Double_t z) { fPosLRS[0] = x; fPosLRS[1] = y; fPosLRS[2] = z; }
00051 void GetLocalPosition(Double_t &x,Double_t &y,Double_t &z) { x = fPosLRS[0]; y = fPosLRS[1]; z = fPosLRS[2]; }
00052 Double_t GetLocal_X() { return fPosLRS[0]; }
00053 Double_t GetLocal_Y() { return fPosLRS[1]; }
00054 Double_t GetLocal_Z() { return fPosLRS[2]; }
00055
00056
00057 void GetMasterPosition(Double_t &x,Double_t &y,Double_t &z) { x = fPosMRS[0]; y = fPosMRS[1]; z = fPosMRS[2]; }
00058 Double_t GetMain_X() { return fPosMRS[0]; }
00059 Double_t GetMain_Y() { return fPosMRS[1]; }
00060 Double_t GetMain_Z() { return fPosMRS[2]; }
00061
00062 virtual void PrintHit(Int_t depth=0) = 0;
00063 virtual void PrintPosition(Int_t mode=0);
00064
00065 ClassDef(TFndHit,1)
00066 };
00067
00068 #endif // FROOT_TFndHit
00069