CMS 3D CMS Logo

MTDEtaRange.h
Go to the documentation of this file.
1 #ifndef Navigation_MTDEtaRange_H
2 #define Navigation_MTDEtaRange_H
3 
15 class MTDEtaRange {
16 public:
17  MTDEtaRange();
18  MTDEtaRange(float max, float min);
19  MTDEtaRange(const MTDEtaRange&);
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 MTDEtaRange& range) const;
26  bool isCompatible(const MTDEtaRange& range) const;
27  MTDEtaRange add(const MTDEtaRange&) const;
28  MTDEtaRange minRange(const MTDEtaRange&) const;
29  MTDEtaRange subtract(const MTDEtaRange&) const;
30 
31 private:
32  float theMin;
33  float theMax;
34 };
35 #include <iostream>
36 inline std::ostream& operator<<(std::ostream& os, const MTDEtaRange& range) {
37  os << "(" << range.min() << " : " << range.max() << ")";
38  return os;
39 }
40 
41 #endif
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
MTDEtaRange::isInside
bool isInside(float eta, float error=0.) const
Definition: MTDEtaRange.cc:39
MTDEtaRange::MTDEtaRange
MTDEtaRange()
Definition: MTDEtaRange.cc:16
operator<<
std::ostream & operator<<(std::ostream &os, const MTDEtaRange &range)
Definition: MTDEtaRange.h:36
MTDEtaRange::theMin
float theMin
Definition: MTDEtaRange.h:32
relativeConstraints.error
error
Definition: relativeConstraints.py:53
MTDEtaRange
Definition: MTDEtaRange.h:15
MTDEtaRange::min
float min() const
Definition: MTDEtaRange.h:22
MTDEtaRange::max
float max() const
Definition: MTDEtaRange.h:23
MTDEtaRange::theMax
float theMax
Definition: MTDEtaRange.h:33
MTDEtaRange::add
MTDEtaRange add(const MTDEtaRange &) const
create maximum of ranges
Definition: MTDEtaRange.cc:57
PVValHelper::eta
Definition: PVValidationHelpers.h:69
MTDEtaRange::subtract
MTDEtaRange subtract(const MTDEtaRange &) const
create new range of size this minus range
Definition: MTDEtaRange.cc:63
MTDEtaRange::~MTDEtaRange
~MTDEtaRange()
Definition: MTDEtaRange.h:20
MTDEtaRange::operator=
MTDEtaRange & operator=(const MTDEtaRange &)
Assignment operator.
Definition: MTDEtaRange.cc:31
MTDEtaRange::minRange
MTDEtaRange minRange(const MTDEtaRange &) const
MTDEtaRange::isCompatible
bool isCompatible(const MTDEtaRange &range) const
true if this overlaps with range
Definition: MTDEtaRange.cc:51