how to access genjet in madanalysis expert mode

Asked by Nikhil Bachhawat

I was trying to access the particle information from the genjets that are generated by Delphes in Madanalysis. Is there a pointer in event.rec() to genjets that can be used to find all jets are parton level.

I was hoping to compare b-jets both from generator level and detector level.

Thanks,
Nikhil

Question information

Language:
English Edit question
Status:
Answered
For:
MadAnalysis 5 Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Benjamin Fuks (fuks) said :
#1

Hi Nikhil,

You can try with genjets() [in the expert mode].

Cheers,

Benjamin

> On 29 Mar 2021, at 01:05, Nikhil Bachhawat <email address hidden> wrote:
>
> New question #696292 on MadAnalysis 5:
> https://answers.launchpad.net/madanalysis5/+question/696292
>
> I was trying to access the particle information from the genjets that are generated by Delphes in Madanalysis. Is there a pointer in event.rec() to genjets that can be used to find all jets are parton level.
>
> I was hoping to compare b-jets both from generator level and detector level.
>
> Thanks,
> Nikhil
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Revision history for this message
Nikhil Bachhawat (nikhilb1997) said :
#2

for (MAuint32 i=0;i<event.rec()->genjets().size();i++)
    {
      _P_genbjet_REG_.push_back(&(event.rec()->genjets()[i]));
    }

would something like this be what you are suggesting to fill an empty particle container in expert mode in the user.cpp file?

I have a corresponding std::vector<const RecParticleFormat*> _P_genbjet_REG_; line in the user.h file

Thanks,
Nikhil

Revision history for this message
Benjamin Fuks (fuks) said :
#3

Hi,

Yes, this is precisely what I suggested.

Cheers,

Benjamin

> On 29 Mar 2021, at 18:35, Nikhil Bachhawat <email address hidden> wrote:
>
> Question #696292 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/696292
>
> Status: Answered => Open
>
> Nikhil Bachhawat is still having a problem:
> for (MAuint32 i=0;i<event.rec()->genjets().size();i++)
> {
> _P_genbjet_REG_.push_back(&(event.rec()->genjets()[i]));
> }
>
> would something like this be what you are suggesting to fill an empty
> particle container in expert mode in the user.cpp file?
>
> I have a corresponding std::vector<const RecParticleFormat*>
> _P_genbjet_REG_; line in the user.h file
>
>
> Thanks,
> Nikhil
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Revision history for this message
Nikhil Bachhawat (nikhilb1997) said :
#5

Hi,

Sorry for reopening this again. I try that code but it does not seem to find any genjets at all. I look into the root event file generated by madanalysis running with delphes after, and it has GenJet in the tree which is non empty.

I have tried to run this command in the same run as where I run delphes on a hepmc file. Even running it separately on the delphes root file generated that has non empty GenJet does not seem to work.

The files are too large to share here so if you need any some other way let me know.

Would you have any suggestions?

Thanks,
Nikhil

Revision history for this message
Benjamin Fuks (fuks) said :
#6

Hi Nikhil,

Can you please open the file
  tools/SampleAnalyzer/Interfaces/delphes/DelphesMemoryInterface.cpp
and un-comment the lines l195-209 related to the storage of the genjet information.

Regards,

Benjamin

Revision history for this message
Nikhil Bachhawat (nikhilb1997) said :
#7

Hi I fixed this file as you suggest but it did not help. Do I need to recompile madanalysis. Are there any steps after uncommenting?

Thanks,
Nikhil

Revision history for this message
Jack Y. Araz (jackaraz) said :
#8

Hi Nikhil

Yes you need to recompile ma5 if you change anything in the core c++ functionality otherwise your changes will not be effective.

cheers


Jack Y. Araz

> On Apr 23, 2021, at 6:01 PM, Nikhil Bachhawat <email address hidden> wrote:
>
> [EXTERNAL EMAIL]
>
> Question #696292 on MadAnalysis 5 changed:
> https://answers.launchpad.net/madanalysis5/+question/696292
>
> Status: Answered => Open
>
> Nikhil Bachhawat is still having a problem:
> Hi I fixed this file as you suggest but it did not help. Do I need to
> recompile madanalysis. Are there any steps after uncommenting?
>
> Thanks,
> Nikhil
>
> --
> You received this question notification because you are an answer
> contact for MadAnalysis 5.

Can you help with this problem?

Provide an answer of your own, or ask Nikhil Bachhawat for more information if necessary.

To post a message you must log in.