Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef HeavyFlavorAnalysis_RecoDecay_BPHPlusMinusCandidate_h
0002 #define HeavyFlavorAnalysis_RecoDecay_BPHPlusMinusCandidate_h
0003 /** \class BPHPlusMinusCandidate
0004  *
0005  *  Description: 
0006  *     class for reconstructed decay candidates to opposite charge
0007  *     particle pairs
0008  *
0009  *  \author Paolo Ronchese INFN Padova
0010  *
0011  */
0012 
0013 //----------------------
0014 // Base Class Headers --
0015 //----------------------
0016 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoCandidate.h"
0017 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHPlusMinusVertex.h"
0018 
0019 //------------------------------------
0020 // Collaborating Class Declarations --
0021 //------------------------------------
0022 
0023 //---------------
0024 // C++ Headers --
0025 //---------------
0026 #include <string>
0027 
0028 //              ---------------------
0029 //              -- Class Interface --
0030 //              ---------------------
0031 
0032 class BPHPlusMinusCandidate : public BPHRecoCandidate, public virtual BPHPlusMinusVertex {
0033   friend class BPHRecoCandidate;
0034 
0035 public:
0036   /** Constructor
0037    */
0038   BPHPlusMinusCandidate(const edm::EventSetup* es);
0039 
0040   // deleted copy constructor and assignment operator
0041   BPHPlusMinusCandidate(const BPHPlusMinusCandidate& x) = delete;
0042   BPHPlusMinusCandidate& operator=(const BPHPlusMinusCandidate& x) = delete;
0043 
0044   /** Destructor
0045    */
0046   ~BPHPlusMinusCandidate() override;
0047 
0048   /** Operations
0049    */
0050   /// add a simple particle giving it a name
0051   /// particles are cloned, eventually specifying a different mass
0052   /// particles can be added only up to two particles with opposite charge
0053   void add(const std::string& name, const reco::Candidate* daug, double mass = -1.0, double sigma = -1.0) override;
0054   void add(const std::string& name,
0055            const reco::Candidate* daug,
0056            const std::string& searchList,
0057            double mass = -1.0,
0058            double sigma = -1.0) override;
0059 
0060   /// look for candidates starting from particle collections as
0061   /// specified in the BPHRecoBuilder, with given names for
0062   /// positive and negative particle
0063   /// charge selection is applied inside
0064   static std::vector<BPHPlusMinusConstCandPtr> build(const BPHRecoBuilder& builder,
0065                                                      const std::string& nPos,
0066                                                      const std::string& nNeg,
0067                                                      double mass = -1,
0068                                                      double msig = -1);
0069 
0070   /// clone object, cloning daughters as well up to required depth
0071   /// level = -1 to clone all levels
0072   BPHRecoCandidate* clone(int level = -1) const override;
0073 
0074   /// get a composite by the simple sum of simple particles
0075   const pat::CompositeCandidate& composite() const override;
0076 
0077   /// get cowboy/sailor classification
0078   bool isCowboy() const;
0079   bool isSailor() const;
0080 
0081 protected:
0082   // utility function used to cash reconstruction results
0083   void setNotUpdated() const override {
0084     BPHKinematicFit::setNotUpdated();
0085     BPHPlusMinusVertex::setNotUpdated();
0086   }
0087 
0088 private:
0089   // constructor
0090   BPHPlusMinusCandidate(const edm::EventSetup* es, const BPHRecoBuilder::ComponentSet& compList);
0091 
0092   // return true or false for positive or negative phi_pos-phi_neg difference
0093   bool phiDiff() const;
0094 };
0095 
0096 #endif