CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
NuclearVertexBuilder.h
Go to the documentation of this file.
1 #ifndef NuclearVertexBuilder_h_
2 #define NuclearVertexBuilder_h_
3 
11 
13 
15 
17 
18  public :
19  NuclearVertexBuilder( const MagneticField * mag, const TransientTrackBuilder* transientTkBuilder, const edm::ParameterSet& iConfig ) :
20  theMagField(mag),
21  theTransientTrackBuilder(transientTkBuilder),
22  minDistFromPrim_( iConfig.getParameter<double>("minDistFromPrimary") ),
23  chi2Cut_(iConfig.getParameter<double>("chi2Cut")),
24  DPtovPtCut_(iConfig.getParameter<double>("DPtovPtCut")),
25  minDistFromVtx_(iConfig.getParameter<double>("minDistFromVtx")),
26  shareFrac_(iConfig.getParameter<double>("shareFrac")){}
27 
28  void build( const reco::TrackRef& primaryTrack, std::vector<reco::TrackRef>& secondaryTrack );
29  reco::Vertex getVertex() const { return the_vertex; }
30  bool isCompatible( const reco::TrackRef& secTrack ) const;
31  void addSecondaryTrack( const reco::TrackRef& secTrack );
32  ClosestApproachInRPhi* closestApproach( const reco::TrackRef& primTrack, const reco::TrackRef& secTrack ) const;
33 
34 
35  private :
37  bool FillVertexWithCrossingPoint(const reco::TrackRef& primTrack, const std::vector<reco::TrackRef>& secTracks);
38  bool FillVertexWithAdaptVtxFitter(const reco::TrackRef& primTrack, const std::vector<reco::TrackRef>& secTracks);
39  void FillVertexWithLastPrimHit(const reco::TrackRef& primTrack, const std::vector<reco::TrackRef>& secTracks);
40  bool isGoodSecondaryTrack( const reco::TrackRef& primTrack, const reco::TrackRef& secTrack ) const;
41  bool isGoodSecondaryTrack( const reco::TrackRef& secTrack,
42  const reco::TrackRef& primTrack,
43  const double& distOfClosestApp,
44  const GlobalPoint& crossPoint ) const;
45  void cleanTrackCollection( const reco::TrackRef& primTrack,
46  std::vector<reco::TrackRef>& tC) const;
47  void checkEnergy( const reco::TrackRef& primTrack,
48  std::vector<reco::TrackRef>& tC) const;
49 
51 
52 
56  double chi2Cut_;
57  double DPtovPtCut_;
59  double shareFrac_;
60 
61  class cmpTracks {
62  public:
63  bool operator () (const reco::TrackRef& a, const reco::TrackRef& b) {
64  if( a->numberOfValidHits() != b->numberOfValidHits()) return (a->numberOfValidHits()> b->numberOfValidHits());
65  else return (a->normalizedChi2()<b->normalizedChi2());
66  }
67  };
68 
69 };
70 
71 #endif
void addSecondaryTrack(const reco::TrackRef &secTrack)
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
reco::Vertex getVertex() const
NuclearVertexBuilder(const MagneticField *mag, const TransientTrackBuilder *transientTkBuilder, const edm::ParameterSet &iConfig)
void build(const reco::TrackRef &primaryTrack, std::vector< reco::TrackRef > &secondaryTrack)
bool operator()(const reco::TrackRef &a, const reco::TrackRef &b)
const TransientTrackBuilder * theTransientTrackBuilder
ClosestApproachInRPhi * closestApproach(const reco::TrackRef &primTrack, const reco::TrackRef &secTrack) const
bool isCompatible(const reco::TrackRef &secTrack) const
void checkEnergy(const reco::TrackRef &primTrack, std::vector< reco::TrackRef > &tC) const
void FillVertexWithLastPrimHit(const reco::TrackRef &primTrack, const std::vector< reco::TrackRef > &secTracks)
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
bool FillVertexWithCrossingPoint(const reco::TrackRef &primTrack, const std::vector< reco::TrackRef > &secTracks)
FreeTrajectoryState getTrajectory(const reco::TrackRef &track) const
bool isGoodSecondaryTrack(const reco::TrackRef &primTrack, const reco::TrackRef &secTrack) const
const MagneticField * theMagField
void cleanTrackCollection(const reco::TrackRef &primTrack, std::vector< reco::TrackRef > &tC) const
bool FillVertexWithAdaptVtxFitter(const reco::TrackRef &primTrack, const std::vector< reco::TrackRef > &secTracks)