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