CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
virtual ~PhiBorderFinder()
const std::vector< double > & phiBorders() const
std::vector< double > thePhiBorders
PhiBorderFinder(const std::vector< const Det * > &utheDets)
bool isPhiPeriodic() const
Returns true if the Dets are periodic in phi.
Definition: DetRod.h:13
geomsort::ExtractPhi< Det, float > DetPhi
unsigned int nBins()
double positiveRange(double phi) const
std::vector< double > thePhiBins
bool isPhiOverlapping() const
Returns true if any 2 of the Det overlap in phi.
constexpr double twoPi()
Definition: Pi.h:32
int binIndex(int i) const
const std::vector< double > & phiBins() const
The centers of the Dets.
unsigned int theNbins