"Citizen Science" Project Activity Report 3 - Detector Effects and Event Reconstruction | Reporte de actividades del proyecto "Ciencia Ciudadana" 3 - Efectos del detector y reconstrucción del evento

avatar
(Edited)

EN

"Citizen Science" Project Activity Report 3 - Detector Effects and Event Reconstruction


By Enio...


Summary

This article is the third activity report in the context of the participatory research project Citizen science particle physics project on Hive led by @lemouth and undertaken by a number of blockchain enthusiasts. In it we will see the realization of the project tasks concerning detector effects and event reconstruction. The instructions laid out in this article have been followed. In the first attempt there were some exceptions related to the generation of PDF and DVI files. Configuration differences were also noticed when comparing with the tutorial in the mentioned article. An output HTML document could be obtained, but without the expected histogram. I ask @lemouth to please review my procedures in order to correct them and make the corresponding updates.


Task 1: Getting started with MadAnalysis 5

In order to simulate the particle physics detector such as the one at CERN, it is necessary to install MadAnalysis5. To do this I ran git clone https://github.com/MadAnalysis/madanalysis5 to download the source code, which can be run immediately.

Downloading MadAnalysis5 from GitHub according to the instructions
⬆️ Image 1: Downloading MadAnalysis5 from GitHub according to the instructions.

However, when executing it, the program throws an exception since the "python" command is not understood by the system. This tells me that the software needs to access Python using that alias. Since my GNU/Linux distribution installation only uses the python3 alias, I had to do some configuration tweaking following the instructions at this post to create that alias and have python call to the Python 3 program. Once that was done, MadAnalysis5 ran normally.

MadAnalysis5 is working fine
⬆️ Image 2: MadAnalysis5 is working fine.

Then a series of compilations begins, which is normal according to the instructions. In the end I get this output:

Output
⬆️ Image 3: Output.

Comparing to @lemouth's tutorial I can see there are differences. On my system the SciPy, pyhf and matplotlib packages are disabled. Since the instructions indicate that matplotlib is crucial, I decided to install it, a little bit late though, that is, after the other procedures. In the end I realized I had done something wrong and found out what this was, so I installed matplotlib for the whole system.

Task 2: Additional packages

I installed zlib and fastjet using install zlib and, after restarting MadAnalysis5, I used install fastjet (funny names by the way).

Zlib installed
⬆️ Image 4: Installed zlib. You can see that matplotlib is still marked as disabled, since I didn't notice it yet.
Installed zlib and fastjet
⬆️ Image 5: Installed zlib and fastjet and restarted MadAnalysis5 once again.

Around this time I realized I would need matplotlib and installed it. I started MadAnalysis5 again and the log already showed matplotlib as enabled. However, PySci is still disabled since I installed MadAnalysis5. I hope that won't be a problem.

Matplotlib ya está instalado y enabled
⬆️ Image 6: Matplotlib is already installed and enabled.

Task 3: Top-antitop simulations

I'm still getting ready to do some physics. I copied the path to the file tag_1_pythia8_events.hepmc.gz generated with the past activity and then restarted Ma5 with ./bin/ma5 -R madanalysis/input/ATLAS_default.ma5. I ran the other instructions (import <path-to-my-events>, set main.outputfile=myeventstoo.lhe.gz and submit) . This took a while to run, but in the end I got this output:

Output
⬆️ Image 7: Oops, there are some issues.

As we can see, some things did not go well. It did generate a file of approximately 7mb as expected based on the instructions, but neither the PDF nor the DVI file was generated. I thought this might be because I didn't have SciPy installed, so I installed it by following this documentation. However, repeating the process did not fix the problem. I checked the suggested log and there seems to be a problem with Latex.

There it is
⬆️ Image 8: There it is. The file was generated as expected.

⬆️ Image 9: And this is the log output (.../madanalysis5/ANALYSIS_3/Output/PDF/MadAnalysis5job_0/latex2.log)

As indicated in the log, there is a problem with the pdftexcmds.sty package. According to what I googled, that package comes separately in the most recent versions of Tex Live or something like that, so it would have to be installed separately. However, I didn't know how to fix this easily. Apparently I need to do a full TexLive install, but if I understand correctly, that would take about 5 GB of extra space. Did I understand correctly? Is all this really necessary? Why does MadAnalysis5 indicate that the latex and pdflatex packages are enabled and yet the log indicates something else (see image 5)? This is a bit confusing :S

