Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 12:49:22

0001 #ifndef HeavyFlavorAnalysis_SpecificDecay_BPHDecayToResFlyingBuilder_h
0002 #define HeavyFlavorAnalysis_SpecificDecay_BPHDecayToResFlyingBuilder_h
0003 /** \class BPHDecayToResFlyingBuilder
0004  *
0005  *  Description: 
0006  *     Class to build a particle decaying to a resonances and a flying particle,
0007  *     both decaying to an opposite charged particles pair
0008  *
0009  *  \author Paolo Ronchese INFN Padova
0010  *
0011  */
0012 
0013 //----------------------
0014 // Base Class Headers --
0015 //----------------------
0016 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecayConstrainedBuilder.h"
0017 
0018 //------------------------------------
0019 // Collaborating Class Declarations --
0020 //------------------------------------
0021 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHKinFitChi2Select.h"
0022 
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/Event.h"
0028 
0029 //---------------
0030 // C++ Headers --
0031 //---------------
0032 #include <string>
0033 #include <vector>
0034 
0035 //              ---------------------
0036 //              -- Class Interface --
0037 //              ---------------------
0038 
0039 class BPHDecayToResFlyingBuilder : public BPHDecayConstrainedBuilder {
0040 public:
0041   /** Constructor
0042    */
0043   BPHDecayToResFlyingBuilder(const edm::EventSetup& es,
0044                              const std::string& resName,
0045                              double resMass,
0046                              double resWidth,
0047                              const std::vector<BPHPlusMinusConstCandPtr>& resCollection,
0048                              const std::string& flyName,
0049                              double flyMass,
0050                              double flyMSigma,
0051                              const std::vector<BPHPlusMinusConstCandPtr>& flyCollection);
0052 
0053   // deleted copy constructor and assignment operator
0054   BPHDecayToResFlyingBuilder(const BPHDecayToResFlyingBuilder& x) = delete;
0055   BPHDecayToResFlyingBuilder& operator=(const BPHDecayToResFlyingBuilder& x) = delete;
0056 
0057   /** Destructor
0058    */
0059   ~BPHDecayToResFlyingBuilder() override;
0060 
0061   /** Operations
0062    */
0063   /// build candidates
0064   std::vector<BPHRecoConstCandPtr> build();
0065 
0066   /// get original daughters map
0067   const std::map<const BPHRecoCandidate*, const BPHRecoCandidate*>& daughMap() const { return dMap; }
0068 
0069   /// set cuts
0070   void setFlyingMassMin(double m);
0071   void setFlyingMassMax(double m);
0072   void setFlyingMassRange(double mMin, double mMax);
0073   void setKinFitProbMin(double p);
0074 
0075   /// get current cuts
0076   double getFlyingMassMin() const { return flySel->getMassMin(); }
0077   double getFlyingMassMax() const { return flySel->getMassMax(); }
0078   double getKinFitProbMin() const { return kfChi2Sel->getProbMin(); }
0079 
0080 private:
0081   std::string fName;
0082   double fMass;
0083   double fMSigma;
0084 
0085   const std::vector<BPHPlusMinusConstCandPtr>* fCollection;
0086 
0087   BPHMassFitSelect* flySel;
0088   BPHKinFitChi2Select* kfChi2Sel;
0089 
0090   std::map<const BPHRecoCandidate*, const BPHRecoCandidate*> dMap;
0091   std::vector<BPHRecoConstCandPtr> recList;
0092 };
0093 
0094 #endif