ATLAS Offline Software
Loading...
Searching...
No Matches
SiCharge.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3*/
4
6// SiCharge.h
7// Header file for class SiCharge
9// (c) ATLAS Detector software
11// Class which contains the bare charge deposited by a single process
13// Version 1.4 08/06/2001 David Calvet
15
16#ifndef SITRACKEREVENT_SICHARGE_H
17#define SITRACKEREVENT_SICHARGE_H
18
19#include <iostream>
20
21// Member classes
23
24
25class SiCharge {
26
27public:
29
31 // Public methods:
33public:
34
35 // Constructor with parameters:
36 // deposited charge
37 // time of deposition
38 // type of process which produced this charge
39 // Particle Link to the particle generating the Charge
40 SiCharge(const double& charge,const double& time,
41 const Process& processType,const HepMcParticleLink& PL);
42
43 SiCharge(const double& charge,const double& time,
44 const Process& processType);
45
46 // Destructor:
47 ~SiCharge() = default;
48
49 // Copy constructor:
50 SiCharge(const SiCharge& charge) = default;
51
52 // Assignment operator:
53 SiCharge& operator=(const SiCharge& charge) = default;
54
55 // Move constructor:
56 SiCharge(SiCharge&& charge) noexcept = default;
57
58 //Move assignment
59 SiCharge& operator=(SiCharge&& charge) noexcept = default;
60
62 // Const methods:
64
65 // deposited charge:
66 double charge() const;
67
68 // time of deposition:
69 double time() const;
70
71 // type of process which produced this charge:
72 Process processType() const;
73
74 // Barcode of the particle generating the charge:
75 int trackBarcode() const;
76
77 // Particle Link of the particle generating the charge
78 const HepMcParticleLink& particleLink() const;
79
81 // Non-const methods:
83
84 // add another charge, if the process and track are the same:
85 // returns true if the charge was added
86 bool add(const SiCharge &charge);
87
89 // Private methods:
91private:
92
94
96 // Private data:
98private:
99 double m_charge; // deposited charge
100 double m_time; // time of deposition
101 Process m_processType; // type of process which produced this charge
102 // int m_trackNumber; // track number in case of track process
103 HepMcParticleLink m_partLink; //Replace the track number with a PL
104};
105
107// Inline methods:
109inline double SiCharge::charge() const
110{
111 return m_charge;
112}
113
114inline double SiCharge::time() const
115{
116 return m_time;
117}
118
120{
121 return m_processType;
122}
123
124inline int SiCharge::trackBarcode() const
125{
126 return m_partLink.barcode();
127}
128
130{
131 return m_partLink;
132}
133
135// Input/Output stream functions:
137std::ostream &operator<<(std::ostream &out,const SiCharge &charge);
138
139#endif // SITRACKEREVENT_SICHARGE_H
double charge(const T &p)
Definition AtlasPID.h:997
std::ostream & operator<<(std::ostream &out, const SiCharge &charge)
Definition SiCharge.cxx:51
double m_time
Definition SiCharge.h:100
SiCharge & operator=(SiCharge &&charge) noexcept=default
~SiCharge()=default
Process processType() const
Definition SiCharge.h:119
SiCharge(SiCharge &&charge) noexcept=default
HepMcParticleLink m_partLink
Definition SiCharge.h:103
double time() const
Definition SiCharge.h:114
Process m_processType
Definition SiCharge.h:101
@ cut_track
Definition SiCharge.h:28
@ cellX_Talk
Definition SiCharge.h:28
@ diodeX_Talk
Definition SiCharge.h:28
@ extraNoise
Definition SiCharge.h:28
bool add(const SiCharge &charge)
Definition SiCharge.cxx:35
double m_charge
Definition SiCharge.h:99
const HepMcParticleLink & particleLink() const
Definition SiCharge.h:129
SiCharge(const double &charge, const double &time, const Process &processType, const HepMcParticleLink &PL)
Definition SiCharge.cxx:18
double charge() const
Definition SiCharge.h:109
SiCharge(const SiCharge &charge)=default
SiCharge & operator=(const SiCharge &charge)=default
int trackBarcode() const
Definition SiCharge.h:124