/** * Example of use of tauola C++ interface. Pythia events are * generated with a stable tau. Taus are subsequently decay via * tauola. * * @author Nadia Davidson * @date 17 June 2008 */ #include "../tauolaCInterfaces/Tauola.h" #include "../eventRecordInterfaces/TauolaHepMCEvent.h" //pythia header files #include "Pythia.h" #include "HepMCInterface.h" //MC-TESTER header files #include "Generate.h" #include "HepMCEvent.H" #include "Setup.H" using namespace std; using namespace Pythia8; int NumberOfEvents = 10000; int main(void){ HepMC::I_Pythia8 ToHepMC; // Initialization of pythia Pythia pythia; Event& event = pythia.event; Tauola t; t.initialize(); MC_Initialize(); //Select process and decay to taus //pythia.readString("WeakSingleBoson:all = on"); pythia.readString("WeakSingleBoson:ffbar2gmZ = on"); // Switch off all Z0 decays and then switch back on those to taus. pythia.readString("23:onMode = off"); pythia.readString("23:onIfAny = 15"); pythia.readString("PartonLevel:ISR = off"); pythia.readString("PartonLevel:FSR = off"); //pythia.readString("HadronLevel:all = off"); //pythia.readString("23:onIfMatch = 15 -15"); //pythia.readString("111:onMode = off"); //pythia.readString("HadronLevel:Hadronize = off"); //pythia.readString("SpaceShower:QEDshower = off"); //pythia.readString("SpaceShower:QEDshowerByL = off"); //pythia.readString("SpaceShower:QEDshowerByQ = off"); pythia.particleData.readString("15:mayDecay = off"); //<- uncomment for pythia+tauola //electron positron collisions pythia.init( 11, -11, 92.); // Begin event loop. Generate event. for (int iEvent = 0; iEvent < NumberOfEvents; ++iEvent) { if(iEvent%100==0) cout<print(); TauolaHepMCEvent * t_event = new TauolaHepMCEvent(HepMCEvt); //<- uncomment for pythia+tauola t.processEvent(t_event); //<- uncomment for pythia+tauola HepMCEvent temp_event(*HepMCEvt); MC_Analyze(&temp_event); if(iEvent>=NumberOfEvents-5) { pythia.event.list(); HepMCEvt->print(); } //clean up delete HepMCEvt; delete t_event; //<- uncomment for pythia+tauola } MC_Finalize(); }