00001 #ifndef DST_EMCSHOWER_H 00002 #define DST_EMCSHOWER_H 00003 #include "GaudiKernel/ObjectVector.h" 00004 #include "GaudiKernel/ContainedObject.h" 00005 #include "EventModel/EventModel.h" 00006 #include "CLHEP/Geometry/Point3D.h" 00007 #include "CLHEP/Matrix/SymMatrix.h" 00008 00009 #include <vector> 00010 00011 #ifndef ENABLE_BACKWARDS_COMPATIBILITY 00012 // backwards compatibility will be enabled ONLY in CLHEP 1.9 00013 typedef HepGeom::Point3D<double> HepPoint3D; 00014 #endif 00015 using namespace CLHEP; 00016 00017 using namespace std; 00018 using namespace EventModel; 00019 extern const CLID &CLID_DstEmcShower; 00020 00021 class DstEmcShower : virtual public ContainedObject { 00022 public: 00023 DstEmcShower() {} 00024 virtual ~DstEmcShower() {} 00025 00026 virtual const CLID& clID() const { return DstEmcShower::classID();} 00027 static const CLID& classID() { return CLID_DstEmcShower; } 00028 00029 int trackId() const {return m_trackId ;} 00030 int numHits() const { return m_numHits; } 00031 int status() const { return m_status; } 00032 int cellId() const { return m_cellId; } 00033 int module() const { return m_module; } 00034 HepPoint3D position() const { return m_position; } 00035 double x() const { return m_position.x(); } 00036 double y() const { return m_position.y(); } 00037 double z() const { return m_position.z(); } 00038 double theta() const { return m_position.theta(); } 00039 double phi() const { return m_position.phi(); } 00040 double dx() const; 00041 double dy() const; 00042 double dz() const; 00043 double dtheta() const { return m_dTheta; } 00044 double dphi() const { return m_dPhi; } 00045 double energy() const { return m_energy; } 00046 double dE() const { return m_dE; } 00047 double eSeed() const { return m_eSeed; } 00048 double e3x3() const { return m_e3x3; } 00049 double e5x5() const { return m_e5x5; } 00050 double time() const { return m_time; } 00051 double secondMoment() const {return m_secondMoment;} 00052 double latMoment() const {return m_latMoment;} 00053 double a20Moment() const {return m_a20Moment;} 00054 double a42Moment() const {return m_a42Moment;} 00055 HepSymMatrix errorMatrix() const { return m_errorMatrix; } 00056 00057 void setTrackId(int trackId) {m_trackId = trackId;} 00058 void setNumHits( int hit ) { m_numHits = hit; } 00059 void setStatus(int st ) { m_status = st; } 00060 void setCellId(int id ) { m_cellId = id; } 00061 void setModule(int mod) { m_module = mod; } 00062 void setPosition(const HepPoint3D& pos) { m_position=pos; } 00063 void setEnergy(double e ) { m_energy = e ; } 00064 void setDE(double de ) { m_dE = de; } 00065 void setDtheta(double dt ) { m_dTheta = dt; } 00066 void setDphi(double dpi ) { m_dPhi = dpi ; } 00067 void setESeed(double eSeed ) { m_eSeed = eSeed ; } 00068 void setE3x3(double e3x3 ) { m_e3x3 = e3x3 ; } 00069 void setE5x5(double e5x5 ) { m_e5x5 = e5x5 ; } 00070 void setTime(double time ) { m_time = time ; } 00071 void setSecondMoment(double secondMoment) { m_secondMoment = secondMoment; } 00072 void setLatMoment(double latMoment) { m_latMoment = latMoment; } 00073 void setA20Moment(double a20Moment) { m_a20Moment = a20Moment; } 00074 void setA42Moment(double a42Moment) { m_a42Moment = a42Moment; } 00075 void setErrorMatrix(const HepSymMatrix& error) { m_errorMatrix = error; } 00076 00077 private: 00078 int m_trackId; // Track ID wensp Add 2005-10-19 00079 int m_numHits; // Total number of hits 00080 int m_status; // Status: 1:single seed cluster; 2:splitted from multi-seeds cluster 00081 int m_cellId; // Cell ID 00082 int m_module; // Module: 0:east endcap; 1:barrel; 2:west endcap 00083 HepPoint3D m_position; // Shower position 00084 double m_dTheta; 00085 double m_dPhi; 00086 double m_energy; // Shower energy after correction 00087 double m_dE; 00088 double m_eSeed; 00089 double m_e3x3; //Energy of 3x3 crystals, totally 9 ones 00090 double m_e5x5; //Energy of 5x5 crystals, totally 25 ones 00091 double m_time; //Time measurement 00092 //The following four moments describe the shower shape 00093 double m_secondMoment; //add 2006-07-03 00094 double m_latMoment; //Lateral moment 00095 double m_a20Moment; //Zernike moment 00096 double m_a42Moment; 00097 HepSymMatrix m_errorMatrix; 00098 }; 00099 00100 ostream& operator<<(ostream & os, const DstEmcShower& aShower); 00101 00102 typedef ObjectVector<DstEmcShower> DstEmcShowerCol; 00103 #endif //DST_EMCSHOWER_H 00104