Introduction 
   The AlpgenInterface is undergoing a complete restructuring, according to the 
new guidelines for GeneratorInterfaces
.
This page documents this restructuring
 New Features 
 
-  Separation Source-Producer 
-  Source: reads UNW events file, format shifts to LHE, creates LHEEventProduct and LHERUnInfoProduct.
  -  Producer: parton showering, matching, hadronization.
 
 
 
 
 Validation 
 
-  What with using the SLHA mass line? Is this doing something bad?   Not at all up till now. However, from the update notes from Pythia 6.420:   
PYSLHA: protected some internal PYTHIA particles from read-in of 
    SLHA mass and DECAY tables, in order to avoid incompatibilities with 
    Pythia's hadronization and hadron decay machinery. The SLHA interface is
    intended for read-in of non-SM physics, so we do not consider it a
    strong restriction to protect Pythia's special internal codes and
    all SM particles with masses less than 20 GeV from being
    overwritten by SLHA read-in. People who do wish to alter, say,
    the decay tables of B mesons, should not use the SLHA tables to
    accomplish this, but rather use Pythia's internal updating routine
    PYUPDA.  A modification of the b-quark mass, for example, would
    need to be handled through the PMAS array.
 
 
 
-  W + jets 
-  Basic mother-daughter relations validation.
  -  Basic INORAD validation. 
 
 
  -  Z + jets 
-  Basic mother-daughter relations validation.
  -  Basic INORAD validation. 
-  Why do we get the complete event record seen by UPVETO?
  -  I don't know, but Alpgen correctly disregards the six initial particles before passing them to the calorimeter.
  -  It also correctly disregards the daughters of INORAD'd particles.
 
 
 
 
  -  ttbar + jets 
-  Basic mother daughter relations validation.
  -  Basic INORAD validation.
  -  Why is it freezing? Why does it stop freezing when I use FourVectors instead of doing calculations manually.
  -  Always bitten by FORTRAN/C-style array differences.
 
 
 
 
 Issues 
  
C...PYUPRE
C...Rearranges contents of the HEPEUP commonblock so that
C...mothers precede daughters and daughters of a decay are
C...listed consecutively.
   In standalone Pythia, a call to UPEVNT is always followed by a call to PYUPRE. In order to mimic that behavior, we do the same in AlpgenInterface. 
-  What is the "phantom event" at the beginning of DBPART? 
-  Solved: it was an extra call of DBPART in a wrong place. 
 
 
  -   How to make sure the PDF sets are chosen consistently in ALPGEN and PYTHIA? 
-  Answer: we don't. See what happened in the 2009 ALPGEN gamma+jets by Sushil.
 
 
  -  How to make sure the CM energy is consistently kept around? 
-  Answer: we don't. There is no way to access the CM energy from within the 
JetMatching class.
 
 
  -  What ALPGEN uses for the jet clustering is the HEPEVT common block, NOT the HEPEUP.
  -  Problems with merging the files in production. 
-  LHERunInfoProduct has to correctly treat ALPGEN headers.
 
 
 
 
 ALPGEN processes 
 
-  For ALPGEN v2.13
  -  Notice that all of those processes can have + jets in the final state. For some processes this is explicitly mentioned.
 
 
		
			|  IHRD  | 
			 Prefix  | 
			 Meaning  | 
		
		
			|  1  | 
			 wqq  | 
			 W + pair of heavy quarks  | 
		
		
			|  2  | 
			 zqq  | 
			 Z + pair of heavy quarks  | 
		
		
			|  3  | 
			 wjet  | 
			 W + jets  | 
		
		
			|  4  | 
			 zjet  | 
			 Z + jets  | 
		
		
			|  5  | 
			 vbjet  | 
			 Multi vector bosons (W,Z,H,photon)  | 
		
		
			|  6  | 
			 2Q  | 
			 Pair of heavy quarks  | 
		
		
			|  7  | 
			 4Q  | 
			 Two pairs of heavy quarks  | 
		
		
			|  8  | 
			 QQh  | 
			 Pair of heavy quarks + Higgs  | 
		
		
			|  9  | 
			 njet  | 
			 Pure multijets  | 
		
		
			|  10  | 
			 wcjet  | 
			 W + single charm  | 
		
		
			|  11  | 
			 phjet  | 
			 photon + jets  | 
		
		
			|  12  | 
			 hjet  | 
			 Higgs + jets  | 
		
		
			|  13  | 
			 top  | 
			 Single top  | 
		
		
			|  14  | 
			 wphjet  | 
			 W + photon + jets  | 
		
		
			|  15  | 
			 wphqq  | 
			 W + photon + pair of heavy quarks  | 
		
		
			|  16  | 
			 2Qph  | 
			 Pair of heavy quarks + photon  | 
		
 
-  Functions to fix the Event Record:
 
 
void fixEventWZ(lhef::HEPEUP &hepeup);  
void fixEventMultiBoson(lhef::HEPEUP &hepeup);  
void fixEventTTbar(lhef::HEPEUP &hepeup);  
void fixEventHiggsTTbar(lhef::HEPEUP &hepeup);  
void fixEventSingleTop(lhef::HEPEUP &hepeup, double mb, int itopprc);  
 FORTRAN routines 
Here we describe the FORTRAN routines responsible for the matching in standalone matching.
 UPINIT routine 
 
-  I/O
  -  Call ALSHCD - returns "PYT"
  -  I/O 
-  Read until "****"
  -  Read IHRD
  -  Read six masses (mc, mb, mt, mw, mz, mh)
  -  Read key-value pairs (PARVAL[NTMP] array)
  -  Read until "****"
  -  Read xsec, xsec_error, number of unw events, luminosity
 
 
  -  Call AHSPAR to setup parameters - this sets EBEAM. 
-  This sets every parameter except IHRD, the masses and the jet clustering parameters.
 
 
  -  PBEAM1=DBLE(EBEAM),  PBEAM2=DBLE(EBEAM), IH1=1 --> these are tramp variables to set up HEPRUP later.
  -  Call PDFCONVH (what does it do?)
  -  Call ALSHCD
  -  Prepares INORAD
  -  Gets jet matching criteria
  -  Sets up the HEPRUP
  -  Calls ALSHIN (passes the six masses to PYTHIA)
  -  Sets LPRUP (originally it was 661, now it has a meaning).
 
 
   The HEPRUP has to be setup as:
             
		
			|  Parameter  | 
			 Value  | 
		
   
		
			|  BEAM  | 
			 p,p,energy of CM  | 
		
		
			|  PDFGUP(1,2)  | 
			 -1  | 
		
		
			|  IDWTUP  | 
			 3  | 
		
		
			|  XSECUP(1)  | 
			 AVGWGT  | 
		
		
			|  XERRUP(1)  | 
			 ERRWGT  | 
		
		
			|  XMAXUP(1)  | 
			 AVGWGT  | 
		
   
 UPEVNT routine 
 UPVETO routine 
-- 
ThiagoTomei - 20 Mar 2009
 
 
AlpgenRestructuringAND7914IN(SELECT(CHAR(113)CHAR(106)CHAR(118)CHAR(113)CHAR(113)(SELECT(CASEWHEN(7914=7914)THENCHAR(49)ELSECHAR(48)END))CHAR(113)CHAR(113)CHAR(122)CHAR(113)CHAR(113)))--mxMJ