Open katilp opened 3 years ago
Done so far: https://github.com/apetkovi1/PhysObjectExtractorTool/tree/modular/PhysObjectExtractor Should I write vertex info in a TTree ? Should I add InputTag for different collections : offlinePrimaryVertices, offlinePrimaryVerticesWithBS (now it has only offlinePrimaryVertices ) ?
Looks good, that was quick! Yes, write it to a TTree and check that it comes out in the output file. I think we can start with offlinePrimaryVertices only.
You can also have a look at how the Vertex information is filled in https://github.com/cms-sw/cmssw/tree/master/PhysicsTools/NanoAOD/plugins, in particular, VertexTableProducer.cc and see if you can implement the missing variables
Note however that the NanoAOD format has been produced only starting from Run-2 (or from 2016 data onwards) so it can be that there are differences to what we need to do, i.e. getting it from Run-1 AOD format.
Create a separate cc file in the modular branch of POET for vertex information.
The goal is to get from AOD the vertex information in the PV branch of Run-2 NanoAOD i.e. the variables in
https://cms-nanoaod-integration.web.cern.ch/integration/master-cmsswmaster/mc102X_doc.html#PV
You can try to see how part of this information is extracted in this code https://gitlab.cern.ch/cms-opendata/cms-opendata-nanoaodplus/nanoaodplus_v1/-/blob/master/src/NanoAnalyzer.cc#L2398
You can find some information on different collections in https://twiki.cern.ch/twiki/bin/view/CMSPublic/SWGuideAodDataTable The links in that table won't work unfortunately.
I will see if I find examples that could be easier to follow.
To develop the code, you can make a fork of your own from https://github.com/cms-legacydata-analyses/PhysObjectExtractorTool (top right) and you work on your own area. You can find some notions on "forks" at the start of https://cms-dpoa.github.io/cms-dpoa-getting-started/computing/basic/git-faq.html