ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
LArCalorimeter
LArSimEvent
LArSimEvent
LArHit.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
/* author : Johann Collot */
6
/* date of creation : 07/01/2001 */
7
/* date of last modification : 13/09/2002 CLID removed */
8
9
// 03-Dec-2003 Bill Seligman: Substantially revised. This class no
10
// longer inherits from any base class.
11
12
// 09-Dec-2006 RD Schaffer: moved energy to double for accumulation
13
// precision - float in persistent version
14
15
#ifndef LArSimEvent_LArHit_h
16
#define LArSimEvent_LArHit_h
17
18
#include "Identifier/Identifier.h"
19
#include "
AthenaKernel/Units.h
"
20
21
class
LArHit
22
24
25
{
26
public
:
27
34
LArHit
(
Identifier
l_cell,
double
l_energy,
double
l_time);
35
39
LArHit
();
40
42
~LArHit
();
43
45
Identifier
cellID
()
const
;
46
48
double
energy
()
const
;
49
53
double
time
()
const
;
54
56
bool
Less
(
LArHit
*
const
&
h
)
const
;
57
59
bool
Equals
(
LArHit
*
const
&
h
)
const
;
60
63
void
Add
(
LArHit
*
const
&
h
);
64
67
void
finalize
();
68
69
70
private
:
71
73
Identifier
m_ID
;
74
76
double
m_energy
;
77
79
double
m_time
;
80
81
};
82
83
85
inline
86
LArHit::LArHit
(
Identifier
l_cell,
double
l_energy,
double
l_time)
87
:
88
m_ID
(l_cell),
89
m_energy
(l_energy),
90
m_time
( (l_time*l_energy) )
91
{}
92
93
94
inline
95
LArHit::LArHit
()
96
:
97
m_ID
(
Identifier
()),
98
m_energy
(0.),
99
m_time
(0.)
100
{}
101
102
inline
103
LArHit::~LArHit
()
104
{ }
105
106
inline
107
Identifier
108
LArHit::cellID
()
const
109
{
return
m_ID
; }
110
111
inline
112
double
113
LArHit::energy
()
const
114
{
return
(
double
)
m_energy
; }
115
116
inline
117
double
118
LArHit::time
()
const
119
{
return
m_time
; }
120
121
inline
122
bool
123
LArHit::Less
(
LArHit
*
const
&
h
)
const
124
{
return
m_ID
<
h
->m_ID; }
125
126
inline
127
bool
128
LArHit::Equals
(
LArHit
*
const
&
h
)
const
129
{
return
m_ID
==
h
->m_ID; }
130
131
inline
132
void
133
LArHit::Add
(
LArHit
*
const
&
h
)
134
{
135
m_energy
+=
h
->m_energy;
136
m_time
+=
h
->m_time;
137
}
138
139
// The method to be called at the end of event by SD
140
// For backwards compatibility
141
inline
142
void
143
LArHit::finalize
()
144
{
145
m_time
=
m_energy
==0 ? 0. : (double)(
m_time
/
m_energy
)/Athena::Units::ns;
146
m_energy
=
m_energy
/Athena::Units::MeV;
147
}
148
149
#endif
// LArSimEvent_LArHit_h
150
Units.h
Wrapper to avoid constant divisions when using units.
h
Header file for AthHistogramAlgorithm.
LArHit::m_time
double m_time
time (in ns)
Definition
LArHit.h:79
LArHit::Add
void Add(LArHit *const &h)
Add another hit ot this hit.
Definition
LArHit.h:133
LArHit::energy
double energy() const
Definition
LArHit.h:113
LArHit::Equals
bool Equals(LArHit *const &h) const
Operator Equals this.
Definition
LArHit.h:128
LArHit::~LArHit
~LArHit()
Destructor.
Definition
LArHit.h:103
LArHit::LArHit
LArHit(Identifier l_cell, double l_energy, double l_time)
LArHit Constructor.
Definition
LArHit.h:86
LArHit::m_ID
Identifier m_ID
identifier of the cell in which this hit occured.
Definition
LArHit.h:73
LArHit::Less
bool Less(LArHit *const &h) const
Operator Less than this for hit ordering.
Definition
LArHit.h:123
LArHit::LArHit
LArHit()
Default constructor for persistency.
Definition
LArHit.h:95
LArHit::cellID
Identifier cellID() const
Definition
LArHit.h:108
LArHit::finalize
void finalize()
The method to be called at the end of event by SD.
Definition
LArHit.h:143
LArHit::m_energy
double m_energy
energy (in MeV) deposited in this hit
Definition
LArHit.h:76
LArHit::time
double time() const
Definition
LArHit.h:118
Identifier
Definition
IdentifierFieldParser.cxx:14
Generated on
for ATLAS Offline Software by
1.17.0