CMS 3D CMS Logo

BPHDecayToV0Builder.h
Go to the documentation of this file.
1 #ifndef HeavyFlavorAnalysis_SpecificDecay_BPHDecayToV0Builder_h
2 #define HeavyFlavorAnalysis_SpecificDecay_BPHDecayToV0Builder_h
3 
13 //----------------------
14 // Base Class Headers --
15 //----------------------
17 
18 //------------------------------------
19 // Collaborating Class Declarations --
20 //------------------------------------
24 
27 
29 
30 //---------------
31 // C++ Headers --
32 //---------------
33 #include <string>
34 #include <vector>
35 #include <map>
36 
37 // ---------------------
38 // -- Class Interface --
39 // ---------------------
40 
42 public:
44  struct V0Info {
46  const void* v0;
47  };
48 
52  const std::string& d1Name,
53  const std::string& d2Name,
54  const BPHRecoBuilder::BPHGenericCollection* d1Collection,
55  const BPHRecoBuilder::BPHGenericCollection* d2Collection);
57  const std::string& d1Name,
58  const std::string& d2Name,
59  const std::vector<reco::VertexCompositeCandidate>* v0Collection,
60  const std::string& searchList = "cfp");
62  const std::string& d1Name,
63  const std::string& d2Name,
64  const std::vector<reco::VertexCompositePtrCandidate>* vpCollection,
65  const std::string& searchList = "cfp");
66 
67  // deleted copy constructor and assignment operator
68  BPHDecayToV0Builder(const BPHDecayToV0Builder& x) = delete;
70 
73  ~BPHDecayToV0Builder() override;
74 
77  std::vector<BPHPlusMinusConstCandPtr> build();
79 
81  void setPtMin(double pt);
82  void setEtaMax(double eta);
83 
85  double getPtMin() const;
86  double getEtaMax() const;
87 
88 protected:
89  std::vector<BPHPlusMinusConstCandPtr> cList;
90 
93 
96  const std::vector<reco::VertexCompositeCandidate>* vCollection;
97  const std::vector<reco::VertexCompositePtrCandidate>* rCollection;
99 
100  double ptMin;
101  double etaMax;
102 
103  std::map<const BPHRecoCandidate*, const V0Info*> v0Map;
104 
106  virtual void buildFromBPHGenericCollection() = 0;
107  template <class T>
108  void buildFromV0(const T* v0Collection, v0Type type);
110  const reco::Candidate* c2,
111  const void* v0,
112  v0Type type) = 0;
113  void v0Clear();
114 };
115 
116 #endif
BPHDecayToV0Builder(const edm::EventSetup &es, const std::string &d1Name, const std::string &d2Name, const BPHRecoBuilder::BPHGenericCollection *d1Collection, const BPHRecoBuilder::BPHGenericCollection *d2Collection)
std::vector< BPHPlusMinusConstCandPtr > build()
build candidates
BPHDecayToV0Builder & operator=(const BPHDecayToV0Builder &x)=delete
virtual void buildFromBPHGenericCollection()=0
build candidates and link to V0
const BPHRecoBuilder::BPHGenericCollection * p2Collection
void setEtaMax(double eta)
BPHGenericPtr< BPHPlusMinusCandidate >::type BPHPlusMinusCandidatePtr
std::map< const BPHRecoCandidate *, const V0Info * > v0Map
const BPHRecoBuilder::BPHGenericCollection * p1Collection
std::vector< BPHPlusMinusConstCandPtr > cList
const std::vector< reco::VertexCompositeCandidate > * vCollection
virtual BPHPlusMinusCandidatePtr buildCandidate(const reco::Candidate *c1, const reco::Candidate *c2, const void *v0, v0Type type)=0
void buildFromV0(const T *v0Collection, v0Type type)
const std::vector< reco::VertexCompositePtrCandidate > * rCollection
void setPtMin(double pt)
set cuts
long double T
double getPtMin() const
get current cuts