LesHouchesEvents: how to read .lhe file

  • Thread starter CoronaBorealis
  • Start date
  • Tags
    File
In summary, the conversation is about extracting initial and final values of momenta from a .lhe file for the u u > u u interaction. The person is unsure of how to exclude other information in the file and is considering writing a c++ program. They are then informed about the LheAnalysis tool on the CERN Twiki that may help with their task.
  • #1
CoronaBorealis
2
0
Hello,

I have a .lhe file for the u u > u u interaction and i want to extract the initial and final values of momenta but i don't know how. I could write a c++ program and insert them in arrays but how to exclude all the rest (MG5 Proc card, warnings etc) ?

sorry for any language mistakes
 
Technology news on Phys.org
  • #2
CoronaBorealis said:
Hello,

I have a .lhe file for the u u > u u interaction and i want to extract the initial and final values of momenta but i don't know how. I could write a c++ program and insert them in arrays but how to exclude all the rest (MG5 Proc card, warnings etc) ?

sorry for any language mistakes
Read in everything in the file and only keep what you want; that's the normal way of doing such things. You might ever be able to find on-line code that already has everything to read the file.
 
  • #3
maybe if you search for the LheAnalysis tool in the CERN Twiki it can help you?
 
  • #4
phinds said:
Read in everything in the file and only keep what you want; that's the normal way of doing such things. You might ever be able to find on-line code that already has everything to read the file.
I see.. Thank you !

ChrisVer said:
maybe if you search for the LheAnalysis tool in the CERN Twiki it can help you?
I didn't have a clue about it, thanks a lot!
 

Related to LesHouchesEvents: how to read .lhe file

1. What is an .lhe file?

An .lhe file is a text-based file that contains event information from particle physics simulations. It is commonly used to store data from Monte Carlo event generators such as Pythia or MadGraph.

2. How do I open and read an .lhe file?

There are several software programs that can be used to open and read .lhe files, such as ROOT, MadAnalysis, or Python. These programs have built-in functions and libraries that can parse the data and extract the relevant information.

3. What kind of data can I expect to find in an .lhe file?

An .lhe file typically contains information about the particles produced in a collision event, such as their momenta, energies, and type. It may also include details about the physics model used, the cross-section of the event, and other relevant parameters.

4. Can I modify or edit an .lhe file?

Yes, you can modify an .lhe file by using a text editor or specialized software. However, it is important to understand the structure and formatting of the file to avoid corrupting the data. It is recommended to make a copy of the original file before making any changes.

5. Can I convert an .lhe file into a different format?

Yes, there are tools available that can convert .lhe files into other formats, such as .hepmc or .root. These conversions may be necessary for further analysis or processing of the data. It is important to check the compatibility of the conversion tool with the specific version of the .lhe file.

Similar threads

  • Programming and Computer Science
Replies
4
Views
767
  • Programming and Computer Science
Replies
29
Views
2K
  • Programming and Computer Science
Replies
6
Views
1K
  • Programming and Computer Science
Replies
22
Views
961
  • Programming and Computer Science
Replies
33
Views
4K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
8
Views
5K
  • Programming and Computer Science
Replies
30
Views
4K
Replies
10
Views
994
  • Programming and Computer Science
Replies
11
Views
2K
Back
Top