ATLAS Offline Software
MuonCalibPattern.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <algorithm>
8 #include <limits>
9 
11 
12 namespace MuonCalib {
13 
14  unsigned int MuonCalibPattern::muonSegments() const { return m_muonSegments.size(); }
17 
18  // track parameters
19  double MuonCalibPattern::chi2() const { return m_pars.chi2; }
20  double MuonCalibPattern::z0() const { return m_pars.z0; }
21  double MuonCalibPattern::r0() const { return m_pars.dist0; }
22  double MuonCalibPattern::invP() const { return m_pars.invP; }
23  double MuonCalibPattern::phi() const { return m_pars.phi; }
24  double MuonCalibPattern::theta() const { return m_pars.theta; }
25 
26  unsigned int MuonCalibPattern::nmdtHits() const { return m_pars.nmdt; }
27  unsigned int MuonCalibPattern::nrpcHits() const { return m_pars.nrpc; }
28  unsigned int MuonCalibPattern::ntgcHits() const { return m_pars.ntgc; }
29  unsigned int MuonCalibPattern::ncscHits() const { return m_pars.ncsc; }
30 
31  // methodes for adding segments
32  void MuonCalibPattern::addMuonSegment(MuonCalibSegPtr seg) { m_muonSegments.emplace_back(std::move(seg)); }
33 
35  std::cout << "Consider to add NSW information here " << __FILE__ << ":" << __LINE__ << std::endl;
36  }
37 
39  m_pars = other.m_pars;
41  for (const MuonCalibSegPtr& other_seg : other.muonSegs()) {
42  MuonCalibSegPtr seg{new MuonCalibSegment(*other_seg)};
43  addMuonSegment(seg);
44  }
45  }
48  if (this != &pat) { copy(pat); }
49  return *this;
50  }
51 
52  std::ostream& MuonCalibPattern::dump(std::ostream& os) const {
53  os << "MuonCalibPattern: chi2 " << chi2() << " invP " << invP() << " nsegments " << muonSegments() << std::endl
54  << " (r0,z0) = (" << r0() << "," << z0() << ") (phi,theta) = (" << phi() << "," << theta() << ")";
55  return os;
56  }
57 
58 } // namespace MuonCalib
59 
60 std::ostream& operator<<(std::ostream& stream, const MuonCalib::MuonCalibPattern& pat) { return pat.dump(stream); }
MuonCalib::MuonCalibPattern::chi2
double chi2() const
retrieve chi2 of the pattern
Definition: MuonCalibPattern.cxx:19
make_hlt_rep.pars
pars
Definition: make_hlt_rep.py:90
MuonCalibPattern.h
MuonCalib::MuonCalibPattern::operator=
MuonCalibPattern & operator=(const MuonCalibPattern &pat)
assignment operator.
Definition: MuonCalibPattern.cxx:47
MuonCalib::MuonCalibPattern::ncscHits
unsigned int ncscHits() const
Definition: MuonCalibPattern.cxx:29
MuonCalibSegment.h
MuonCalib::MuonCalibPattern::defineParams::ntgc
unsigned int ntgc
number of CSC hits.
Definition: MuonCalibPattern.h:69
MuonCalib::MuonCalibPattern::defineParams::ncsc
unsigned int ncsc
Definition: MuonCalibPattern.h:72
MuonCalib::MuonCalibPattern::defineParams::chi2
double chi2
Chi2 of the MuonCalibPattern.
Definition: MuonCalibPattern.h:56
MuonCalib::MuonCalibPattern::ntgcHits
unsigned int ntgcHits() const
retrieve number of CSC hits.
Definition: MuonCalibPattern.cxx:28
MuonCalib::MuonCalibPattern::defineParams::nmdt
unsigned int nmdt
number of RPC hits.
Definition: MuonCalibPattern.h:64
MuonCalib::MuonCalibPattern::defineParams
Definition: MuonCalibPattern.h:55
MuonCalib::MuonCalibSegment
Definition: MuonCalibSegment.h:39
MuonCalib::MuonCalibPattern::z0
double z0() const
retrieve the z0 (track)parameter of the pattern
Definition: MuonCalibPattern.cxx:20
MuonCalib::MuonCalibPattern::r0
double r0() const
retrieve the r0 (track)parameter of the pattern
Definition: MuonCalibPattern.cxx:21
MuonCalib::MuonCalibPattern::copy
void copy(const MuonCalibPattern &other)
Definition: MuonCalibPattern.cxx:38
AthenaPoolTestWrite.stream
string stream
Definition: AthenaPoolTestWrite.py:12
MuonCalib::MuonCalibPattern::muonSegments
unsigned int muonSegments() const
retrieve number of segments
Definition: MuonCalibPattern.cxx:14
MuonCalib::MuonCalibPattern::phi
double phi() const
retrieve the phi (track)parameter of the pattern
Definition: MuonCalibPattern.cxx:23
MuonCalib::MuonCalibPattern::m_muonSegments
MuonSegmentVec m_muonSegments
set of MuonCalibSegments assigned to this MuonCalibPattern
Definition: MuonCalibPattern.h:111
MuonCalib::MuonCalibPattern::defineParams::dist0
double dist0
d0 (track)parameter of the MuonCalibPattern
Definition: MuonCalibPattern.h:58
MuonCalib::MuonCalibPattern::invP
double invP() const
retrieve the invP (track)parameter of the pattern
Definition: MuonCalibPattern.cxx:22
MuonCalib::MuonCalibPattern::defineParams::nrpc
unsigned int nrpc
number of TGC hits.
Definition: MuonCalibPattern.h:66
MuonCalib
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.
Definition: CscCalcPed.cxx:22
MuonCalib::MuonCalibPattern::defineParams::z0
double z0
z0 (track)parameter of the MuonCalibPattern
Definition: MuonCalibPattern.h:57
MuonCalib::MuonCalibPattern::defineParams::theta
double theta
theta (track)parameter of the MuonCalibPattern
Definition: MuonCalibPattern.h:61
MuonCalib::MuonCalibPattern::muonSegs
const MuonSegmentVec & muonSegs() const
retrieve the whole set of MuonCalibSegments: reference to the segment vector
Definition: MuonCalibPattern.cxx:15
ReadFromCoolCompare.os
os
Definition: ReadFromCoolCompare.py:231
MuonCalib::MuonCalibPattern::defineParams::invP
double invP
invP (track)parameter of the MuonCalibPattern
Definition: MuonCalibPattern.h:59
dso-stats.pat
pat
Definition: dso-stats.py:39
MuonCalib::MuonCalibPattern::MuonCalibPattern
MuonCalibPattern()=default
Default constructor.
MuonCalib::MuonCalibPattern::addMuonSegment
void addMuonSegment(MuonCalibSegPtr seg)
Definition: MuonCalibPattern.cxx:32
MuonCalib::MuonCalibPattern::dump
std::ostream & dump(std::ostream &os) const
Definition: MuonCalibPattern.cxx:52
MuonCalib::MuonCalibPattern::MuonCalibSegPtr
std::shared_ptr< MuonCalibSegment > MuonCalibSegPtr
typedef for a set of (pointers to) MuonCalibSegments
Definition: MuonCalibPattern.h:45
operator<<
std::ostream & operator<<(std::ostream &stream, const MuonCalib::MuonCalibPattern &pat)
Definition: MuonCalibPattern.cxx:60
MuonCalib::MuonCalibPattern::nmdtHits
unsigned int nmdtHits() const
< retrieve number of MDT hits. Counting convention: 1000*eta hits + phi hits. Note that MDTs only mea...
Definition: MuonCalibPattern.cxx:26
InDetDD::other
@ other
Definition: InDetDD_Defs.h:16
MuonCalib::MuonCalibPattern
Definition: MuonCalibPattern.h:42
MuonCalib::MuonCalibPattern::MuonSegmentVec
std::vector< MuonCalibSegPtr > MuonSegmentVec
typedef for the iterator of the set of MuonCalibSegments
Definition: MuonCalibPattern.h:47
MuonCalib::MuonCalibPattern::theta
double theta() const
retrieve the theta (track)parameter of the pattern
Definition: MuonCalibPattern.cxx:24
MuonCalib::MuonCalibPattern::nrpcHits
unsigned int nrpcHits() const
retrieve number of TGC hits.
Definition: MuonCalibPattern.cxx:27
MuonCalib::MuonCalibPattern::m_pars
defineParams m_pars
Definition: MuonCalibPattern.h:114
MuonCalib::MuonCalibPattern::defineParams::phi
double phi
phi (track)parameter of the MuonCalibPattern
Definition: MuonCalibPattern.h:60