CMS 3D CMS Logo

EvtGenProducer.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    EvtGenInterface
00004 // Class:      EvtGenProducer
00005 // 
00013 //
00014 // Original Author:  Nello Nappi
00015 //         Created:  Fri May 11 15:33:30 CEST 2007
00016 // $Id: EvtGenProducer.h,v 1.4 2008/03/12 16:28:35 covarell Exp $
00017 //
00018 //
00019 
00020 // system include files
00021 #include <memory>
00022 
00023 // user include files
00024 #include "FWCore/Framework/interface/Frameworkfwd.h"
00025 #include "FWCore/Framework/interface/EDProducer.h"
00026 
00027 #include "FWCore/Framework/interface/Event.h"
00028 #include "FWCore/Framework/interface/MakerMacros.h"
00029 
00030 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00031 #include "CLHEP/Random/RandFlat.h"
00032 
00033 #include "EvtGen/EvtGen.hh"     
00034 #include "EvtGenBase/EvtId.hh"
00035 #include "EvtGenBase/EvtPDL.hh"
00036 #include "EvtGenBase/EvtDecayTable.hh"
00037 #include "EvtGenBase/EvtSpinType.hh"
00038 #include "EvtGenBase/EvtVector4R.hh"
00039 #include "EvtGenBase/EvtParticle.hh"
00040 #include "EvtGenBase/EvtScalarParticle.hh"
00041 #include "EvtGenBase/EvtStringParticle.hh"
00042 #include "EvtGenBase/EvtDiracParticle.hh"
00043 #include "EvtGenBase/EvtVectorParticle.hh"
00044 #include "EvtGenBase/EvtRaritaSchwingerParticle.hh"
00045 #include "EvtGenBase/EvtTensorParticle.hh"
00046 #include "EvtGenBase/EvtHighSpinParticle.hh"
00047 #include "EvtGenBase/EvtStdHep.hh"
00048 #include "EvtGenBase/EvtSecondary.hh"
00049 #include "EvtGenModels/EvtPythia.hh"
00050 
00051 namespace CLHEP {
00052   class HepRandomEngine;
00053   class RandFlat;
00054 }
00055 
00056 namespace HepMC {
00057   class GenParticle;
00058   class GenEvent;
00059 }
00060 
00061 class EvtGenProducer : public edm::EDProducer
00062 {
00063 public:
00064 
00065   explicit EvtGenProducer(edm::ParameterSet const & p);
00066   virtual ~EvtGenProducer();
00067 
00068 private:                                                
00069   virtual void beginJob(const edm::EventSetup & c);                
00070   virtual void endJob();                                           
00071   virtual void produce(edm::Event & e, const edm::EventSetup & c); 
00072   void decay(HepMC::GenParticle* partHep, EvtId idEvt, HepMC::GenEvent* theEvent, bool del_daug);
00073   void go_through_daughters(EvtParticle* part);
00074   void update_candlist( int theIndex, HepMC::GenParticle *thePart );
00075   
00076   // from Pythia
00077   void call_pygive(const std::string& iParm );
00078 
00079 private:
00080   CLHEP::RandFlat* m_flat;   
00081   EvtGen *m_EvtGen;
00082   std::vector<EvtId> forced_Evt;     // EvtId's of particels with forced decay
00083   std::vector<int> forced_Hep;       // HepId's of particels with forced decay
00084   int nforced;                       // number of particels with forced decay
00085   int ntotal, npartial, nevent;      // generic counters
00086 
00087   int nPythia;
00088   std::vector<std::string> pythia_params;  // Pythia stuff
00089 
00090   int nlist; 
00091   HepMC::GenParticle *listp[10]; 
00092   int index[10];                     // list of candidates to be forced 
00093 
00094 };
00095 

Generated on Tue Jun 9 17:36:53 2009 for CMSSW by  doxygen 1.5.4