CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RoadSearchCircleSeed.h
Go to the documentation of this file.
1 #ifndef RoadSearchCircleSeed_h
2 #define RoadSearchCircleSeed_h
3 
4 //
5 // Package: RecoTracker/RoadSearchSeedFinder
6 // Class: RoadSearchCircleSeed
7 //
8 // Description: circle from three global points in 2D
9 // all data members restricted to 2 dimensions
10 //
11 // Original Author: Oliver Gutsche, gutsche@fnal.gov
12 // Created: Mon Jan 22 21:42:35 UTC 2007
13 //
14 // $Author: mkirn $
15 // $Date: 2007/09/07 16:28:51 $
16 // $Revision: 1.7 $
17 //
18 
19 #include <utility>
20 #include <vector>
21 #include <iosfwd>
22 
24 
26 
28 
30 {
31  public:
32 
33  // line, first parameter slope, second offset
34  typedef std::pair<double,double> line;
35 
36  enum type {
39  };
40 
42  const TrackingRecHit *hit2,
43  const TrackingRecHit *hit3,
44  GlobalPoint &point1,
45  GlobalPoint &point2,
46  GlobalPoint &point3);
48  const TrackingRecHit *hit2,
49  GlobalPoint &point1,
50  GlobalPoint &point2);
51 
53 
54  inline std::vector<GlobalPoint> Points() const { return points_; }
55  inline std::vector<GlobalPoint>::const_iterator begin_points() const { return points_.begin(); }
56  inline std::vector<GlobalPoint>::const_iterator end_points() const { return points_.end(); }
57 
58  inline std::vector<const TrackingRecHit*> Hits() const { return hits_; }
59  inline std::vector<const TrackingRecHit*>::const_iterator begin_hits() const { return hits_.begin(); }
60  inline std::vector<const TrackingRecHit*>::const_iterator end_hits() const { return hits_.end(); }
61 
62  inline GlobalPoint Center() const { return center_;}
63  inline double Radius() const { return radius_;}
64  inline double ImpactParameter() const { return impactParameter_;}
65  inline double Eta() const { return calculateEta(Theta());}
66  inline double Type() const { return type_; }
67  inline bool InBarrel() const { return inBarrel_; }
68 
69  inline void setSeed(const Roads::RoadSeed *input) { seed_ = input; }
70  inline const Roads::RoadSeed* getSeed() { return seed_; }
71 
72  inline void setSet(const Roads::RoadSet *input) { set_ = input; }
73  inline const Roads::RoadSet* getSet() { return set_; }
74 
76  double centerCut,
77  double radiusCut,
78  unsigned int differentHitsCut) const;
79 
81  double centerCut) const;
82 
84  double radiusCut) const;
85 
87  unsigned int differentHitsCut) const;
88 
89  double determinant(double array[][3], unsigned int bins);
90  bool calculateInBarrel();
92  double radius);
93  double calculateEta(double theta) const;
94  double Theta () const;
95  double Phi0 () const;
96 
97  std::string print() const;
98 
99  private:
100 
101  std::vector<GlobalPoint> points_;
102 
103  std::vector<const TrackingRecHit*> hits_;
104 
106  bool inBarrel_;
108  double radius_;
110 
113 
114 };
115 
116 //
117 // class declaration
118 //
119 
120 class LineRZ {
121  public:
122  LineRZ(GlobalPoint point1, GlobalPoint point2);
123  ~LineRZ();
124 
125  inline double Theta() const { return atan2(theR_,theZ_); }
126 
127  private:
128  double theR_;
129  double theZ_;
130 };
131 
132 //
133 // class declaration
134 //
135 
136 class LineXY {
137  public:
138  LineXY(GlobalPoint point1, GlobalPoint point2);
139  ~LineXY();
140 
141  inline double Phi() const { return atan2(theY_,theX_); }
142 
143  private:
144  double theX_;
145  double theY_;
146 };
147 
148 std::ostream& operator<<(std::ostream& ost, const RoadSearchCircleSeed & seed);
149 
150 #endif
const Roads::RoadSeed * getSeed()
bool Compare(const RoadSearchCircleSeed *circle, double centerCut, double radiusCut, unsigned int differentHitsCut) const
std::vector< GlobalPoint >::const_iterator end_points() const
double calculateEta(double theta) const
const Roads::RoadSeed * seed_
Geom::Theta< T > theta() const
void setSet(const Roads::RoadSet *input)
std::ostream & operator<<(std::ostream &out, const ALILine &li)
Definition: ALILine.cc:187
std::vector< const TrackingRecHit * > Hits() const
std::pair< double, double > line
std::vector< const TrackingRecHit * >::const_iterator begin_hits() const
void setSeed(const Roads::RoadSeed *input)
std::vector< std::vector< const Ring * > > RoadSet
Definition: Roads.h:39
GlobalPoint Center() const
double calculateImpactParameter(GlobalPoint &center, double radius)
double ImpactParameter() const
double determinant(double array[][3], unsigned int bins)
bool CompareDifferentHits(const RoadSearchCircleSeed *circle, unsigned int differentHitsCut) const
double Phi() const
std::pair< std::vector< const Ring * >, std::vector< const Ring * > > RoadSeed
Definition: Roads.h:38
double Theta() const
std::vector< const TrackingRecHit * >::const_iterator end_hits() const
std::vector< GlobalPoint > points_
bool CompareRadius(const RoadSearchCircleSeed *circle, double radiusCut) const
bool CompareCenter(const RoadSearchCircleSeed *circle, double centerCut) const
RoadSearchCircleSeed(const TrackingRecHit *hit1, const TrackingRecHit *hit2, const TrackingRecHit *hit3, GlobalPoint &point1, GlobalPoint &point2, GlobalPoint &point3)
std::vector< GlobalPoint >::const_iterator begin_points() const
const Roads::RoadSet * set_
std::vector< const TrackingRecHit * > hits_
LineRZ(GlobalPoint point1, GlobalPoint point2)
std::vector< GlobalPoint > Points() const
const Roads::RoadSet * getSet()
std::string print() const
LineXY(GlobalPoint point1, GlobalPoint point2)