Opened 11 years ago
Last modified 9 years ago
#238 new How to
access jet constituents for substructure analysis
Reported by: | alexandra | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Delphes code | Version: | Delphes 3 |
Keywords: | jet Constituents | Cc: |
Description
Dear
I am planning to use substructure techniques on analysing delphes output
I am basing myself in your example
http://www.hep.wisc.edu/~dasu/public/Delphes-3.0.9/examples/Example3.C
I am using the default CMS card
it turns out that I can access the number of constituents of a jet
std::cout<<jet->Constituents.GetEntriesFast()<<std::endl;
but all the constituents are empty, i.e. they do not pass this condition
Check if the constituent is accessible
if(object == 0) continue;
I am wondering if maybe there is some option on datacard to be turned on such as saves the constituents
thanks!
Alexandra
Change History (11)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
I've just tested Example3.C and it seems to work.
All the jet constituents are accessible.
Only in the latest Delphes version, we apply EnergyScale to jets and (jet->PT - momentum.Pt())/jet->PT
is not centered at 0 anymore.
I'll try fix the limits of the "jet delta pt" histogram.
comment:3 by , 11 years ago
Hi Michelle
thanks for the answer!
I was indeed not using these additional branches
TClonesArray *branchEFlowTrack = treeReader->UseBranch?("EFlowTrack");
TClonesArray *branchEFlowTower = treeReader->UseBranch?("EFlowTower");
TClonesArray *branchEFlowMuon = treeReader->UseBranch?("EFlowMuon");
Is there a way to access the PID of a Jet object?
from your workflow flowchat it seems it is not so obvious
but I saw the Jets class also have a member "Particles" that problably store PID and IsPU of generated particle attached with the jet,
I tried a guess
TRefArray* test = jet->Particles;
JetsFlavour.push_back(test->PID );
but it is not that...
how do I access these variables if there is a way?
thanks!
Alexandra
comment:5 by , 11 years ago
Hello Dominic and Alexandra,
sorry for not answering, we forgot this ticket somehow..
Did you try something like:
GenParticle *particle; for(j = 0; j < jet->Particles.GetEntriesFast(); ++j) { particle = (GenParticle*) jet->Particles.At(j); cout<<((GenParticle*) particle)->PID<<endl; }
Be aware that this will give you the PID of stable particle from Pythia output, not those coming from the hard scattering.
Cheers,
Michele
comment:7 by , 9 years ago
Dear developers
I'ld like to use jet prunned mass nsubjetiness to study CMS tagger and mass drop , filtering and grooming to study ATLAS tagger
I could try to use the procedure above, however I saw that you had implemented some of these features to belong to the jet class [1].
I had downloaded and made work the last Delphes version, however I could not finf something like PrunedP4[5]; in the jet class
are this already available?
thank you
[1] https://cp3.irmp.ucl.ac.be/projects/delphes/browser/classes/DelphesClasses.h
comment:8 by , 9 years ago
Dear Alexandra,
There is not yet a release for the latest version of the code in our git repository.
However, you can download this code using the following command:
git clone https://github.com/delphes/delphes.git
Best regards,
Pavel
comment:9 by , 9 years ago
Dear Pavel
thank you much
I am trying to install the unversioned version, the libraries related with PUPPI give me error*,
as I do not need PUPPI by the moment I removed the part of the Makefile that is related with
# NOFASTJET = libDelphesNoFastJet.$(DllSuf)
# NOFASTJETLIB = libDelphesNoFastJet.lib
and it compiles normally, including the external libs (fastjet)
it would be ok?
=============================
Other question,
I had realized that when turning on pileup the name of the jet constituents changes,
(it is not anymore as EFlowTrack/Tower/Muon... as previous in this thread)
does it makes sense?
how to get the jet constituents if have pileup on?
(for grooming and Mass drop I'ld still use it)
thank you
Alexandra
====================================
the compilation error*
Building libDelphesNoFastJet.so Undefined symbols for architecture x86_64: "fastjet::SelectorCircle(double)", referenced from: puppiCleanContainer::var_within_R(int const&, std::__1::vector<fastjet::PseudoJet, std::__1::allocator<fastjet::PseudoJet> > const&, fastjet::PseudoJet const&, float const&) in puppiCleanContainer.o
comment:11 by , 9 years ago
Hi Alexandra,
the change in the constituent names are probably due to the fact that you are now using a different Delphes version after Pavel's answer, rather than pileup vs. non-pileup.
Now the branch names have changed. Something like this should be used now (as in the updated Example3.C):
TClonesArray *branchEFlowTrack = treeReader->UseBranch("EFlowTrack"); TClonesArray *branchEFlowPhoton = treeReader->UseBranch("EFlowPhoton"); TClonesArray *branchEFlowNeutralHadron = treeReader->UseBranch("EFlowNeutralHadron");
Muons are now contained in !EFlowTracks.
Cheers,
Michele
Dear Alexandra,
This can happen if you have modified the TClonesArray declaration. Could you make sure the following lines are present in your macro?
TClonesArray *branchParticle = treeReader->UseBranch("Particle");
TClonesArray *branchEFlowTrack = treeReader->UseBranch("EFlowTrack");
TClonesArray *branchEFlowTower = treeReader->UseBranch("EFlowTower");
TClonesArray *branchEFlowMuon = treeReader->UseBranch("EFlowMuon");
these branches need to be properly filled and called, because this is where the constituents are located.
If your don't fill these branches or do not store them in your output, this is the reason why your object=0.
Could you please try this?
If this doesn't work please attach here the datacard and the macro you are using.
Thanks
Michele