File indexing completed on 2024-04-06 12:19:01
0001 #ifndef BaseFlatGunProducer_H
0002 #define BaseFlatGunProducer_H
0003
0004
0005
0006
0007
0008
0009 #include <string>
0010
0011 #include "HepPDT/defs.h"
0012 #include "HepPDT/TableBuilder.hh"
0013 #include "HepPDT/ParticleDataTable.hh"
0014
0015 #include "HepMC/GenEvent.h"
0016
0017 #include "FWCore/Framework/interface/ESHandle.h"
0018 #include "FWCore/Framework/interface/one/EDProducer.h"
0019 #include "FWCore/Framework/interface/EventSetup.h"
0020 #include "FWCore/Framework/interface/Run.h"
0021
0022 #include <memory>
0023
0024 namespace edm {
0025
0026 class BaseFlatGunProducer : public one::EDProducer<one::WatchRuns, EndRunProducer> {
0027 public:
0028 BaseFlatGunProducer(const ParameterSet&);
0029 ~BaseFlatGunProducer() override;
0030 void beginRun(const edm::Run& r, const edm::EventSetup&) override;
0031 void endRun(edm::Run const& r, const edm::EventSetup&) override;
0032 void endRunProduce(edm::Run& r, const edm::EventSetup&) override;
0033
0034 private:
0035 const ESGetToken<HepPDT::ParticleDataTable, edm::DefaultRecord> fPDGTableToken;
0036
0037 protected:
0038
0039
0040
0041
0042
0043 std::vector<int> fPartIDs;
0044 double fMinEta;
0045 double fMaxEta;
0046 double fMinPhi;
0047 double fMaxPhi;
0048
0049
0050 HepMC::GenEvent* fEvt;
0051
0052
0053
0054
0055
0056
0057
0058
0059 ESHandle<HepPDT::ParticleDataTable> fPDGTable;
0060
0061 int fVerbosity;
0062
0063 bool fAddAntiParticle;
0064 };
0065 }
0066
0067 #endif