File indexing completed on 2024-04-06 12:15:35
0001 #ifndef HeavyFlavorAnalysis_SpecificDecay_BPHOniaToMuMuBuilder_h
0002 #define HeavyFlavorAnalysis_SpecificDecay_BPHOniaToMuMuBuilder_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecayGenericBuilderBase.h"
0016 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecayGenericBuilder.h"
0017
0018
0019
0020
0021 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoBuilder.h"
0022 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoCandidate.h"
0023 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHPlusMinusCandidate.h"
0024
0025 class BPHEventSetupWrapper;
0026 class BPHMuonPtSelect;
0027 class BPHMuonEtaSelect;
0028 class BPHChi2Select;
0029 class BPHMassSelect;
0030 class BPHRecoSelect;
0031 class BPHMomentumSelect;
0032 class BPHVertexSelect;
0033
0034
0035
0036
0037 #include <string>
0038 #include <vector>
0039 #include <map>
0040
0041
0042
0043
0044
0045 class BPHOniaToMuMuBuilder : public virtual BPHDecayGenericBuilderBase,
0046 public virtual BPHDecayGenericBuilder<BPHPlusMinusCandidate> {
0047 public:
0048 enum oniaType { NRes, Phi, Psi1, Psi2, Ups, Ups1, Ups2, Ups3 };
0049
0050
0051
0052 BPHOniaToMuMuBuilder(const BPHEventSetupWrapper& es,
0053 const BPHRecoBuilder::BPHGenericCollection* muPosCollection,
0054 const BPHRecoBuilder::BPHGenericCollection* muNegCollection);
0055
0056
0057 BPHOniaToMuMuBuilder(const BPHOniaToMuMuBuilder& x) = delete;
0058 BPHOniaToMuMuBuilder& operator=(const BPHOniaToMuMuBuilder& x) = delete;
0059
0060
0061
0062 ~BPHOniaToMuMuBuilder() override;
0063
0064
0065
0066
0067 void fillRecList() override;
0068
0069
0070
0071 std::vector<BPHPlusMinusConstCandPtr> getList(oniaType type,
0072 BPHRecoSelect* dSel = nullptr,
0073 BPHMomentumSelect* mSel = nullptr,
0074 BPHVertexSelect* vSel = nullptr,
0075 BPHFitSelect* kSel = nullptr);
0076
0077
0078
0079 BPHPlusMinusConstCandPtr getOriginalCandidate(const BPHRecoCandidate& cand);
0080
0081
0082 void setPtMin(oniaType type, double pt);
0083 void setEtaMax(oniaType type, double eta);
0084 void setMassMin(oniaType type, double m);
0085 void setMassMax(oniaType type, double m);
0086 void setProbMin(oniaType type, double p);
0087 void setConstr(oniaType type, double mass, double sigma);
0088
0089
0090 double getPtMin(oniaType type) const;
0091 double getEtaMax(oniaType type) const;
0092 double getMassMin(oniaType type) const;
0093 double getMassMax(oniaType type) const;
0094 double getProbMin(oniaType type) const;
0095 double getConstrMass(oniaType type) const;
0096 double getConstrSigma(oniaType type) const;
0097
0098 private:
0099 std::string muPosName;
0100 std::string muNegName;
0101
0102 const BPHRecoBuilder::BPHGenericCollection* posCollection;
0103 const BPHRecoBuilder::BPHGenericCollection* negCollection;
0104
0105 struct OniaParameters {
0106 BPHMuonPtSelect* ptSel;
0107 BPHMuonEtaSelect* etaSel;
0108 BPHMassSelect* massSel;
0109 BPHChi2Select* chi2Sel;
0110 double mass;
0111 double sigma;
0112 bool outdated;
0113 };
0114
0115 std::map<oniaType, OniaParameters> oniaPar;
0116 std::map<oniaType, std::vector<BPHPlusMinusConstCandPtr> > oniaList;
0117
0118 void setNotUpdated();
0119 void setParameters(oniaType type,
0120 double ptMin,
0121 double etaMax,
0122 double massMin,
0123 double massMax,
0124 double probMin,
0125 double mass,
0126 double sigma);
0127 void extractList(oniaType type);
0128 };
0129
0130 #endif