ATLAS Offline Software
Loading...
Searching...
No Matches
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
12namespace 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
60std::ostream& operator<<(std::ostream& stream, const MuonCalib::MuonCalibPattern& pat) { return pat.dump(stream); }
std::ostream & operator<<(std::ostream &stream, const MuonCalib::MuonCalibPattern &pat)
Class to store the information belonging to a global pattern in the muon system.
MuonCalibPattern()=default
Default constructor.
std::shared_ptr< MuonCalibSegment > MuonCalibSegPtr
typedef for a set of (pointers to) MuonCalibSegments
double r0() const
retrieve the r0 (track)parameter of the pattern
std::vector< MuonCalibSegPtr > MuonSegmentVec
typedef for the iterator of the set of MuonCalibSegments
double phi() const
retrieve the phi (track)parameter of the pattern
double invP() const
retrieve the invP (track)parameter of the pattern
double z0() const
retrieve the z0 (track)parameter of the pattern
unsigned int nmdtHits() const
< retrieve number of MDT hits. Counting convention: 1000*eta hits + phi hits. Note that MDTs only mea...
const MuonSegmentVec & muonSegs() const
retrieve the whole set of MuonCalibSegments: reference to the segment vector
std::ostream & dump(std::ostream &os) const
void copy(const MuonCalibPattern &other)
MuonCalibPattern & operator=(const MuonCalibPattern &pat)
assignment operator.
unsigned int muonSegments() const
retrieve number of segments
void addMuonSegment(MuonCalibSegPtr seg)
double theta() const
retrieve the theta (track)parameter of the pattern
unsigned int ncscHits() const
double chi2() const
retrieve chi2 of the pattern
unsigned int ntgcHits() const
retrieve number of CSC hits.
unsigned int nrpcHits() const
retrieve number of TGC hits.
MuonSegmentVec m_muonSegments
set of MuonCalibSegments assigned to this MuonCalibPattern
A MuonCalibSegment is a reconstructed three dimensional track segment in the MuonSpectrometer.
CscCalcPed - algorithm that finds the Cathode Strip Chamber pedestals from an RDO.