CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GhostTrackVertexFinder.h
Go to the documentation of this file.
1 #ifndef RecoBTag_GhostTrackVertexFinder_h
2 #define RecoBTag_GhostTrackVertexFinder_h
3 
4 #include <memory>
5 #include <vector>
6 #include <set>
7 
11 
14 
16 
20 
23 
24 namespace reco {
25 
26 class GhostTrack;
27 class GhostTrackFitter;
28 
29 class GhostTrackVertexFinder { // : public VertexReconstructor
30  public:
31  enum FitType {
35  };
36 
38  GhostTrackVertexFinder(double maxFitChi2, double mergeThreshold,
39  double primcut, double seccut,
40  FitType fitType);
42 
43  std::vector<TransientVertex>
45  const GlobalVector &direction,
46  double coneRadius,
47  const std::vector<TransientTrack> &tracks) const;
48 
49  std::vector<TransientVertex>
50  vertices(const GlobalPoint &primaryPosition,
51  const GlobalError &primaryError,
52  const GlobalVector &direction,
53  double coneRadius,
54  const std::vector<TransientTrack> &tracks) const;
55 
56  std::vector<TransientVertex>
58  const GlobalVector &direction,
59  double coneRadius,
60  const reco::BeamSpot &beamSpot,
61  const std::vector<TransientTrack> &tracks) const;
62 
63  std::vector<TransientVertex>
64  vertices(const GlobalPoint &primaryPosition,
65  const GlobalError &primaryError,
66  const GlobalVector &direction,
67  double coneRadius,
68  const reco::BeamSpot &beamSpot,
69  const std::vector<TransientTrack> &tracks) const;
70 
71  std::vector<TransientVertex>
73  const GlobalVector &direction,
74  double coneRadius,
75  const reco::BeamSpot &beamSpot,
76  const std::vector<TransientTrack> &primaries,
77  const std::vector<TransientTrack> &tracks) const;
78 
79  std::vector<TransientVertex>
80  vertices(const GlobalPoint &primaryPosition,
81  const GlobalError &primaryError,
82  const GlobalVector &direction,
83  double coneRadius,
84  const reco::BeamSpot &beamSpot,
85  const std::vector<TransientTrack> &primaries,
86  const std::vector<TransientTrack> &tracks) const;
87 
88  std::vector<TransientVertex>
90  const reco::Track &ghostTrack,
91  const std::vector<TransientTrack> &tracks,
92  const std::vector<float> &weights = std::vector<float>()) const;
93 
94  std::vector<TransientVertex>
95  vertices(const reco::Vertex &primaryVertex,
96  const reco::Track &ghostTrack,
97  const reco::BeamSpot &beamSpot,
98  const std::vector<TransientTrack> &tracks,
99  const std::vector<float> &weights = std::vector<float>()) const;
100 
101  std::vector<TransientVertex>
102  vertices(const reco::Vertex &primaryVertex,
103  const reco::Track &ghostTrack,
104  const reco::BeamSpot &beamSpot,
105  const std::vector<TransientTrack> &primaries,
106  const std::vector<TransientTrack> &tracks,
107  const std::vector<float> &weights = std::vector<float>()) const;
108 
109  std::vector<TransientVertex>
110  vertices(const GlobalPoint &primaryPosition,
111  const GlobalError &primaryError,
112  const GhostTrack &ghostTrack) const;
113 
114  std::vector<TransientVertex>
115  vertices(const GlobalPoint &primaryPosition,
116  const GlobalError &primaryError,
117  const reco::BeamSpot &beamSpot,
118  const GhostTrack &ghostTrack) const;
119 
120  std::vector<TransientVertex>
121  vertices(const GlobalPoint &primaryPosition,
122  const GlobalError &primaryError,
123  const reco::BeamSpot &beamSpot,
124  const std::vector<TransientTrack> &primaries,
125  const GhostTrack &ghostTrack) const;
126 
127  std::vector<TransientVertex>
128  vertices(const reco::Vertex &primaryVertex,
129  const GhostTrack &ghostTrack) const;
130 
131  std::vector<TransientVertex>
132  vertices(const reco::Vertex &primaryVertex,
133  const reco::BeamSpot &beamSpot,
134  const GhostTrack &ghostTrack) const;
135 
136  std::vector<TransientVertex>
137  vertices(const reco::Vertex &primaryVertex,
138  const reco::BeamSpot &beamSpot,
139  const std::vector<TransientTrack> &primaries,
140  const GhostTrack &ghostTrack) const;
141 
142  std::vector<TransientVertex> vertices(
143  const GhostTrack &ghostTrack,
144  const CachingVertex<5> &primary = CachingVertex<5>(),
145  const reco::BeamSpot &beamSpot = reco::BeamSpot(),
146  bool hasBeamSpot = false, bool hasPrimaries = false) const;
147 
148  private:
149  struct FinderInfo;
150 
151  std::vector<CachingVertex<5> > initialVertices(
152  const FinderInfo &info) const;
153 
155  const CachingVertex<5> &vertex2,
156  const FinderInfo &info,
157  bool isPrimary) const;
158 
159  bool recursiveMerge(std::vector<CachingVertex<5> > &vertices,
160  const FinderInfo &info) const;
161 
162  bool reassignTracks(std::vector<CachingVertex<5> > &vertices,
163  const FinderInfo &info) const;
164 
165  void refitGhostTrack(std::vector<CachingVertex<5> > &vertices,
166  FinderInfo &info) const;
167 
169  VertexFitter<5> &vertexFitter(bool primary) const;
170 
171  static double vertexCompat(const CachingVertex<5> &vtx1,
172  const CachingVertex<5> &vtx2,
173  const FinderInfo &info,
174  double scale1 = 1.0, double scale2 = 1.0);
175 
176  double maxFitChi2_;
178  double primcut_;
179  double seccut_;
181 
182  mutable std::auto_ptr<GhostTrackFitter> ghostTrackFitter_;
183  mutable std::auto_ptr<VertexFitter<5> > primVertexFitter_;
184  mutable std::auto_ptr<VertexFitter<5> > secVertexFitter_;
185 };
186 
187 }
188 #endif // RecoBTag_GhostTrackVertexFinder_h
std::auto_ptr< VertexFitter< 5 > > primVertexFitter_
static const TGPicture * info(bool iBackgroundIsBlack)
static double vertexCompat(const CachingVertex< 5 > &vtx1, const CachingVertex< 5 > &vtx2, const FinderInfo &info, double scale1=1.0, double scale2=1.0)
bool reassignTracks(std::vector< CachingVertex< 5 > > &vertices, const FinderInfo &info) const
bool recursiveMerge(std::vector< CachingVertex< 5 > > &vertices, const FinderInfo &info) const
std::auto_ptr< VertexFitter< 5 > > secVertexFitter_
tuple primaryVertex
std::vector< TransientVertex > vertices(const reco::Vertex &primaryVertex, const GlobalVector &direction, double coneRadius, const std::vector< TransientTrack > &tracks) const
std::auto_ptr< GhostTrackFitter > ghostTrackFitter_
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalVector
vector in glovbal coordinate system
Definition: Vector3D.h:27
tuple tracks
Definition: testEve_cfg.py:39
CachingVertex< 5 > mergeVertices(const CachingVertex< 5 > &vertex1, const CachingVertex< 5 > &vertex2, const FinderInfo &info, bool isPrimary) const
std::vector< CachingVertex< 5 > > initialVertices(const FinderInfo &info) const
VertexFitter< 5 > & vertexFitter(bool primary) const
ROOT::Math::PositionVector3D< ROOT::Math::Cartesian3D< float >, ROOT::Math::GlobalCoordinateSystemTag > GlobalPoint
point in global coordinate system
Definition: Point3D.h:17
GhostTrackFitter & ghostTrackFitter() const
void refitGhostTrack(std::vector< CachingVertex< 5 > > &vertices, FinderInfo &info) const