Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-09-22 02:39:43

0001 #ifndef BaseRandomtXiGunProducer_H
0002 #define BaseRandomtXiGunProducer_H
0003 
0004 /** \class FlatRandomEGunProducer
0005  *
0006  * Generates single particle gun in HepMC format
0007  * Julia Yarba 10/2005 
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 BaseRandomtXiGunProducer : public one::EDProducer<one::WatchRuns, EndRunProducer> {
0027   public:
0028     BaseRandomtXiGunProducer(const ParameterSet&);
0029     ~BaseRandomtXiGunProducer() override;
0030     void beginRun(const edm::Run& r, const edm::EventSetup&) override;
0031     void endRun(const edm::Run& 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     // non-virtuals ! this and only way !
0039     //
0040     // data members
0041 
0042     // gun particle(s) characteristics
0043     std::vector<int> fPartIDs;
0044     double fMinPhi;
0045     double fMaxPhi;
0046     double fpEnergy;
0047     double fECMS;
0048 
0049     // the event format itself
0050     HepMC::GenEvent* fEvt;
0051 
0052     ESHandle<HepPDT::ParticleDataTable> fPDGTable;
0053 
0054     int fVerbosity;
0055 
0056     const HepPDT::ParticleData* PData;
0057 
0058     bool fFireForward;
0059     bool fFireBackward;
0060     bool fLog_t;
0061   };
0062 }  // namespace edm
0063 #endif