00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00014 #ifndef DIGIPHOTON_H
00015 #define DIGIPHOTON_H
00016 #include "TObject.h"
00017 #include "TRef.h"
00018 #ifndef PLEXSTRIPENDID_H
00019 # include "Plex/PlexStripEndId.h"
00020 #endif
00021 #ifndef MUNITS_H
00022 # include "Conventions/Munits.h"
00023 #endif
00024
00025 #include "TVector3.h"
00026 #include "TMath.h"
00027
00028 class DigiScintHit;
00029
00030 class DigiPhoton : public TObject
00031 {
00032 public:
00033 DigiPhoton();
00034 DigiPhoton( const DigiScintHit* hit,
00035 double wavelength, double t,
00036 double x, double y, double z,
00037 double u, double v, double w);
00038
00039 DigiPhoton(const DigiScintHit* hit,
00040 double wavelength, double t,
00041 const TVector3& pos,
00042 const TVector3& dir );
00043
00044
00045 const DigiScintHit* ParentHit() const { return fHit; };
00046
00047 Double_t WaveLength() const { return fWavelength; };
00048 Double_t E() const;
00049 Double_t T() const { return fT; }
00050
00051 const TVector3& GetPos() const { return fPos; };
00052 Double_t X() const { return fPos.X(); }
00053 Double_t Y() const { return fPos.Y(); }
00054 Double_t Z() const { return fPos.Z(); }
00055
00056 const TVector3& GetDir() const { return fDir; };
00057 Double_t GetCosX() const { return fDir.X(); };
00058 Double_t GetCosY() const { return fDir.Y(); };
00059 Double_t GetCosZ() const { return fDir.Z(); };
00060 Double_t U() const { return fDir.X(); };
00061 Double_t V() const { return fDir.Y(); };
00062 Double_t W() const { return fDir.Z(); };
00063 Double_t DxDz() const { return fDir.Z()>0?(fDir.X()/fDir.Z()):999.;}
00064 Double_t DyDz() const { return fDir.Z()>0?(fDir.Y()/fDir.Z()):999.;}
00065
00066
00067 void SetParentHit( const DigiScintHit* hit ) { fHit = hit; };
00068 void SetWavelength( double l ) { fWavelength = l; };
00069 void SetTime( double t ) { fT = t; };
00070 void SetPosition(const TVector3& in) { fPos = in; };
00071 void SetPosition(Double_t x, Double_t y, Double_t z) { fPos.SetXYZ(x,y,z); };
00072 void SetDirection(const TVector3& in) { fDir = in; fDir.SetMag(1.0); };
00073 void SetDirection(Double_t u, Double_t v, Double_t w) { fDir.SetXYZ(u,v,w); };
00074
00075 virtual void Print( Option_t* option="") const;
00076
00077 public:
00078 const DigiScintHit* fHit;
00079
00080 Double_t fWavelength;
00081 Double_t fT;
00082 TVector3 fPos;
00083 TVector3 fDir;
00084
00085 ClassDef(DigiPhoton,2)
00086 };
00087
00088
00089 inline Double_t DigiPhoton::E() const
00090 {
00091
00092
00093 return (TMath::H() * TMath::C() / fWavelength) * TMath::Qe() / Munits::eV;
00094 }
00095
00096 #endif // DIGIPHTON
00097
00098
00099
00100
00101
00102
00103
00104
00105