CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MuonEtaRange.h
Go to the documentation of this file.
1 #ifndef Navigation_MuonEtaRange_H
2 #define Navigation_MuonEtaRange_H
3 
15 class MuonEtaRange {
16 public:
17  MuonEtaRange();
18  MuonEtaRange(float max, float min);
19  MuonEtaRange(const MuonEtaRange&);
22  inline float min() const { return theMin; }
23  inline float max() const { return theMax; }
24  bool isInside(float eta, float error = 0.) const;
25  bool isInside(const MuonEtaRange& range) const;
26  bool isCompatible(const MuonEtaRange& range) const;
27  MuonEtaRange add(const MuonEtaRange&) const;
28  MuonEtaRange minRange(const MuonEtaRange&) const;
29  MuonEtaRange subtract(const MuonEtaRange&) const;
30 
31 private:
32  float theMin;
33  float theMax;
34 };
35 #include <iostream>
36 inline std::ostream& operator<<(std::ostream& os, const MuonEtaRange& range) {
37  os << "(" << range.min() << " : " << range.max() << ")";
38  return os;
39 }
40 
41 #endif
MuonEtaRange minRange(const MuonEtaRange &) const
bool isCompatible(const MuonEtaRange &range) const
true if this overlaps with range
Definition: MuonEtaRange.cc:51
float min() const
Definition: MuonEtaRange.h:22
bool isInside(float eta, float error=0.) const
Definition: MuonEtaRange.cc:39
MuonEtaRange subtract(const MuonEtaRange &) const
create new range of size this minus range
Definition: MuonEtaRange.cc:63
MuonEtaRange & operator=(const MuonEtaRange &)
Assignment operator.
Definition: MuonEtaRange.cc:31
MuonEtaRange add(const MuonEtaRange &) const
create maximum of ranges
Definition: MuonEtaRange.cc:57
float max() const
Definition: MuonEtaRange.h:23
std::ostream & operator<<(std::ostream &os, const MuonEtaRange &range)
Definition: MuonEtaRange.h:36