Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef HeavyFlavorAnalysis_SpecificDecay_BPHDecayToTkpTknSymChargeBuilder_h
0002 #define HeavyFlavorAnalysis_SpecificDecay_BPHDecayToTkpTknSymChargeBuilder_h
0003 /** \class BPHDecayToTkpTknSymChargeBuilder
0004  *
0005  *  Description: 
0006  *     Class to build a decay to an oppositely charged particle pair
0007  *     with different masses, choosing the best mass assignment on
0008  *     the reconstructed mass basis
0009  *
0010  *  \author Paolo Ronchese INFN Padova
0011  *
0012  */
0013 
0014 //----------------------
0015 // Base Class Headers --
0016 //----------------------
0017 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecayGenericBuilder.h"
0018 
0019 //------------------------------------
0020 // Collaborating Class Declarations --
0021 //------------------------------------
0022 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoBuilder.h"
0023 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHRecoCandidate.h"
0024 #include "HeavyFlavorAnalysis/RecoDecay/interface/BPHPlusMinusCandidate.h"
0025 
0026 #include "FWCore/Framework/interface/Event.h"
0027 
0028 class BPHParticlePtSelect;
0029 class BPHParticleEtaSelect;
0030 class BPHChi2Select;
0031 class BPHMassSelect;
0032 
0033 //---------------
0034 // C++ Headers --
0035 //---------------
0036 #include <string>
0037 #include <vector>
0038 
0039 //              ---------------------
0040 //              -- Class Interface --
0041 //              ---------------------
0042 
0043 class BPHDecayToTkpTknSymChargeBuilder : public BPHDecayGenericBuilder {
0044 public:
0045   /** Constructor
0046    */
0047   BPHDecayToTkpTknSymChargeBuilder(const edm::EventSetup& es,
0048                                    const std::string& daug1Name,
0049                                    double daug1Mass,
0050                                    double daug1Sigma,
0051                                    const std::string& daug2Name,
0052                                    double daug2Mass,
0053                                    double daug2Sigma,
0054                                    const BPHRecoBuilder::BPHGenericCollection* posCollection,
0055                                    const BPHRecoBuilder::BPHGenericCollection* negCollection,
0056                                    double expectedMass);
0057 
0058   // deleted copy constructor and assignment operator
0059   BPHDecayToTkpTknSymChargeBuilder(const BPHDecayToTkpTknSymChargeBuilder& x) = delete;
0060   BPHDecayToTkpTknSymChargeBuilder& operator=(const BPHDecayToTkpTknSymChargeBuilder& x) = delete;
0061 
0062   /** Destructor
0063    */
0064   ~BPHDecayToTkpTknSymChargeBuilder() override;
0065 
0066   /** Operations
0067    */
0068   /// build candidates
0069   std::vector<BPHPlusMinusConstCandPtr> build();
0070 
0071   /// set cuts
0072   void setTrk1PtMin(double pt);
0073   void setTrk2PtMin(double pt);
0074   void setTrk1EtaMax(double eta);
0075   void setTrk2EtaMax(double eta);
0076   void setDzMax(double dz);
0077 
0078   /// get current cuts
0079   double getTrk1PtMin() const { return pt1Min; }
0080   double getTrk2PtMin() const { return pt2Min; }
0081   double getTrk1EtaMax() const { return eta1Max; }
0082   double getTrk2EtaMax() const { return eta2Max; }
0083   double getDzMax() const { return dzMax; }
0084 
0085 private:
0086   std::string d1Name;
0087   double d1Mass;
0088   double d1Sigma;
0089   std::string d2Name;
0090   double d2Mass;
0091   double d2Sigma;
0092   double eMass;
0093 
0094   const BPHRecoBuilder::BPHGenericCollection* pCollection;
0095   const BPHRecoBuilder::BPHGenericCollection* nCollection;
0096 
0097   double pt1Min;
0098   double pt2Min;
0099   double eta1Max;
0100   double eta2Max;
0101   double dzMax;
0102 
0103   std::vector<BPHPlusMinusConstCandPtr> recList;
0104 
0105   class Particle {
0106   public:
0107     Particle(const reco::Candidate* c, const reco::Track* tk, double x, double y, double z, double f, double g)
0108         : cand(c), track(tk), px(x), py(y), pz(z), e1(f), e2(g) {}
0109     const reco::Candidate* cand;
0110     const reco::Track* track;
0111     double px;
0112     double py;
0113     double pz;
0114     double e1;
0115     double e2;
0116   };
0117   void addParticle(const BPHRecoBuilder::BPHGenericCollection* collection, int charge, std::vector<Particle*>& list);
0118 };
0119 
0120 #endif