Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:19:01

0001 #ifndef FlatBaseThetaGunProducer_H
0002 #define FlatBaseThetaGunProducer_H
0003 
0004 #include <string>
0005 
0006 #include "HepPDT/defs.h"
0007 #include "HepPDT/TableBuilder.hh"
0008 #include "HepPDT/ParticleDataTable.hh"
0009 
0010 #include "HepMC/GenEvent.h"
0011 
0012 #include "FWCore/Framework/interface/one/EDProducer.h"
0013 #include "FWCore/Framework/interface/ESHandle.h"
0014 #include "FWCore/Framework/interface/EventSetup.h"
0015 #include "FWCore/Framework/interface/Run.h"
0016 
0017 #include <memory>
0018 
0019 namespace edm {
0020 
0021   class FlatBaseThetaGunProducer : public one::EDProducer<one::WatchRuns, EndRunProducer> {
0022   public:
0023     FlatBaseThetaGunProducer(const ParameterSet&);
0024     ~FlatBaseThetaGunProducer() override;
0025     void beginRun(const edm::Run&, const edm::EventSetup&) override;
0026     void endRun(const edm::Run& r, const edm::EventSetup&) override;
0027     void endRunProduce(edm::Run& r, const edm::EventSetup&) override;
0028 
0029   private:
0030     const ESGetToken<HepPDT::ParticleDataTable, edm::DefaultRecord> fPDGTableToken;
0031 
0032   protected:
0033     // non-virtuals ! this and only way !
0034     //
0035     // data members
0036 
0037     // gun particle(s) characteristics
0038     std::vector<int> fPartIDs;
0039     double fMinTheta;
0040     double fMaxTheta;
0041     double fMinPhi;
0042     double fMaxPhi;
0043 
0044     // the event format itself
0045     HepMC::GenEvent* fEvt;
0046 
0047     // HepMC/HepPDT related things
0048     // (for particle/event construction)
0049     ESHandle<HepPDT::ParticleDataTable> fPDGTable;
0050 
0051     int fVerbosity;
0052 
0053     bool fAddAntiParticle;
0054   };
0055 }  // namespace edm
0056 
0057 #endif