Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:15:35

0001 #ifndef HeavyFlavorAnalysis_SpecificDecay_BPHBdToKxMuMuBuilder_h
0002 #define HeavyFlavorAnalysis_SpecificDecay_BPHBdToKxMuMuBuilder_h
0003 /** \class BPHBdToKxMuMuBuilder
0004  *
0005  *  Description: 
0006  *     Class to build B0 to K*0 mu+ mu- candidates
0007  *
0008  *  \author Paolo Ronchese INFN Padova
0009  *
0010  */
0011 
0012 //----------------------
0013 // Base Class Headers --
0014 //----------------------
0015 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecayGenericBuilder.h"
0016 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecaySpecificBuilder.h"
0017 
0018 //------------------------------------
0019 // Collaborating Class Declarations --
0020 //------------------------------------
0021 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoBuilder.h"
0022 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoCandidate.h"
0023 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHPlusMinusCandidate.h"
0024 
0025 #include "FWCore/Framework/interface/EventSetup.h"
0026 
0027 class BPHEventSetupWrapper;
0028 class BPHMassSelect;
0029 class BPHChi2Select;
0030 class BPHMassFitSelect;
0031 
0032 //---------------
0033 // C++ Headers --
0034 //---------------
0035 #include <string>
0036 #include <vector>
0037 
0038 //              ---------------------
0039 //              -- Class Interface --
0040 //              ---------------------
0041 
0042 class BPHBdToKxMuMuBuilder : public virtual BPHDecayGenericBuilder<BPHRecoCandidate>,
0043                              public BPHDecaySpecificBuilder<BPHRecoCandidate> {
0044 public:
0045   /** Constructor
0046    */
0047   BPHBdToKxMuMuBuilder(const BPHEventSetupWrapper& es,
0048                        const std::vector<BPHPlusMinusConstCandPtr>& oniaCollection,
0049                        const std::vector<BPHPlusMinusConstCandPtr>& kx0Collection)
0050       : BPHDecayGenericBuilderBase(es, nullptr),
0051         oniaName("MuMu"),
0052         kx0Name("Kx0"),
0053         oCollection(&oniaCollection),
0054         kCollection(&kx0Collection) {
0055     oniaSel = new BPHMassSelect(1.00, 12.00);
0056     mkx0Sel = new BPHMassSelect(0.80, 1.00);
0057   }
0058 
0059   // deleted copy constructor and assignment operator
0060   BPHBdToKxMuMuBuilder(const BPHBdToKxMuMuBuilder& x) = delete;
0061   BPHBdToKxMuMuBuilder& operator=(const BPHBdToKxMuMuBuilder& x) = delete;
0062 
0063   /** Destructor
0064    */
0065   ~BPHBdToKxMuMuBuilder() override = default;
0066 
0067   /** Operations
0068    */
0069   /// build candidates
0070   void fill(BPHRecoBuilder& brb, void* parameters) override {
0071     brb.setMinPDiffererence(minPDiff);
0072     brb.add(oniaName, *oCollection);
0073     brb.add(kx0Name, *kCollection);
0074     brb.filter(oniaName, *oniaSel);
0075     brb.filter(kx0Name, *mkx0Sel);
0076     if (massSel->getMassMax() >= 0.0)
0077       brb.filter(*massSel);
0078     if (chi2Sel->getProbMin() >= 0.0)
0079       brb.filter(*chi2Sel);
0080     return;
0081   }
0082 
0083   /// set cuts
0084   void setOniaMassMin(double m) {
0085     outdated = true;
0086     oniaSel->setMassMin(m);
0087   }
0088   void setOniaMassMax(double m) {
0089     outdated = true;
0090     oniaSel->setMassMax(m);
0091   }
0092   void setKxMassMin(double m) {
0093     outdated = true;
0094     mkx0Sel->setMassMin(m);
0095   }
0096   void setKxMassMax(double m) {
0097     outdated = true;
0098     mkx0Sel->setMassMax(m);
0099   }
0100 
0101   /// get current cuts
0102   double getOniaMassMin() const { return oniaSel->getMassMin(); }
0103   double getOniaMassMax() const { return oniaSel->getMassMax(); }
0104   double getKxMassMin() const { return mkx0Sel->getMassMin(); }
0105   double getKxMassMax() const { return mkx0Sel->getMassMax(); }
0106 
0107   /// setup parameters for BPHRecoBuilder
0108   void setup(void* parameters) override {}
0109 
0110 private:
0111   std::string oniaName;
0112   std::string kx0Name;
0113 
0114   const std::vector<BPHPlusMinusConstCandPtr>* oCollection;
0115   const std::vector<BPHPlusMinusConstCandPtr>* kCollection;
0116 
0117   BPHMassSelect* oniaSel;
0118   BPHMassSelect* mkx0Sel;
0119 };
0120 
0121 #endif