Skip to content
Snippets Groups Projects
Commit 92f7433d authored by Lynn Garren's avatar Lynn Garren
Browse files

adding herwig translation from HepMC 1.24

parent 5dd89f63
Branches
Tags
No related merge requests found
// $Id: CBhepevt.h,v 1.2 2003/10/08 19:36:47 garren Exp $
// $Id: CBhepevt.h,v 1.3 2003/10/10 15:56:34 garren Exp $
// ----------------------------------------------------------------------
// CBhepevt.h
// ----------------------------------------------------------------------
......@@ -65,9 +65,9 @@ public:
bool addtoHEPEVT( const GenEvent * ); // not yet implemented
void print( std::ostream & os = std::cout ) const;
void print_hepevt( std::ostream & os = std::cout );
void printHEPEVT( std::ostream & os = std::cout );
void print_legend( std::ostream & os = std::cout );
void print_hepevt_particle( int index, std::ostream & os = std::cout );
void printHEPEVTparticle( int index, std::ostream & os = std::cout );
// decide how to deal with HEPEVT
bool trustMothers() const { return itsTrustMothers; }
......
// $Id: CBhepevt.icc,v 1.2 2003/10/08 19:36:47 garren Exp $
// $Id: CBhepevt.icc,v 1.3 2003/10/10 15:56:34 garren Exp $
// ----------------------------------------------------------------------
// CBhepevt.icc
// ----------------------------------------------------------------------
......@@ -77,7 +77,7 @@ void CBhepevt::print( std::ostream & os ) const
os << " trustMothersAndDaughters: " << itsTrustMothersAndDaughters << std::endl;
}
void CBhepevt::print_hepevt( std::ostream & os )
void CBhepevt::printHEPEVT( std::ostream & os )
{
// dumps the content of this HEPEVT event to os (Width is 80)
os << "________________________________________"
......@@ -91,7 +91,7 @@ void CBhepevt::print_hepevt( std::ostream & os )
os << "________________________________________"
<< "________________________________________" << std::endl;
for ( int i=1; i <= number_entries(); ++i ) {
print_hepevt_particle( i, os );
printHEPEVTparticle( i, os );
}
os << "________________________________________"
<< "________________________________________" << std::endl;
......@@ -99,13 +99,18 @@ void CBhepevt::print_hepevt( std::ostream & os )
void CBhepevt::print_legend( std::ostream & os )
{
os << "Indx Stat Par- chil- "
<< "( P_x, P_y, P_z, Energy M ) [GeV]" << std::endl;
os << " ID ents dren "
<< "Prod ( X, Y, Z, cT ) [mm]" << std::endl;
char outline[81];
sprintf( outline,"%4s %4s %4s %5s %10s, %9s, %9s, %9s, %10s",
"Indx","Stat","Par-","chil-",
"( P_x","P_y","P_z","Energy","M ) [GeV]");
os << outline << std::endl;
sprintf( outline,"%9s %4s %4s %10s, %9s, %9s, %9s) %9s",
"ID ","ents","dren",
"Prod ( X","Y","Z","cT", "[mm]");
os << outline << std::endl;
}
void CBhepevt::print_hepevt_particle( int i, std::ostream & os )
void CBhepevt::printHEPEVTparticle( int i, std::ostream & os )
{
// dumps the content HEPEVT particle entry i (Width is 120)
// here i is the C array index (i.e. it starts at 0 ... whereas the
......@@ -148,7 +153,7 @@ bool CBhepevt::check_hepevt_consistency( std::ostream & os )
}
os << "Inconsistent entry " << i
<< " first parent > last parent " << std::endl;
CBhepevt::print_hepevt_particle( i, os );
CBhepevt::printHEPEVTparticle( i, os );
}
for ( int m = moth1; m<=moth2 && m!=0; ++m ) {
if ( m>CBhepevt::number_entries() || m < 0 ) {
......@@ -159,7 +164,7 @@ bool CBhepevt::check_hepevt_consistency( std::ostream & os )
}
os << "Inconsistent entry " << i
<< " mother points out of range " << std::endl;
CBhepevt::print_hepevt_particle( i, os );
CBhepevt::printHEPEVTparticle( i, os );
}
int mChild1 = CBhepevt::first_child(m);
int mChild2 = CBhepevt::last_child(m);
......@@ -174,8 +179,8 @@ bool CBhepevt::check_hepevt_consistency( std::ostream & os )
os << "Inconsistent mother-daughter relationship between "
<< i << " & " << m
<< " (try !trustMother)" << std::endl;
CBhepevt::print_hepevt_particle( i, os );
CBhepevt::print_hepevt_particle( m, os );
CBhepevt::printHEPEVTparticle( i, os );
CBhepevt::printHEPEVTparticle( m, os );
}
}
// 2. check its daughters
......@@ -189,7 +194,7 @@ bool CBhepevt::check_hepevt_consistency( std::ostream & os )
}
os << "Inconsistent entry " << i
<< " first child > last child " << std::endl;
CBhepevt::print_hepevt_particle( i, os );
CBhepevt::printHEPEVTparticle( i, os );
}
for ( int d = dau1; d<=dau2 && d!=0; ++d ) {
if ( d>CBhepevt::number_entries() || d < 0 ) {
......@@ -200,7 +205,7 @@ bool CBhepevt::check_hepevt_consistency( std::ostream & os )
}
os << "Inconsistent entry " << i
<< " child points out of range " << std::endl;
CBhepevt::print_hepevt_particle( i, os );
CBhepevt::printHEPEVTparticle( i, os );
}
int d_moth1 = CBhepevt::first_parent(d);
int d_moth2 = CBhepevt::last_parent(d);
......@@ -215,8 +220,8 @@ bool CBhepevt::check_hepevt_consistency( std::ostream & os )
os << "Inconsistent mother-daughter relationship between "
<< i << " & " << d
<< " (try trustMothers)"<< std::endl;
CBhepevt::print_hepevt_particle( i, os );
CBhepevt::print_hepevt_particle( d, os );
CBhepevt::printHEPEVTparticle( i, os );
CBhepevt::printHEPEVTparticle( d, os );
}
}
}
......@@ -240,7 +245,7 @@ bool CBhepevt::check_hepevt_consistency( std::ostream & os )
os << "To obtain a file summarizing the inconsistency, you should:"
<< "\n\t ofstream myFile(\"myInconsistentEvent.txt\"); "
<< "\n\t CBhepevt::check_hepevt_consistency(myFile); "
<< "\n\t CBhepevt::print_hepevt(myFile); "
<< "\n\t CBhepevt::printHEPEVT(myFile); "
<< "\n[now write the event to HepMC using something like"
<< "\n\t\t myIO_HEPEVT->write_event(myEvent); ]"
<< "\n\t myEvent->print( myFile ); "
......
// $Id: CBherwig.h,v 1.1 2003/10/10 15:56:34 garren Exp $
// ----------------------------------------------------------------------
// CBherwig.h
// ----------------------------------------------------------------------
// Author: Lynn Garren, Marc Paterno
//
// This is part of the Fortran interface to the herwig common blocks
// Do not attempt to use the common blocks directly.
//
// user code:
// CBherwig * hep = CBherwig::instance();
// hep->hepevt()->nhep;
// ----------------------------------------------------------------------
#ifndef CBHERWIG_H
#define CBHERWIG_H
//////////////////////////////////////////////////////////////////////////
// Matt.Dobbs@Cern.CH, October 2002, refer to:
// M. Dobbs and J.B. Hansen, "The HepMC C++ Monte Carlo Event Record for
// High Energy Physics", Computer Physics Communications (to be published).
//
// IO class for reading the (non-standard) HEPEVT common block from
// the Herwig monte carlo program.
// Notes:
// - The HERWIG HEPEVT common block is non-standard, primarily because it
// contains some color flow information. When you call CBherwig, the
// HEPEVT common block is transformed to the standard. THIS CHANGES THE
// CONTENT of HEPEVT!.
// - The HERWIG HEPEVT common block has some EXTRA non-physical ENTRIES
// (such as CMS frame, HARD subprocess, and CONE).
// These are removed by CBherwig. Thus the HepMC event will APPEAR
// to have fewer particles in it that herwig did.
// There is a switch itsNoBarcodeGaps. For
// true - then the extra particles are removed from HEPEVT, with
// the result that the HepMC barcodes will be sequential, with
// no gaps.
// false - the barcodes will correspond directly to the HEPEVT index, but
// there will be gaps ... ie some barcodes will be unassigned.
// this switch requested by I Hinchliffe, October 31, 2002
// - some of the Herwig GLUON SPLITTING products are not properly documented
// in hepevt. I was unable to repair this in a simple and robust way.
// Therefore some of the gluon splitting products will be orphans
// in the HepMC output.
//////////////////////////////////////////////////////////////////////////
#include "CLHEP/HepMC/GenEvent.h"
#include "CLHEP/HepMC/HepMCConfig.h"
#include "CLHEP/HepMC/include/stdhep.h"
namespace HepMC {
/**
* @author
* @ingroup hepmc
*/
class CBherwig {
public:
CBherwig();
hepevt_t * hepevt() { return hptr; }
static int max_number_entries() { return NMXHEP; }
static int max_multiple_interactions() { return NMXMLT; }
int event_number() { return hptr->nevhep; }
int number_entries() { return hptr->nhep; }
int first_parent( int index ); // index of 1st mother
int last_parent( int index ); // index of last mother
int first_child( int index ); // index of 1st daughter
int last_child( int index ); // index of last daughter
int number_children( int index );
int number_parents( int index );
void clean( );
void zero_everything() { clean(); }
bool check_hepevt_consistency( std::ostream & os = std::cout );
bool toGenEvent( GenEvent *, bool printErrors );
bool addtoHEPEVT( const GenEvent * ); // not yet implemented
bool no_gaps_in_barcodes() const { return itsNoBarcodeGaps; }
void set_no_gaps_in_barcodes( bool a ) { itsNoBarcodeGaps=a; }
void print( std::ostream & os = std::cout ) const;
void printHEPEVT( std::ostream & os = std::cout );
void print_legend( std::ostream & os = std::cout );
void printHEPEVTparticle( int index, std::ostream & os = std::cout );
protected: // for internal use only
// decide how to deal with HEPEVT
bool trustMothers() const { return itsTrustMothers; }
bool trustMothersAndDaughters() const { return itsTrustMothersAndDaughters; }
void setTrustMothers( bool b ) { itsTrustMothers = b; }
void setTrustMothersAndDaughters( bool b ) { itsTrustMothersAndDaughters = b; }
int translate_herwig_to_pdg_id( int i, bool printInconsistencyErrors ) const;
private:
hepevt_t * hptr;
bool itsTrustMothers;
bool itsTrustMothersAndDaughters;
bool itsNoBarcodeGaps;
// we need to use HepPDT translation instead
std::vector<int> m_herwig_to_pdg_id;
std::set<int> m_no_antiparticles;
// internal functions
GenParticle* createParticle( int index );
void buildProductionVertex( int i,
std::vector<GenParticle*>& hepevt_particle,
GenEvent* evt,
bool printInconsistencyErrors );
void buildEndVertex( int i, std::vector<GenParticle*>& hepevt_particle,
GenEvent* evt,
bool printInconsistencyErrors );
int find( const std::map<GenParticle*,int>& m, GenParticle* p);
void repair_hepevt( bool printInconsistencyErrors );
void remove_gaps_in_hepevt();
void zero_hepevt_entry( int i );
}; // CBherwig
} // HepMC
#include "CLHEP/HepMC/CBherwig.icc"
#endif // CBHERWIG_H
This diff is collapsed.
// $Id: ConvertHEPEVT.h,v 1.1.1.1 2003/07/15 20:15:05 garren Exp $
// $Id: ConvertHEPEVT.h,v 1.2 2003/10/10 15:56:34 garren Exp $
// ----------------------------------------------------------------------
//
// ConvertHEPEVT.h
......@@ -14,8 +14,8 @@
// bool tf = conv.fromGenEvent( evt );
//
// ----------------------------------------------------------------------
#ifndef CONVERTHEPEVT_H
#define CONVERTHEPEVT_H
#ifndef CONVERT_HEPEVT_H
#define CONVERT_HEPEVT_H
#include "CLHEP/HepMC/GenEventConvert.h"
#include "CLHEP/HepMC/CBhepevt.h"
......@@ -27,4 +27,4 @@ typedef CBInterface<CBhepevt> FIhepevt;
}
#endif // CONVERTHEPEVT_H
#endif // CONVERT_HEPEVT_H
// $Id: ConvertHerwig.h,v 1.1 2003/10/10 15:56:34 garren Exp $
// ----------------------------------------------------------------------
//
// ConvertHerwig.h
//
// defines methods to build GenEvent from Herwig
//
// User Code:
//#include "CLHEP/HepMC/ConvertHerwig.h"
//#include "CLHEP/HepMC/GenEvent.h"
// ...
// HepMC::ConvertHerwig conv;
// HepMC::GenEvent* evt = conv.getGenEventfromHEPEVT();
// bool tf = conv.fromGenEvent( evt );
//
// ----------------------------------------------------------------------
#ifndef CONVERT_HERWIG_H
#define CONVERT_HERWIG_H
#include "CLHEP/HepMC/GenEventConvert.h"
#include "CLHEP/HepMC/CBherwig.h"
namespace HepMC {
typedef GenEventConvert<CBherwig> ConvertHerwig;
typedef CBInterface<CBherwig> FIherwig;
}
#endif // CONVERT_HERWIG_H
// $Id: GenEventConvert.h,v 1.2 2003/10/08 19:36:47 garren Exp $
// $Id: GenEventConvert.h,v 1.3 2003/10/10 15:56:34 garren Exp $
// ----------------------------------------------------------------------
//
// GenEventConvert.h
......@@ -41,11 +41,15 @@ public:
bool toGenEvent( GenEvent * );
bool fromGenEvent( const GenEvent * );
bool addtoHEPEVT( const GenEvent * );
bool fill_next_event( GenEvent * evt ) { toGenEvent(evt); }
GenEvent * read_next_event() { return getGenEventfromHEPEVT(); }
bool fill_next_event( GenEvent * evt ) { return toGenEvent(evt); }
// decide how to deal with HEPEVT
bool printInconsistencyErrors() const { return itsInconsitencyErrors; }
void setInconsitencyErrors( bool b ) { itsInconsitencyErrors = b; }
// print
void print_hepevt( std::ostream & os = std::cout );
private:
......
// $Id: GenEventConvert.icc,v 1.2 2003/10/08 19:36:47 garren Exp $
// $Id: GenEventConvert.icc,v 1.3 2003/10/10 15:56:34 garren Exp $
// ----------------------------------------------------------------------
//
// GenEventConvert.icc
......@@ -15,6 +15,14 @@
namespace HepMC {
template<class S>
void GenEventConvert< S >::print_hepevt( std::ostream & os )
{
CBInterface< S > * hep = CBInterface< S >::instance();
(*hep)->printHEPEVT( os );
return;
}
template<class S>
GenEvent * GenEventConvert< S >::getGenEventfromHEPEVT()
{
......
......@@ -7,8 +7,11 @@ SUBDIRS = include
pkginclude_HEADERS = \
CBhepevt.h \
CBhepevt.icc \
CBherwig.h \
CBherwig.icc \
CBInterface.h \
ConvertHEPEVT.h \
ConvertHerwig.h \
DummyDecayModel.h \
Flow.h \
GenEventConvert.h \
......
//--------------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////////
// Matt.Dobbs@Cern.CH, November 200July 2002
// Just a link to whichever herwig version is current.
//////////////////////////////////////////////////////////////////////////
// This pre-compiler directive is included (2002-01-16) to allow compatibility
// with MS Visual C++, which interfaces to fortran in a different manner.
// For it to work you need to define the _WIN32 variable when compiling.
#ifdef _WIN32 // Platform: Windows MS Visual C++
// Sorry, there is NO version currently available for Vusual C++.
// If you need it, please complain to Matt.Dobbs@cern.ch
#else // Generic version, tested on Linux ecgs/gcc
#include "CLHEP/HepMC/include/HerwigWrapper6_4.h"
#endif // Platform
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
#ifndef HERWIG_WRAPPER_H
#define HERWIG_WRAPPER_H
//////////////////////////////////////////////////////////////////////////
// Matt.Dobbs@Cern.CH, April 2002
// Wrapper for FORTRAN version of Herwig
//////////////////////////////////////////////////////////////////////////
//
#include <ctype.h>
//--------------------------------------------------------------------------
// HERWIG Common Block Declarations
// COMMON/HWPROC/EBEAM1,EBEAM2,PBEAM1,PBEAM2,IPROC,MAXEV
extern struct {
double EBEAM1,EBEAM2,PBEAM1,PBEAM2;
int IPROC,MAXEV;
} hwproc_;
#define hwproc hwproc_
// CHARACTER*8 PART1,PART2
// COMMON/HWBMCH/PART1,PART2
extern struct {
char PART1[8],PART2[8];
} hwbmch_;
#define hwbmch hwbmch_
// COMMON/HWEVNT/AVWGT,EVWGT,GAMWT,TLOUT,WBIGST,WGTMAX,WGTSUM,WSQSUM,
// & IDHW(NMXHEP),IERROR,ISTAT,LWEVT,MAXER,MAXPR,NOWGT,NRN(2),NUMER,
// & NUMERU,NWGTS,GENSOF
const int herwig_hepevt_size = 4000;
extern struct {
double AVWGT,EVWGT,GAMWT,TLOUT,WBIGST,WGTMAX,WGTSUM,WSQSUM;
int IDHW[herwig_hepevt_size],IERROR,ISTAT,LWEVT,MAXER,MAXPR;
int NOWGT,NRN[2],NUMER,NUMERU,NWGTS;
int GENSOF; //Beware! in F77 this is logical
} hwevnt_;
#define hwevnt hwevnt_
// C Basic parameters (and quantities derived from them)
// COMMON/HWPRAM/AFCH(16,2),ALPHEM,B1LIM,BETAF,BTCLM,CAFAC,CFFAC,
// & CLMAX,CLPOW,CLSMR(2),CSPEED,ENSOF,ETAMIX,F0MIX,F1MIX,F2MIX,GAMH,
// & GAMW,GAMZ,GAMZP,GEV2NB,H1MIX,PDIQK,PGSMX,PGSPL(4),PHIMIX,PIFAC,
// & PRSOF,PSPLT(2),PTRMS,PXRMS,QCDL3,QCDL5,QCDLAM,QDIQK,QFCH(16),QG,
// & QSPAC,QV,SCABI,SWEIN,TMTOP,VFCH(16,2),VCKM(3,3),VGCUT,VQCUT,
// & VPCUT,ZBINM,EFFMIN,OMHMIX,ET2MIX,PH3MIX,GCUTME,
// & IOPREM,IPRINT,ISPAC,LRSUD,LWSUD,MODPDF(2),NBTRY,NCOLO,NCTRY,
// & NDTRY,NETRY,NFLAV,NGSPL,NSTRU,NSTRY,NZBIN,IOP4JT(2),NPRFMT,
// & AZSOFT,AZSPIN,CLDIR(2),HARDME,NOSPAC,PRNDEC,PRVTX,SOFTME,ZPRIME,
// & PRNDEF,PRNTEX,PRNWEB
extern struct {
double AFCH[2][16],ALPHEM,B1LIM,BETAF,BTCLM,CAFAC,CFFAC,
CLMAX,CLPOW,CLSMR[2],CSPEED,ENSOF,ETAMIX,F0MIX,F1MIX,F2MIX,GAMH,
GAMW,GAMZ,GAMZP,GEV2NB,H1MIX,PDIQK,PGSMX,PGSPL[4],PHIMIX,PIFAC,
PRSOF,PSPLT[2],PTRMS,PXRMS,QCDL3,QCDL5,QCDLAM,QDIQK,QFCH[16],QG,
QSPAC,QV,SCABI,SWEIN,TMTOP,VFCH[2][16],VCKM[3][3],VGCUT,VQCUT,
VPCUT,ZBINM,EFFMIN,OMHMIX,ET2MIX,PH3MIX,GCUTME;
int IOPREM,IPRINT,ISPAC,LRSUD,LWSUD,MODPDF[2],NBTRY,NCOLO,NCTRY,
NDTRY,NETRY,NFLAV,NGSPL,NSTRU,NSTRY,NZBIN,IOP4JT[2],NPRFMT;
int AZSOFT,AZSPIN,CLDIR[2],HARDME,NOSPAC,PRNDEC,PRVTX,SOFTME,
ZPRIME,PRNDEF,PRNTEX,PRNWEB; //Beware! in F77 these are logical
} hwpram_;
#define hwpram hwpram_
//--------------------------------------------------------------------------
// HERWIG routines declaration
#define hwigin hwigin_ // initialise other common blocks
#define hwigup hwigup_ // initialise HepUP run common block
#define hwuinc hwuinc_ // compute parameter-dependent constants
#define hwusta hwusta_ // call hwusta to make any particle stable
#define hweini hweini_ // initialise elementary process
#define hwuine hwuine_ // initialise event
#define hwepro hwepro_ // generate HERWIG hard subprocess
#define hwupro hwupro_ // read USER hard subprocess from HepUP event common
#define hwbgen hwbgen_ // generate parton cascades
#define hwdhob hwdhob_ // do heavy object decays
#define hwcfor hwcfor_ // do cluster hadronization
#define hwcdec hwcdec_ // do cluster decay
#define hwdhad hwdhad_ // do unstable particle decays
#define hwdhvy hwdhvy_ // do heavy flavour decays
#define hwmevt hwmevt_ // add soft underlying event if needed
#define hwufne hwufne_ // event generation completed, wrap up event ....
#define hwefin hwefin_ // terminate elementary process
#define hwudpr hwudpr_ // prints out particle/decay properties
#define hwuepr hwuepr_ // prints out event data
#define hwupup hwupup_ // prints out HepEUP user common block event data
#define hwegup hwegup_ // terminal calculations to replace HWEFIN for HepUP
extern "C" {
void hwigin(void);
void hwigup(void);
void hwuinc(void);
void hwusta(const char*,int);
void hweini(void);
void hwuine(void);
void hwepro(void);
void hwupro(void);
void hwbgen(void);
void hwdhob(void);
void hwcfor(void);
void hwcdec(void);
void hwdhad(void);
void hwdhvy(void);
void hwmevt(void);
void hwufne(void);
void hwefin(void);
void hwudpr(void);
void hwuepr(void);
void hwupup(void);
void hwegup(void);
}
//--------------------------------------------------------------------------
// HERWIG block data
// ( with gcc it works to initialize the block data by calling
// "hwudat();" at beginning. )
#define hwudat hwudat_
extern "C" {
void hwudat(void);
}
#endif // HERWIG_WRAPPER_H
//--------------------------------------------------------------------------
//////////////////////////////////////////////////////////////////////////
// Matt.Dobbs@Cern.CH, October 2002
// example of generating events with Herwig using HepMC/HerwigWrapper.h
// Events are read into the HepMC event record from the FORTRAN HEPEVT
// common block using the ConvertHerwig strategy.
//////////////////////////////////////////////////////////////////////////
// To Compile: go to the HepMC directory and type:
// gmake examples/example_MyHerwig.exe
//
// In this example the precision and number of entries for the HEPEVT
// fortran common block are explicitly defined to correspond to those
// used in the Herwig version of the HEPEVT common block.
// If you get funny output from HEPEVT in your own code, probably you have
// set these values incorrectly!
//
#include <iostream>
#include "CLHEP/HepMC/defs.h"
#include "CLHEP/HepMC/include/HerwigWrapper.h"
#include "CLHEP/HepMC/ConvertHerwig.h"
#include "CLHEP/HepMC/GenEvent.h"
int main() {
//
//.......................................INITIALIZATIONS
hwproc.PBEAM1 = 7000.; // energy of beam1
hwproc.PBEAM2 = 7000.; // energy of beam2
// 1610 = gg->H--> WW, 1706 = qq-->ttbar, 2510 = ttH -> ttWW
hwproc.IPROC = 1706; // qq -> ttbar production
hwproc.MAXEV = 100; // number of events
// tell it what the beam particles are:
for ( unsigned int i = 0; i < 8; ++i ) {
hwbmch.PART1[i] = (i < 1) ? 'P' : ' ';
hwbmch.PART2[i] = (i < 1) ? 'P' : ' ';
}
hwigin(); // INITIALISE OTHER COMMON BLOCKS
hwevnt.MAXPR = 1; // number of events to print
hwuinc(); // compute parameter-dependent constants
hweini(); // initialise elementary process
//........................................HepMC INITIALIZATIONS
//
// Instantiate an IO strategy for reading from HEPEVT.
HepMC::ConvertHerwig hepevtio;
//
//........................................EVENT LOOP
for ( int i = 1; i <= hwproc.MAXEV; i++ ) {
if ( i%50==1 ) std::cout << "Processing Event Number "
<< i << std::endl;
// initialise event
hwuine();
// generate hard subprocess
hwepro();
// generate parton cascades
hwbgen();
// do heavy object decays
hwdhob();
// do cluster formation
hwcfor();
// do cluster decays
hwcdec();
// do unstable particle decays
hwdhad();
// do heavy flavour hadron decays
hwdhvy();
// add soft underlying event if needed
hwmevt();
// finish event
hwufne();
HepMC::GenEvent* evt = hepevtio.read_next_event();
// add some information to the event
evt->set_event_number(i);
evt->set_signal_process_id(20);
if (i<=hwevnt.MAXPR) {
std::cout << "\n\n This is the FIXED version of HEPEVT as "
<< "coded in ConvertHerwig " << std::endl;
hepevtio.print_hepevt();
evt->print();
}
// we also need to delete the created event from memory
delete evt;
}
//........................................TERMINATION
hwefin();
return 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment