ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
MuonSpectrometer
MuonReconstruction
MuonRecEvent
MuonPrepRawData
src
CscStripPrepData.cxx
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3
*/
4
6
// CscStripPrepData.cxx
7
// Implementation file for class CscStripPrepData
9
// (c) ATLAS Detector software
11
// Version 1.0 03/29/2005 Ketevi A. Assamagan
13
14
#include <new>
15
#include <sstream>
16
#include "
MuonPrepRawData/CscStripPrepData.h
"
17
#include "GaudiKernel/MsgStream.h"
18
19
namespace
Muon
20
{
21
22
23
CscStripPrepData::CscStripPrepData
(
const
Identifier
& RDOId,
24
const
IdentifierHash
&
collectionHash
,
25
const
Amg::Vector2D
& locpos,
26
const
Amg::MatrixX
& locErrMat,
27
const
MuonGM::CscReadoutElement
* detEl,
28
const
std::vector<float>&
sampleCharges
,
29
float
timeOfFirstSample
,
30
unsigned
short
samplingTime
31
):
32
PrepRawData
(RDOId, locpos, locErrMat),
//call base class constructor
33
m_collectionHash
(
collectionHash
),
34
m_globalPosition
(),
35
m_detEl
(detEl),
36
m_sampleCharges
(
sampleCharges
),
37
m_timeOfFirstSample
(
timeOfFirstSample
),
38
m_samplingTime
(
samplingTime
),
39
m_samplingPhase
(false)
40
{
41
}
42
43
CscStripPrepData::CscStripPrepData
(
const
Identifier
& RDOId,
44
const
IdentifierHash
&
collectionHash
,
45
const
Amg::Vector2D
& locpos,
46
Amg::MatrixX
&& locErrMat,
47
const
MuonGM::CscReadoutElement
* detEl,
48
const
std::vector<float>&
sampleCharges
,
49
float
timeOfFirstSample
,
50
unsigned
short
samplingTime
51
):
52
PrepRawData
(RDOId, locpos,
std
::move(locErrMat)),
//call base class constructor
53
m_collectionHash
(
collectionHash
),
54
m_globalPosition
(),
55
m_detEl
(detEl),
56
m_sampleCharges
(
sampleCharges
),
57
m_timeOfFirstSample
(
timeOfFirstSample
),
58
m_samplingTime
(
samplingTime
),
59
m_samplingPhase
(false)
60
{
61
}
62
63
64
// Destructor:
65
CscStripPrepData::~CscStripPrepData
()
66
=
default
;
67
68
// Default constructor:
69
CscStripPrepData::CscStripPrepData
():
70
PrepRawData
(),
71
m_collectionHash
(),
72
m_globalPosition
(),
73
m_detEl
(nullptr),
74
m_sampleCharges
(),
75
m_timeOfFirstSample
(0),
76
m_samplingTime
(0),
77
m_samplingPhase
(false)
78
{ }
79
80
//copy constructor:
81
CscStripPrepData::CscStripPrepData
(
const
CscStripPrepData
& RIO):
82
PrepRawData
(RIO),
83
m_collectionHash
( RIO.
m_collectionHash
),
84
m_globalPosition
(),
85
m_detEl
( RIO.
m_detEl
),
86
m_sampleCharges
( RIO.
m_sampleCharges
),
87
m_timeOfFirstSample
( RIO.
m_timeOfFirstSample
),
88
m_samplingTime
( RIO.
m_samplingTime
),
89
m_samplingPhase
( RIO.
m_samplingPhase
)
90
{ }
91
92
//assignment operator
93
CscStripPrepData
&
CscStripPrepData::operator=
(
const
CscStripPrepData
& RIO)
94
{
95
if
(&RIO !=
this
)
96
{
97
if
(
m_globalPosition
)
m_globalPosition
.release().reset();
98
m_collectionHash
= RIO.
m_collectionHash
;
99
m_detEl
= RIO.
m_detEl
;
100
m_sampleCharges
= RIO.
m_sampleCharges
;
101
m_timeOfFirstSample
= RIO.
m_timeOfFirstSample
;
102
m_samplingTime
= RIO.
m_samplingTime
;
103
m_samplingPhase
= RIO.
m_samplingPhase
;
104
PrepRawData::operator=(RIO);
105
}
106
return
*
this
;
107
}
108
109
MsgStream&
CscStripPrepData::dump
( MsgStream& stream)
const
110
{
111
stream << MSG::INFO <<
"CscStripPrepData {"
<<
endmsg
;
112
113
std::stringstream s;
114
s << std::setiosflags(std::ios::fixed);
115
s << std::setprecision(4);
116
s <<
"Samples = "
;
117
for
(
unsigned
int
i=0;i<
m_sampleCharges
.size();++i) s <<
m_sampleCharges
[i] <<
" , "
;
118
s << std::endl;
119
s <<
"Time of first sample= "
<<this->
timeOfFirstSample
() <<
", sampling Time (ns) "
120
<< this->
samplingTime
() <<
", sampling Phase "
<< this->
samplingPhase
();
121
s <<
"} End CscStripPrepData"
<< std::endl;
122
stream << s.str();
123
124
return
stream;
125
}
126
127
std::ostream&
CscStripPrepData::dump
( std::ostream& stream)
const
128
{
129
stream <<
"CscStripPrepData {"
<<std::endl;
130
131
std::stringstream s;
132
s << std::setiosflags(std::ios::fixed);
133
s << std::setprecision(4);
134
135
s <<
"Samples = "
;
136
for
(
unsigned
int
i=0;i<
m_sampleCharges
.size();++i) s <<
m_sampleCharges
[i] <<
" , "
;
137
s << std::endl;
138
s <<
"Time of first sample= "
<<this->
timeOfFirstSample
() <<
", sampling time(ns) "
139
<< this->
samplingTime
();
140
s <<
"} End CscStripPrepData"
<< std::endl;
141
stream << s.str();
142
143
return
stream;
144
}
145
//end of classdef
146
147
}
//end of ns
endmsg
#define endmsg
Definition
AnalysisConfig_Ntuple.cxx:54
CscStripPrepData.h
IdentifierHash
This is a "hash" representation of an Identifier.
Definition
IdentifierHash.h:25
MuonGM::CscReadoutElement
Definition
CscReadoutElement.h:56
Muon::CscStripPrepData::samplingPhase
bool samplingPhase() const
return the sampling phase
Definition
CscStripPrepData.h:177
Muon::CscStripPrepData::CscStripPrepData
CscStripPrepData()
Definition
CscStripPrepData.cxx:69
Muon::CscStripPrepData::m_samplingPhase
bool m_samplingPhase
Definition
CscStripPrepData.h:132
Muon::CscStripPrepData::timeOfFirstSample
double timeOfFirstSample() const
return the time of the first sample
Definition
CscStripPrepData.h:167
Muon::CscStripPrepData::m_globalPosition
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
The global position is calculated 'on the fly' and is not written to disk.
Definition
CscStripPrepData.h:127
Muon::CscStripPrepData::m_detEl
const MuonGM::CscReadoutElement * m_detEl
Definition
CscStripPrepData.h:128
Muon::CscStripPrepData::sampleCharges
const std::vector< float > & sampleCharges() const
Return the time samples.
Definition
CscStripPrepData.h:162
Muon::CscStripPrepData::collectionHash
const IdentifierHash collectionHash() const
returns the IdentifierHash corresponding to the channel.
Definition
CscStripPrepData.h:157
Muon::CscStripPrepData::m_samplingTime
unsigned short m_samplingTime
Definition
CscStripPrepData.h:131
Muon::CscStripPrepData::~CscStripPrepData
virtual ~CscStripPrepData()
Destructor:
Muon::CscStripPrepData::m_timeOfFirstSample
float m_timeOfFirstSample
Definition
CscStripPrepData.h:130
Muon::CscStripPrepData::samplingTime
unsigned short samplingTime() const
return the sampling time in ns: the time between samplings
Definition
CscStripPrepData.h:172
Muon::CscStripPrepData::m_collectionHash
IdentifierHash m_collectionHash
The IdenifierHash of the collection used to store this PRD.
Definition
CscStripPrepData.h:125
Muon::CscStripPrepData::m_sampleCharges
std::vector< float > m_sampleCharges
Definition
CscStripPrepData.h:129
Muon::CscStripPrepData::operator=
CscStripPrepData & operator=(const CscStripPrepData &)
Definition
CscStripPrepData.cxx:93
Muon::CscStripPrepData::dump
virtual MsgStream & dump(MsgStream &stream) const override final
dump information about the PRD
Definition
CscStripPrepData.cxx:109
Trk::PrepRawData::PrepRawData
PrepRawData()
public because of DataPool
Definition
PrepRawData.cxx:68
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition
EventPrimitives.h:27
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition
GeoPrimitives.h:48
Identifier
Definition
IdentifierFieldParser.cxx:14
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition
TrackSystemController.h:46
std
STL namespace.
Generated on
for ATLAS Offline Software by
1.17.0