Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef HeavyFlavorAnalysis_SpecificDecay_BPHDecayToChargedXXbarBuilder_h
0002 #define HeavyFlavorAnalysis_SpecificDecay_BPHDecayToChargedXXbarBuilder_h
0003 /** \class BPHDecayToChargedXXbarBuilder
0004  *
0005  *  Description: 
0006  *     Class to build a decay to an oppositely charged 
0007  *     particle-antiparticle pair
0008  *
0009  *  \author Paolo Ronchese INFN Padova
0010  *
0011  */
0012 
0013 //----------------------
0014 // Base Class Headers --
0015 //----------------------
0016 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecayGenericBuilder.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/Event.h"
0026 
0027 class BPHParticlePtSelect;
0028 class BPHParticleEtaSelect;
0029 class BPHChi2Select;
0030 class BPHMassSelect;
0031 
0032 //---------------
0033 // C++ Headers --
0034 //---------------
0035 #include <string>
0036 #include <vector>
0037 
0038 //              ---------------------
0039 //              -- Class Interface --
0040 //              ---------------------
0041 
0042 class BPHDecayToChargedXXbarBuilder : public BPHDecayGenericBuilder {
0043 public:
0044   /** Constructor
0045    */
0046   BPHDecayToChargedXXbarBuilder(const edm::EventSetup& es,
0047                                 const std::string& dPosName,
0048                                 const std::string& dNegName,
0049                                 double daugMass,
0050                                 double daugSigma,
0051                                 const BPHRecoBuilder::BPHGenericCollection* posCollection,
0052                                 const BPHRecoBuilder::BPHGenericCollection* negCollection);
0053 
0054   // deleted copy constructor and assignment operator
0055   BPHDecayToChargedXXbarBuilder(const BPHDecayToChargedXXbarBuilder& x) = delete;
0056   BPHDecayToChargedXXbarBuilder& operator=(const BPHDecayToChargedXXbarBuilder& x) = delete;
0057 
0058   /** Destructor
0059    */
0060   ~BPHDecayToChargedXXbarBuilder() override;
0061 
0062   /** Operations
0063    */
0064   /// build Phi candidates
0065   std::vector<BPHPlusMinusConstCandPtr> build();
0066 
0067   /// set cuts
0068   void setPtMin(double pt);
0069   void setEtaMax(double eta);
0070   void setDzMax(double dz);
0071 
0072   /// get current cuts
0073   double getPtMin() const;
0074   double getEtaMax() const;
0075   double getDzMax() const { return dzMax; }
0076 
0077 private:
0078   std::string pName;
0079   std::string nName;
0080   double dMass;
0081   double dSigma;
0082 
0083   const BPHRecoBuilder::BPHGenericCollection* pCollection;
0084   const BPHRecoBuilder::BPHGenericCollection* nCollection;
0085 
0086   double ptMin;
0087   double etaMax;
0088   double dzMax;
0089 
0090   std::vector<BPHPlusMinusConstCandPtr> recList;
0091 
0092   class Particle {
0093   public:
0094     Particle(const reco::Candidate* c, const reco::Track* tk, double x, double y, double z, double e)
0095         : cand(c), track(tk), px(x), py(y), pz(z), en(e) {}
0096     const reco::Candidate* cand;
0097     const reco::Track* track;
0098     double px;
0099     double py;
0100     double pz;
0101     double en;
0102   };
0103   void addParticle(const BPHRecoBuilder::BPHGenericCollection* collection, int charge, std::vector<Particle*>& list);
0104 };
0105 
0106 #endif