Skip to content

Commit f765a89

Browse files
committed
add pixel vertex table to NGT scouting nano output
1 parent 202f5c5 commit f765a89

File tree

3 files changed

+18
-4
lines changed

3 files changed

+18
-4
lines changed

HLTrigger/NGTScouting/plugins/HLTVertexTableProducer.cc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ void HLTVertexTableProducer::produce(edm::Event& iEvent, const edm::EventSetup&
6969

7070
//vertex collection
7171
auto pvsIn = iEvent.getHandle(pvs_);
72+
auto pvScoreIn = iEvent.getHandle(pvsScore_);
7273
const size_t nPVs = pvsIn.isValid() ? (*pvsIn).size() : 0;
7374

7475
static constexpr float default_value = std::numeric_limits<float>::quiet_NaN();
@@ -90,7 +91,6 @@ void HLTVertexTableProducer::produce(edm::Event& iEvent, const edm::EventSetup&
9091

9192
if (pvsIn.isValid() || !(this->skipNonExistingSrc_)) {
9293
const auto& pvs = *pvsIn;
93-
const auto& pvsScoreProd = iEvent.get(pvsScore_);
9494

9595
auto pfcIn = iEvent.getHandle(pfc_);
9696
const bool isPfcValid = pfcIn.isValid();
@@ -109,7 +109,11 @@ void HLTVertexTableProducer::produce(edm::Event& iEvent, const edm::EventSetup&
109109
v_zError[i] = pv.zError();
110110
v_nTracks[i] = pv.nTracks();
111111
v_is_good[i] = goodPvCut_(pv);
112-
v_pv_score[i] = pvsScoreProd.get(pvsIn.id(), i);
112+
113+
if (pvScoreIn.isValid() || !(this->skipNonExistingSrc_)) {
114+
const auto& pvsScoreProd = *pvScoreIn;
115+
v_pv_score[i] = pvsScoreProd.get(pvsIn.id(), i);
116+
}
113117

114118
float sumpt2 = 0.f, sumpx = 0.f, sumpy = 0.f;
115119

HLTrigger/NGTScouting/python/HLTNanoProducer_cff.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#+ hltTriggerAcceptFilter
4848
+ hltVertexTable
4949
+ hltPixelTrackTable
50+
+ hltPixelVertexTable
5051
+ hltGeneralTrackTable
5152
+ hltEgammaPacker
5253
+ hltPhotonTable
@@ -70,6 +71,7 @@
7071
+ dstTriggerAcceptFilter
7172
+ hltVertexTable
7273
+ hltPixelTrackTable
74+
+ hltPixelVertexTable
7375
+ hltGeneralTrackTable
7476
+ hltEgammaPacker
7577
+ hltPhotonTable

HLTrigger/NGTScouting/python/hltVertices_cfi.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,13 @@
88
pfSrc = cms.InputTag("hltParticleFlowTmp"),
99
dlenMin = cms.double(0),
1010
dlenSigMin = cms.double(3),
11-
pvName = cms.string("hltPrimaryVertex"),
12-
)
11+
pvName = cms.string("hltPrimaryVertex"))
12+
13+
hltPixelVertexTable = cms.EDProducer("HLTVertexTableProducer",
14+
skipNonExistingSrc = cms.bool(True),
15+
pvSrc = cms.InputTag("hltPhase2PixelVertices"),
16+
goodPvCut = cms.string(""),
17+
pfSrc = cms.InputTag(""),
18+
dlenMin = cms.double(0),
19+
dlenSigMin = cms.double(3),
20+
pvName = cms.string("hltPixelVertex"))

0 commit comments

Comments
 (0)