Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:29:58

0001 #ifndef PYTHIADAUVFILTERMATCHID_h
0002 #define PYTHIADAUVFILTERMATCHID_h
0003 // -*- C++ -*-
0004 //
0005 // Package:    PythiaDauVFilterMatchID
0006 // Class:      PythiaDauVFilterMatchID
0007 //
0008 /**\class PythiaDauVFilterMatchID PythiaDauVFilterMatchID.cc 
0009 
0010  Description: Filter events using MotherId and ChildrenIds infos
0011 
0012  Implementation:
0013      <Notes on implementation>
0014 */
0015 //
0016 // Original Author:  Daniele Pedrini
0017 //         Created:  Apr 29 2008
0018 //         Adapted by Stephan Wiederkehr
0019 //
0020 //
0021 
0022 // system include files
0023 #include <memory>
0024 
0025 // user include files
0026 #include "FWCore/Framework/interface/Frameworkfwd.h"
0027 #include "FWCore/Framework/interface/global/EDFilter.h"
0028 
0029 #include "FWCore/Framework/interface/Event.h"
0030 #include "FWCore/Framework/interface/MakerMacros.h"
0031 
0032 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0033 
0034 #include "Pythia8/Pythia.h"
0035 
0036 //
0037 // class decleration
0038 //
0039 namespace edm {
0040   class HepMCProduct;
0041 }
0042 
0043 struct decayTarget {
0044   int pdgID;
0045   double minPt, maxPt, minEta, maxEta;
0046 };
0047 
0048 class PythiaDauVFilterMatchID : public edm::global::EDFilter<> {
0049 public:
0050   explicit PythiaDauVFilterMatchID(const edm::ParameterSet&);
0051   ~PythiaDauVFilterMatchID() override;
0052 
0053   bool filter(edm::StreamID, edm::Event&, const edm::EventSetup&) const override;
0054 
0055 private:
0056   const int fVerbose;
0057   const edm::EDGetTokenT<edm::HepMCProduct> token_;
0058   std::vector<int> dauIDs;
0059   const int particleID;
0060   const int motherID;
0061   const bool chargeconju;
0062   const int ndaughters;
0063   std::vector<double> minptcut;
0064   const double maxptcut;
0065   std::vector<double> minetacut;
0066   std::vector<double> maxetacut;
0067   std::unique_ptr<Pythia8::Pythia> fLookupGen;  // this instance is for accessing particleData information
0068 };
0069 #endif