ATLAS Offline Software
MMPrepData.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 #include "GaudiKernel/MsgStream.h"
7 
8 namespace Muon
9 {
10 
12  const IdentifierHash& idDE,
13  Amg::Vector2D&& locpos,
14  std::vector<Identifier>&& rdoList,
15  Amg::MatrixX&& locErrMat,
16  const MuonGM::MMReadoutElement* detEl,
17  const short int time,
18  const int charge,
19  const float driftDist,
20  std::vector<uint16_t>&& stripNumbers,
21  std::vector<short int>&& stripTimes,
22  std::vector<int>&& stripCharges)
23  : MuonCluster(RDOId, idDE,locpos, std::move(rdoList), std::move(locErrMat))
24  , m_detEl(detEl)
25  , m_time(time)
26  , m_charge(charge)
27  , m_driftDist(driftDist)
28  , m_stripNumbers(std::move(stripNumbers))
29  , m_stripTimes(std::move(stripTimes))
30  , m_stripCharges(std::move(stripCharges)) {}
31 
33  const IdentifierHash& idDE,
34  Amg::Vector2D&& locpos,
35  std::vector<Identifier>&& rdoList,
36  Amg::MatrixX&& locErrMat,
37  const MuonGM::MMReadoutElement* detEl,
38  const short int time,
39  const int charge)
40  : MuonCluster(RDOId, idDE, locpos, std::move(rdoList), std::move(locErrMat))
41  , m_detEl(detEl)
42  , m_time(time)
43  , m_charge(charge){}
44 
46  const IdentifierHash& idDE,
47  Amg::Vector2D&& locpos,
48  std::vector<Identifier>&& rdoList,
49  Amg::MatrixX&& locErrMat,
50  const MuonGM::MMReadoutElement* detEl,
51  const short int time,
52  const int charge,
53  const float driftDist)
54  : MuonCluster(RDOId, idDE, locpos, std::move(rdoList), std::move(locErrMat))
55  , m_detEl(detEl)
56  , m_time(time)
57  , m_charge(charge)
58  , m_driftDist(driftDist) {}
59 
61  const IdentifierHash& idDE,
62  Amg::Vector2D&& locpos,
63  std::vector<Identifier>&& rdoList,
64  Amg::MatrixX&& locErrMat,
65  const MuonGM::MMReadoutElement* detEl)
66  : MuonCluster(RDOId, idDE, locpos, std::move(rdoList), std::move(locErrMat))
67  , m_detEl(detEl) {}
68 
69 
71 void
72 MMPrepData::setMicroTPC(float angle, float chisqProb) {
73  m_angle = angle;
75 }
76 
78 void MMPrepData::setDriftDist(std::vector<float>&& driftDist,
79  std::vector<AmgVector(2)>&& driftDistErrors) {
80  m_stripDriftDist = std::move(driftDist);
81  m_stripDriftErrors = std::move(driftDistErrors);
82 }
83 void MMPrepData::setDriftDist(std::vector<float>&& driftDist,
84  std::vector<float>&& stripDriftErrors_0_0,
85  std::vector<float>&& stripDriftErrors_1_1) {
86  m_stripDriftDist = std::move(driftDist);
88  for(uint i_strip = 0; i_strip < stripDriftErrors_1_1.size(); i_strip++){
89  AmgVector(2) tmp{AmgVector(2)::Zero()};
90  tmp[0] = stripDriftErrors_0_0.at(i_strip);
91  tmp[1] = stripDriftErrors_1_1.at(i_strip);
92  m_stripDriftErrors.push_back(std::move(tmp));
93  }
94  }
95 
97  m_author = author;
98  }
99 
100 
101 
102 MsgStream& MMPrepData::dump( MsgStream& stream) const {
103  stream << MSG::INFO<<"MMPrepData {"<<std::endl;
105  stream<<"}"<<endmsg;
106  return stream;
107 }
108 
109 std::ostream& MMPrepData::dump( std::ostream& stream) const {
110  stream << "MMPrepData {"<<std::endl;
112  stream<<"}"<<std::endl;
113  return stream;
114 }
115 
116 std::vector<float> MMPrepData::stripDriftErrors_0_0 () const {
117  std::vector<float> ret;
118  ret.reserve(m_stripDriftErrors.size());
119  for (const AmgVector(2)& mat: m_stripDriftErrors) {
120  ret.push_back(mat[0]);
121  }
122  return ret;
123 }
124 
125 std::vector<float> MMPrepData::stripDriftErrors_1_1 () const {
126  std::vector<float> ret;
127  ret.reserve(m_stripDriftErrors.size());
128  for (const AmgVector(2)& mat: m_stripDriftErrors) {
129  ret.push_back(mat[1]);
130  }
131  return ret;
132 }
133 
134 
135  //end of classdef
136 }//end of ns
137 
Muon::MMPrepData::m_angle
float m_angle
@angle and chisquare from micro-TPC fit
Definition: MMPrepData.h:192
Muon::MMPrepData::MMPrepData
MMPrepData()=default
Muon::MMPrepData::driftDist
float driftDist() const
Returns the Drift Distance.
Definition: MMPrepData.h:232
Amg::MatrixX
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Definition: EventPrimitives.h:29
Amg::Vector2D
Eigen::Matrix< double, 2, 1 > Vector2D
Definition: GeoPrimitives.h:48
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:53
Muon::MMPrepData::setDriftDist
void setDriftDist(std::vector< float > &&driftDist, std::vector< AmgVector(2)> &&driftDistErrors)
set drift distances and uncertainties
Definition: MMPrepData.cxx:78
Muon
This class provides conversion from CSC RDO data to CSC Digits.
Definition: TrackSystemController.h:49
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
Muon::MMPrepData::stripDriftErrors_0_0
std::vector< float > stripDriftErrors_0_0() const
Definition: MMPrepData.cxx:116
Muon::MMPrepData::m_author
Author m_author
Definition: MMPrepData.h:201
Muon::MMPrepData::angle
float angle() const
Returns the microTPC angle.
Definition: MMPrepData.h:237
Muon::MMPrepData::m_chisqProb
float m_chisqProb
Definition: MMPrepData.h:193
Muon::MMPrepData::m_stripDriftErrors
std::vector< AmgVector(2)> m_stripDriftErrors
Definition: MMPrepData.h:200
uint
unsigned int uint
Definition: LArOFPhaseFill.cxx:20
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
ret
T ret(T t)
Definition: rootspy.cxx:260
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
angle
double angle(const GeoTrf::Vector2D &a, const GeoTrf::Vector2D &b)
Definition: TRTDetectorFactory_Full.cxx:73
AmgVector
AmgVector(4) T2BSTrackFilterTool
Definition: T2BSTrackFilterTool.cxx:114
MMPrepData.h
Muon::MMPrepData::dump
virtual MsgStream & dump(MsgStream &stream) const override final
Dumps information about the PRD.
Definition: MMPrepData.cxx:102
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
Muon::MMPrepData::m_stripDriftDist
std::vector< float > m_stripDriftDist
Definition: MMPrepData.h:199
Muon::MMPrepData::setMicroTPC
void setMicroTPC(float angle, float chisqProb)
set microTPC parameters
Definition: MMPrepData.cxx:72
Muon::MMPrepData::stripDriftErrors_1_1
std::vector< float > stripDriftErrors_1_1() const
Definition: MMPrepData.cxx:125
charge
double charge(const T &p)
Definition: AtlasPID.h:494
Muon::MMPrepData::Author
Author
Definition: MMPrepData.h:156
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
CaloCondBlobAlgs_fillNoiseFromASCII.author
string author
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:26
MuonGM::MMReadoutElement
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
Definition: MMReadoutElement.h:23
Muon::MuonCluster::dump
virtual MsgStream & dump(MsgStream &stream) const override
Dumps information about the PRD.
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/src/MuonCluster.cxx:78
Muon::MuonCluster
Class representing clusters in the muon system.
Definition: MuonSpectrometer/MuonReconstruction/MuonRecEvent/MuonPrepRawData/MuonPrepRawData/MuonCluster.h:37
Muon::MMPrepData::author
Author author() const
Definition: MMPrepData.h:272
IdentifierHash
Definition: IdentifierHash.h:38
Muon::MMPrepData::setAuthor
void setAuthor(Author author)
Definition: MMPrepData.cxx:96
Muon::MMPrepData::chisqProb
float chisqProb() const
Returns the microTPC chisq Prob.
Definition: MMPrepData.h:242