ATLAS Offline Software
Loading...
Searching...
No Matches
MuonSpectrometer
MuonDigitContainer
src
CscDigit.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
7
#include "
MuonDigitContainer/CscDigit.h
"
8
#include <algorithm>
9
#include <utility>
10
12
14
15
CscDigit::CscDigit
(
const
Identifier
&
id
,
int
charge
)
16
:
MuonDigit
(id),
m_charge
(
charge
) { }
17
18
CscDigit::CscDigit
(
const
Identifier
&
id
,
int
charge
,
float
time
)
19
:
MuonDigit
(id),
m_charge
(
charge
),
m_time
(
time
) { }
20
21
CscDigit::CscDigit
(
const
Identifier
&
id
, std::vector<float>
sampleCharges
)
22
:
MuonDigit
(id),
m_sampleCharges
(
std
::move(
sampleCharges
)) {
23
24
std::vector<float, std::allocator<float> >
::iterator
pkit
25
= std::max_element(
m_sampleCharges
.begin(),
m_sampleCharges
.end() );
26
27
m_charge
= *pkit;
28
m_time
= 0.0;
// obsolete
29
30
}
31
33
bool
CscDigit::is_valid
(
const
CscIdHelper
* cscHelper)
const
{
34
return
(
m_charge
> 0 && cscHelper->
valid
(
m_muonId
));
35
}
36
CscDigit.h
iterator
CscDigit::m_sampleCharges
std::vector< float > m_sampleCharges
Definition
CscDigit.h:23
CscDigit::CscDigit
CscDigit()=default
Default constructor.
CscDigit::is_valid
bool is_valid(const CscIdHelper *cscHelper) const
Is this a valid digit.
Definition
CscDigit.cxx:33
CscDigit::charge
int charge() const
Return the charge.
Definition
CscDigit.h:42
CscDigit::m_charge
int m_charge
Definition
CscDigit.h:21
CscDigit::m_time
float m_time
Definition
CscDigit.h:22
CscDigit::sampleCharges
const std::vector< float > & sampleCharges() const
Definition
CscDigit.h:48
CscDigit::time
float time() const
return the time
Definition
CscDigit.h:46
CscIdHelper
Definition
CscIdHelper.h:52
CscIdHelper::valid
bool valid(const Identifier &id) const
Public validation of levels.
Definition
CscIdHelper.cxx:560
MuonDigit::m_muonId
Identifier m_muonId
Definition
MuonDigit.h:21
MuonDigit::MuonDigit
MuonDigit()=default
Identifier
Definition
IdentifierFieldParser.cxx:14
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.14.0