Similarly, the log for the DVI files gave this:

! LaTeX Error: File `pdftexcmds.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:
! Emergency stop.
<read *>

l.108 \RequirePackage{pdftexcmds}[2009/04/10]
^^M
No pages of output.
Transcript written on main.log.

Which is basically the same exception.

Task 3: Some physics

I decided to go ahead and see if this could work after all. I ran the commands:

import ANALYSIS_0/Output/SAF/_defaultset/lheEvents0_0/myeventstoo.lhe.gz as ttbar
set ttbar.xsection = 505.491
plot NAPID
submit


Entering the commands to do some physics
⬆️ Image 10: Entering the commands to do some physics.

And after a short wait I got this output:

An alarming output?
⬆️ Image 11: An alarming output?

Again the same exceptions appeared regarding the generation of PDF and DVI files. An HTML document was generated and using the Open command, as suggested by the output, opened the web browser displaying this page:

HTML document generated
⬆️ Image 12: HTML document generated.

The histos and cuts part was empty, a histogram plot was not generated as expected.

At the moment this is what I have. I hope @lemouth you can help me fix these issues and get the histogram generated. Thanks in advance.

UPDATE 2022/04/26:

Finally I have obtained the expected outputs. Getting to this was quite a "journey" that had many stops and definitely deserves its own post. Essentially I had to get another computer where I could fully install TexLive (2022), reinstall and repeat all the tasks of this project from scratch and read a lot of documentation and support forums to overcome every exception that appeared. But it was worth it!

At last!
⬆️ Image 13: The expected output, no errors.
Histogram generated
⬆️ Image 14: Histogram generated.

Thanks to @lemouth for his feedback.




If you are interested in more STEM (Science, Technology, Engineering and Mathematics) topics, check out the STEMSocial community, where you can find more quality content and also make your contributions. You can join the STEMSocial Discord server to participate even more in our community and check out the weekly distilled.



NOTES

  • Unless otherwise stated, the images in this post are the author's.

ES

Reporte de actividades del proyecto "Ciencia Ciudadana" 3 - Efectos del detector y reconstrucción del evento


Por Enio...


Resumen

Este artículo es el tercer reporte de actividades en el contexto del proyecto de investigación participativa Citizen science particle physics project on Hive dirigido por @lemouth y emprendido por una serie de entusiastas de la blockchain. En él veremos la realización de las tareas de proyecto en lo referido a los efectos de los detectores y reconstrucción de eventos. Se han seguido las instrucciones planteadas en este artículo. En el primer intento se produjeron unas excepciones relacionadas con la generación de archivos PDF y DVI. También se apreciaron diferencias de configuración al comparar con el tutorial en el artículo mencionado. Se pudo obtener un documento HTML de salida, pero sin el histograma esperado. Agradezco a @lemouth la revisión de mis procedimientos a fin de corregirlos y hacer las actualizaciones correspondientes.


Tarea 1: Empezar a utilizar MadAnalysis 5

Para poder hacer la simulación del detector de física de partículas tal como el del CERN es necesario instalar MadAnalysis5. Para ello ejecuté git clone https://github.com/MadAnalysis/madanalysis5 para descargar el código fuente, que puede ser ejecutado inmediatamente.

Descargando MadAnalysis5 de GitHub según las instrucciones.
⬆️ Imagen 1: Descargando MadAnalysis5 de GitHub según las instrucciones.

Sin embargo, al ejecutarlo el programa produce excepción puesto que la orden "python" no es entendida por el sistema. Esto me indica que el software necesita acceder a Python usando ese alias. Dado que la instalación de mi distribución GNU/Linux solo usa el alias python3, tuve que hacer unos ajuste de configuración siguiendo las instrucciones en este post para crear ese alias y hacer que python invoque al programa Python 3. Una vez hecho eso, MadAnalysis5 se ejecutó normalmente.

MadAnalysis5 funcionando bien
⬆️ Imagen 2: MadAnalysis5 funcionando bien.

Acto seguido empieza una serie de compilaciones, lo cual es normal de acuerdo a las instrucciones. Al final obtengo esta salida:

Salida tras las compilaciones
⬆️ Imagen 3: Salida tras las compilaciones.

Al comparar con el tutorial de @lemouth, puedo ver que hay diferencias. En mi sistema, los paquetes SciPy, pyhf y matplotlib están deshabilitados. Dado que las instrucciones indican que matplotlib es crucial, decidí instalarlo, aunque tardíamente, es decir, después de los demás procedimientos. Al final me di cuenta que había hecho algo mal y descubrí que era esto, por lo que instalé matplotlib para todo el sistema.

Tarea 2: Paquetes adicionales

Instalé zlib y fastjet usando install zlib y, tras el reinicio de MadAnalysis5, install fastjet (curiosos nombres por cierto).

Instalado zlib
⬆️ Imagen 4: Instalado zlib. Puede verse que matplotlib sigue marcado como disabled, puesto que aún no lo notaba.

⬆️ Imagen 5: Inslaldos zlib y fastjet y reiniciado MadAnalysis5 una vez mas.

Alrededor de este momento me di cuenta que necesitaría matplotlib y lo instalé. Inicié nuevamente MadAnalysis5 y el log ya me mostraba a matplotlib como enabled. Sin embargo, PySci sigue deshabilitado desde que hice la isntalación de MadAnalysis5. Espero que eso no vaya a ser un problema.

Matplotlib ya está instalado y marcado como enabled
⬆️ Imagen 6: Matplotlib ya está instalado y marcado como enabled.

Tarea 3: Simulaciones de top-antitop

Sigo preparándome para hacer algo de física. Copié la ruta al archivo tag_1_pythia8_events.hepmc.gz generado con la actividad pasada y acto seguido reinicié a Ma5 con ./bin/ma5 -R madanalysis/input/ATLAS_default.ma5. Ejecuté las demás instrucciones (import <path-to-my-events>, set main.outputfile=myeventstoo.lhe.gz y submit). Esto tardó algo en ejecutarse, pero al final obtuve esta salida:

Ups, hay problemas
⬆️ Imagen 7: Ups, hay problemas.

Como podemos ver, algunas cosas no salieron bien. Sí se generó un archivo de aproximadamente 7 mb tal como se esperaba según las instrucciones, pero no se generó el PDF ni el archivo DVI. Pensé que esto podía tener que ver con que no tenía SciPy instalado, así que lo instalé siguiendo esta documentación. Sin embargo, al repetir el proceso, esto no solucionó el problema. Verifiqué el log sugerido y al parecer hay un problema con Latex.

Allí está
⬆️ Imagen 8: Allí está. El archivo generado como se esperaba.
Y esta es la salida del log
⬆️ Imagen 9: Y esta es la salida del log (.../madanalysis5/ANALYSIS_3/Output/PDF/MadAnalysis5job_0/latex2.log).

Como se indica en el log, hay un problema con el paquete pdftexcmds.sty. Según googleé, ese paquete viene separado en las versiones más recientes de Tex Live o algo por el estilo, por lo que habría que instalarlo separadamente. Sin embargo, no supe cómo solucionar esto de manera sencilla. Al parecer debo hacer una instalación completa de TexLive, pero si entendí bien, ello necesitaría como 5 GB de espacio adicional. ¿Entendí bien? ¿Es realmente todo esto necesario? ¿Por qué MadAnalysis5 indica que los paquetes latex y pdflatex están habilitados y sin embargo el log indica otra cosa (ver imagen 5)? Esto es un poco confuso :S

Similarmente, el log para los archivos DVI arrojó esto:

! LaTeX Error: File `pdftexcmds.sty' not found.

