ATLAS Offline Software
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 
39  class CscStripPrepData final: public Trk::PrepRawData
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 bool type(Trk::PrepRawDataType type) const override final
95  {
97  }
98 
100  virtual const IdentifierHash collectionHash() const final;
101 
103  const std::vector<float>& sampleCharges() const;
104 
106  double timeOfFirstSample() const;
107 
109  bool samplingPhase() const;
110 
112  unsigned short samplingTime() const;
113 
115  virtual MsgStream& dump( MsgStream& stream) const override final;
116 
118  virtual std::ostream& dump( std::ostream& stream) const override final;
119 
122  void set_samplingPhase () ;
123 
124  private:
129  const MuonGM::CscReadoutElement* m_detEl;
130  std::vector<float> m_sampleCharges;
132  unsigned short m_samplingTime;
134  };
135 
136  // /////////////////////////////////////////////////////////////////
137  // Inline methods:
138  // /////////////////////////////////////////////////////////////////
139 
140  // return globalPosition:
142  {
143  if (not m_globalPosition) {
144  m_globalPosition.set(std::make_unique<const Amg::Vector3D>(
147  }
148 
150  return *m_globalPosition;
151  }
152 
154  {
155  return m_detEl;
156  }
157 
159  {
160  return m_collectionHash;
161  }
162 
163  inline const std::vector<float>& CscStripPrepData::sampleCharges() const
164  {
165  return m_sampleCharges;
166  }
167 
169  {
170  return m_timeOfFirstSample;
171  }
172 
173  inline unsigned short CscStripPrepData::samplingTime() const
174  {
175  return m_samplingTime;
176  }
177 
179  {
180  return m_samplingPhase;
181  }
182 
184  {
185  m_samplingPhase = true;
186  }
187 }
188 
189 #endif // MUONPREPRAWDATA_CSCPREPDATA_H
190 
Muon::CscStripPrepData::samplingTime
unsigned short samplingTime() const
return the sampling time in ns: the time between samplings
Definition: CscStripPrepData.h:173
Trk::PrepRawDataType::MdtPrepData
@ MdtPrepData
Muon::CscStripPrepData::set_samplingPhase
void set_samplingPhase()
set the sampling phase
Definition: CscStripPrepData.h:183
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:29
Muon::CscStripPrepDataContainerCnv_p1
Definition: CscStripPrepDataContainerCnv_p1.h:27
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
Muon::CscStripPrepData::type
virtual bool type(Trk::PrepRawDataType type) const override final
Interface method checking the type.
Definition: CscStripPrepData.h:94
MuonGM::CscReadoutElement
Definition: CscReadoutElement.h:56
const
bool const RAWDATA *ch2 const
Definition: LArRodBlockPhysicsV0.cxx:562
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
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:153
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:158
PrepRawData.h
Muon::CscStripPrepData::m_collectionHash
IdentifierHash m_collectionHash
The IdenifierHash of the collection used to store this PRD.
Definition: CscStripPrepData.h:126
Muon::CscStripPrepData::m_timeOfFirstSample
float m_timeOfFirstSample
Definition: CscStripPrepData.h:131
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:178
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
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:128
CscReadoutElement.h
Muon::CscStripPrepData::CscStripPrepData
CscStripPrepData()
Definition: CscStripPrepData.cxx:69
Muon::CscStripPrepData::m_sampleCharges
std::vector< float > m_sampleCharges
Definition: CscStripPrepData.h:130
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:141
Muon::CscStripPrepData::m_samplingPhase
bool m_samplingPhase
Definition: CscStripPrepData.h:133
IdentifierHash
Definition: IdentifierHash.h:38
Muon::CscStripPrepData::m_samplingTime
unsigned short m_samplingTime
Definition: CscStripPrepData.h:132
Muon::CscStripPrepData::~CscStripPrepData
virtual ~CscStripPrepData()
Destructor:
Muon::CscStripPrepData::m_detEl
const MuonGM::CscReadoutElement * m_detEl
Definition: CscStripPrepData.h:129
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:168
Muon::CscStripPrepData::sampleCharges
const std::vector< float > & sampleCharges() const
Return the time samples.
Definition: CscStripPrepData.h:163
Trk::PrepRawDataUndefinedVariable
class thrown in the event of an variable not being defined.
Definition: PrepRawData.h:59