CMS 3D CMS Logo

FlatEGunASCIIWriter.h

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------
00002 // FlatEGunASCIIWriter.h
00003 // Author: Julia Yarba
00004 //
00005 // This code has been molded after examples in HepMC and HepPDT, and
00006 // after single particle gun example (private contacts with Lynn Garren)
00007 //
00008 // Plus, it uses the ParameterSet funtionalities for "user interface"  
00009 //
00010 // ----------------------------------------------------------------------
00011 
00012 #ifndef FlatEGunASCIIWriter_h
00013 #define FlatEGunASCIIWriter_h
00014 
00015 // base class
00016 #include "FWCore/Framework/interface/EDAnalyzer.h"
00017 
00018 // for local things (data members)
00019 #include <string>
00020 
00021 #include "HepPDT/defs.h"
00022 #include "HepPDT/TableBuilder.hh"
00023 #include "HepPDT/ParticleDataTable.hh"
00024 
00025 #include "HepMC/GenEvent.h"
00026 #include "HepMC/IO_Ascii.h"
00027 
00028 #include "FWCore/Framework/interface/GeneratedInputSource.h"
00029 #include "FWCore/Framework/interface/ESHandle.h"
00030 #include "FWCore/Framework/interface/EventSetup.h"
00031 
00032 namespace edm 
00033 {
00034 
00035    class FlatEGunASCIIWriter : public edm::EDAnalyzer 
00036    {
00037 
00038       public:
00039 
00040      // The following is not yet used, but will be the primary
00041      // constructor when the parameter set system is available.
00042      //
00043      explicit FlatEGunASCIIWriter( const edm::ParameterSet& ) ;
00044      
00045      virtual ~FlatEGunASCIIWriter() ;
00046      
00047      virtual void analyze(  const edm::Event&, const edm::EventSetup& );
00048          virtual void beginJob( const EventSetup& ) ;
00049      
00050    private:
00051      
00052      
00053      // gun particle(s) characteristics
00054      std::vector<int>        fPartIDs ;
00055      double                  fMinEta ;
00056      double                  fMaxEta ;
00057      double                  fMinPhi ;
00058      double                  fMaxPhi ;
00059      double                  fMinE   ;
00060      double                  fMaxE   ;
00061      
00062      // the event format itself
00063      HepMC::GenEvent*  fEvt;
00064      
00065      
00066      // HepMC/HepPDT related things 
00067      ESHandle<HepPDT::ParticleDataTable> fPDGTable ;
00068          
00069      std::string    fOutFileName;
00070      HepMC::IO_Ascii * fOutStream ;
00071      
00072      int            fCurrentEvent ; // event counter - untill I learn how to get it
00073                                         // from edm::Event ) EventID ??? or what ?)
00074      
00075    };
00076    
00077 }
00078 
00079 #endif

Generated on Tue Jun 9 17:39:07 2009 for CMSSW by  doxygen 1.5.4