Type X to quit or <RETURN> to proceed,
or enter new name. (Default extension: sty)

Enter file name:
! Emergency stop.
<read *>

l.108 \RequirePackage{pdftexcmds}[2009/04/10]
^^M
No pages of output.
Transcript written on main.log.

Que es básicamente la misma excepción.

Tarea 4: Algo de física

Decidí seguir adelante para ver si esto podía funcionar después de todo. Ejecuté los comandos:

import ANALYSIS_0/Output/SAF/_defaultset/lheEvents0_0/myeventstoo.lhe.gz as ttbar
set ttbar.xsection = 505.491
plot NAPID
submit


Ingresando los comandos para hacer algo de física
⬆️ Imagen 10: Ingresando los comandos para hacer algo de física.

Y tras una breve espera obtuve esta salida:

¿Una salida alarmante?
⬆️ Image 11: ¿Una salida alarmante?

Nuevamente aparecieron las mismas excepciones con respecto a la generacion de los archivos PDF y DVI. Si se generó un documento HTML y al usar el comando Open, como sugiere la salida, se abrió el navegador web mostrando esta página:

Documento HTML generado
⬆️ Imagen 12: Documento HTML generado.

La parte de histos and cuts estaba vacía, no se generó un gráfico de histograma como se esperaba.

