ATLAS Offline Software
Loading...
Searching...
No Matches
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
27class SiHelper; // used to set the flag word
28//class SiChargedDiode;
29
31
32 friend class SiHelper;
33
35 // Public methods:
37public:
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:
78private:
79
81
83 // Private data:
85private:
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
102inline int SiChargedDiode::flag() const
103{
104 return m_word;
105}
106
108{
109 return m_totalCharge;
110}
114
115inline double SiChargedDiode::charge() const
116{
117 return m_totalCharge.charge();
118}
119
124
125inline void SiChargedDiode::add(const SiTotalCharge &totcharge)
126{
127 m_totalCharge.add(totcharge);
128}
129
134
135// Input/Output stream functions:
137std::ostream &operator<<(std::ostream &out,const SiChargedDiode &chargedDiode);
138
139#endif // SIDIGITIZATION_SICHARGEDDIODE_H
std::ostream & operator<<(std::ostream &out, const SiChargedDiode &chargedDiode)
Identifier for the strip or pixel cell.
Definition SiCellId.h:29
Identifier for the strip or pixel readout cell.
const InDetDD::SiCellId & diode() const
void setNextInCluster(SiChargedDiode *nextInCluster)
SiChargedDiode(const InDetDD::SiCellId &diode, const InDetDD::SiReadoutCellId &roCell, int flagword=0, SiChargedDiode *nextInCluster=nullptr)
InDetDD::SiCellId m_diode
friend class SiHelper
InDetDD::SiReadoutCellId m_readoutCell
int flag() const
SiTotalCharge m_totalCharge
double charge() const
SiChargedDiode * m_nextInCluster
const SiTotalCharge & totalCharge() const
void add(const SiCharge &charge)
const InDetDD::SiReadoutCellId & getReadoutCell() const
SiChargedDiode * nextInCluster()