Fork me on GitHub

Opened 10 years ago

Last modified 10 years ago

#294 new How to

Tau Jet information

Reported by: Daniele Owned by:
Priority: major Milestone:
Component: Delphes code Version: Delphes 3
Keywords: Cc:

Description

Dear Delphes Authors,
I have switched to the new version of delphes and I have an issue regarding the Tau Jet Properties.

In the old delphes version under Analysis, there is the TauJet tree with then all the information, TauJet.E, TauJet.PT and so on.
In the new version of Delphes I can only see under the three Jet, the following
Jet.TauTag
Jet.Tau1
..
Jet.Tau5

but I can' find any informations about the kinematics of the tau jet.
Are they somewhere else or I need to reconstruct them in some way?

Thanks

Daniele

Attachments (2)

analysis_8_proto.h (42.7 KB ) - added by Daniele 10 years ago.
analysis_8_proto.C (3.5 KB ) - added by Daniele 10 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by Alexandre Mertens, 10 years ago

Dear Daniele,

Thanks for using the new version of Delphes!
If the TauTag is set to one, then one can access the kinematic information of the TauJet simply by using Jet.E, Jet.PT etc...

using the root interface, you can for example try:

root -l delphes_output.root
...
root [1] Delphes->Draw("Jet.PT","Jet.TauTag == 1")

Does that help you?

Cheers,
Alexandre

comment:2 by Daniele, 10 years ago

Dear Alexandre,
thanks for the quick reply.
From the root interface this works perfectly, for example with the lines you wrote, but I was wondering how to do this from a C++ macro, since I need to select events.

In fact I can find the events where Jet_TauTag[0]==1, that means that there are tau jets in that events, but if I print the Jet_PT I get, of course, the PT of the leading jet, not of the tau jet. Is this information stored in JET_PT[k] with some particular k value? I had a look at the manual, but I can'f find it...

Thanks

Daniele

comment:3 by Alexandre Mertens, 10 years ago

Hello,

here is a piece of code:


for(Int_t entry = 0; entry < numberOfEntries; ++entry)
  {
    // Load selected branches with data from specified event
    treeReader->ReadEntry(entry);

    // If event contains at least 1 jet
    for (Int_t i = 0; i < branchJet->GetEntries(); i++)
    {
      // Take the i-th jet
      Jet *jet = (Jet*) branchJet->At(i);
      // if it is tau-tagged
      if (jet->TauTag == 1)
        {
        // Print jet transverse momentum
        cout << jet->PT << endl;
        }
    }

Can you check that it does what you need?

by Daniele, 10 years ago

Attachment: analysis_8_proto.h added

by Daniele, 10 years ago

Attachment: analysis_8_proto.C added

comment:4 by Daniele, 10 years ago

Sorry, I think I made a mess with the attachments, and my message was erased.
What I wrote was that I am using some template root files for the analysis that loops automatically on the events, for example with the lines 75-80 in the .C file

ANALYSIS PART
printf("Analysing event n.%d of %d\r",entry+1,nentries);

if(Jet_>0 && Jet_PT[0]>110){

nev++;

}

END ANALYSIS PART

I am counting events with a jet with PT>110 GeV (actually I am a bit worried that this conditions is also applied to taujet now...)

I tried to modify mi file accordingly to your e-mail but I think I am doing something wrong. In fact if I write

printf("%d %d\n",entry,b_Jet_->GetEntries());

I get as an output

1 50000
2 50000
3 50000

and so on, where 50k is the number of events in my root files,but I thought that b_Jet_ defined in line 434 in the .h file in attach was the equivalent of your branchJet of the reply...

Is there a way to do this analysis on the tau using these templates that root gives me?

Cheers

Daniele

comment:5 by Daniele, 10 years ago

p.s. I am running this two files with a run.C file that contains inside the following

void running()
{

TFile *f_1 = TFile::Open("tag_1_delphes_events.root");
TTree *tree_1 = (TTree *)f_1->Get("Delphes");
tree_1->Process("analysis_8_proto.C");

}

comment:6 by Alexandre Mertens, 10 years ago

Hello,

here are the definitions I am using:

  gSystem->Load("libDelphes");

  // Create chain of root trees
  TChain chain("Delphes");
  chain.Add(inputFile);

  // Create object of class ExRootTreeReader
  ExRootTreeReader *treeReader = new ExRootTreeReader(&chain);
  Long64_t numberOfEntries = treeReader->GetEntries();

  // Get pointers to branches used in this analysis
  TClonesArray *branchJet = treeReader->UseBranch("Jet");

There are some example in delphes_directory/examples/ExampleX.C
Please, have a look to those which are very interesting to start using macro to analyse delphes simulations.

comment:7 by Daniele, 10 years ago

Hi,
thanks again for the quick reply.
Yeah, I knew these examples from which I first started to learn how to use root files, then I discovered this useful template create by root which I have started to use and with which I wrote my analysis and which I would like to keep using, so I hope there is a way to find the properties for the tau jets from that .h file that I am using.
Anyway of course with your code I can select them, but I would like to make it work in my "old" way. I am pretty sure there is an easy way to do it, I just need to find it.
Thanks again

Daniele

comment:8 by Daniele, 10 years ago

Just one last thing, to be sure that I am not doing something wrong.
If for example I ask in my analysis

if(Jet_>2){
then do stuff
}
So that I want more than 2 jets in my event, are tau jet considered among the 2 that I want or not? I guess not, since I am not asking any TauTag, but I would like to be sure.

Best

Daniele

Version 0, edited 10 years ago by Daniele (next)
Note: See TracTickets for help on using tickets.