Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-07-08 01:45:54

0001 #ifndef HeavyFlavorAnalysis_SpecificDecay_BPHDecayToJPsiPiPiBuilder_h
0002 #define HeavyFlavorAnalysis_SpecificDecay_BPHDecayToJPsiPiPiBuilder_h
0003 /** \class BPHDecayToJPsiPiPiBuilder
0004  *
0005  *  Description: 
0006  *     Class to build particles decaying to JPsi pi+ pi- candidates
0007  *
0008  *  \author Paolo Ronchese INFN Padova
0009  *
0010  */
0011 
0012 //----------------------
0013 // Base Class Headers --
0014 //----------------------
0015 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecayToResTrkTrkSameMassBuilder.h"
0016 
0017 //------------------------------------
0018 // Collaborating Class Declarations --
0019 //------------------------------------
0020 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecayGenericBuilderBase.h"
0021 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecayConstrainedBuilderBase.h"
0022 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHParticleMasses.h"
0023 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoBuilder.h"
0024 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoCandidate.h"
0025 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHPlusMinusCandidate.h"
0026 
0027 #include "FWCore/Framework/interface/EventSetup.h"
0028 
0029 class BPHEventSetupWrapper;
0030 
0031 //---------------
0032 // C++ Headers --
0033 //---------------
0034 #include <string>
0035 #include <vector>
0036 
0037 //              ---------------------
0038 //              -- Class Interface --
0039 //              ---------------------
0040 
0041 class BPHDecayToJPsiPiPiBuilder : public BPHDecayToResTrkTrkSameMassBuilder<BPHRecoCandidate, BPHPlusMinusCandidate> {
0042 public:
0043   /** Constructor
0044    */
0045   BPHDecayToJPsiPiPiBuilder(const BPHEventSetupWrapper& es,
0046                             const std::vector<BPHPlusMinusConstCandPtr>& jpsiCollection,
0047                             const BPHRecoBuilder::BPHGenericCollection* posCollection,
0048                             const BPHRecoBuilder::BPHGenericCollection* negCollection)
0049       : BPHDecayGenericBuilderBase(es, nullptr),
0050         BPHDecayConstrainedBuilderBase("JPsi", BPHParticleMasses::jPsiMass, BPHParticleMasses::jPsiMWidth),
0051         BPHDecayToResTrkTrkSameMassBuilder(jpsiCollection,
0052                                            "PionPos",
0053                                            "PionNeg",
0054                                            BPHParticleMasses::pionMass,
0055                                            BPHParticleMasses::pionMSigma,
0056                                            posCollection,
0057                                            negCollection) {
0058     setResMassRange(2.80, 3.40);
0059     setTrkPtMin(1.0);
0060     setTrkEtaMax(10.0);
0061     setMassRange(3.00, 4.50);
0062     setProbMin(0.02);
0063     setMassFitRange(3.50, 4.20);
0064   }
0065 
0066   // deleted copy constructor and assignment operator
0067   BPHDecayToJPsiPiPiBuilder(const BPHDecayToJPsiPiPiBuilder& x) = delete;
0068   BPHDecayToJPsiPiPiBuilder& operator=(const BPHDecayToJPsiPiPiBuilder& x) = delete;
0069 
0070   /** Destructor
0071    */
0072   ~BPHDecayToJPsiPiPiBuilder() override = default;
0073 
0074   /** Operations
0075    */
0076 
0077   /// set cuts
0078   void setPiPtMin(double pt) { setTrkPtMin(pt); }
0079   void setPiEtaMax(double eta) { setTrkEtaMax(eta); }
0080   void setJPsiMassMin(double m) { setResMassMin(m); }
0081   void setJPsiMassMax(double m) { setResMassMax(m); }
0082 
0083   /// get current cuts
0084   double getPiPtMin() const { return getTrkPtMin(); }
0085   double getPiEtaMax() const { return getTrkEtaMax(); }
0086   double getJPsiMassMin() const { return getResMassMin(); }
0087   double getJPsiMassMax() const { return getResMassMax(); }
0088 
0089 protected:
0090   BPHDecayToJPsiPiPiBuilder(const std::vector<BPHPlusMinusConstCandPtr>& jpsiCollection,
0091                             const BPHRecoBuilder::BPHGenericCollection* posCollection,
0092                             const BPHRecoBuilder::BPHGenericCollection* negCollection)
0093       : BPHDecayToResTrkTrkSameMassBuilder(jpsiCollection,
0094                                            "PionPos",
0095                                            "PionNeg",
0096                                            BPHParticleMasses::pionMass,
0097                                            BPHParticleMasses::pionMSigma,
0098                                            posCollection,
0099                                            negCollection) {
0100     rName = "JPsi";
0101     rMass = BPHParticleMasses::jPsiMass;
0102     rWidth = BPHParticleMasses::jPsiMWidth;
0103     resoSel = new BPHMassSelect(-2.0e+06, -1.0e+06);
0104     massConstr = true;
0105     mFitSel = new BPHMassFitSelect(rName, rMass, rWidth, -2.0e+06, -1.0e+06);
0106   }
0107 };
0108 
0109 #endif