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 
13 
16 
22 
23 // FIXME: remove this include
25 
26 #include <vector>
27 
29 public:
30 
31  typedef DetRod Det; //FIXME!!!
33 
34 
35  PhiBorderFinder(const std::vector<const Det*>& utheDets);
36 
37  virtual ~PhiBorderFinder(){};
38 
39  inline unsigned int nBins() {return theNbins;}
40 
42  inline bool isPhiPeriodic() const { return isPhiPeriodic_; }
43 
45  inline bool isPhiOverlapping() const { return isPhiOverlapping_; }
46 
49  inline const std::vector<double>& phiBorders() const { return thePhiBorders; }
50 
52  inline const std::vector<double>& phiBins() const { return thePhiBins; }
53 
54  // inline std::vector<double> etaBorders() {}
55  // inline std::vector<double> zBorders() {}
56 
57 private:
58  unsigned int theNbins;
61  std::vector<double> thePhiBorders;
62  std::vector<double> thePhiBins;
63 
64  inline double positiveRange (double phi) const
65  {
66  return (phi > 0) ? phi : phi + Geom::twoPi();
67  }
68 
69  int binIndex( int i) const {
70  int ind = i % (int)theNbins;
71  return (ind < 0) ? ind+theNbins : ind;
72  }
73 
74 
75 };
76 #endif
77 
geomsort::ExtractPhi< Det, float > DetPhi
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
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