00001 #ifndef EmcMcHit_H
00002 #define EmcMcHit_H
00003 #include <algorithm>
00004 #include "GaudiKernel/ContainedObject.h"
00005 #include "Identifier/Identifier.h"
00006 #include "GaudiKernel/ObjectVector.h"
00007 #include "EventModel/EventModel.h"
00008 #include <map>
00009
00010 using namespace EventModel;
00011 extern const CLID& CLID_EmcMcHit;
00012
00013 namespace Event {
00014
00015 class EmcMcHit : virtual public ContainedObject {
00016 public:
00017 virtual const CLID& clID() const
00018 {
00019 return EmcMcHit::classID();
00020 }
00021
00022 static const CLID& classID()
00023 {
00024 return CLID_EmcMcHit;
00025 }
00026
00027 EmcMcHit(){};
00028 EmcMcHit(const Identifier& id, unsigned int trackIndex, double xPosition,
00029 double yPosition, double zPosition, double px, double py,
00030 double pz, double depositEnergy);
00031
00032
00033
00034 Identifier identify() const;
00035
00036
00037 unsigned int getTrackIndex() const;
00038
00039
00040 int getHitEmc() const;
00041
00042
00043 int getPDGCode() const;
00044
00045
00046 double getPDGCharge() const;
00047
00048
00049 double getTime() const;
00050
00051
00052 double getPositionX() const;
00053
00054
00055 double getPositionY() const;
00056
00057
00058 double getPositionZ() const;
00059
00060
00061 double getPx() const;
00062
00063
00064 double getPy() const;
00065
00066
00067 double getPz() const;
00068
00069
00070 double getDepositEnergy() const;
00071
00072
00073 void setIdentifier(Identifier& id) {m_id = id ;}
00074 void setHitEmc(int is) { m_hitEmc=is; }
00075 void setPDGCode(int code) { m_PDGCode=code; }
00076 void setPDGCharge(double charge) { m_PDGCharge = charge; }
00077 void setTime(double time) { m_time=time; }
00078 void setTrackIndex(unsigned int trackIndex){ m_trackIndex = trackIndex;}
00079 void setPositionX(double positionX) {m_xPosition = positionX;}
00080 void setPositionY(double positionY) {m_yPosition = positionY;}
00081 void setPositionZ(double positionZ) {m_zPosition = positionZ;}
00082 void setPx(double px) {m_px = px;}
00083 void setPy(double py) {m_py = py;}
00084 void setPz(double pz) {m_pz = pz;}
00085 void setDepositEnergy(double depositEnergy) {m_depositEnergy = depositEnergy;}
00086
00087
00088 std::map<Identifier,double>::const_iterator begin() const;
00089 std::map<Identifier,double>::const_iterator end() const;
00090 std::map<Identifier,double>::const_iterator find(Identifier&) const;
00091
00092 unsigned int size() const;
00093 std::map<Identifier,double> getHitMap() const;
00094 void setHitMap(std::map<Identifier,double>& hitMap) { m_hitMap=hitMap; }
00095
00096 private:
00097 EmcMcHit(const EmcMcHit &);
00098
00099 EmcMcHit &operator=(const EmcMcHit &);
00100
00101
00102
00103 Identifier m_id;
00104
00105 unsigned int m_trackIndex;
00106
00107 int m_hitEmc;
00108
00109 int m_PDGCode;
00110
00111 double m_PDGCharge;
00112
00113 double m_time;
00114
00115 double m_xPosition;
00116
00117 double m_yPosition;
00118
00119 double m_zPosition;
00120
00121 double m_px;
00122
00123 double m_py;
00124
00125 double m_pz;
00126
00127 double m_depositEnergy;
00128
00129 std::map<Identifier,double> m_hitMap;
00130 };
00131
00132 typedef ObjectVector<EmcMcHit> EmcMcHitCol;
00133
00134 }
00135
00136 #endif