CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/GeneratorInterface/Pythia8Interface/interface/JetMatchingHook.h

Go to the documentation of this file.
00001 #ifndef gen_JetMatchinhHook_h
00002 #define gen_JetMatchingHook_h
00003 
00004 #include <Pythia.h>
00005 
00006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00007 
00008 #include "SimDataFormats/GeneratorProducts/interface/LHECommonBlocks.h"
00009 
00010 #include "GeneratorInterface/LHEInterface/interface/LHERunInfo.h"
00011 #include "GeneratorInterface/LHEInterface/interface/LHEEvent.h"
00012 
00013 #include "GeneratorInterface/PartonShowerVeto/interface/JetMatching.h"
00014 
00015 class JetMatchingHook : public Pythia8::UserHooks
00016 {
00017 
00018 public:
00019 
00020   JetMatchingHook( const edm::ParameterSet&, Pythia8::Info* );
00021   virtual ~JetMatchingHook();
00022   
00023   virtual bool canVetoPartonLevel() { return true; }  
00024   virtual bool doVetoPartonLevel( const Pythia8::Event& event );
00025     
00026   void setEventNumber( int ievt ) { fEventNumber = ievt; return ; }
00027   
00028   void init( lhef::LHERunInfo* runInfo );
00029   void resetMatchingStatus() { fJetMatching->resetMatchingStatus(); return; }
00030   void beforeHadronization( lhef::LHEEvent* lhee );
00031   
00032 protected:
00033 
00034   void setLHERunInfo( lhef::LHERunInfo* lheri ) { 
00035      fRunBlock=lheri;
00036      if ( fRunBlock == 0 ) return;
00037      const lhef::HEPRUP* heprup = fRunBlock->getHEPRUP();
00038      lhef::CommonBlocks::fillHEPRUP(heprup); 
00039      return;
00040   }
00041   void setLHEEvent( lhef::LHEEvent* lhee ) { 
00042      fEventBlock=lhee; 
00043      if ( fEventBlock == 0 ) return;
00044      const lhef::HEPEUP* hepeup = fEventBlock->getHEPEUP();
00045      lhef::CommonBlocks::fillHEPEUP(hepeup);
00046      return;
00047   }
00048     
00049 private:
00050 
00051      lhef::LHERunInfo*       fRunBlock;
00052      lhef::LHEEvent*         fEventBlock;
00053      int                     fEventNumber;
00054      Pythia8::Info*          fInfoPtr;
00055      gen::JetMatching*       fJetMatching;
00056           
00057      void setHEPEVT( const Pythia8::Event& );
00058      // void setHEPEVT();
00059      int getAncestor( int, const Pythia8::Event& );
00060  
00061 };
00062 
00063 #endif