CMS 3D CMS Logo

BPHBdToKxMuMuBuilder.h
Go to the documentation of this file.
1 #ifndef HeavyFlavorAnalysis_SpecificDecay_BPHBdToKxMuMuBuilder_h
2 #define HeavyFlavorAnalysis_SpecificDecay_BPHBdToKxMuMuBuilder_h
3 
12 //----------------------
13 // Base Class Headers --
14 //----------------------
17 
18 //------------------------------------
19 // Collaborating Class Declarations --
20 //------------------------------------
24 
26 
28 class BPHMassSelect;
29 class BPHChi2Select;
30 class BPHMassFitSelect;
31 
32 //---------------
33 // C++ Headers --
34 //---------------
35 #include <string>
36 #include <vector>
37 
38 // ---------------------
39 // -- Class Interface --
40 // ---------------------
41 
42 class BPHBdToKxMuMuBuilder : public virtual BPHDecayGenericBuilder<BPHRecoCandidate>,
43  public BPHDecaySpecificBuilder<BPHRecoCandidate> {
44 public:
48  const std::vector<BPHPlusMinusConstCandPtr>& oniaCollection,
49  const std::vector<BPHPlusMinusConstCandPtr>& kx0Collection)
50  : BPHDecayGenericBuilderBase(es, nullptr),
51  oniaName("MuMu"),
52  kx0Name("Kx0"),
53  oCollection(&oniaCollection),
54  kCollection(&kx0Collection) {
55  oniaSel = new BPHMassSelect(1.00, 12.00);
56  mkx0Sel = new BPHMassSelect(0.80, 1.00);
57  }
58 
59  // deleted copy constructor and assignment operator
62 
65  ~BPHBdToKxMuMuBuilder() override = default;
66 
69  void fill(BPHRecoBuilder& brb, void* parameters) override {
72  brb.add(oniaName, *oCollection);
73  brb.add(kx0Name, *kCollection);
74  brb.filter(oniaName, *oniaSel);
75  brb.filter(kx0Name, *mkx0Sel);
76  if (massSel->getMassMax() >= 0.0)
77  brb.filter(*massSel);
78  if (chi2Sel->getProbMin() >= 0.0)
79  brb.filter(*chi2Sel);
80  return;
81  }
82 
84  void setOniaMassMin(double m) {
85  outdated = true;
87  }
88  void setOniaMassMax(double m) {
89  outdated = true;
91  }
92  void setKxMassMin(double m) {
93  outdated = true;
95  }
96  void setKxMassMax(double m) {
97  outdated = true;
99  }
100 
102  double getOniaMassMin() const { return oniaSel->getMassMin(); }
103  double getOniaMassMax() const { return oniaSel->getMassMax(); }
104  double getKxMassMin() const { return mkx0Sel->getMassMin(); }
105  double getKxMassMax() const { return mkx0Sel->getMassMax(); }
106 
108  void setup(void* parameters) override {}
109 
110 private:
113 
114  const std::vector<BPHPlusMinusConstCandPtr>* oCollection;
115  const std::vector<BPHPlusMinusConstCandPtr>* kCollection;
116 
119 };
120 
121 #endif
double getProbMin() const
get current prob min
Definition: BPHChi2Select.h:66
double getMassMin() const
get current mass cuts
Definition: BPHMassCuts.h:58
void setMinPDiffererence(double pMin)
BPHBdToKxMuMuBuilder(const BPHEventSetupWrapper &es, const std::vector< BPHPlusMinusConstCandPtr > &oniaCollection, const std::vector< BPHPlusMinusConstCandPtr > &kx0Collection)
void setMassMax(double m)
Definition: BPHMassCuts.h:52
double getOniaMassMin() const
get current cuts
~BPHBdToKxMuMuBuilder() override=default
BPHBdToKxMuMuBuilder & operator=(const BPHBdToKxMuMuBuilder &x)=delete
void setOniaMassMax(double m)
const std::vector< BPHPlusMinusConstCandPtr > * kCollection
void filter(const std::string &name, const BPHRecoSelect &sel) const
double getMassMax() const
Definition: BPHMassCuts.h:59
void setMassMin(double m)
set mass cuts
Definition: BPHMassCuts.h:48
void add(const std::string &name, const BPHGenericCollection *collection, double mass=-1.0, double msig=-1.0)
void setOniaMassMin(double m)
set cuts
const std::vector< BPHPlusMinusConstCandPtr > * oCollection
void fill(BPHRecoBuilder &brb, void *parameters) override
build candidates
void setup(void *parameters) override
setup parameters for BPHRecoBuilder