ATLAS Offline Software
Loading...
Searching...
No Matches
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
8namespace 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)
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)
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
71void
76
78void 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}
83void 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
99
100
101
102MsgStream& MMPrepData::dump( MsgStream& stream) const {
103 stream << MSG::INFO<<"MMPrepData {"<<std::endl;
104 MuonCluster::dump(stream);
105 stream<<"}"<<endmsg;
106 return stream;
107}
108
109std::ostream& MMPrepData::dump( std::ostream& stream) const {
110 stream << "MMPrepData {"<<std::endl;
111 MuonCluster::dump(stream);
112 stream<<"}"<<std::endl;
113 return stream;
114}
115
116std::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
125std::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
#define endmsg
#define AmgVector(rows)
unsigned int uint
This is a "hash" representation of an Identifier.
An MMReadoutElement corresponds to a single STGC module; therefore typicaly a barrel muon station con...
std::vector< float > m_stripDriftDist
Definition MMPrepData.h:199
Author author() const
Definition MMPrepData.h:272
std::vector< float > stripDriftErrors_0_0() const
const std::vector< uint16_t > & stripNumbers() const
returns the list of strip numbers
Definition MMPrepData.h:247
const std::vector< short int > & stripTimes() const
returns the list of times
Definition MMPrepData.h:252
short int m_time
measured time
Definition MMPrepData.h:182
float angle() const
Returns the microTPC angle.
Definition MMPrepData.h:237
float driftDist() const
Returns the Drift Distance.
Definition MMPrepData.h:232
float m_angle
@angle and chisquare from micro-TPC fit
Definition MMPrepData.h:192
int m_charge
measured charge
Definition MMPrepData.h:186
virtual MsgStream & dump(MsgStream &stream) const override final
Dumps information about the PRD.
short int time() const
Returns the time (in ns)
Definition MMPrepData.h:222
std::vector< int > m_stripCharges
Definition MMPrepData.h:198
MMPrepData()=default
const std::vector< int > & stripCharges() const
returns the list of charges
Definition MMPrepData.h:257
int charge() const
Returns the AD.
Definition MMPrepData.h:227
std::vector< AmgVector(2)> m_stripDriftErrors
Definition MMPrepData.h:200
void setAuthor(Author author)
float chisqProb() const
Returns the microTPC chisq Prob.
Definition MMPrepData.h:242
void setDriftDist(std::vector< float > &&driftDist, std::vector< AmgVector(2)> &&driftDistErrors)
set drift distances and uncertainties
std::vector< float > stripDriftErrors_1_1() const
float m_driftDist
drift distance
Definition MMPrepData.h:189
std::vector< uint16_t > m_stripNumbers
@list of strip numbers, time and charge, of the strips associated to the PRD
Definition MMPrepData.h:196
std::vector< short int > m_stripTimes
Definition MMPrepData.h:197
void setMicroTPC(float angle, float chisqProb)
set microTPC parameters
const MuonGM::MMReadoutElement * m_detEl
Cached pointer to the detector element - should never be zero.
Definition MMPrepData.h:178
virtual MsgStream & dump(MsgStream &stream) const override
Dumps information about the PRD.
const std::vector< Identifier > & rdoList() const
return the List of rdo identifiers (pointers)
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic > MatrixX
Dynamic Matrix - dynamic allocation.
Eigen::Matrix< double, 2, 1 > Vector2D
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
STL namespace.