Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-07-08 01:45:54

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 particle, decaying itself
0007  *     in cascade, and an additional flying particle, for generic particle types
0008  *
0009  *  \author Paolo Ronchese INFN Padova
0010  *
0011  */
0012 
0013 //----------------------
0014 // Base Class Headers --
0015 //----------------------
0016 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecayToResFlyingBuilderBase.h"
0017 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecayConstrainedBuilder.h"
0018 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecayToFlyingCascadeBuilder.h"
0019 #include "HeavyFlavorAnalysis/SpecificDecay/interface/BPHDecaySpecificBuilder.h"
0020 
0021 //------------------------------------
0022 // Collaborating Class Declarations --
0023 //------------------------------------
0024 #include "FWCore/Framework/interface/EventSetup.h"
0025 
0026 class BPHEventSetupWrapper;
0027 
0028 //---------------
0029 // C++ Headers --
0030 //---------------
0031 #include <string>
0032 #include <vector>
0033 #include <iostream>
0034 //              ---------------------
0035 //              -- Class Interface --
0036 //              ---------------------
0037 
0038 template <class ProdType, class ResType, class FlyingType>
0039 class BPHDecayToResFlyingBuilder : public BPHDecayToResFlyingBuilderBase,
0040                                    public BPHDecayConstrainedBuilder<ProdType, ResType>,
0041                                    public BPHDecayToFlyingCascadeBuilder<ProdType, FlyingType>,
0042                                    public BPHDecaySpecificBuilder<ProdType> {
0043 public:
0044   using typename BPHDecayGenericBuilder<ProdType>::prod_ptr;
0045   using typename BPHDecayConstrainedBuilder<ProdType, ResType>::res_ptr;
0046   using typename BPHDecayToFlyingCascadeBuilder<ProdType, FlyingType>::flying_ptr;
0047 
0048   /** Constructor
0049    */
0050   BPHDecayToResFlyingBuilder(const BPHEventSetupWrapper& es,
0051                              const std::string& resName,
0052                              double resMass,
0053                              double resWidth,
0054                              const std::vector<res_ptr>& resCollection,
0055                              const std::string& flyName,
0056                              double flyMass,
0057                              double flyMSigma,
0058                              const std::vector<flying_ptr>& flyCollection)
0059       : BPHDecayGenericBuilderBase(es, nullptr),
0060         BPHDecayConstrainedBuilderBase(resName, resMass, resWidth),
0061         BPHDecayToFlyingCascadeBuilderBase(flyName, flyMass, flyMSigma),
0062         BPHDecayConstrainedBuilder<ProdType, ResType>(resCollection),
0063         BPHDecayToFlyingCascadeBuilder<ProdType, FlyingType>(flyCollection) {}
0064 
0065   // deleted copy constructor and assignment operator
0066   BPHDecayToResFlyingBuilder(const BPHDecayToResFlyingBuilder& x) = delete;
0067   BPHDecayToResFlyingBuilder& operator=(const BPHDecayToResFlyingBuilder& x) = delete;
0068 
0069   /** Destructor
0070    */
0071   ~BPHDecayToResFlyingBuilder() override = default;
0072 
0073 protected:
0074   BPHDecayToResFlyingBuilder(const std::vector<res_ptr>& resCollection, const std::vector<flying_ptr>& flyCollection)
0075       : BPHDecayConstrainedBuilder<ProdType, ResType>(resCollection),
0076         BPHDecayToFlyingCascadeBuilder<ProdType, FlyingType>(flyCollection) {}
0077 
0078   void fillRecList() override {
0079     BPHDecaySpecificBuilder<ProdType>::fillRecList();
0080     this->fitAndFilter(this->recList);
0081     return;
0082   }
0083 };
0084 
0085 #endif