# Regarding the slimmed secondary vertex from reco::Vertex collection

**URL:** <https://opendata-forum.cern.ch/t/regarding-the-slimmed-secondary-vertex-from-reco-vertex-collection/330>\
**Category:** CMS\
**Created:** [8 July 2024 05:32 UTC](https://opendata-forum.cern.ch/t/regarding-the-slimmed-secondary-vertex-from-reco-vertex-collection/330 "2024-07-08T05:32:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![SwastiRathod](https://opendata-forum.cern.ch/user_avatar/opendata-forum.cern.ch/swastirathod/32/155_2.png) [@SwastiRathod](https://opendata-forum.cern.ch/u/SwastiRathod)\
**Post date:** [8 July 2024 05:32 UTC](https://opendata-forum.cern.ch/t/regarding-the-slimmed-secondary-vertex-from-reco-vertex-collection/330/1 "2024-07-08T05:32:41Z")

</div>

I am trying to extract the information of secondary vertex from [/QCD\_Pt\_470to600\_TuneCP5\_13TeV\_pythia8/RunIISummer20UL16MiniAODv2-106X\_mcRun2\_asymptotic\_v17-v1/MINIAODSIM | CERN Open Data Portal](https://opendata.cern.ch/record/63217)

Every parameter that I am trying to access is in the list form as shown here:

```auto
svNdf \
0 []   
1 [0.9372603893280029, 6.627773284912109, 2.9017...   
2 [4.729351043701172, 0.9429101943969727, 1.1871...   
3 [8.71173095703125, 6.702803611755371]   
4 [13.29013442993164, 0.9429559707641602, 2.9734... 

```

Which corresponds to the different number of secondary vertices obtained from each event. I want to know on what basis are these secondary vertices arranged in each list? Also, I am interested in a particular secondary vertex, i.e. from bb quark, So how can I get a dataframe of parameters from only those secondary vertices.

---

<div class="post-metadata">

**Author:** ![jmhogan](https://opendata-forum.cern.ch/letter_avatar_proxy/v4/letter/j/779978/32.png) [@jmhogan](https://opendata-forum.cern.ch/u/jmhogan)\
**Post date:** [8 July 2024 18:03 UTC](https://opendata-forum.cern.ch/t/regarding-the-slimmed-secondary-vertex-from-reco-vertex-collection/330/2 "2024-07-08T18:03:21Z")

</div>

Hi Swasti,

I’m not quickly able to deduce from a NanoAOD file what the arrangement rule is. This would take some deeper digging into CMSSW.

To match a secondary vertex to any generator information, you’ll need to load the “prunedGenParticles” (hopefully my name is correct for MiniAOD). The PDG ID information for the generated particles can be used to find particles or decays that interest you, and you could use spatial matching (Delta-R) to identify vertices close to the decay you want to study.

From 2015 MiniAOD (which uses an older CMSSW version) we have an example of accessing the generated particles that might help: [PhysObjectExtractorTool/PhysObjectExtractor/src/GenParticleAnalyzer.cc at master · cms-opendata-analyses/PhysObjectExtractorTool · GitHub](https://github.com/cms-opendata-analyses/PhysObjectExtractorTool/blob/master/PhysObjectExtractor/src/GenParticleAnalyzer.cc)

Regards,  
Julie

---

<div class="post-metadata">

**Author:** ![SwastiRathod](https://opendata-forum.cern.ch/user_avatar/opendata-forum.cern.ch/swastirathod/32/155_2.png) [@SwastiRathod](https://opendata-forum.cern.ch/u/SwastiRathod)\
**Post date:** [9 July 2024 12:55 UTC](https://opendata-forum.cern.ch/t/regarding-the-slimmed-secondary-vertex-from-reco-vertex-collection/330/3 "2024-07-09T12:55:08Z")

</div>

Thank you for the reply.
