How to create jets in particle level from pythia hep files

Asked by Juanpe

Hi!

I have a Pythia hep file and I would like to reconstruct jets (with fast jets for example) at particle level before any detector simulation using expert mode. Is it possible to create the jets in the event in madanalysis? If so, what is the best way to do this, I have been searching but haven't found anything useful (or I haven't recognised it, which is also possible).

Thanks a lot in advance!

EDIT: I know that the event.rec() object is available but I am not sure if this is what I want to use with pythia files.

Question information

Language:
English Edit question
Status:
Solved
For:
MadAnalysis 5 Edit question
Assignee:
No assignee Edit question
Solved by:
Juanpe
Solved:
Last query:
Last reply:
Revision history for this message
Benjamin Fuks (fuks) said :
#1

Hi,

You can import the hep file and ask madanalysis to use fastjet for clustering. For instance,
./bin ma5 -R
  set main.fastsim.package = fastjet;
  set main.fastsim.radius=0.4;
  set main.outputfile=myoutput.lhe.gz
  import mysample.hep.gz
  submit

Note that there are many more options that you an play with (use auto-completion and "set main.fastsim."

Cheers,

Benj

On 21 Sep 2015, at 16:47 , Juanpe <email address hidden> wrote:

> Question #271626 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/271626
>
> Description changed to:
> Hi!
>
> I have a Pythia hep file and I would like to reconstruct jets (with fast
> jets for example) at particle level before any detector simulation using
> expert mode. Is it possible to create the jets in the event in
> madanalysis? If so, what is the best way to do this, I have been
> searching but haven't found anything useful (or I haven't recognised it,
> which is also possible).
>
> Thanks a lot in advance!
>
> EDIT: I know that the event.rec() object is available but I am not sure
> if this is what I want to use with pythia files.
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Revision history for this message
Juanpe (erjuanpea) said :
#2

Hi Benajmin,

thanks a lot for the answer. I knew that you could make this with the python interface but I would be interested in doing this in expert mode since I wanted to make several checks in my analysis and I would like to work with the jets after the clustering is done.

I have run an example similar to this today and found out that what it actually does is to configure the JetClusterer but I don't understand what is what it does at the end. It seems like the event is rewritten but I don't know how should I access the jets afterwards, should I use the event.rec()-jets() and it will return the vector with the jets?

Thanks a lot!
Juanpe.

Revision history for this message
Eric Conte (eric-conte) said :
#3

Dear Juanpe,

For using the jet-clustering algorithm in the expert mode, I think the best way is to create a such analysis with Python console (by following Benjamin's instructions) and then to modify it.

You are right. The jet-clustering algorithm is encapsulated into the class JetClusterer. Configuration of this algorithm is set in the main file called 'main.cpp'.

For each event, MadAnalysis will apply the jetclustering algorithm feeding with the generated part of the event and will fill the jet collection of the reconstructed part of the event. Then, the execute method() of your analysis is called.

Normally, you can access the jet resulting of the jet clustering algorithm by using the collection event.rec()->jets().

I hope these explanations could help you.
Cheers,
Eric

Revision history for this message
Juanpe (erjuanpea) said :
#4

Dear Eric,

thanks a lot for your answer which is very helpful. What I have done is essentially create the analysis with python and I noticed that the main function changed so I introduced those changes in my code as well. It seems that it is working and I can get jets, I am going to investigate how it works and if I have any other comment our doubt I will let you know.

Thank you very much!
Juanpe.