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 //------------------------------------
31 
32 //---------------
33 // C++ Headers --
34 //---------------
35 #include <vector>
36 #include <map>
37 #include <string>
38 
39 // ---------------------
40 // -- Class Interface --
41 // ---------------------
42 
43 class BPHDecayVertex : public virtual BPHDecayMomentum {
44 public:
48  // deleted copy constructor and assignment operator
49  BPHDecayVertex(const BPHDecayVertex& x) = delete;
50  BPHDecayVertex& operator=(const BPHDecayVertex& x) = delete;
51 
54  ~BPHDecayVertex() override;
55 
59  virtual bool validTracks() const;
61  virtual bool validVertex() const;
62 
64  virtual const reco::Vertex& vertex(VertexFitter<5>* fitter = nullptr,
65  const reco::BeamSpot* bs = nullptr,
66  const GlobalPoint* priorPos = nullptr,
67  const GlobalError* priorError = nullptr) const;
68 
70  const std::vector<const reco::Track*>& tracks() const;
71 
73  const reco::Track* getTrack(const reco::Candidate* cand) const;
74 
76  const std::vector<reco::TransientTrack>& transientTracks() const;
77 
80 
82  const edm::EventSetup* getEventSetup() const;
83 
86 
87 protected:
88  // constructor
90  // pointer used to retrieve informations from other bases
91  BPHDecayVertex(const BPHDecayVertex* ptr, const edm::EventSetup* es);
92 
95  virtual void addV(const std::string& name, const reco::Candidate* daug, const std::string& searchList, double mass);
97  virtual void addV(const std::string& name, const BPHRecoConstCandPtr& comp);
98 
99  // utility function used to cash reconstruction results
100  void setNotUpdated() const override;
101 
102 private:
103  // EventSetup needed to build TransientTrack
105 
106  // map linking particles to associated track search list
107  std::map<const reco::Candidate*, std::string> searchMap;
108 
109  // reconstruction results cache
110  mutable bool oldTracks;
111  mutable bool oldVertex;
112  mutable bool validTks;
113  mutable std::vector<const reco::Track*> rTracks;
114  mutable std::vector<reco::TransientTrack> trTracks;
115  mutable std::map<const reco::Candidate*, const reco::Track*> tkMap;
116  mutable std::map<const reco::Candidate*, reco::TransientTrack*> ttMap;
119  mutable reco::BeamSpot const* savedBS;
120  mutable GlobalPoint const* savedPP;
121  mutable GlobalError const* savedPE;
122 
123  // create TransientTrack and fit vertex
124  virtual void tTracks() const;
125  virtual void fitVertex(VertexFitter<5>* fitter,
126  const reco::BeamSpot* bs,
127  const GlobalPoint* priorPos,
128  const GlobalError* priorError) const;
129 };
130 
131 #endif
BPHDecayVertex::getTrackSearchList
const std::string & getTrackSearchList(const reco::Candidate *cand) const
retrieve track search list
Definition: BPHDecayVertex.cc:154
BPHDecayVertex::addV
virtual void addV(const std::string &name, const reco::Candidate *daug, const std::string &searchList, double mass)
edm
HLT enums.
Definition: AlignableModifier.h:19
BPHDecayVertex::getTrack
const reco::Track * getTrack(const reco::Candidate *cand) const
get Track for a daughter
Definition: BPHDecayVertex.cc:129
BPHDecayVertex::getTransientTrack
reco::TransientTrack * getTransientTrack(const reco::Candidate *cand) const
get TransientTrack for a daughter
Definition: BPHDecayVertex.cc:143
BPHDecayVertex::getEventSetup
const edm::EventSetup * getEventSetup() const
retrieve EventSetup
Definition: BPHDecayVertex.cc:152
VertexFitter.h
BPHDecayVertex::tTracks
virtual void tTracks() const
Definition: BPHDecayVertex.cc:182
BPHDecayMomentum.h
DDAxes::x
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
BPHDecayVertex::~BPHDecayVertex
~BPHDecayVertex() override
Definition: BPHDecayVertex.cc:86
BPHDecayVertex::validVertex
virtual bool validVertex() const
Definition: BPHDecayVertex.cc:97
AlCaHLTBitMon_QueryRunRegistry.comp
comp
Definition: AlCaHLTBitMon_QueryRunRegistry.py:249
BPHDecayVertex::BPHDecayVertex
BPHDecayVertex(const BPHDecayVertex &x)=delete
BPHDecayVertex::oldVertex
bool oldVertex
Definition: BPHDecayVertex.h:111
VertexFitter< 5 >
BPHDecayVertex::fittedVertex
reco::Vertex fittedVertex
Definition: BPHDecayVertex.h:117
BPHDecayVertex::vertex
virtual const reco::Vertex & vertex(VertexFitter< 5 > *fitter=nullptr, const reco::BeamSpot *bs=nullptr, const GlobalPoint *priorPos=nullptr, const GlobalError *priorError=nullptr) const
get reconstructed vertex
Definition: BPHDecayVertex.cc:102
cms::cuda::bs
bs
Definition: HistoContainer.h:127
BPHDecayVertex::savedPE
GlobalError const * savedPE
Definition: BPHDecayVertex.h:121
reco::BeamSpot
Definition: BeamSpot.h:21
BPHDecayVertex::tkMap
std::map< const reco::Candidate *, const reco::Track * > tkMap
Definition: BPHDecayVertex.h:115
reco::Track
Definition: Track.h:27
BPHDecayVertex::transientTracks
const std::vector< reco::TransientTrack > & transientTracks() const
get list of TransientTracks
Definition: BPHDecayVertex.cc:137
Point3DBase
Definition: Point3DBase.h:10
BPHDecayVertex::setNotUpdated
void setNotUpdated() const override
Definition: BPHDecayVertex.cc:175
BPHDecayMomentum
Definition: BPHDecayMomentum.h:35
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
Vertex.h
BPHDecayVertex::validTracks
virtual bool validTracks() const
check for valid reconstructed vertex
Definition: BPHDecayVertex.cc:91
BPHDecayVertex
Definition: BPHDecayVertex.h:43
BPHDecayVertex::oldTracks
bool oldTracks
Definition: BPHDecayVertex.h:110
BPHDecayVertex::evSetup
const edm::EventSetup * evSetup
Definition: BPHDecayVertex.h:104
cand
Definition: decayParser.h:32
BPHDecayVertex::validTks
bool validTks
Definition: BPHDecayVertex.h:112
BPHDecayVertex::trTracks
std::vector< reco::TransientTrack > trTracks
Definition: BPHDecayVertex.h:114
newFWLiteAna.searchList
searchList
Definition: newFWLiteAna.py:119
BPHDecayVertex::rTracks
std::vector< const reco::Track * > rTracks
Definition: BPHDecayVertex.h:113
GlobalErrorBase
Definition: GlobalErrorBase.h:25
edm::EventSetup
Definition: EventSetup.h:58
BPHDecayVertex::operator=
BPHDecayVertex & operator=(const BPHDecayVertex &x)=delete
BPHDecayVertex::ttMap
std::map< const reco::Candidate *, reco::TransientTrack * > ttMap
Definition: BPHDecayVertex.h:116
reco::Candidate
Definition: Candidate.h:27
HltBtagValidation_cff.Vertex
Vertex
Definition: HltBtagValidation_cff.py:32
reco::TransientTrack
Definition: TransientTrack.h:19
BPHDecayVertex::tracks
const std::vector< const reco::Track * > & tracks() const
get list of Tracks
Definition: BPHDecayVertex.cc:123
BPHDecayVertex::fitVertex
virtual void fitVertex(VertexFitter< 5 > *fitter, const reco::BeamSpot *bs, const GlobalPoint *priorPos, const GlobalError *priorError) const
Definition: BPHDecayVertex.cc:221
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
Skims_PA_cff.name
name
Definition: Skims_PA_cff.py:17
BPHDecayVertex::savedFitter
VertexFitter< 5 > * savedFitter
Definition: BPHDecayVertex.h:118
EventSetup
BPHDecayVertex::savedBS
reco::BeamSpot const * savedBS
Definition: BPHDecayVertex.h:119
BPHDecayVertex::savedPP
GlobalPoint const * savedPP
Definition: BPHDecayVertex.h:120
reco::Vertex
Definition: Vertex.h:35
BPHRecoConstCandPtr
BPHGenericPtr< const BPHRecoCandidate >::type BPHRecoConstCandPtr
Definition: BPHRecoCandidatePtr.h:9
BPHDecayVertex::searchMap
std::map< const reco::Candidate *, std::string > searchMap
Definition: BPHDecayVertex.h:107