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