Skip to content

reco::PFTau::signalTauChargedHadronCandidates() returns empty vector #30894

Open
@veelken

Description

@veelken

Hi,

I came across a weird feature today: I produce a collection of reco::PFTau objects in a 1st cmsRun job and then read the same reco::PFTau collection in a 2nd cmsRun job.
While the function
reco::PFTau::signalTauChargedHadronCandidates().size()
returns values of 1 for one-prong taus and 3 for three-prong taus in the 1st cmsRun job as expected,
when I call the same function in the 2nd cmsRun job, I always get 0, i.e. the function
https://github.com/cms-sw/cmssw/blob/master/DataFormats/TauReco/interface/PFTau.h#L155
returns an empty vector in case the collection of reco::PFTau objects is read from a ROOT file.
I do not get a warning or error message. The code just fails silently.

The weird thing is that calling the function
reco::PFTau::signalPiZeroCandidates().size()
returns the same value in the 1st and in the 2nd cmsRun job.

Is the feature that I observed for the access to reco::PFTau::signalTauChargedHadronCandidates() the intended behaviour ?

The feature prevents the tau decay mode discriminator to be recomputed, because the tau mass window cuts cannot be applied (when reco::PFTau::signalTauChargedHadronCandidates().size() returns 0, this line of code fails: https://github.com/cms-sw/cmssw/blob/master/RecoTauTag/RecoTau/plugins/PFRecoTauDiscriminationByHPSSelection.cc#L136-L137 )

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions