@@ -82,38 +82,37 @@ class KGenInfoProducer : public KInfoProducer<Tmeta>
82
82
// metaEvent->alphaQED = hEventInfo->alphaQED();
83
83
84
84
// Get PU infos
85
- this ->metaEvent ->numPUInteractionsM2 = 0 ;
86
- this ->metaEvent ->numPUInteractionsM1 = 0 ;
87
- this ->metaEvent ->numPUInteractions0 = 0 ;
88
- this ->metaEvent ->numPUInteractionsP1 = 0 ;
89
- this ->metaEvent ->numPUInteractionsP2 = 0 ;
85
+ this ->metaEvent ->nPUm2 = 0 ;
86
+ this ->metaEvent ->nPUm1 = 0 ;
87
+ this ->metaEvent ->nPU = 0 ;
88
+ this ->metaEvent ->nPUp1 = 0 ;
89
+ this ->metaEvent ->nPUp2 = 0 ;
90
90
edm::Handle<std::vector<PileupSummaryInfo> > puHandles;
91
91
if (event.getByLabel (puInfoSource, puHandles) && puHandles.isValid ())
92
92
{
93
93
for (std::vector<PileupSummaryInfo>::const_iterator it = puHandles->begin (); it != puHandles->end (); ++it)
94
94
{
95
95
unsigned char nPU = (unsigned char )std::min (255 , it->getPU_NumInteractions ());
96
96
if (it->getBunchCrossing () == -2 )
97
- this ->metaEvent ->numPUInteractionsM2 = nPU;
97
+ this ->metaEvent ->nPUm2 = nPU;
98
98
else if (it->getBunchCrossing () == -1 )
99
- this ->metaEvent ->numPUInteractionsM1 = nPU;
99
+ this ->metaEvent ->nPUm1 = nPU;
100
100
else if (it->getBunchCrossing () == 0 )
101
- this ->metaEvent ->numPUInteractions0 = nPU;
101
+ this ->metaEvent ->nPU = nPU;
102
102
else if (it->getBunchCrossing () == 1 )
103
- this ->metaEvent ->numPUInteractionsP1 = nPU;
103
+ this ->metaEvent ->nPUp1 = nPU;
104
104
else if (it->getBunchCrossing () == 2 )
105
- this ->metaEvent ->numPUInteractionsP2 = nPU;
105
+ this ->metaEvent ->nPUp2 = nPU;
106
106
107
- // remove the following line to compile with CMSSW 4.2.7 or earlier
108
- this ->metaEvent ->numPUInteractionsTruth = it->getTrueNumInteractions ();
107
+ this ->metaEvent ->nPUMean = it->getTrueNumInteractions (); // remove this line to compile with CMSSW 4.2.7 or earlier
109
108
}
110
109
}
111
110
else
112
111
{
113
112
// in some versions of CMSSW it's not a vector:
114
113
edm::Handle<PileupSummaryInfo> puHandle;
115
114
if (event.getByLabel (puInfoSource, puHandle) && puHandle.isValid ())
116
- this ->metaEvent ->numPUInteractions0 = (unsigned char )std::min (255 , puHandle->getPU_NumInteractions ());
115
+ this ->metaEvent ->nPU = (unsigned char )std::min (255 , puHandle->getPU_NumInteractions ());
117
116
}
118
117
119
118
return true ;
@@ -172,11 +171,11 @@ class KHepMCInfoProducer : public KInfoProducer<Tmeta>
172
171
// metaEvent->alphaQED = hEventInfo->alphaQED();
173
172
174
173
// Get PU infos
175
- this ->metaEvent ->numPUInteractionsM2 = 0 ;
176
- this ->metaEvent ->numPUInteractionsM1 = 0 ;
177
- this ->metaEvent ->numPUInteractions0 = 0 ;
178
- this ->metaEvent ->numPUInteractionsP1 = 0 ;
179
- this ->metaEvent ->numPUInteractionsP2 = 0 ;
174
+ this ->metaEvent ->nPUm2 = 0 ;
175
+ this ->metaEvent ->nPUm1 = 0 ;
176
+ this ->metaEvent ->nPU = 0 ;
177
+ this ->metaEvent ->nPUp1 = 0 ;
178
+ this ->metaEvent ->nPUp2 = 0 ;
180
179
181
180
return true ;
182
181
}
0 commit comments