#ifndef OPDATA_TSCINHIT_H #define OPDATA_TSCINHIT_H 1 /*! \class TSCINHit TSCINHit.h "OpData/TSCINHit.h" \brief Memory description of a Target Scintillator Hit \author J.E Campagne */ #include "OpAlgo/IOData.h" #include "OpData/Particle.h" class TSCINHit; typedef OpSmartPtr TSCINHitPtr; typedef std::list TSCINHitList; typedef std::vector TSCINHitVector; class TSCINHit : public IOData { private: //! typedef to be close to ROOT definitions typedef int Int_t; typedef float Float_t; public: //!Constructor TSCINHit(): m_x(0.), m_y(0.), m_z(0.), m_sciBar(0), m_sciBox(0), m_sciWall(0), m_sciSM(0), m_eDep(0.) { m_index = nextId++; m_localParticle = ParticlePtr(0); m_primaryParticle = ParticlePtr(0); m_motherParticle = ParticlePtr(0); } //!Destructor virtual ~TSCINHit() {} //! Use the copy constructor to clone TSCINHit* clone() const {return new TSCINHit(*this);} //! @name Accessors //@{ //! Retreive index long index() const { return m_index;} long index() { return m_index;} //! Update index void setIndex(long value){ m_index = value; } static void resetId() { nextId = 0;} static void setNextId(long value) { nextId = value;} //! Update X void setX(Float_t value) { m_x = value; } //! Retreive x Float_t x() { return m_x; } Float_t x() const { return m_x; } //! Update Y void setY(const Float_t& value) { m_y = value; } //! Retreive y Float_t y() { return m_y; } Float_t y() const { return m_y; } //! Update Z void setZ(const Float_t& value) { m_z = value; } //! Retreive z Float_t z() { return m_z; } Float_t z() const { return m_z; } //! Update sciBar void setSciBar(const Int_t& value) { m_sciBar = value; } //! Retreive sciBar Int_t sciBar() { return m_sciBar; } Int_t sciBar() const { return m_sciBar; } //! Update sciBox void setSciBox(const Int_t& value) { m_sciBox = value; } //! Retreive sciBox Int_t sciBox() { return m_sciBox; } Int_t sciBox() const { return m_sciBox; } //! Update sciWall void setSciWall(const Int_t& value) { m_sciWall = value; } //! Retreive sciWall Int_t sciWall() { return m_sciWall; } Int_t sciWall() const { return m_sciWall; } //! Update sciSM void setSciSM(const Int_t& value) { m_sciSM = value; } //! Retreive sciSM Int_t sciSM() { return m_sciSM; } Int_t sciSM() const { return m_sciSM; } //! Update eDep void setEDep(const Float_t& value) { m_eDep = value; } //! Retreive eDep Float_t eDep() { return m_eDep; } Float_t eDep() const { return m_eDep; } //! Update localParticle void setLocalParticle(const ParticlePtr& value) { m_localParticle = value;} //! Retreive localParticle ParticlePtr localParticle() const { return m_localParticle;} ParticlePtr localParticle() { return m_localParticle;} //! Update primaryParticle void setPrimaryParticle(const ParticlePtr& value) { m_primaryParticle = value;} //! Retreive primaryParticle ParticlePtr primaryParticle() const { return m_primaryParticle;} ParticlePtr primaryParticle() { return m_primaryParticle;} //! Update motherParticle void setMotherParticle(const ParticlePtr& value) { m_motherParticle = value;} //! Retreive motherParticle ParticlePtr motherParticle() const { return m_motherParticle;} ParticlePtr motherParticle() { return m_motherParticle;} //@} private: /*! Counter */ static long nextId; /*! Index of the object in the list */ long m_index; //! X Float_t m_x; //! Y Float_t m_y; //! Z Float_t m_z; //! Volume identification Int_t m_sciBar; Int_t m_sciBox; Int_t m_sciWall; Int_t m_sciSM; //! deposited energy Float_t m_eDep; //!Local State of the Particle that produces the hits ParticlePtr m_localParticle; //!Primary Particle ParticlePtr m_primaryParticle; //!Mother Particle ParticlePtr m_motherParticle; }; #endif // OPDATA_TSCINHIT_H