diff --git a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiode.h b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiode.h index 9ad0b953e9758c70dc4f17dd913af5fdfdd557a8..00727f5eac6a126f2c134b5b9e6c56f56386ef2c 100755 --- a/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiode.h +++ b/InnerDetector/InDetDigitization/SiDigitization/SiDigitization/SiChargedDiode.h @@ -27,6 +27,7 @@ #include "InDetReadoutGeometry/SiReadoutCellId.h" class SiHelper; // used to set the flag word +//class SiChargedDiode; class SiChargedDiode { @@ -39,7 +40,7 @@ public: // Constructor with parameters: SiChargedDiode(const SiTotalCharge::alloc_t& alloc, - const InDetDD::SiCellId & diode, const InDetDD::SiReadoutCellId & roCell, int flagword=0); + const InDetDD::SiCellId & diode, const InDetDD::SiReadoutCellId & roCell, int flagword=0, SiChargedDiode* nextInCluster=NULL); /////////////////////////////////////////////////////////////////// // Const methods: @@ -60,6 +61,9 @@ public: // flag, disconnected etc. int flag() const; + + //neighbouring strip for navigation + SiChargedDiode * nextInCluster() const; /////////////////////////////////////////////////////////////////// // Non-const methods: /////////////////////////////////////////////////////////////////// @@ -68,6 +72,8 @@ public: void add(const SiCharge &charge); // add a total charge void add(const SiTotalCharge &totcharge); + //add a neighbouring strip for navigation + void setNextInCluster(SiChargedDiode* nextInCluster); /////////////////////////////////////////////////////////////////// // Private methods: @@ -85,6 +91,7 @@ private: SiTotalCharge m_totalCharge; // total charge and its composition InDetDD::SiReadoutCellId m_readoutCell; //Readout cell associated to this diode int m_word; // a flag for noise etc etc as in InDetSimData + SiChargedDiode * m_nextInCluster; //the next strip to navigate to - allows traversing clusters since the SiChargedDiodeCollection is not guaranteed to be contiguous }; /////////////////////////////////////////////////////////////////// @@ -113,6 +120,11 @@ inline double SiChargedDiode::charge() const return m_totalCharge.charge(); } +inline SiChargedDiode * SiChargedDiode::nextInCluster() const +{ + return m_nextInCluster; +} + inline void SiChargedDiode::add(const SiCharge &charge) { m_totalCharge.add(charge); @@ -123,7 +135,10 @@ inline void SiChargedDiode::add(const SiTotalCharge &totcharge) m_totalCharge.add(totcharge); } - +inline void SiChargedDiode::setNextInCluster(SiChargedDiode* nextInCluster) +{ + m_nextInCluster = nextInCluster; +} /////////////////////////////////////////////////////////////////// // Input/Output stream functions: /////////////////////////////////////////////////////////////////// diff --git a/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiode.cxx b/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiode.cxx index 7471d7c8701b7019565a1b876d908d7cf1190cba..67fa357d40f3f0b04cee8ae2f6ed00c804c95bf5 100755 --- a/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiode.cxx +++ b/InnerDetector/InDetDigitization/SiDigitization/src/SiChargedDiode.cxx @@ -17,11 +17,12 @@ // Constructor with parameters: SiChargedDiode::SiChargedDiode(const SiTotalCharge::alloc_t& alloc, - const InDetDD::SiCellId & diode, const InDetDD::SiReadoutCellId & roCell, int flagword) + const InDetDD::SiCellId & diode, const InDetDD::SiReadoutCellId & roCell, int flagword, SiChargedDiode * nextInCluster) : m_diode(diode), m_totalCharge(alloc), m_readoutCell(roCell), - m_word(flagword) + m_word(flagword), + m_nextInCluster(nextInCluster) {}