Linear Collider Forum



Home » Simulation » Full Simulations » Converting HepMC to Mokka compatible format
Re: Converting HepMC to Mokka compatible format [message #1960 is a reply to message #1955] Fri, 30 April 2010 02:09 Go to previous messageGo to previous message
weuste
Messages: 2
Registered: April 2010
There was a bug in the code.


weuste wrote on Mon, 26 April 2010 00:47

...

...

int main()
{
...
		for (int i = 0; i < pythia.event.size(); i++)
		{

                ...

			if (longHepEvt) {
				out << setw(4) << pythia.event[i].mother1()+1 << ' ';			// JMOHEP1, first mother id
				out << setw(4) << pythia.event[i].mother2()+1 << ' ';			// JMOHEP2, last mother id
			}
			out << setw(4) << pythia.event[i].daughter1()+1 << ' ';			// JDAHEP1, first daughter id
			out << setw(4) << pythia.event[i].daughter2()+1 << ' ';			// JDAHEP2, last daughter id



...

		}
	}
...
}




is has to be:
			if (longHepEvt) {
				int JMOHEP1 = pythia.event[i].mother1() > 0 ? pythia.event[i].mother1()+1 : 0;
				int JMOHEP2 = pythia.event[i].mother2() > 0 ? pythia.event[i].mother2()+1 : 0;
				out << setw(4) << JMOHEP1 << ' ';								// JMOHEP1, first mother id
				out << setw(4) << (JMOHEP2 == 0 ? JMOHEP1 : JMOHEP2) << ' ';	// JMOHEP2, last mother id
			}

			int JDAHEP1 = pythia.event[i].daughter1() > 0 ? pythia.event[i].daughter1()+1 : 0;
			int JDAHEP2 = pythia.event[i].daughter2() > 0 ? pythia.event[i].daughter2()+1 : 0;
			out << setw(4) << JDAHEP1 << ' ';								// JDAHEP1, first daughter id
			out << setw(4) << (JDAHEP2 == 0 ? JDAHEP1 : JDAHEP2) << ' ';	// JDAHEP2, last daughter id
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:Converter from Les Houches event xml files to stdhep format?
Next Topic:How to count events in .stdhep file
Goto Forum:
  


Current Time: Sat Jun 23 16:45:21 Pacific Daylight Time 2018
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.1.
Copyright ©2001-2010 FUDforum Bulletin Board Software