ram1123 / nanoAOD_skim

nanoAOD skiming code for vv senile-tonic VBS studies
0 stars 9 forks source link

nElectron and nMuon branches are empty #22

Closed ram1123 closed 9 months ago

ram1123 commented 10 months ago

Issues

Reported by @Anusreevijay769.

If we printout Events->Scan("nElectron:nMuon:nJet"). It will show zero for electrons and muons. But the jet looks fine.

Cause

We already investigated and pointed out the cause of this issue. This issue is caused by following lines:

https://github.com/ram1123/nanoAOD_skim/blob/6400864df1489fa1f20c7db784bbce7df3b6a8d2/H4LCppModule.py#L132-L137

If we replace above patch with below patch, it fixes the issue:

        self.out.branch("Electron_Fsr_pt",  "F", lenVar = "0")
        self.out.branch("Electron_Fsr_eta",  "F", lenVar = "0")
        self.out.branch("Electron_Fsr_phi",  "F", lenVar = "0")
        self.out.branch("Muon_Fsr_pt",  "F", lenVar = "0")
        self.out.branch("Muon_Fsr_eta",  "F", lenVar = "0")
        self.out.branch("Muon_Fsr_phi",  "F", lenVar = "0")

Possible fix

@YujiLee301 introduced this to get the length for the leptons for FSR leptons. May be we can create a temporary variable for this and then use it. This should fix this issue.