[373] | 1 | #ifndef OPDATA_TSCINHIT_H
|
---|
| 2 | #define OPDATA_TSCINHIT_H 1
|
---|
| 3 | /*!
|
---|
| 4 | \class TSCINHit TSCINHit.h
|
---|
| 5 | "OpData/TSCINHit.h"
|
---|
| 6 | \brief Memory description of a Target Scintillator Hit
|
---|
| 7 | \author J.E Campagne
|
---|
| 8 | */
|
---|
| 9 |
|
---|
| 10 |
|
---|
| 11 | #include "OpAlgo/IOData.h"
|
---|
| 12 | #include "OpData/Particle.h"
|
---|
| 13 |
|
---|
| 14 | class TSCINHit;
|
---|
| 15 | typedef OpSmartPtr<TSCINHit> TSCINHitPtr;
|
---|
| 16 | typedef std::list<TSCINHitPtr> TSCINHitList;
|
---|
| 17 | typedef std::vector<TSCINHitPtr> TSCINHitVector;
|
---|
| 18 |
|
---|
| 19 |
|
---|
| 20 | class TSCINHit : public IOData {
|
---|
| 21 |
|
---|
| 22 | private:
|
---|
| 23 | //! typedef to be close to ROOT definitions
|
---|
| 24 | typedef int Int_t;
|
---|
| 25 | typedef float Float_t;
|
---|
| 26 |
|
---|
| 27 | public:
|
---|
| 28 | //!Constructor
|
---|
| 29 | TSCINHit():
|
---|
| 30 | m_x(0.),
|
---|
| 31 | m_y(0.),
|
---|
| 32 | m_z(0.),
|
---|
| 33 | m_sciBar(0),
|
---|
| 34 | m_sciBox(0),
|
---|
| 35 | m_sciWall(0),
|
---|
| 36 | m_sciSM(0),
|
---|
| 37 | m_eDep(0.)
|
---|
| 38 | {
|
---|
| 39 | m_index = nextId++;
|
---|
| 40 | m_localParticle = ParticlePtr(0);
|
---|
| 41 | m_primaryParticle = ParticlePtr(0);
|
---|
| 42 | m_motherParticle = ParticlePtr(0);
|
---|
| 43 | }
|
---|
| 44 |
|
---|
| 45 | //!Destructor
|
---|
| 46 | virtual ~TSCINHit() {}
|
---|
| 47 | //! Use the copy constructor to clone
|
---|
| 48 | TSCINHit* clone() const {return new TSCINHit(*this);}
|
---|
| 49 |
|
---|
| 50 | //! @name Accessors
|
---|
| 51 | //@{
|
---|
| 52 | //! Retreive index
|
---|
| 53 | long index() const { return m_index;}
|
---|
| 54 | long index() { return m_index;}
|
---|
| 55 | //! Update index
|
---|
| 56 | void setIndex(long value){ m_index = value; }
|
---|
| 57 | static void resetId() { nextId = 0;}
|
---|
| 58 | static void setNextId(long value) { nextId = value;}
|
---|
| 59 |
|
---|
| 60 | //! Update X
|
---|
| 61 | void setX(Float_t value) { m_x = value; }
|
---|
| 62 | //! Retreive x
|
---|
| 63 | Float_t x() { return m_x; }
|
---|
| 64 | Float_t x() const { return m_x; }
|
---|
| 65 |
|
---|
| 66 | //! Update Y
|
---|
| 67 | void setY(const Float_t& value) { m_y = value; }
|
---|
| 68 | //! Retreive y
|
---|
| 69 | Float_t y() { return m_y; }
|
---|
| 70 | Float_t y() const { return m_y; }
|
---|
| 71 |
|
---|
| 72 | //! Update Z
|
---|
| 73 | void setZ(const Float_t& value) { m_z = value; }
|
---|
| 74 | //! Retreive z
|
---|
| 75 | Float_t z() { return m_z; }
|
---|
| 76 | Float_t z() const { return m_z; }
|
---|
| 77 |
|
---|
| 78 |
|
---|
| 79 | //! Update sciBar
|
---|
| 80 | void setSciBar(const Int_t& value) { m_sciBar = value; }
|
---|
| 81 | //! Retreive sciBar
|
---|
| 82 | Int_t sciBar() { return m_sciBar; }
|
---|
| 83 | Int_t sciBar() const { return m_sciBar; }
|
---|
| 84 |
|
---|
| 85 | //! Update sciBox
|
---|
| 86 | void setSciBox(const Int_t& value) { m_sciBox = value; }
|
---|
| 87 | //! Retreive sciBox
|
---|
| 88 | Int_t sciBox() { return m_sciBox; }
|
---|
| 89 | Int_t sciBox() const { return m_sciBox; }
|
---|
| 90 |
|
---|
| 91 | //! Update sciWall
|
---|
| 92 | void setSciWall(const Int_t& value) { m_sciWall = value; }
|
---|
| 93 | //! Retreive sciWall
|
---|
| 94 | Int_t sciWall() { return m_sciWall; }
|
---|
| 95 | Int_t sciWall() const { return m_sciWall; }
|
---|
| 96 |
|
---|
| 97 | //! Update sciSM
|
---|
| 98 | void setSciSM(const Int_t& value) { m_sciSM = value; }
|
---|
| 99 | //! Retreive sciSM
|
---|
| 100 | Int_t sciSM() { return m_sciSM; }
|
---|
| 101 | Int_t sciSM() const { return m_sciSM; }
|
---|
| 102 |
|
---|
| 103 | //! Update eDep
|
---|
| 104 | void setEDep(const Float_t& value) { m_eDep = value; }
|
---|
| 105 | //! Retreive eDep
|
---|
| 106 | Float_t eDep() { return m_eDep; }
|
---|
| 107 | Float_t eDep() const { return m_eDep; }
|
---|
| 108 |
|
---|
| 109 | //! Update localParticle
|
---|
| 110 | void setLocalParticle(const ParticlePtr& value) { m_localParticle = value;}
|
---|
| 111 | //! Retreive localParticle
|
---|
| 112 | ParticlePtr localParticle() const { return m_localParticle;}
|
---|
| 113 | ParticlePtr localParticle() { return m_localParticle;}
|
---|
| 114 |
|
---|
| 115 | //! Update primaryParticle
|
---|
| 116 | void setPrimaryParticle(const ParticlePtr& value) { m_primaryParticle = value;}
|
---|
| 117 | //! Retreive primaryParticle
|
---|
| 118 | ParticlePtr primaryParticle() const { return m_primaryParticle;}
|
---|
| 119 | ParticlePtr primaryParticle() { return m_primaryParticle;}
|
---|
| 120 |
|
---|
| 121 | //! Update motherParticle
|
---|
| 122 | void setMotherParticle(const ParticlePtr& value) { m_motherParticle = value;}
|
---|
| 123 | //! Retreive motherParticle
|
---|
| 124 | ParticlePtr motherParticle() const { return m_motherParticle;}
|
---|
| 125 | ParticlePtr motherParticle() { return m_motherParticle;}
|
---|
| 126 |
|
---|
| 127 | //@}
|
---|
| 128 |
|
---|
| 129 | private:
|
---|
| 130 | /*! Counter
|
---|
| 131 | */
|
---|
| 132 | static long nextId;
|
---|
| 133 | /*! Index of the object in the list
|
---|
| 134 | */
|
---|
| 135 | long m_index;
|
---|
| 136 |
|
---|
| 137 | //! X
|
---|
| 138 | Float_t m_x;
|
---|
| 139 | //! Y
|
---|
| 140 | Float_t m_y;
|
---|
| 141 | //! Z
|
---|
| 142 | Float_t m_z;
|
---|
| 143 |
|
---|
| 144 | //! Volume identification
|
---|
| 145 | Int_t m_sciBar;
|
---|
| 146 | Int_t m_sciBox;
|
---|
| 147 | Int_t m_sciWall;
|
---|
| 148 | Int_t m_sciSM;
|
---|
| 149 |
|
---|
| 150 | //! deposited energy
|
---|
| 151 | Float_t m_eDep;
|
---|
| 152 |
|
---|
| 153 | //!Local State of the Particle that produces the hits
|
---|
| 154 | ParticlePtr m_localParticle;
|
---|
| 155 |
|
---|
| 156 | //!Primary Particle
|
---|
| 157 | ParticlePtr m_primaryParticle;
|
---|
| 158 |
|
---|
| 159 | //!Mother Particle
|
---|
| 160 | ParticlePtr m_motherParticle;
|
---|
| 161 |
|
---|
| 162 |
|
---|
| 163 | };
|
---|
| 164 | #endif // OPDATA_TSCINHIT_H
|
---|