CMS 3D CMS Logo

PuppiProducer.cc
Go to the documentation of this file.
1 // system include files
2 #include <memory>
3 
4 // user include files
19 //Main File
21 
22 // ------------------------------------------------------------------------------------------
24  fPuppiDiagnostics = iConfig.getParameter<bool>("puppiDiagnostics");
25  fPuppiNoLep = iConfig.getParameter<bool>("puppiNoLep");
26  fUseFromPVLooseTight = iConfig.getParameter<bool>("UseFromPVLooseTight");
27  fUseDZ = iConfig.getParameter<bool>("UseDeltaZCut");
28  fDZCut = iConfig.getParameter<double>("DeltaZCut");
29  fEtaMinUseDZ = iConfig.getParameter<double>("EtaMinUseDeltaZ");
30  fPtMaxCharged = iConfig.getParameter<double>("PtMaxCharged");
31  fEtaMaxCharged = iConfig.getParameter<double>("EtaMaxCharged");
32  fPtMaxPhotons = iConfig.getParameter<double>("PtMaxPhotons");
33  fEtaMaxPhotons = iConfig.getParameter<double>("EtaMaxPhotons");
34  fNumOfPUVtxsForCharged = iConfig.getParameter<uint>("NumOfPUVtxsForCharged");
35  fDZCutForChargedFromPUVtxs = iConfig.getParameter<double>("DeltaZCutForChargedFromPUVtxs");
36  fUseExistingWeights = iConfig.getParameter<bool>("useExistingWeights");
37  fClonePackedCands = iConfig.getParameter<bool>("clonePackedCands");
38  fVtxNdofCut = iConfig.getParameter<int>("vtxNdofCut");
39  fVtxZCut = iConfig.getParameter<double>("vtxZCut");
40  fPuppiContainer = std::make_unique<PuppiContainer>(iConfig);
41 
42  tokenPFCandidates_ = consumes<CandidateView>(iConfig.getParameter<edm::InputTag>("candName"));
43  tokenVertices_ = consumes<VertexCollection>(iConfig.getParameter<edm::InputTag>("vertexName"));
44 
45  ptokenPupOut_ = produces<edm::ValueMap<float>>();
46  ptokenP4PupOut_ = produces<edm::ValueMap<LorentzVector>>();
47  ptokenValues_ = produces<edm::ValueMap<reco::CandidatePtr>>();
48 
50  ptokenPackedPuppiCandidates_ = produces<pat::PackedCandidateCollection>();
51  else {
52  ptokenPuppiCandidates_ = produces<reco::PFCandidateCollection>();
53  }
54 
55  if (fPuppiDiagnostics) {
56  ptokenNalgos_ = produces<double>("PuppiNAlgos");
57  ptokenRawAlphas_ = produces<std::vector<double>>("PuppiRawAlphas");
58  ptokenAlphas_ = produces<std::vector<double>>("PuppiAlphas");
59  ptokenAlphasMed_ = produces<std::vector<double>>("PuppiAlphasMed");
60  ptokenAlphasRms_ = produces<std::vector<double>>("PuppiAlphasRms");
61  }
62 }
63 // ------------------------------------------------------------------------------------------
65 // ------------------------------------------------------------------------------------------
67  // Get PFCandidate Collection
68  edm::Handle<CandidateView> hPFProduct;
69  iEvent.getByToken(tokenPFCandidates_, hPFProduct);
70  const CandidateView* pfCol = hPFProduct.product();
71 
72  // Get vertex collection w/PV as the first entry?
74  iEvent.getByToken(tokenVertices_, hVertexProduct);
75  const reco::VertexCollection* pvCol = hVertexProduct.product();
76 
77  int npv = 0;
78  const reco::VertexCollection::const_iterator vtxEnd = pvCol->end();
79  for (reco::VertexCollection::const_iterator vtxIter = pvCol->begin(); vtxEnd != vtxIter; ++vtxIter) {
80  if (!vtxIter->isFake() && vtxIter->ndof() >= fVtxNdofCut && std::abs(vtxIter->z()) <= fVtxZCut)
81  npv++;
82  }
83 
84  std::vector<double> lWeights;
85  if (!fUseExistingWeights) {
86  //Fill the reco objects
87  fRecoObjCollection.clear();
88  fRecoObjCollection.reserve(pfCol->size());
89  for (auto const& aPF : *pfCol) {
90  RecoObj pReco;
91  pReco.pt = aPF.pt();
92  pReco.eta = aPF.eta();
93  pReco.phi = aPF.phi();
94  pReco.m = aPF.mass();
95  pReco.rapidity = aPF.rapidity();
96  pReco.charge = aPF.charge();
97  pReco.pdgId = aPF.pdgId();
98  const reco::Vertex* closestVtx = nullptr;
99  double pDZ = -9999;
100  double pD0 = -9999;
101  uint pVtxId = 0;
102  bool isLepton = ((std::abs(pReco.pdgId) == 11) || (std::abs(pReco.pdgId) == 13));
103  const pat::PackedCandidate* lPack = dynamic_cast<const pat::PackedCandidate*>(&aPF);
104  if (lPack == nullptr) {
105  const reco::PFCandidate* pPF = dynamic_cast<const reco::PFCandidate*>(&aPF);
106  double curdz = 9999;
107  int closestVtxForUnassociateds = -9999;
108  const reco::TrackRef aTrackRef = pPF->trackRef();
109  bool lFirst = true;
110  for (auto const& aV : *pvCol) {
111  if (lFirst) {
112  if (aTrackRef.isNonnull()) {
113  pDZ = aTrackRef->dz(aV.position());
114  pD0 = aTrackRef->d0();
115  } else if (pPF->gsfTrackRef().isNonnull()) {
116  pDZ = pPF->gsfTrackRef()->dz(aV.position());
117  pD0 = pPF->gsfTrackRef()->d0();
118  }
119  lFirst = false;
120  if (pDZ > -9999)
121  pVtxId = 0;
122  }
123  if (aTrackRef.isNonnull() && aV.trackWeight(pPF->trackRef()) > 0) {
124  closestVtx = &aV;
125  break;
126  }
127  // in case it's unassocciated, keep more info
128  double tmpdz = 99999;
129  if (aTrackRef.isNonnull())
130  tmpdz = aTrackRef->dz(aV.position());
131  else if (pPF->gsfTrackRef().isNonnull())
132  tmpdz = pPF->gsfTrackRef()->dz(aV.position());
133  if (std::abs(tmpdz) < curdz) {
134  curdz = std::abs(tmpdz);
135  closestVtxForUnassociateds = pVtxId;
136  }
137  pVtxId++;
138  }
139  int tmpFromPV = 0;
140  // mocking the miniAOD definitions
141  if (std::abs(pReco.charge) > 0) {
142  if (closestVtx != nullptr && pVtxId > 0)
143  tmpFromPV = 0;
144  if (closestVtx != nullptr && pVtxId == 0)
145  tmpFromPV = 3;
146  if (closestVtx == nullptr && closestVtxForUnassociateds == 0)
147  tmpFromPV = 2;
148  if (closestVtx == nullptr && closestVtxForUnassociateds != 0)
149  tmpFromPV = 1;
150  }
151  pReco.dZ = pDZ;
152  pReco.d0 = pD0;
153  pReco.id = 0;
154  if (std::abs(pReco.charge) == 0) {
155  pReco.id = 0;
156  } else {
157  if (fPuppiNoLep && isLepton)
158  pReco.id = 3;
159  else if (tmpFromPV == 0) {
160  pReco.id = 2;
161  if (fNumOfPUVtxsForCharged > 0 and (pVtxId <= fNumOfPUVtxsForCharged) and
163  pReco.id = 1;
164  } else if (tmpFromPV == 3)
165  pReco.id = 1;
166  else if (tmpFromPV == 1 || tmpFromPV == 2) {
167  pReco.id = 0;
168  if ((fPtMaxCharged > 0) and (pReco.pt > fPtMaxCharged))
169  pReco.id = 1;
170  else if (std::abs(pReco.eta) > fEtaMaxCharged)
171  pReco.id = 1;
172  else if ((fUseDZ) && (std::abs(pReco.eta) >= fEtaMinUseDZ))
173  pReco.id = (std::abs(pDZ) < fDZCut) ? 1 : 2;
174  else if (fUseFromPVLooseTight && tmpFromPV == 1)
175  pReco.id = 2;
176  else if (fUseFromPVLooseTight && tmpFromPV == 2)
177  pReco.id = 1;
178  }
179  }
180  } else if (lPack->vertexRef().isNonnull()) {
181  pDZ = lPack->dz();
182  pD0 = lPack->dxy();
183  pReco.dZ = pDZ;
184  pReco.d0 = pD0;
185 
186  pReco.id = 0;
187  if (std::abs(pReco.charge) == 0) {
188  pReco.id = 0;
189  }
190  if (std::abs(pReco.charge) > 0) {
191  if (fPuppiNoLep && isLepton) {
192  pReco.id = 3;
193  } else if (lPack->fromPV() == 0) {
194  pReco.id = 2;
196  for (size_t puVtx_idx = 1; puVtx_idx <= fNumOfPUVtxsForCharged && puVtx_idx < pvCol->size();
197  ++puVtx_idx) {
198  if (lPack->fromPV(puVtx_idx) >= 2) {
199  pReco.id = 1;
200  break;
201  }
202  }
203  }
204  } else if (lPack->fromPV() == (pat::PackedCandidate::PVUsedInFit)) {
205  pReco.id = 1;
206  } else if (lPack->fromPV() == (pat::PackedCandidate::PVTight) ||
207  lPack->fromPV() == (pat::PackedCandidate::PVLoose)) {
208  pReco.id = 0;
209  if ((fPtMaxCharged > 0) and (pReco.pt > fPtMaxCharged))
210  pReco.id = 1;
211  else if (std::abs(pReco.eta) > fEtaMaxCharged)
212  pReco.id = 1;
213  else if ((fUseDZ) && (std::abs(pReco.eta) >= fEtaMinUseDZ))
214  pReco.id = (std::abs(pDZ) < fDZCut) ? 1 : 2;
216  pReco.id = 2;
218  pReco.id = 1;
219  }
220  }
221  }
222 
223  fRecoObjCollection.push_back(pReco);
224  }
225 
226  fPuppiContainer->initialize(fRecoObjCollection);
227  fPuppiContainer->setNPV(npv);
228 
229  //Compute the weights and get the particles
230  lWeights = fPuppiContainer->puppiWeights();
231  } else {
232  //Use the existing weights
233  int lPackCtr = 0;
234  for (auto const& aPF : *pfCol) {
235  const pat::PackedCandidate* lPack = dynamic_cast<const pat::PackedCandidate*>(&aPF);
236  float curpupweight = -1.;
237  if (lPack == nullptr) {
238  // throw error
240  "PuppiProducer: cannot get weights since inputs are not PackedCandidates");
241  } else {
242  if (fPuppiNoLep) {
243  curpupweight = lPack->puppiWeightNoLep();
244  } else {
245  curpupweight = lPack->puppiWeight();
246  }
247  }
248  // Protect high pT photons (important for gamma to hadronic recoil balance)
249  if ((fPtMaxPhotons > 0) && (lPack->pdgId() == 22) && (std::abs(lPack->eta()) < fEtaMaxPhotons) &&
250  (lPack->pt() > fPtMaxPhotons))
251  curpupweight = 1;
252  lWeights.push_back(curpupweight);
253  lPackCtr++;
254  }
255  }
256 
257  //Fill it into the event
258  edm::ValueMap<float> lPupOut;
259  edm::ValueMap<float>::Filler lPupFiller(lPupOut);
260  lPupFiller.insert(hPFProduct, lWeights.begin(), lWeights.end());
261  lPupFiller.fill();
262 
263  // This is a dummy to access the "translate" method which is a
264  // non-static member function even though it doesn't need to be.
265  // Will fix in the future.
266  static const reco::PFCandidate dummySinceTranslateIsNotStatic;
267 
268  // Fill a new PF/Packed Candidate Collection and write out the ValueMap of the new p4s.
269  // Since the size of the ValueMap must be equal to the input collection, we need
270  // to search the "puppi" particles to find a match for each input. If none is found,
271  // the input is set to have a four-vector of 0,0,0,0
272  PFOutputCollection fPuppiCandidates;
273  PackedOutputCollection fPackedPuppiCandidates;
274 
276  LorentzVectorCollection puppiP4s;
277  std::vector<reco::CandidatePtr> values(hPFProduct->size());
278 
279  int iCand = -1;
280  for (auto const& aCand : *hPFProduct) {
281  ++iCand;
282  std::unique_ptr<pat::PackedCandidate> pCand;
283  std::unique_ptr<reco::PFCandidate> pfCand;
284 
286  const pat::PackedCandidate* cand = dynamic_cast<const pat::PackedCandidate*>(&aCand);
287  if (!cand)
288  throw edm::Exception(edm::errors::LogicError, "PuppiProducer: inputs are not PackedCandidates");
289  pCand = std::make_unique<pat::PackedCandidate>(*cand);
290  } else {
291  auto id = dummySinceTranslateIsNotStatic.translatePdgIdToType(aCand.pdgId());
292  const reco::PFCandidate* cand = dynamic_cast<const reco::PFCandidate*>(&aCand);
293  pfCand = std::make_unique<reco::PFCandidate>(cand ? *cand : reco::PFCandidate(aCand.charge(), aCand.p4(), id));
294  }
295 
296  // Here, we are using new weights computed and putting them in the packed candidates.
298  if (fPuppiNoLep)
299  pCand->setPuppiWeight(pCand->puppiWeight(), lWeights[iCand]);
300  else
301  pCand->setPuppiWeight(lWeights[iCand], pCand->puppiWeightNoLep());
302  }
303 
304  puppiP4s.emplace_back(lWeights[iCand] * aCand.px(),
305  lWeights[iCand] * aCand.py(),
306  lWeights[iCand] * aCand.pz(),
307  lWeights[iCand] * aCand.energy());
308 
309  // Here, we are using existing weights, or we're using packed candidates.
310  // That is, whether or not we recomputed the weights, we store the
311  // source candidate appropriately, and set the p4 of the packed candidate.
313  pCand->setP4(puppiP4s.back());
314  pCand->setSourceCandidatePtr(aCand.sourceCandidatePtr(0));
315  fPackedPuppiCandidates.push_back(*pCand);
316  } else {
317  pfCand->setP4(puppiP4s.back());
318  pfCand->setSourceCandidatePtr(aCand.sourceCandidatePtr(0));
319  fPuppiCandidates.push_back(*pfCand);
320  }
321  }
322 
323  //Compute the modified p4s
324  edm::ValueMap<LorentzVector>::Filler p4PupFiller(p4PupOut);
325  p4PupFiller.insert(hPFProduct, puppiP4s.begin(), puppiP4s.end());
326  p4PupFiller.fill();
327 
328  iEvent.emplace(ptokenPupOut_, lPupOut);
329  iEvent.emplace(ptokenP4PupOut_, p4PupOut);
332  iEvent.emplace(ptokenPackedPuppiCandidates_, fPackedPuppiCandidates);
333  for (unsigned int ic = 0, nc = oh->size(); ic < nc; ++ic) {
334  reco::CandidatePtr pkref(oh, ic);
335  values[ic] = pkref;
336  }
337  } else {
339  for (unsigned int ic = 0, nc = oh->size(); ic < nc; ++ic) {
340  reco::CandidatePtr pkref(oh, ic);
341  values[ic] = pkref;
342  }
343  }
346  filler.insert(hPFProduct, values.begin(), values.end());
347  filler.fill();
348  iEvent.emplace(ptokenValues_, pfMap_p);
349 
352  // all the different alphas per particle
353  // THE alpha per particle
354  std::vector<double> theAlphas(fPuppiContainer->puppiAlphas());
355  std::vector<double> theAlphasMed(fPuppiContainer->puppiAlphasMed());
356  std::vector<double> theAlphasRms(fPuppiContainer->puppiAlphasRMS());
357  std::vector<double> alphas(fPuppiContainer->puppiRawAlphas());
358  double nalgos(fPuppiContainer->puppiNAlgos());
359 
360  iEvent.emplace(ptokenRawAlphas_, alphas);
361  iEvent.emplace(ptokenNalgos_, nalgos);
362  iEvent.emplace(ptokenAlphas_, theAlphas);
363  iEvent.emplace(ptokenAlphasMed_, theAlphasMed);
364  iEvent.emplace(ptokenAlphasRms_, theAlphasRms);
365  }
366 }
367 
368 // ------------------------------------------------------------------------------------------
370 // ------------------------------------------------------------------------------------------
372 // ------------------------------------------------------------------------------------------
375  desc.add<bool>("puppiDiagnostics", false);
376  desc.add<bool>("puppiNoLep", false);
377  desc.add<bool>("UseFromPVLooseTight", false);
378  desc.add<bool>("UseDeltaZCut", true);
379  desc.add<double>("DeltaZCut", 0.3);
380  desc.add<double>("EtaMinUseDeltaZ", 0.);
381  desc.add<double>("PtMaxCharged", -1.);
382  desc.add<double>("EtaMaxCharged", 99999.);
383  desc.add<double>("PtMaxPhotons", -1.);
384  desc.add<double>("EtaMaxPhotons", 2.5);
385  desc.add<double>("PtMaxNeutrals", 200.);
386  desc.add<double>("PtMaxNeutralsStartSlope", 0.);
387  desc.add<uint>("NumOfPUVtxsForCharged", 0);
388  desc.add<double>("DeltaZCutForChargedFromPUVtxs", 0.2);
389  desc.add<bool>("useExistingWeights", false);
390  desc.add<bool>("clonePackedCands", false);
391  desc.add<int>("vtxNdofCut", 4);
392  desc.add<double>("vtxZCut", 24);
393  desc.add<edm::InputTag>("candName", edm::InputTag("particleFlow"));
394  desc.add<edm::InputTag>("vertexName", edm::InputTag("offlinePrimaryVertices"));
395  desc.add<bool>("applyCHS", true);
396  desc.add<bool>("invertPuppi", false);
397  desc.add<bool>("useExp", false);
398  desc.add<double>("MinPuppiWeight", .01);
399 
401 
402  descriptions.add("PuppiProducer", desc);
403 }
404 //define this as a plug-in
RecoObj::d0
float d0
Definition: RecoObj.h:37
reco::PFCandidate::trackRef
reco::TrackRef trackRef() const
Definition: PFCandidate.cc:408
PuppiProducer::fPtMaxCharged
double fPtMaxCharged
Definition: PuppiProducer.h:67
PuppiProducer::fPuppiNoLep
bool fPuppiNoLep
Definition: PuppiProducer.h:62
RecoObj::dZ
float dZ
Definition: RecoObj.h:36
RecoObj::eta
float eta
Definition: RecoObj.h:26
edm::helper::Filler::insert
void insert(const H &h, I begin, I end)
Definition: ValueMap.h:53
RecoObj::charge
int charge
Definition: RecoObj.h:38
pat::PackedCandidate::vertexRef
const reco::VertexRef vertexRef() const
Definition: PackedCandidate.h:737
PuppiProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: PuppiProducer.cc:66
edm::Handle::product
T const * product() const
Definition: Handle.h:70
EDProducer.h
ESHandle.h
PuppiProducer::fVtxZCut
double fVtxZCut
Definition: PuppiProducer.h:76
PuppiProducer::ptokenRawAlphas_
edm::EDPutTokenT< std::vector< double > > ptokenRawAlphas_
Definition: PuppiProducer.h:54
edm::errors::LogicError
Definition: EDMException.h:37
pat::PackedCandidate::pdgId
int pdgId() const override
PDG identifier.
Definition: PackedCandidate.h:832
RecoObj::phi
float phi
Definition: RecoObj.h:26
PuppiProducer::fUseFromPVLooseTight
bool fUseFromPVLooseTight
Definition: PuppiProducer.h:63
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
edm::helper::Filler::fill
void fill()
Definition: ValueMap.h:65
edm::ParameterSetDescription
Definition: ParameterSetDescription.h:52
RecoObj::m
float m
Definition: RecoObj.h:26
PuppiProducer::fClonePackedCands
bool fClonePackedCands
Definition: PuppiProducer.h:74
PuppiProducer::fUseDZ
bool fUseDZ
Definition: PuppiProducer.h:64
RecoObj::pdgId
int pdgId
Definition: RecoObj.h:28
PuppiProducer::ptokenValues_
edm::EDPutTokenT< edm::ValueMap< reco::CandidatePtr > > ptokenValues_
Definition: PuppiProducer.h:50
Association.h
pat::PackedCandidate::PVTight
Definition: PackedCandidate.h:703
edm::Handle
Definition: AssociativeIterator.h:50
parallelization.uint
uint
Definition: parallelization.py:124
RecoObj::pt
float pt
Definition: RecoObj.h:26
reco::isLepton
bool isLepton(const Candidate &part)
Definition: pdgIdUtils.h:13
edm::Ref< TrackCollection >
pat::PackedCandidate::PVUsedInFit
Definition: PackedCandidate.h:703
CandidateFwd.h
MakerMacros.h
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
PuppiProducer::beginJob
virtual void beginJob()
Definition: PuppiProducer.cc:369
PuppiProducer::ptokenAlphasRms_
edm::EDPutTokenT< std::vector< double > > ptokenAlphasRms_
Definition: PuppiProducer.h:57
edm::ConfigurationDescriptions::add
void add(std::string const &label, ParameterSetDescription const &psetDescription)
Definition: ConfigurationDescriptions.cc:57
PuppiProducer::ptokenNalgos_
edm::EDPutTokenT< double > ptokenNalgos_
Definition: PuppiProducer.h:53
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
PuppiProducer::~PuppiProducer
~PuppiProducer() override
Definition: PuppiProducer.cc:64
pat::PackedCandidate::dz
virtual float dz(size_t ipv=0) const
dz with respect to the PV[ipv]
Definition: PackedCandidate.h:745
RecoObj::rapidity
float rapidity
Definition: RecoObj.h:26
PuppiProducer::ptokenP4PupOut_
edm::EDPutTokenT< edm::ValueMap< LorentzVector > > ptokenP4PupOut_
Definition: PuppiProducer.h:49
PuppiProducer::fDZCut
double fDZCut
Definition: PuppiProducer.h:65
PuppiProducer::fUseExistingWeights
bool fUseExistingWeights
Definition: PuppiProducer.h:73
pat::PackedCandidate::fromPV
const PVAssoc fromPV(size_t ipv=0) const
Definition: PackedCandidate.h:704
edm::ConfigurationDescriptions
Definition: ConfigurationDescriptions.h:28
edm::View::size
size_type size() const
pat::PackedCandidate::pt
double pt() const override
transverse momentum
Definition: PackedCandidate.h:523
edm::View
Definition: CaloClusterFwd.h:14
edm::ParameterSet
Definition: ParameterSet.h:47
reco::PFCandidate::gsfTrackRef
reco::GsfTrackRef gsfTrackRef() const
Definition: PFCandidate.cc:440
pat::PackedCandidate::puppiWeight
float puppiWeight() const
Definition: PackedCandidate.cc:380
Event.h
PuppiProducer::ptokenPackedPuppiCandidates_
edm::EDPutTokenT< pat::PackedCandidateCollection > ptokenPackedPuppiCandidates_
Definition: PuppiProducer.h:51
PuppiProducer::ptokenAlphasMed_
edm::EDPutTokenT< std::vector< double > > ptokenAlphasMed_
Definition: PuppiProducer.h:56
PuppiProducer.h
pat::PackedCandidate
Definition: PackedCandidate.h:22
trigObjTnPSource_cfi.filler
filler
Definition: trigObjTnPSource_cfi.py:21
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
PuppiProducer::fillDescriptions
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
Definition: PuppiProducer.cc:373
cand
Definition: decayParser.h:32
PuppiProducer::fDZCutForChargedFromPUVtxs
double fDZCutForChargedFromPUVtxs
Definition: PuppiProducer.h:72
iEvent
int iEvent
Definition: GenABIO.cc:224
PuppiProducer::fEtaMaxCharged
double fEtaMaxCharged
Definition: PuppiProducer.h:68
GsfTrack.h
PuppiProducer
Definition: PuppiProducer.h:23
edm::EventSetup
Definition: EventSetup.h:57
PuppiProducer::PackedOutputCollection
std::vector< pat::PackedCandidate > PackedOutputCollection
Definition: PuppiProducer.h:35
PuppiAlgo::fillDescriptionsPuppiAlgo
static void fillDescriptionsPuppiAlgo(edm::ParameterSetDescription &desc)
Definition: PuppiAlgo.cc:218
RecoObj
Definition: RecoObj.h:4
PuppiProducer::PuppiProducer
PuppiProducer(const edm::ParameterSet &)
Definition: PuppiProducer.cc:23
PuppiProducer::fPuppiDiagnostics
bool fPuppiDiagnostics
Definition: PuppiProducer.h:61
edm::Ptr< Candidate >
ValueMap.h
PuppiProducer::ptokenPupOut_
edm::EDPutTokenT< edm::ValueMap< float > > ptokenPupOut_
Definition: PuppiProducer.h:48
PuppiProducer::fRecoObjCollection
std::vector< RecoObj > fRecoObjCollection
Definition: PuppiProducer.h:78
PuppiProducer::ptokenAlphas_
edm::EDPutTokenT< std::vector< double > > ptokenAlphas_
Definition: PuppiProducer.h:55
PuppiProducer::LorentzVectorCollection
std::vector< LorentzVector > LorentzVectorCollection
Definition: PuppiProducer.h:30
RecoObj::id
int id
Definition: RecoObj.h:27
PuppiProducer::fVtxNdofCut
int fVtxNdofCut
Definition: PuppiProducer.h:75
pat::PackedCandidate::dxy
virtual float dxy() const
dxy with respect to the PV ref
Definition: PackedCandidate.h:740
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
PuppiProducer::tokenPFCandidates_
edm::EDGetTokenT< CandidateView > tokenPFCandidates_
Definition: PuppiProducer.h:43
edm::OrphanHandle
Definition: EDProductfwd.h:39
GsfTrackFwd.h
Frameworkfwd.h
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
PuppiProducer::ptokenPuppiCandidates_
edm::EDPutTokenT< reco::PFCandidateCollection > ptokenPuppiCandidates_
Definition: PuppiProducer.h:52
edm::ValueMap< float >
pat::PackedCandidate::PVLoose
Definition: PackedCandidate.h:703
Exception
Definition: hltDiff.cc:246
PuppiProducer::fPuppiContainer
std::unique_ptr< PuppiContainer > fPuppiContainer
Definition: PuppiProducer.h:77
PuppiProducer::fPtMaxPhotons
double fPtMaxPhotons
Definition: PuppiProducer.h:69
PuppiProducer::endJob
virtual void endJob()
Definition: PuppiProducer.cc:371
EventSetup.h
reco::PFCandidate::translatePdgIdToType
ParticleType translatePdgIdToType(int pdgid) const
Definition: PFCandidate.cc:209
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
PuppiProducer::fEtaMinUseDZ
double fEtaMinUseDZ
Definition: PuppiProducer.h:66
reco::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
PuppiProducer::fNumOfPUVtxsForCharged
uint fNumOfPUVtxsForCharged
Definition: PuppiProducer.h:71
Candidate.h
edm::helper::Filler
Definition: ValueMap.h:22
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
PuppiProducer::tokenVertices_
edm::EDGetTokenT< VertexCollection > tokenVertices_
Definition: PuppiProducer.h:44
View.h
ParameterSet.h
edm::Event
Definition: Event.h:73
edm::InputTag
Definition: InputTag.h:15
PuppiProducer::PFOutputCollection
std::vector< reco::PFCandidate > PFOutputCollection
Definition: PuppiProducer.h:34
reco::Vertex
Definition: Vertex.h:35
pat::PackedCandidate::eta
double eta() const override
momentum pseudorapidity
Definition: PackedCandidate.h:563
pat::PackedCandidate::puppiWeightNoLep
float puppiWeightNoLep() const
Weight from full PUPPI.
Definition: PackedCandidate.cc:384
PuppiProducer::fEtaMaxPhotons
double fEtaMaxPhotons
Definition: PuppiProducer.h:70