Tau truth information

Hi everyone,
I have a question regarding the truth information for tau leptons. In order to define a new variable in the training-dataset-dumper I am looking at all the daughter particles from b- and c-hadrons and count the leptons by checking the pdgid of the truth particles in the decay chain. This also works for muons and electrons but for taus this information is not available. However I know that there is a tau container so I was wondering if someone has an idea how to access this information for taus?
Cheers,
Tomke

Can you clarify what is not available?
in PHYSVAL we should have all the truth particles in the truth particle container, so what works for a b-hadron should work also for a tau lepton.
[btw I assume you are stopping the search once you find Geant particles, right?]

Best,

Valerio

So I start with a b- or a c- hadron and save all truth particles that originate from that hadron in a vector. After that I go through this vector of truth particles and check with truth_particle->pdgId() if the truth particle is a lepton. I get 11 and 13 for electrons and muons but never 15 for taus even though there should be some taus. So I am missing the information if the truth particle I am looking at is a tau.
What exactly do you mean by Geant particle?

Hi Valerio,

This is the line in my code which checks if the corresponding particle is a tau:

and I am using this sample:
´mc20_13TeV.410470.PhPy8EG_A14_ttbar_hdamp258p75_nonallhad.deriv.DAOD_PHYSVAL.e6337_s3681_r13144_p4931´

Best,
Tomke

Hello Tomke,

first of all, let me apologise for the late reply.
Second, your issue is in this line:

tau are unstable so they have status=2, to me this should explain why you are missing taus.
[ I see them in the same sample with a different ptag].

Best,

Valerio

I should chime in here to say that if you’re going to merge this code with the dataset dumpster eventually, you could make a WIP merge request so we can discuss the specifics there too. (There are also some unrelated suggestions I might make)

Hello Valerio,

Thanks for your help! Sorry for the late reply, I had to adjust some other things but was finally able to dump a sample including the taus.

Best,
Tomke