File indexing completed on 2024-04-06 12:15:33
0001 #ifndef HeavyFlavorAnalysis_RecoDecay_BPHPlusMinusCandidate_h
0002 #define HeavyFlavorAnalysis_RecoDecay_BPHPlusMinusCandidate_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHPlusMinusCandidatePtr.h"
0017 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoCandidate.h"
0018 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHPlusMinusVertex.h"
0019
0020
0021
0022
0023 class BPHEventSetupWrapper;
0024
0025
0026
0027
0028 #include <string>
0029
0030
0031
0032
0033
0034 class BPHPlusMinusCandidate : public BPHRecoCandidate, public virtual BPHPlusMinusVertex {
0035 friend class BPHRecoCandidate;
0036
0037 public:
0038 typedef BPHPlusMinusCandidatePtr pointer;
0039 typedef BPHPlusMinusConstCandPtr const_pointer;
0040
0041
0042
0043 BPHPlusMinusCandidate(const BPHEventSetupWrapper* es);
0044
0045
0046 BPHPlusMinusCandidate(const BPHPlusMinusCandidate& x) = delete;
0047 BPHPlusMinusCandidate& operator=(const BPHPlusMinusCandidate& x) = delete;
0048
0049
0050
0051 ~BPHPlusMinusCandidate() override = default;
0052
0053
0054
0055
0056
0057
0058 void add(const std::string& name, const reco::Candidate* daug, double mass = -1.0, double sigma = -1.0) override;
0059 void add(const std::string& name,
0060 const reco::Candidate* daug,
0061 const std::string& searchList,
0062 double mass = -1.0,
0063 double sigma = -1.0) override;
0064
0065
0066
0067
0068
0069 struct BuilderParameters {
0070 const std::string* posName;
0071 const std::string* negName;
0072 double constrMass;
0073 double constrSigma;
0074 };
0075 static std::vector<BPHPlusMinusConstCandPtr> build(const BPHRecoBuilder& builder, const BuilderParameters& par) {
0076 return build(builder, *par.posName, *par.negName, par.constrMass, par.constrSigma);
0077 }
0078 static std::vector<BPHPlusMinusConstCandPtr> build(const BPHRecoBuilder& builder,
0079 const std::string& nPos,
0080 const std::string& nNeg,
0081 double mass = -1,
0082 double msig = -1);
0083
0084
0085
0086 BPHRecoCandidate* clone(int level = -1) const override;
0087
0088
0089 const pat::CompositeCandidate& composite() const override;
0090
0091
0092 bool isCowboy() const;
0093 bool isSailor() const;
0094
0095 protected:
0096
0097 void setNotUpdated() const override {
0098 BPHKinematicFit::setNotUpdated();
0099 BPHPlusMinusVertex::setNotUpdated();
0100 }
0101
0102 private:
0103
0104 BPHPlusMinusCandidate(const BPHEventSetupWrapper* es, const BPHRecoBuilder::ComponentSet& compList);
0105
0106
0107 bool phiDiff() const;
0108 };
0109
0110 #endif