Fork me on GitHub

Opened 6 weeks ago

Closed 5 weeks ago

#1331 closed How to (fixed)

Add variables to Class Jet using DelphesPythia8

Reported by: alefisico Owned by:
Priority: minor Milestone:
Component: Delphes code Version: Delphes 3
Keywords: Cc:

Description

Hi all

I am having problems trying to add a variable into the Class::Jet and storing it in the output root file.

I am using delphes with this tag tags/3.4.2pre15, in lxplus at cern, using the CMSSW libraries, and the PYTHIA8 libraries as:

export PYTHIA8=/cvmfs/cms.cern.ch/slc6_amd64_gcc530/external/pythia8/223-mlhled2/
export LD_LIBRARY_PATH=$PYTHIA8/lib:$LD_LIBRARY_PATH

I dont know if it matters, or if you have access, but to install delphes with Pythia8 I am using this recipe:
https://twiki.cern.ch/twiki/bin/viewauth/CMS/DelphesUPG

Now, I want to run DelphesPythia8 using a fastjet external package (HEPTopTagger). I install it correctly and I am sure that the package is running with the DelphesPythia8 command. Then I want to store the output variables of the algorithm in the final rootfile.

For that I copy the delpes_card_CMS with the new feature:
https://github.com/alefisico/delphes/blob/myV0/cards/delphes_card_CMS_withHTT.tcl#L684-L695
And I include the variable in the Class:Candidate first:
https://github.com/alefisico/delphes/blob/myV0/classes/DelphesClasses.h#L662
https://github.com/alefisico/delphes/blob/myV0/classes/DelphesClasses.cc#L163

and then in the Class::Jet:
https://github.com/alefisico/delphes/blob/myV0/classes/DelphesClasses.h#L420

and store the variable in the WriteTree? module:
https://github.com/alefisico/delphes/blob/myV0/modules/TreeWriter.cc#L710

of course I am filling the variable in the FastJetFinder? module:
https://github.com/alefisico/delphes/blob/myV0/modules/FastJetFinder.cc#L618

But after succesfully running the job as:
./DelphesPythia8 cards/delphes_card_CMS_withHTT.tcl configLHE_0001.cmnd delphesSample_0001.root

The jet branch does not contain the variable at all. Am I missing something?

Also, weird thing, if I define the variable IsTop? in the Class::Jet
https://github.com/alefisico/delphes/blob/myV0/classes/DelphesClasses.h#L420
anywhere before 418, the code compiles but I got a segmentation fault error while I ran DelphesPythia8.

Please let me know if you need more information.
Thanks for the help.

cheers
Alejandro

Change History (3)

comment:1 Changed 6 weeks ago by mselvaggi

Hi,

you should

./configure

before re-compiling after modifying the Delphes classes.
Also can you add to your repository the cards/delphes_card_CMS_withHTT.tcl so I can try it out?

comment:2 Changed 6 weeks ago by alefisico

Hi

yeah, it was just a stupid compilation problem. I forgot to make clean before compile it.

thanks anyway.

comment:3 Changed 5 weeks ago by pavel

  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.