CMS 3D CMS Logo

BPHDecayVertex.h
Go to the documentation of this file.
1 #ifndef HeavyFlavorAnalysis_RecoDecay_BPHDecayVertex_h
2 #define HeavyFlavorAnalysis_RecoDecay_BPHDecayVertex_h
3 
12 //----------------------
13 // Base Class Headers --
14 //----------------------
16 
17 namespace edm {
18  class EventSetup;
19 }
20 
21 namespace reco {
22  class TransientTrack;
23  class Vertex;
24 } // namespace reco
25 
26 //------------------------------------
27 // Collaborating Class Declarations --
28 //------------------------------------
30 
31 //---------------
32 // C++ Headers --
33 //---------------
34 #include <vector>
35 #include <map>
36 #include <string>
37 
38 // ---------------------
39 // -- Class Interface --
40 // ---------------------
41 
42 class BPHDecayVertex : public virtual BPHDecayMomentum {
43 public:
50  ~BPHDecayVertex() override;
51 
55  virtual bool validTracks() const;
57  virtual bool validVertex() const;
58 
60  virtual const reco::Vertex& vertex() const;
61 
63  const std::vector<const reco::Track*>& tracks() const;
64 
66  const reco::Track* getTrack(const reco::Candidate* cand) const;
67 
69  const std::vector<reco::TransientTrack>& transientTracks() const;
70 
72  reco::TransientTrack* getTransientTrack(const reco::Candidate* cand) const;
73 
75  const std::string& getTrackSearchList(const reco::Candidate* cand) const;
76 
77 protected:
78  // constructor
80  // pointer used to retrieve informations from other bases
81  BPHDecayVertex(const BPHDecayVertex* ptr, const edm::EventSetup* es);
82 
85  virtual void addV(const std::string& name, const reco::Candidate* daug, const std::string& searchList, double mass);
87  virtual void addV(const std::string& name, const BPHRecoConstCandPtr& comp);
88 
89  // utility function used to cash reconstruction results
90  void setNotUpdated() const override;
91 
92 private:
93  // EventSetup needed to build TransientTrack
95 
96  // map linking particles to associated track search list
97  std::map<const reco::Candidate*, std::string> searchMap;
98 
99  // reconstruction results cache
100  mutable bool oldTracks;
101  mutable bool oldVertex;
102  mutable bool validTks;
103  mutable std::vector<const reco::Track*> rTracks;
104  mutable std::vector<reco::TransientTrack> trTracks;
105  mutable std::map<const reco::Candidate*, const reco::Track*> tkMap;
106  mutable std::map<const reco::Candidate*, reco::TransientTrack*> ttMap;
108 
109  // create TransientTrack and fit vertex
110  virtual void tTracks() const;
111  virtual void fitVertex() const;
112 };
113 
114 #endif
BPHGenericPtr< const BPHRecoCandidate >::type BPHRecoConstCandPtr
std::vector< reco::TransientTrack > trTracks
std::map< const reco::Candidate *, std::string > searchMap
std::map< const reco::Candidate *, reco::TransientTrack * > ttMap
reco::Vertex fittedVertex
static const TrackGhostTrackState * getTrack(const BasicGhostTrackState *basic)
std::map< const reco::Candidate *, const reco::Track * > tkMap
const edm::EventSetup * evSetup
fixed size matrix
HLT enums.
std::vector< const reco::Track * > rTracks