De momento esto es lo que tengo. Espero, @lemouth, puedas ayudarme a solucionar estos problemas y conseguir que se genere el histograma.

ACTUALIZACIÓN 2022/04/26:

Finalmente he conseguido las salidas esperadas. Llegar a esto consitió en toda una "travesía" que tuvo muchas paradas y que definitivamente merece su propio post. Esencialmente tuve que conseguirme otra computadora donde poder instalar completamente TexLive (2022), reinstalar y repetir todas las tareas de este proyecto desde cero y leer mucha documentación y foros de soporte para superar cuanta excepción aparecía. ¡Pero ha valido la pena!

Por fin
⬆️ Image 13: La salida esperada, sin errores.
Histograma generado
⬆️ Image 14: Histograma generado.

Gracias a @lemouth por su feedback.




Si está interesado en más temas STEM (ciencia, tecnología, ingeniería y matemáticas), consulte la comunidad STEMSocial, donde puede encontrar más contenido de calidad y también hacer sus aportes. Puedes unirte al servidor de Discord de STEMSocial para participar aún más en nuestra comunidad y ver el distilled semanal.



Notas

  • A menos que se indique lo contrario, las imágenes de esta publicación son del autor.


0
0
0.000
7 comments
avatar

Congratulations @eniolw! You have completed the following achievement on the Hive blockchain and have been rewarded with new badge(s):

You have been a buzzy bee and published a post every day of the week.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

Support the HiveBuzz project. Vote for our proposal!
0
0
0.000
avatar

You guys are better than me. I sweat a bit before getting it done. I never bothered about installing latex or pdf since I got an info earlier that one can proceed without it.

0
0
0.000
avatar

It's great that you got it done! In my case, both of them are causing problems.

0
0
0.000
avatar

Thanks for your contribution to the STEMsocial community. Feel free to join us on discord to get to know the rest of us!

Please consider delegating to the @stemsocial account (85% of the curation rewards are returned).

You may also include @stemsocial as a beneficiary of the rewards of this post to get a stronger support. 
 

0
0
0.000
avatar

Hi eniolw. Apologies for the delay in reviewing this report. Easter was in the way ;)

First of all, thanks a lot for this report and your hard work! Let's now work together to fix your issues.

However, when executing it, the program throws an exception since the "python" command is not understood by the system

Mmmh that is a good remark. I should add something with this respect in the main post, or maybe replace #!/usr/bin/env python3 by #!/usr/bin/env python3 in the bin/ma5 file. I will start by dealing with the former as it is easier.

However, PySci is still disabled since I installed MadAnalysis5. I hope that won't be a problem.

Nope, this won’t be an issue. Otherwise, you can still install it later via pip3 for instance.

However, I didn't know how to fix this easily. Apparently I need to do a full TexLive install, but if I understand correctly, that would take about 5 GB of extra space. Did I understand correctly?

Hmmmm I didn’t know this. I have opened an issue on GitHub (here), so that me or anyone from the MadAnalysis5 team will check this out very soon.

In the meantime, this is not a big deal if latex is disabled (you can just veto its usage it by editing the file madanalysis/input/installation_options.dat, un-commenting the related lines (49 and 52) and setting the veto to true (1).

At the moment this is what I have. I hope @lemouth you can help me fix these issues and get the histogram generated. Thanks in advance.

It seems that some fonts required by matplotlib are not available, at least according to the error message. Do you mind installing them and retrying? Please let me know whether this works.

Cheers!

0
0
0.000
avatar

Thanks for the feedback! I planned to update this today, but I got busy. I will let you know :)

0
0
0.000
avatar

Nice to see everything is finally fixed! :)

0
0
0.000