ATLAS Offline Software
SiChargedDiode.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 // SiChargedDiode.h // Header file for class SiChargedDiode
8 // Class which contains the sum and the composition of all bare
9 //charges (SiTotalCharge) deposited in one SiDiode
11 // Version 2.1 09/06/2001 David Calvet
12 // Revisited 04-03-03 Davide Costanzo
13 // added a int flag as a private data member to store the noise,
14 // disconnected, bad_tot information. The relative bunch number is
15 // also stored in this word.
16 // the word will is meant to be copied as it is in the SDO
18 
19 #ifndef SIDIGITIZATION_SICHARGEDDIODE_H
20 #define SIDIGITIZATION_SICHARGEDDIODE_H
21 
22 // Data member classes
26 
27 class SiHelper; // used to set the flag word
28 //class SiChargedDiode;
29 
31 
32  friend class SiHelper;
33 
35  // Public methods:
37 public:
38 
39  // Constructor with parameters:
40  SiChargedDiode(const InDetDD::SiCellId & diode, const InDetDD::SiReadoutCellId & roCell, int flagword=0, SiChargedDiode* nextInCluster=nullptr);
41 
43  // Const methods:
45 
46  // Diode which contains this charge:
47  const InDetDD::SiCellId & diode() const;
48 
49  // Readout cell associated to diode
50  // (usually the same id as the diode except for ganged pixels):
52 
53  // total charge and its composition:
54  const SiTotalCharge & totalCharge() const;
55 
56  // total deposited charge:
57  double charge() const;
58 
59  // flag, disconnected etc.
60  int flag() const;
61 
62  //neighbouring strip for navigation
65  // Non-const methods:
67 
68  // add another charge:
69  void add(const SiCharge &charge);
70  // add a total charge
71  void add(const SiTotalCharge &totcharge);
72  //add a neighbouring strip for navigation
74 
76  // Private methods:
78 private:
79 
81 
83  // Private data:
85 private:
86  InDetDD::SiCellId m_diode; // SiDiode which contains this charge
87  // the pointed SiDiode is owned by the SiChargedDiode
88  SiTotalCharge m_totalCharge; // total charge and its composition
89  InDetDD::SiReadoutCellId m_readoutCell; //Readout cell associated to this diode
90  int m_word; // a flag for noise etc etc as in InDetSimData
91  SiChargedDiode * m_nextInCluster; //the next strip to navigate to - allows traversing clusters since the SiChargedDiodeCollection is not guaranteed to be contiguous
92 };
93 
95 // Inline methods:
98 {
99  return m_diode;
100 }
101 
102 inline int SiChargedDiode::flag() const
103 {
104  return m_word;
105 }
106 
108 {
109  return m_totalCharge;
110 }
112  return m_readoutCell;
113 }
114 
115 inline double SiChargedDiode::charge() const
116 {
117  return m_totalCharge.charge();
118 }
119 
121 {
122  return m_nextInCluster;
123 }
124 
125 inline void SiChargedDiode::add(const SiTotalCharge &totcharge)
126 {
127  m_totalCharge.add(totcharge);
128 }
129 
131 {
133 }
135 // Input/Output stream functions:
137 std::ostream &operator<<(std::ostream &out,const SiChargedDiode &chargedDiode);
138 
139 #endif // SIDIGITIZATION_SICHARGEDDIODE_H
SiChargedDiode
Definition: SiChargedDiode.h:30
SiChargedDiode::m_diode
InDetDD::SiCellId m_diode
Definition: SiChargedDiode.h:86
SiTotalCharge.h
operator<<
std::ostream & operator<<(std::ostream &out, const SiChargedDiode &chargedDiode)
Definition: SiChargedDiode.cxx:37
SiChargedDiode::m_nextInCluster
SiChargedDiode * m_nextInCluster
Definition: SiChargedDiode.h:91
SiChargedDiode::setNextInCluster
void setNextInCluster(SiChargedDiode *nextInCluster)
Definition: SiChargedDiode.h:130
SiChargedDiode::getReadoutCell
const InDetDD::SiReadoutCellId & getReadoutCell() const
Definition: SiChargedDiode.h:111
python.AthDsoLogger.out
out
Definition: AthDsoLogger.py:71
SiTotalCharge::charge
double charge() const
Definition: SiTotalCharge.h:118
SiCharge
Definition: SiCharge.h:25
SiChargedDiode::add
void add(const SiCharge &charge)
Definition: SiChargedDiode.cxx:29
SiChargedDiode::charge
double charge() const
Definition: SiChargedDiode.h:115
SiChargedDiode::m_totalCharge
SiTotalCharge m_totalCharge
Definition: SiChargedDiode.h:88
SiChargedDiode::diode
const InDetDD::SiCellId & diode() const
Definition: SiChargedDiode.h:97
SiChargedDiode::totalCharge
const SiTotalCharge & totalCharge() const
Definition: SiChargedDiode.h:107
SiReadoutCellId.h
SiHelper
Definition: SiHelper.h:28
SiTotalCharge::add
void add(const SiCharge &charge)
Definition: SiTotalCharge.cxx:62
SiChargedDiode::flag
int flag() const
Definition: SiChargedDiode.h:102
SiChargedDiode::SiChargedDiode
SiChargedDiode()
SiChargedDiode::m_readoutCell
InDetDD::SiReadoutCellId m_readoutCell
Definition: SiChargedDiode.h:89
SiChargedDiode::m_word
int m_word
Definition: SiChargedDiode.h:90
InDetDD::SiCellId
Definition: SiCellId.h:29
SiTotalCharge
Definition: SiTotalCharge.h:24
InDetDD::SiReadoutCellId
Definition: SiReadoutCellId.h:42
SiChargedDiode::nextInCluster
SiChargedDiode * nextInCluster()
Definition: SiChargedDiode.h:120
SiCellId.h