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 }
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 
44  public:
45 
52  virtual ~BPHDecayVertex();
53 
57  virtual bool validTracks() const;
59  virtual bool validVertex() const;
60 
62  virtual const reco::Vertex& vertex() const;
63 
65  const std::vector<const reco::Track*>& tracks() const;
66 
68  const reco::Track* getTrack( const reco::Candidate* cand ) const;
69 
71  const std::vector<reco::TransientTrack>& transientTracks() const;
72 
74  reco::TransientTrack* getTransientTrack( const reco::Candidate* cand ) const;
75 
77  const std::string& getTrackSearchList( const reco::Candidate* cand ) const;
78 
79  protected:
80 
81  // constructor
82  BPHDecayVertex( const edm::EventSetup* es );
83  // pointer used to retrieve informations from other bases
84  BPHDecayVertex( const BPHDecayVertex* ptr,
85  const edm::EventSetup* es );
86 
89  virtual void addV( const std::string& name,
90  const reco::Candidate* daug,
91  const std::string& searchList,
92  double mass );
94  virtual void addV( const std::string& name,
95  const BPHRecoConstCandPtr& comp );
96 
97  // utility function used to cash reconstruction results
98  virtual void setNotUpdated() const;
99 
100  private:
101 
102  // EventSetup needed to build TransientTrack
104 
105  // map linking particles to associated track search list
106  std::map<const reco::Candidate*,std::string> searchMap;
107 
108  // reconstruction results cache
109  mutable bool oldTracks;
110  mutable bool oldVertex;
111  mutable bool validTks;
112  mutable std::vector<const reco::Track*> rTracks;
113  mutable std::vector<reco::TransientTrack> trTracks;
114  mutable std::map<const reco::Candidate*,const reco::Track*> tkMap;
115  mutable std::map<const reco::Candidate*,reco::TransientTrack*> ttMap;
117 
118  // create TransientTrack and fit vertex
119  virtual void tTracks() const;
120  virtual void fitVertex() const;
121 
122 };
123 
124 
125 #endif
126 
BPHGenericPtr< const BPHRecoCandidate >::type BPHRecoConstCandPtr
std::vector< reco::TransientTrack > trTracks
reco::Vertex fittedVertex
std::map< const reco::Candidate *, std::string > searchMap
static const TrackGhostTrackState * getTrack(const BasicGhostTrackState *basic)
std::map< const reco::Candidate *, const reco::Track * > tkMap
const edm::EventSetup * evSetup
std::map< const reco::Candidate *, reco::TransientTrack * > ttMap
fixed size matrix
HLT enums.
std::vector< const reco::Track * > rTracks