Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 
30 namespace Muon
31 {
32 
33  class CscStripPrepDataContainerCnv_p1;
34 
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,
72  float timeOfFirstSample,
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,
80  float timeOfFirstSample,
81  unsigned short samplingRate);
82 
84  virtual ~CscStripPrepData();
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 
102  const std::vector<float>& sampleCharges() const;
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:
128  const MuonGM::CscReadoutElement* m_detEl;
129  std::vector<float> m_sampleCharges;
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>(
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 
Muon::CscStripPrepData::prdType
virtual Trk::PrepRawDataType prdType() const override final
Interface method checking the type.
Definition: CscStripPrepData.h:94
Muon::CscStripPrepData::samplingTime
unsigned short samplingTime() const
return the sampling time in ns: the time between samplings
Definition: CscStripPrepData.h:172
Muon::CscStripPrepData::set_samplingPhase
void set_samplingPhase()
set the sampling phase
Definition: CscStripPrepData.h:182
MuonGM
Ensure that the Athena extensions are properly loaded.
Definition: GeoMuonHits.h:27
Trk::PrepRawDataType
PrepRawDataType
Definition: PrepRawData.h:39
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:27
Muon::CscStripPrepDataContainerCnv_p1
Definition: CscStripPrepDataContainerCnv_p1.h:26
CxxUtils::CachedUniquePtr
CachedUniquePtrT< const T > CachedUniquePtr
Definition: CachedUniquePtr.h:114
CscStripPrepDataContainerCnv
Create derived converter to customize the saving of identifiable container.
Definition: CscStripPrepDataContainerCnv.h:25
Surface.h
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
Muon::CscStripPrepData::operator=
CscStripPrepData & operator=(const CscStripPrepData &)
Definition: CscStripPrepData.cxx:93
MuonGM::CscReadoutElement
Definition: CscReadoutElement.h:56
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:560
Muon
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
Definition: TrackSystemController.h:45
Muon::CscStripPrepData::dump
virtual MsgStream & dump(MsgStream &stream) const override final
dump information about the PRD
Definition: CscStripPrepData.cxx:109
Muon::CscStripPrepData::detectorElement
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...
Definition: CscStripPrepData.h:152
MuonGM::MuonClusterReadoutElement::surface
virtual const Trk::PlaneSurface & surface() const override
access to chamber surface (phi orientation), uses the first gas gap
Definition: MuonClusterReadoutElement.h:123
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
Muon::CscStripPrepData::collectionHash
virtual const IdentifierHash collectionHash() const final
returns the IdentifierHash corresponding to the channel.
Definition: CscStripPrepData.h:157
PrepRawData.h
Muon::CscStripPrepData::m_collectionHash
IdentifierHash m_collectionHash
The IdenifierHash of the collection used to store this PRD.
Definition: CscStripPrepData.h:125
Trk::PrepRawDataType::CscPrepData
@ CscPrepData
Muon::CscStripPrepData::m_timeOfFirstSample
float m_timeOfFirstSample
Definition: CscStripPrepData.h:130
Muon::CscStripPrepData
Class representing the raw data of one CSC strip (for clusters look at Muon::CscPrepData).
Definition: CscStripPrepData.h:40
Muon::CscStripPrepData::samplingPhase
bool samplingPhase() const
return the sampling phase
Definition: CscStripPrepData.h:177
vector
Definition: MultiHisto.h:13
CxxUtils
Definition: aligned_vector.h:29
CachedUniquePtr.h
Cached unique_ptr with atomic update.
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
CscReadoutElement.h
Muon::CscStripPrepData::CscStripPrepData
CscStripPrepData()
Definition: CscStripPrepData.cxx:69
columnar::final
CM final
Definition: ColumnAccessor.h:106
Muon::CscStripPrepData::m_sampleCharges
std::vector< float > m_sampleCharges
Definition: CscStripPrepData.h:129
Trk::PrepRawData
Definition: PrepRawData.h:62
Trk::PrepRawData::identify
Identifier identify() const
return the identifier
Trk
Ensure that the ATLAS eigen extensions are properly loaded.
Definition: FakeTrackBuilder.h:9
Amg
Definition of ATLAS Math & Geometry primitives (Amg)
Definition: AmgStringHelpers.h:19
private
#define private
Definition: DetDescrConditionsDict_dict_fixes.cxx:13
IdentifierHash.h
Trk::PrepRawData::localPosition
const Amg::Vector2D & localPosition() const
return the local position reference
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
Muon::CscStripPrepData::globalPosition
const Amg::Vector3D & globalPosition() const
return global position reference
Definition: CscStripPrepData.h:140
Muon::CscStripPrepData::m_samplingPhase
bool m_samplingPhase
Definition: CscStripPrepData.h:132
IdentifierHash
This is a "hash" representation of an Identifier. This encodes a 32 bit index which can be used to lo...
Definition: IdentifierHash.h:25
Muon::CscStripPrepData::m_samplingTime
unsigned short m_samplingTime
Definition: CscStripPrepData.h:131
Muon::CscStripPrepData::~CscStripPrepData
virtual ~CscStripPrepData()
Destructor:
Muon::CscStripPrepData::m_detEl
const MuonGM::CscReadoutElement * m_detEl
Definition: CscStripPrepData.h:128
Trk::Surface::localToGlobal
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.
Muon::CscStripPrepData::timeOfFirstSample
double timeOfFirstSample() const
return the time of the first sample
Definition: CscStripPrepData.h:167
Muon::CscStripPrepData::sampleCharges
const std::vector< float > & sampleCharges() const
Return the time samples.
Definition: CscStripPrepData.h:162
Trk::PrepRawDataUndefinedVariable
class thrown in the event of an variable not being defined.
Definition: PrepRawData.h:59
Identifier
Definition: IdentifierFieldParser.cxx:14