Skip to content
Snippets Groups Projects
Commit cab1d6a1 authored by Nicholas Styles's avatar Nicholas Styles Committed by Graeme Stewart
Browse files

fix for ATLITKSW-26 (SiDigitization-04-10-01)

	* Add (optional) nextInCluster to SiChargedDiode to allow navigation within strip clusters
	* ATLITKSW-26
	* Tagged as SiDigitization-04-10-01
parent 9e3fb8c1
No related branches found
No related tags found
No related merge requests found
......@@ -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:
///////////////////////////////////////////////////////////////////
......
......@@ -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)
{}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment