ATLAS Offline Software
MuonCalibPattern.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 // MuonCalibPattern.h
6 // Header file for class MuonCalibPattern
8 // (c) ATLAS Detector software
10 // nveldik@nikhef.nl
12 
13 #ifndef MUONCALIB_MUONCALIBPATTERN_H
14 #define MUONCALIB_MUONCALIBPATTERN_H
15 
16 // stl includes
17 #include <float.h>
18 
19 #include <memory>
20 #include <ostream>
21 #include <vector>
22 namespace MuonCalib {
23 
24  class MuonCalibSegment;
25 
43  public:
44  using MuonCalibSegPtr = std::shared_ptr<MuonCalibSegment>;
46  using MuonSegmentVec = std::vector<MuonCalibSegPtr>;
48 
49  public:
50  MuonCalibPattern() = default;
53  ~MuonCalibPattern() = default;
54 
55  struct defineParams {
56  double chi2{FLT_MAX};
57  double z0{FLT_MAX};
58  double dist0{FLT_MAX};
59  double invP{FLT_MAX};
60  double phi{FLT_MAX};
61  double theta{FLT_MAX};
62 
64  unsigned int nmdt{0};
66  unsigned int nrpc{0};
68 
69  unsigned int ntgc{0};
71 
72  unsigned int ncsc{0};
73  };
74 
75  MuonCalibPattern(const defineParams& pars);
76 
78  // accessors
79  /* Number of muonSegments */
80  unsigned int muonSegments() const;
81  /* access the (const) iterators*/
82  /* retrieve a reference to the MuonCalibSegments-vector*/
83  const MuonSegmentVec& muonSegs() const;
85 
86  /* access to track parameters */
87  double chi2() const;
88  double z0() const;
89  double r0() const;
90  double invP() const;
91  double phi() const;
92  double theta() const;
93 
94  /* access to number of hits */
96 
97  unsigned int nmdtHits() const;
99  unsigned int nrpcHits() const;
101  unsigned int ntgcHits() const;
103  unsigned int ncscHits() const;
104 
105  /* methods for adding segments */
106  // void addMuonSegment(MuonCalibSegment* seg); //!< Adds the MuonCalibSegment to the set MuonCalibSegments of the MuonCalibPattern.
108  std::ostream& dump(std::ostream& os) const;
109 
110  private:
112  void copy(const MuonCalibPattern& other);
113 
115  /* pattern parameters */
116  };
117 
118 } // namespace MuonCalib
119 
120 std::ostream& operator<<(std::ostream& stream, const MuonCalib::MuonCalibPattern& pat);
121 
122 #endif
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
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
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::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
operator<<
std::ostream & operator<<(std::ostream &stream, const MuonCalib::MuonCalibPattern &pat)
Definition: MuonCalibPattern.cxx:60
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::~MuonCalibPattern
~MuonCalibPattern()=default
destructor
MuonCalib::MuonCalibPattern::MuonCalibSegPtr
std::shared_ptr< MuonCalibSegment > MuonCalibSegPtr
typedef for a set of (pointers to) MuonCalibSegments
Definition: MuonCalibPattern.h:45
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