cms-nanoAOD / cmssw

CMS NanoAOD software integration repository
http://cms-sw.github.io/
Apache License 2.0
3 stars 10 forks source link

NanoAOD root files from 2016B Dataset with different TTree structure #528

Closed vargasa closed 4 years ago

vargasa commented 4 years ago

Dear NanoAOD experts,

For the NanoAODv6 and v7 2016B Dataset the content of the Events TTree seems to be inconsistent. The branch HLT_TkMu50 is present in some root files but not in others even when looping through the same dataset. I was expecting the TTree to have the same content through the entire dataset but that doesn't seem to be the case. For a more detailed version for v6 this please check (1). However, I see the same pattern on 02Apr2020 release, check das query here.

EventIDMaker::Init Error: Tree Events Branch: HLT_TkMu50 not found
URL: root://cmsxrootd.fnal.gov//store/data/Run2016B/SingleElectron/NANOAOD/02Apr2020-v1/230000/B88E4B38-1084-1B4F-841B-C3E56506E35F.root

EventIDMaker::Init Error: Tree Events Branch: HLT_TkMu50 not found
URL: root://cmsxrootd.fnal.gov//store/data/Run2016B/SingleElectron/NANOAOD/02Apr2020-v2/250000/F9E2E715-37C2-0B40-A92B-0588E5E6BDB3.root

EventIDMaker::Init Error: Tree Events Branch: HLT_TkMu50 not found
URL: root://cmsxrootd.fnal.gov//store/data/Run2016B/SinglePhoton/NANOAOD/02Apr2020-v1/50000/AF2C9908-787B-3646-AFBA-1664230FC643.root

EventIDMaker::Init Error: Tree Events Branch: HLT_TkMu50 not found
URL: root://cmsxrootd.fnal.gov//store/data/Run2016B/SingleMuon/NANOAOD/02Apr2020-v1/40000/D50E7ED4-5629-0549-A255-BB395B6A65C1.root
...

This is a sample, there are more files missing the branch. It is possible to verify this by running:

auto t1 = TFile::Open("root://cmsxrootd.fnal.gov//store/data/Run2016B/SingleElectron/NANOAOD/02Apr2020-v1/230000/96CBE196-6566-1A4A-BD28-911BDFC58907.root")
auto t2 = (TTree*)t1->Get("Events")
t2->Print("HLT_TkMu50*") /* Found here */
auto t3 = TFile::Open("root://cmsxrootd.fnal.gov//store/data/Run2016B/SingleElectron/NANOAOD/02Apr2020-v1/230000/B88E4B38-1084-1B4F-841B-C3E56506E35F.root")
auto t4 = (TTree*)t3->Get("Events")
t4->Print("HLT_TkMu50*") /* But not here*/

If this is not the right place for this issue, Can you please provide insights on where to place it or feedback if those files can be safely ignored/skipped ?

As always, thanks a lot!

(1) https://hypernews.cern.ch/HyperNews/CMS/get/b2g-selections/352.html
peruzzim commented 4 years ago

This is the expected behaviour in files that contain no event in which that trigger was in the menu. There is no predefined trigger list stored in NanoAOD, the set of triggers is discovered dynamically and branches are created to accommodate only the bits that are found in the input file.

pieterdavid commented 4 years ago

@vargasa HLT_TkMu50 is present from run 274954 on. I split 2016B in two parts for my analysis to deal with this, also in the DAS query with run between (you can get this kind of information from brilcalc trg - I wrote a script to parse the output and get more readable output for a list of triggers, I can push it somewhere if it can be useful also for other people).

vargasa commented 4 years ago

@peruzzim thanks for the info! @pieterdavid it would be certainly be useful, can I find it somewhere on your repos? Thanks a lot!

pieterdavid commented 4 years ago

@vargasa I uploaded them as snippets on gitlab: just the run ranges and with prescales (there may be better tools around for this - I wrote them for my own use, so there may be bugs)