CMS 3D CMS Logo

BPHDecayToResTrkBuilderBase.h
Go to the documentation of this file.
1 #ifndef HeavyFlavorAnalysis_SpecificDecay_BPHDecayToResTrkBuilderBase_h
2 #define HeavyFlavorAnalysis_SpecificDecay_BPHDecayToResTrkBuilderBase_h
3 
13 //----------------------
14 // Base Class Headers --
15 //----------------------
18 
19 //------------------------------------
20 // Collaborating Class Declarations --
21 //------------------------------------
24 
27 
30 
31 //---------------
32 // C++ Headers --
33 //---------------
34 #include <string>
35 #include <vector>
36 
37 // ---------------------
38 // -- Class Interface --
39 // ---------------------
40 
42  public virtual BPHDecayConstrainedBuilderBase {
43 public:
47  const std::string& resName,
48  double resMass,
49  double resWidth,
50  const std::string& trkName,
51  double trkMass,
52  double trkSigma,
53  const BPHRecoBuilder::BPHGenericCollection* trkCollection);
54 
55  // deleted copy constructor and assignment operator
58 
62 
66  void setTrkPtMin(double pt);
68  void setTrkEtaMax(double eta);
69 
71  double getTrkPtMin() const { return ptSel->getPtMin(); }
72  double getTrkEtaMax() const { return etaSel->getEtaMax(); }
73 
74 protected:
76  double trkMass,
77  double trkSigma,
78  const BPHRecoBuilder::BPHGenericCollection* trkCollection);
79 
81  double tMass;
82  double tSigma;
83 
85 
89 
91  void fill(BPHRecoBuilder& brb, void* parameters) override;
92 
93 private:
94  std::vector<const reco::Candidate*> tCollectSel1;
95  std::vector<const reco::Candidate*> tCollectSel2;
96  static void filter(const std::vector<const reco::Candidate*>* s,
97  std::vector<const reco::Candidate*>* d,
98  BPHRecoSelect* f) {
99  int i;
100  int n = s->size();
101  d->clear();
102  d->reserve(n);
103  for (i = 0; i < n; ++i) {
104  if (f->accept(*s->at(i)))
105  d->push_back(s->at(i));
106  }
107  }
108  void swap(std::vector<const reco::Candidate*>*& l, std::vector<const reco::Candidate*>*& r) {
109  std::vector<const reco::Candidate*>* t = l;
110  l = r;
111  r = t;
112  }
113 };
114 
115 #endif
double getPtMin() const
get current pt min
BPHDecayToResTrkBuilderBase(const BPHEventSetupWrapper &es, const std::string &resName, double resMass, double resWidth, const std::string &trkName, double trkMass, double trkSigma, const BPHRecoBuilder::BPHGenericCollection *trkCollection)
BPHDecayToResTrkBuilderBase & operator=(const BPHDecayToResTrkBuilderBase &x)=delete
void fill(BPHRecoBuilder &brb, void *parameters) override
build candidates
double f[11][100]
d
Definition: ztail.py:151
const BPHRecoBuilder::BPHGenericCollection * tCollection
static void filter(const std::vector< const reco::Candidate *> *s, std::vector< const reco::Candidate *> *d, BPHRecoSelect *f)
std::vector< const reco::Candidate * > tCollectSel2
void swap(std::vector< const reco::Candidate *> *&l, std::vector< const reco::Candidate *> *&r)
common object to interface with edm collections
double getTrkPtMin() const
get current cuts
std::vector< const reco::Candidate * > tCollectSel1
double getEtaMax() const
get current eta max