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
PhiBorderFinder::isPhiPeriodic_
bool isPhiPeriodic_
Definition: PhiBorderFinder.h:56
PhiBorderFinder::thePhiBorders
std::vector< double > thePhiBorders
Definition: PhiBorderFinder.h:58
mps_fire.i
i
Definition: mps_fire.py:428
PhiBorderFinder::DetPhi
geomsort::ExtractPhi< Det, float > DetPhi
Definition: PhiBorderFinder.h:30
MessageLogger.h
PhiBorderFinder
Definition: PhiBorderFinder.h:27
PhiBorderFinder::PhiBorderFinder
PhiBorderFinder(const std::vector< const Det * > &utheDets)
Definition: PhiBorderFinder.cc:3
PhiBorderFinder::isPhiOverlapping_
bool isPhiOverlapping_
Definition: PhiBorderFinder.h:57
PhiBorderFinder::phiBins
const std::vector< double > & phiBins() const
The centers of the Dets.
Definition: PhiBorderFinder.h:49
simple_stat.h
PhiBorderFinder::positiveRange
double positiveRange(double phi) const
Definition: PhiBorderFinder.h:61
precomputed_value_sort.h
BoundingBox.h
PhiBorderFinder::phiBorders
const std::vector< double > & phiBorders() const
Definition: PhiBorderFinder.h:46
PhiBorderFinder::isPhiPeriodic
bool isPhiPeriodic() const
Returns true if the Dets are periodic in phi.
Definition: PhiBorderFinder.h:39
DetRod
Definition: DetRod.h:13
PhiBorderFinder::thePhiBins
std::vector< double > thePhiBins
Definition: PhiBorderFinder.h:59
Geom::twoPi
constexpr double twoPi()
Definition: Pi.h:32
PhiBorderFinder::theNbins
unsigned int theNbins
Definition: PhiBorderFinder.h:55
Pi.h
createfilelist.int
int
Definition: createfilelist.py:10
PhiBorderFinder::nBins
unsigned int nBins()
Definition: PhiBorderFinder.h:36
geomsort::ExtractPhi
Definition: GeometricSorting.h:45
PhiBorderFinder::binIndex
int binIndex(int i) const
Definition: PhiBorderFinder.h:63
DDAxes::phi
GeomDet.h
DetRod.h
GeometricSorting.h
Exception.h
PhiBorderFinder::~PhiBorderFinder
virtual ~PhiBorderFinder()
Definition: PhiBorderFinder.h:34
PhiBorderFinder::isPhiOverlapping
bool isPhiOverlapping() const
Returns true if any 2 of the Det overlap in phi.
Definition: PhiBorderFinder.h:42
PhiBorderFinder::Det
DetRod Det
Definition: PhiBorderFinder.h:29