gambit is hosted by Hepforge, IPPP Durham
GAMBIT  v1.5.0-2191-ga4742ac
a Global And Modular Bsm Inference Tool
mainEWinos_bino_winos_higgsinos.cc File Reference
#include "Pythia8/Pythia.h"
#include "Pythia8Plugins/HepMC2.h"
Include dependency graph for mainEWinos_bino_winos_higgsinos.cc:

Go to the source code of this file.

Functions

int main ()
 

Function Documentation

◆ main()

int main ( )

Definition at line 16 of file mainEWinos_bino_winos_higgsinos.cc.

Referenced by Gambit::Scanner::Function_Base< ret(args...)>::Function_Base(), Gambit::Scanner::Plugins::Plugin_Main_Interface_Base< ret(args...)>::operator()(), and Gambit::Scanner::Function_Base< ret(args...)>::operator()().

16  {
17  // Interface for conversion from Pythia8::Event to HepMC event.
18  HepMC::Pythia8ToHepMC ToHepMC;
19 
20  // Specify file where HepMC events will be stored.
21  HepMC::IO_GenEvent ascii_io("hepmcEWinos_bino_winos_higgsinos.dat", std::ios::out);
22 
23  // Generator. Shorthand for the event.
24  Pythia pythia;
25 // Event& event = pythia.event;
26 
27  // Read in commands from external file.
28  pythia.readFile("mainEWinos_bino_winos_higgsinos.cmnd");
29 
30  // Initialize
31  pythia.init();
32 
33  // Extract settings to be used in the main program.
34  int nEvent = pythia.mode("Main:numberOfEvents");
35 
36  // Begin event loop. Generate event. Skip if error.
37  for (int iEvent = 0; iEvent < nEvent; ++iEvent)
38  {
39  if (!pythia.next()) continue;
40 
41  // Construct new empty HepMC event and fill it.
42  // Units will be as chosen for HepMC build; but can be changed
43  // by arguments, e.g. GenEvt( HepMC::Units::GEV, HepMC::Units::MM)
44  HepMC::GenEvent* hepmcevt = new HepMC::GenEvent();
45  ToHepMC.fill_next_event( pythia, hepmcevt );
46 
47  // Write the HepMC event to file. Done with it.
48  ascii_io << hepmcevt;
49  delete hepmcevt;
50 
51  // End of event loop. Statistics. Histogram.
52  }
53  pythia.stat();
54 
55  // Done.
56  return 0;
57 }
Here is the caller graph for this function: