CMS 3D CMS Logo

Public Member Functions | Protected Member Functions | Protected Attributes

JetMatchingHook Class Reference

#include <JetMatchingHook.h>

List of all members.

Public Member Functions

virtual void beforeHadronization (lhef::LHEEvent *lhee)
virtual bool canVetoPartonLevel ()
virtual bool doVetoPartonLevel (const Pythia8::Event &event)
virtual void init (lhef::LHERunInfo *runInfo)
virtual bool initAfterBeams ()
 JetMatchingHook (const edm::ParameterSet &, Pythia8::Info *)
void resetMatchingStatus ()
void setEventNumber (int ievt)
virtual ~JetMatchingHook ()

Protected Member Functions

 JetMatchingHook ()
void setLHEEvent (lhef::LHEEvent *lhee)
void setLHERunInfo (lhef::LHERunInfo *lheri)

Protected Attributes

lhef::LHEEventfEventBlock
int fEventNumber
Pythia8::Info * fInfoPtr
bool fIsInitialized
Py8toJetInputfJetInputFill
gen::JetMatchingfJetMatching
lhef::LHERunInfofRunBlock

Detailed Description

Definition at line 18 of file JetMatchingHook.h.


Constructor & Destructor Documentation

JetMatchingHook::JetMatchingHook ( const edm::ParameterSet ,
Pythia8::Info *   
)
JetMatchingHook::~JetMatchingHook ( ) [virtual]

Definition at line 64 of file JetMatchingHook.cc.

References fJetMatching.

{
   if ( fJetMatching ) delete fJetMatching;
}
JetMatchingHook::JetMatchingHook ( ) [inline, protected]

Definition at line 46 of file JetMatchingHook.h.

: UserHooks() {} 

Member Function Documentation

void JetMatchingHook::beforeHadronization ( lhef::LHEEvent lhee) [virtual]

Definition at line 86 of file JetMatchingHook.cc.

References gen::JetMatching::beforeHadronisation(), gen::JetMatching::beforeHadronisationExec(), fJetMatching, and setLHEEvent().

Referenced by Pythia8Hadronizer::hadronize().

{

   setLHEEvent( lhee );   
   fJetMatching->beforeHadronisation( lhee );
      
   // here we'll have to adjust, if needed, for "massless" particles
   // from earlier Madgraph version(s)
   // also, we'll have to setup elements of the Py6 fortran array 
   // VINT(357), VINT(358), VINT(360) and VINT(390)
   // if ( fJetMatching->getMatchingScheme() == "Madgraph" )
   // {
   //    
   // }
   
   fJetMatching->beforeHadronisationExec();  
   
   return;   

}
virtual bool JetMatchingHook::canVetoPartonLevel ( ) [inline, virtual]

Definition at line 33 of file JetMatchingHook.h.

{ return true; }  
bool JetMatchingHook::doVetoPartonLevel ( const Pythia8::Event &  event) [virtual]

Definition at line 108 of file JetMatchingHook.cc.

References fEventBlock, Py8toJetInput::fillJetAlgoInput(), fJetInputFill, fJetMatching, gen::JetMatching::getPartonList(), hepeup_, gen::JetMatching::isMatchingDone(), gen::JetMatching::match(), and HEPEUP_::nup.

{
                  
   // event.list();
   
   // extract "hardest" event - the output will go into workEvent, 
   // which is a data mamber of base class UserHooks
   //
   subEvent(event,true);
      
   if ( !hepeup_.nup || fJetMatching->isMatchingDone() )
   {
      return true;
   }
   
   //
   // bool jmtch = fJetMatching->match( 0, 0, true ); // true if veto-ed, false if accepted (not veto-ed)
   std::vector<fastjet::PseudoJet> jetInput = fJetInputFill->fillJetAlgoInput( event, workEvent,
                                                                               fEventBlock,
                                                                               fJetMatching->getPartonList() );
   bool jmtch = fJetMatching->match( fEventBlock, &jetInput );
   if ( jmtch )
   {
      return true;
   }
         
   // Do not veto events that got this far
   //
   return false;

}
void JetMatchingHook::init ( lhef::LHERunInfo runInfo) [virtual]
virtual bool JetMatchingHook::initAfterBeams ( ) [inline, virtual]

Definition at line 39 of file JetMatchingHook.h.

References fIsInitialized, fJetMatching, and gen::JetMatching::initAfterBeams().

{ if ( fIsInitialized ) return true; fJetMatching->initAfterBeams(); fIsInitialized=true; return true; }
void JetMatchingHook::resetMatchingStatus ( ) [inline]
void JetMatchingHook::setEventNumber ( int  ievt) [inline]

Definition at line 36 of file JetMatchingHook.h.

References fEventNumber.

{ fEventNumber = ievt; return ; }
void JetMatchingHook::setLHEEvent ( lhef::LHEEvent lhee) [inline, protected]

Definition at line 55 of file JetMatchingHook.h.

References fEventBlock, lhef::CommonBlocks::fillHEPEUP(), and lhef::LHEEvent::getHEPEUP().

Referenced by beforeHadronization().

                                         { 
     fEventBlock=lhee; 
     if ( fEventBlock == 0 ) return;
     const lhef::HEPEUP* hepeup = fEventBlock->getHEPEUP();
     lhef::CommonBlocks::fillHEPEUP(hepeup);
     return;
  }
void JetMatchingHook::setLHERunInfo ( lhef::LHERunInfo lheri) [inline, protected]

Definition at line 48 of file JetMatchingHook.h.

References lhef::CommonBlocks::fillHEPRUP(), fRunBlock, and lhef::LHERunInfo::getHEPRUP().

Referenced by init().

                                              { 
     fRunBlock=lheri;
     if ( fRunBlock == 0 ) return;
     const lhef::HEPRUP* heprup = fRunBlock->getHEPRUP();
     lhef::CommonBlocks::fillHEPRUP(heprup); 
     return;
  }

Member Data Documentation

Definition at line 66 of file JetMatchingHook.h.

Referenced by doVetoPartonLevel(), and setLHEEvent().

Definition at line 67 of file JetMatchingHook.h.

Referenced by setEventNumber().

Pythia8::Info* JetMatchingHook::fInfoPtr [protected]

Definition at line 69 of file JetMatchingHook.h.

Definition at line 77 of file JetMatchingHook.h.

Referenced by initAfterBeams().

Definition at line 72 of file JetMatchingHook.h.

Referenced by doVetoPartonLevel(), and init().

Definition at line 65 of file JetMatchingHook.h.

Referenced by init(), and setLHERunInfo().