cmg-xtracks / cmgtools-lite

CMG X-tracks code
1 stars 0 forks source link

Adding primary vertex to ntuples #21

Closed jniedzie closed 5 years ago

avartak commented 5 years ago

Hi Jeremi,

There is typically a loose quality selection applied while selecting "good" vertices. You can find it here:

http://cmslxr.fnal.gov/source/RecoMET/METFilters/python/metFilters_cff.py?v=CMSSW_9_4_2#0044

My suggestion would be to pick up the first vertex that passes these cuts. The efficiency is close to 100% so I don't expect things to change a lot, but this would be the proper way to select vertices.

Note that the "goodVertices" filter already requires at least one vertex in the event passing this selection. So you should end up with at least one vertex.

jniedzie commented 5 years ago

Hi @avartak,

I added the cuts you suggested - they didn't change anything in the sample I was testing, so I guess they should be fine. I also renamed the per-hit variables.