CMS 3D CMS Logo

PhiBorderFinder.h
Go to the documentation of this file.
1 #ifndef TrackingTools_DetLayers_PhiBorderFinder_H
2 #define TrackingTools_DetLayers_PhiBorderFinder_H
3 
12 
15 
21 
22 // FIXME: remove this include
24 
25 #include <vector>
26 
28 public:
29  typedef DetRod Det; //FIXME!!!
31 
32  PhiBorderFinder(const std::vector<const Det*>& utheDets);
33 
34  virtual ~PhiBorderFinder() {}
35 
36  inline unsigned int nBins() { return theNbins; }
37 
39  inline bool isPhiPeriodic() const { return isPhiPeriodic_; }
40 
42  inline bool isPhiOverlapping() const { return isPhiOverlapping_; }
43 
46  inline const std::vector<double>& phiBorders() const { return thePhiBorders; }
47 
49  inline const std::vector<double>& phiBins() const { return thePhiBins; }
50 
51  // inline std::vector<double> etaBorders() {}
52  // inline std::vector<double> zBorders() {}
53 
54 private:
55  unsigned int theNbins;
58  std::vector<double> thePhiBorders;
59  std::vector<double> thePhiBins;
60 
61  inline double positiveRange(double phi) const { return (phi > 0) ? phi : phi + Geom::twoPi(); }
62 
63  int binIndex(int i) const {
64  int ind = i % (int)theNbins;
65  return (ind < 0) ? ind + theNbins : ind;
66  }
67 };
68 #endif
const std::vector< double > & phiBins() const
The centers of the Dets.
double positiveRange(double phi) const
virtual ~PhiBorderFinder()
std::vector< double > thePhiBorders
const std::vector< double > & phiBorders() const
Definition: DetRod.h:13
bool isPhiOverlapping() const
Returns true if any 2 of the Det overlap in phi.
geomsort::ExtractPhi< Det, float > DetPhi
int binIndex(int i) const
unsigned int nBins()
std::vector< double > thePhiBins
bool isPhiPeriodic() const
Returns true if the Dets are periodic in phi.
constexpr double twoPi()
Definition: Pi.h:32
PhiBorderFinder(const std::vector< const Det *> &utheDets)
unsigned int theNbins