Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:15:35

0001 #ifndef HeavyFlavorAnalysis_SpecificDecay_BPHDecayGenericBuilder_h
0002 #define HeavyFlavorAnalysis_SpecificDecay_BPHDecayGenericBuilder_h
0003 /** \class BPHDecayGenericBuilder
0004  *
0005  *  Description: 
0006  *     Class to build a generic decay applying selections to the
0007  *     reconstructed particle
0008  *
0009  *  \author Paolo Ronchese INFN Padova
0010  *
0011  */
0012 
0013 //----------------------
0014 // Base Class Headers --
0015 //----------------------
0016 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecayGenericBuilderBase.h"
0017 
0018 //------------------------------------
0019 // Collaborating Class Declarations --
0020 //------------------------------------
0021 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHMassSelect.h"
0022 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHChi2Select.h"
0023 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHMassFitSelect.h"
0024 
0025 #include "FWCore/Framework/interface/EventSetup.h"
0026 
0027 class BPHEventSetupWrapper;
0028 
0029 //---------------
0030 // C++ Headers --
0031 //---------------
0032 #include <vector>
0033 #include <iostream>
0034 
0035 //              ---------------------
0036 //              -- Class Interface --
0037 //              ---------------------
0038 
0039 template <class ProdType>
0040 class BPHDecayGenericBuilder : public virtual BPHDecayGenericBuilderBase {
0041 public:
0042   typedef typename ProdType::const_pointer prod_ptr;
0043 
0044   /** Constructor
0045    */
0046   BPHDecayGenericBuilder(const BPHEventSetupWrapper& es, BPHMassFitSelect* mfs) : BPHDecayGenericBuilderBase(es, mfs) {}
0047 
0048   // deleted copy constructor and assignment operator
0049   BPHDecayGenericBuilder(const BPHDecayGenericBuilder& x) = delete;
0050   BPHDecayGenericBuilder& operator=(const BPHDecayGenericBuilder& x) = delete;
0051 
0052   /** Destructor
0053    */
0054   ~BPHDecayGenericBuilder() override = default;
0055 
0056   /** Operations
0057    */
0058   /// build candidates
0059   virtual std::vector<prod_ptr> build() {
0060     if (outdated) {
0061       recList.clear();
0062       fillRecList();
0063       outdated = false;
0064     }
0065     return recList;
0066   }
0067 
0068 protected:
0069   BPHDecayGenericBuilder() {}
0070 
0071   std::vector<prod_ptr> recList;
0072 };
0073 
0074 #endif