CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_9/src/IOMC/ParticleGuns/interface/BaseFlatGunSource.h

Go to the documentation of this file.
00001 #ifndef BaseFlatGunSource_H
00002 #define BaseFlatGunSource_H
00003 
00009 #include <string>
00010 
00011 #include "HepPDT/defs.h"
00012 // #include "HepPDT/DefaultConfig.hh"
00013 #include "HepPDT/TableBuilder.hh"
00014 //#include "HepPDT/ParticleDataTableT.hh"
00015 #include "HepPDT/ParticleDataTable.hh"
00016 
00017 #include "HepMC/GenEvent.h"
00018 
00019 #include "FWCore/Framework/interface/GeneratedInputSource.h"
00020 #include "FWCore/Framework/interface/ESHandle.h"
00021 #include "FWCore/Framework/interface/EventSetup.h"
00022 
00023 #include "CLHEP/Random/JamesRandom.h"
00024 #include "CLHEP/Random/RandFlat.h"
00025 
00026 #include <memory>
00027 #include "boost/shared_ptr.hpp"
00028 
00029 namespace edm
00030 {
00031   
00032   class BaseFlatGunSource : public GeneratedInputSource
00033   {
00034   
00035   public:
00036     BaseFlatGunSource(const ParameterSet &, const InputSourceDescription&  );
00037     // BaseFlatGunSource( const ParameterSet& ) ;
00038     virtual ~BaseFlatGunSource();
00039     void beginRun( edm::Run & r, const edm::EventSetup& ) ;
00040   private:
00041    
00042   protected :
00043   
00044     // non-virtuals ! this and only way !
00045     //
00046     // data members
00047     
00048     // gun particle(s) characteristics
00049     std::vector<int> fPartIDs ;
00050     double           fMinEta ;
00051     double           fMaxEta ;
00052     double           fMinPhi ;
00053     double           fMaxPhi ;
00054 
00055     // the event format itself
00056     HepMC::GenEvent* fEvt;
00057 
00058     // HepMC/HepPDT related things 
00059     // (for particle/event construction)
00060     //std::string      fPDGTablePath ;
00061     //std::string      fPDGTableName ; 
00062     // DefaultConfig::ParticleDataTable* fPDGTable;
00063     // DefaultConfig::ParticleDataTable* fTestTable ;
00064     // ESHandle<DefaultConfig::ParticleDataTable> fPDGTable ;
00065     ESHandle<HepPDT::ParticleDataTable> fPDGTable ;
00066                         
00067     int              fVerbosity ;
00068 
00069     CLHEP::HepRandomEngine& fRandomEngine ;
00070     CLHEP::RandFlat*        fRandomGenerator; 
00071     
00072     bool             fAddAntiParticle;
00073     
00074   };
00075 } 
00076 
00077 #endif