@@ -82,38 +82,37 @@ class KGenInfoProducer : public KInfoProducer<Tmeta>
8282 // metaEvent->alphaQED = hEventInfo->alphaQED();
8383
8484 // 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 ;
9090 edm::Handle<std::vector<PileupSummaryInfo> > puHandles;
9191 if (event.getByLabel (puInfoSource, puHandles) && puHandles.isValid ())
9292 {
9393 for (std::vector<PileupSummaryInfo>::const_iterator it = puHandles->begin (); it != puHandles->end (); ++it)
9494 {
9595 unsigned char nPU = (unsigned char )std::min (255 , it->getPU_NumInteractions ());
9696 if (it->getBunchCrossing () == -2 )
97- this ->metaEvent ->numPUInteractionsM2 = nPU;
97+ this ->metaEvent ->nPUm2 = nPU;
9898 else if (it->getBunchCrossing () == -1 )
99- this ->metaEvent ->numPUInteractionsM1 = nPU;
99+ this ->metaEvent ->nPUm1 = nPU;
100100 else if (it->getBunchCrossing () == 0 )
101- this ->metaEvent ->numPUInteractions0 = nPU;
101+ this ->metaEvent ->nPU = nPU;
102102 else if (it->getBunchCrossing () == 1 )
103- this ->metaEvent ->numPUInteractionsP1 = nPU;
103+ this ->metaEvent ->nPUp1 = nPU;
104104 else if (it->getBunchCrossing () == 2 )
105- this ->metaEvent ->numPUInteractionsP2 = nPU;
105+ this ->metaEvent ->nPUp2 = nPU;
106106
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
109108 }
110109 }
111110 else
112111 {
113112 // in some versions of CMSSW it's not a vector:
114113 edm::Handle<PileupSummaryInfo> puHandle;
115114 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 ());
117116 }
118117
119118 return true ;
@@ -172,11 +171,11 @@ class KHepMCInfoProducer : public KInfoProducer<Tmeta>
172171 // metaEvent->alphaQED = hEventInfo->alphaQED();
173172
174173 // 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 ;
180179
181180 return true ;
182181 }
0 commit comments