ATLAS Offline Software
Loading...
Searching...
No Matches
CscStripPrepData.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
6// CscStripPrepPdata.h
7// Header file for class CscPrepData
9// (c) ATLAS Detector software
11// Class to implement Cluster for Muon - CSC
13// Version 1.0 03/12/2007 Niels van Eldik
15
16#ifndef MUONPREPRAWDATA_CSCSTRIPPREPDATA_H
17#define MUONPREPRAWDATA_CSCSTRIPPREPDATA_H
18
19// Base classes
21#include "TrkSurfaces/Surface.h"
25
26#include<vector>
27
29
30namespace Muon
31{
32
34
38
40 {
41
43 // Public methods:
45 public:
46
47 friend class ::CscStripPrepDataContainerCnv;
49
53
54
66 CscStripPrepData(const Identifier& RDOId,
68 const Amg::Vector2D& locpos,
69 const Amg::MatrixX& locErrMat,
70 const MuonGM::CscReadoutElement* detEl,
71 const std::vector<float>& sampleCharges,
73 unsigned short samplingRate);
74 CscStripPrepData(const Identifier& RDOId,
76 const Amg::Vector2D& locpos,
77 Amg::MatrixX&& locErrMat,
78 const MuonGM::CscReadoutElement* detEl,
79 const std::vector<float>& sampleCharges,
81 unsigned short samplingRate);
82
85
87 const Amg::Vector3D& globalPosition() const;
88
91 virtual const MuonGM::CscReadoutElement* detectorElement() const override final;
92
94 virtual Trk::PrepRawDataType prdType() const override final {
96 }
97
99 virtual const IdentifierHash collectionHash() const final;
100
103
105 double timeOfFirstSample() const;
106
108 bool samplingPhase() const;
109
111 unsigned short samplingTime() const;
112
114 virtual MsgStream& dump( MsgStream& stream) const override final;
115
117 virtual std::ostream& dump( std::ostream& stream) const override final;
118
121 void set_samplingPhase () ;
122
123 private:
131 unsigned short m_samplingTime;
133 };
134
135 // /////////////////////////////////////////////////////////////////
136 // Inline methods:
137 // /////////////////////////////////////////////////////////////////
138
139 // return globalPosition:
141 {
142 if (not m_globalPosition) {
143 m_globalPosition.set(std::make_unique<const Amg::Vector3D>(
144 m_detEl->surface(identify())
146 }
147
149 return *m_globalPosition;
150 }
151
153 {
154 return m_detEl;
155 }
156
158 {
159 return m_collectionHash;
160 }
161
162 inline const std::vector<float>& CscStripPrepData::sampleCharges() const
163 {
164 return m_sampleCharges;
165 }
166
168 {
169 return m_timeOfFirstSample;
170 }
171
172 inline unsigned short CscStripPrepData::samplingTime() const
173 {
174 return m_samplingTime;
175 }
176
178 {
179 return m_samplingPhase;
180 }
181
183 {
184 m_samplingPhase = true;
185 }
186}
187
188#endif // MUONPREPRAWDATA_CSCPREPDATA_H
189
Cached unique_ptr with atomic update.
Eigen::Matrix< double, 3, 1 > Vector3D
Create derived converter to customize the saving of identifiable container.
This is a "hash" representation of an Identifier.
bool samplingPhase() const
return the sampling phase
virtual Trk::PrepRawDataType prdType() const override final
Interface method checking the type.
double timeOfFirstSample() const
return the time of the first sample
CxxUtils::CachedUniquePtr< const Amg::Vector3D > m_globalPosition
The global position is calculated 'on the fly' and is not written to disk.
const MuonGM::CscReadoutElement * m_detEl
const std::vector< float > & sampleCharges() const
Return the time samples.
void set_samplingPhase()
set the sampling phase
unsigned short m_samplingTime
virtual const MuonGM::CscReadoutElement * detectorElement() const override final
return the detector element corresponding to this PRD The pointer will be zero if the det el is not d...
virtual ~CscStripPrepData()
Destructor:
virtual const IdentifierHash collectionHash() const final
returns the IdentifierHash corresponding to the channel.
unsigned short samplingTime() const
return the sampling time in ns: the time between samplings
IdentifierHash m_collectionHash
The IdenifierHash of the collection used to store this PRD.
const Amg::Vector3D & globalPosition() const
return global position reference
std::vector< float > m_sampleCharges
CscStripPrepData & operator=(const CscStripPrepData &)
class thrown in the event of an variable not being defined.
Definition PrepRawData.h:59
const Amg::Vector2D & localPosition() const
return the local position reference
Identifier identify() const
return the identifier
virtual void localToGlobal(const Amg::Vector2D &locp, const Amg::Vector3D &mom, Amg::Vector3D &glob) const =0
Specified by each surface type: LocalToGlobal method without dynamic memory allocation.
STL class.
Definition of ATLAS Math & Geometry primitives (Amg)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 2, 1 > Vector2D
Eigen::Matrix< double, 3, 1 > Vector3D
Ensure that the Athena extensions are properly loaded.
Definition GeoMuonHits.h:27
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Ensure that the ATLAS eigen extensions are properly loaded.
-event-from-file
STL namespace.
#define private