CMS 3D CMS Logo

PATPackedCandidateProducer.cc
Go to the documentation of this file.
1 #include <string>
2 
24 
25 /*#include "TrackingTools/TrajectoryState/interface/TrajectoryStateTransform.h"
26 #include "MagneticField/Engine/interface/MagneticField.h"
27 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
28 #include "RecoVertex/VertexPrimitives/interface/ConvertToFromReco.h"
29 #include
30 "TrackingTools/GeomPropagators/interface/AnalyticalImpactPointExtrapolator.h"
31 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
32 */
33 //#define CRAZYSORT
34 
35 namespace pat {
37  const static int qualityMap[8] = {1, 0, 1, 1, 4, 4, 5, 6};
38 
40  public:
42  ~PATPackedCandidateProducer() override;
43 
44  void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override;
45 
46  // sorting of cands to maximize the zlib compression
48  if (std::abs(i.charge()) == std::abs(j.charge())) {
49  if (i.charge() != 0) {
50  if (i.hasTrackDetails() and !j.hasTrackDetails())
51  return true;
52  if (!i.hasTrackDetails() and j.hasTrackDetails())
53  return false;
54  if (i.covarianceSchema() > j.covarianceSchema())
55  return true;
56  if (i.covarianceSchema() < j.covarianceSchema())
57  return false;
58  }
59  if (i.vertexRef() == j.vertexRef())
60  return i.eta() > j.eta();
61  else
62  return i.vertexRef().key() < j.vertexRef().key();
63  }
64  return std::abs(i.charge()) > std::abs(j.charge());
65  }
66 
67  template <typename T>
68  static std::vector<size_t> sort_indexes(const std::vector<T> &v) {
69  std::vector<size_t> idx(v.size());
70  for (size_t i = 0; i != idx.size(); ++i)
71  idx[i] = i;
72  std::sort(idx.begin(), idx.end(), [&v](size_t i1, size_t i2) { return candsOrdering(v[i1], v[i2]); });
73  return idx;
74  }
75 
76  private:
77  // if PuppiSrc && PuppiNoLepSrc are empty, usePuppi is false
78  // otherwise assumes that if they are set, you wanted to use puppi and will
79  // throw an exception if the puppis are not found
80  const bool usePuppi_;
81 
90  std::vector<edm::EDGetTokenT<edm::View<reco::Candidate>>> SVWhiteLists_;
93 
96  const int covarianceVersion_;
97  const std::vector<int> covariancePackingSchemas_;
98 
99  const std::vector<int> pfCandidateTypesForHcalDepth_;
101 
102  const bool storeTiming_;
103  const bool timeFromValueMap_;
106 
107  // for debugging
108  float calcDxy(float dx, float dy, float phi) const { return -dx * std::sin(phi) + dy * std::cos(phi); }
110  return p.Z() - v.Z() - ((p.X() - v.X()) * c.px() + (p.Y() - v.Y()) * c.py()) * c.pz() / (c.pt() * c.pt());
111  }
112  };
113 } // namespace pat
114 
116  : usePuppi_(!iConfig.getParameter<edm::InputTag>("PuppiSrc").encode().empty() ||
117  !iConfig.getParameter<edm::InputTag>("PuppiNoLepSrc").encode().empty()),
118  Cands_(consumes<reco::PFCandidateCollection>(iConfig.getParameter<edm::InputTag>("inputCollection"))),
119  PVs_(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("inputVertices"))),
120  PVAsso_(
121  consumes<edm::Association<reco::VertexCollection>>(iConfig.getParameter<edm::InputTag>("vertexAssociator"))),
122  PVAssoQuality_(consumes<edm::ValueMap<int>>(iConfig.getParameter<edm::InputTag>("vertexAssociator"))),
123  PVOrigs_(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("originalVertices"))),
124  TKOrigs_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("originalTracks"))),
125  PuppiWeight_(usePuppi_ ? consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("PuppiSrc"))
126  : edm::EDGetTokenT<edm::ValueMap<float>>()),
127  PuppiWeightNoLep_(usePuppi_ ? consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("PuppiNoLepSrc"))
128  : edm::EDGetTokenT<edm::ValueMap<float>>()),
129  storeChargedHadronIsolation_(!iConfig.getParameter<edm::InputTag>("chargedHadronIsolation").encode().empty()),
130  ChargedHadronIsolation_(
131  consumes<edm::ValueMap<bool>>(iConfig.getParameter<edm::InputTag>("chargedHadronIsolation"))),
132  minPtForChargedHadronProperties_(iConfig.getParameter<double>("minPtForChargedHadronProperties")),
133  minPtForTrackProperties_(iConfig.getParameter<double>("minPtForTrackProperties")),
134  covarianceVersion_(iConfig.getParameter<int>("covarianceVersion")),
135  covariancePackingSchemas_(iConfig.getParameter<std::vector<int>>("covariancePackingSchemas")),
136  pfCandidateTypesForHcalDepth_(iConfig.getParameter<std::vector<int>>("pfCandidateTypesForHcalDepth")),
137  storeHcalDepthEndcapOnly_(iConfig.getParameter<bool>("storeHcalDepthEndcapOnly")),
138  storeTiming_(iConfig.getParameter<bool>("storeTiming")),
139  timeFromValueMap_(!iConfig.getParameter<edm::InputTag>("timeMap").encode().empty() &&
140  !iConfig.getParameter<edm::InputTag>("timeMapErr").encode().empty()),
141  t0Map_(timeFromValueMap_ ? consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("timeMap"))
142  : edm::EDGetTokenT<edm::ValueMap<float>>()),
143  t0ErrMap_(timeFromValueMap_ ? consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("timeMapErr"))
144  : edm::EDGetTokenT<edm::ValueMap<float>>()) {
145  std::vector<edm::InputTag> sv_tags =
146  iConfig.getParameter<std::vector<edm::InputTag>>("secondaryVerticesForWhiteList");
147  for (const auto &itag : sv_tags) {
149  }
150 
151  produces<std::vector<pat::PackedCandidate>>();
152  produces<edm::Association<pat::PackedCandidateCollection>>();
153  produces<edm::Association<reco::PFCandidateCollection>>();
154 
155  if (not pfCandidateTypesForHcalDepth_.empty())
156  produces<edm::ValueMap<pat::HcalDepthEnergyFractions>>("hcalDepthEnergyFractions");
157 }
158 
160 
163  iEvent.getByToken(Cands_, cands);
164 
166  edm::Handle<edm::ValueMap<float>> puppiWeightNoLep;
167  if (usePuppi_) {
168  iEvent.getByToken(PuppiWeight_, puppiWeight);
169  iEvent.getByToken(PuppiWeightNoLep_, puppiWeightNoLep);
170  }
171 
173  iEvent.getByToken(PVOrigs_, PVOrigs);
174 
176  iEvent.getByToken(PVAsso_, assoHandle);
177  edm::Handle<edm::ValueMap<int>> assoQualityHandle;
178  iEvent.getByToken(PVAssoQuality_, assoQualityHandle);
179  const edm::Association<reco::VertexCollection> &associatedPV = *(assoHandle.product());
180  const edm::ValueMap<int> &associationQuality = *(assoQualityHandle.product());
181 
182  edm::Handle<edm::ValueMap<bool>> chargedHadronIsolationHandle;
183  if (storeChargedHadronIsolation_)
184  iEvent.getByToken(ChargedHadronIsolation_, chargedHadronIsolationHandle);
185 
186  std::set<unsigned int> whiteList;
187  std::set<reco::TrackRef> whiteListTk;
188  for (auto itoken : SVWhiteLists_) {
189  edm::Handle<edm::View<reco::Candidate>> svWhiteListHandle;
190  iEvent.getByToken(itoken, svWhiteListHandle);
191  const edm::View<reco::Candidate> &svWhiteList = *(svWhiteListHandle.product());
192  for (unsigned int i = 0; i < svWhiteList.size(); i++) {
193  // Whitelist via Ptrs
194  for (unsigned int j = 0; j < svWhiteList[i].numberOfSourceCandidatePtrs(); j++) {
195  const edm::Ptr<reco::Candidate> &c = svWhiteList[i].sourceCandidatePtr(j);
196  if (c.id() == cands.id())
197  whiteList.insert(c.key());
198  }
199  // Whitelist via RecoCharged
200  for (auto dau = svWhiteList[i].begin(); dau != svWhiteList[i].end(); dau++) {
201  const reco::RecoChargedCandidate *chCand = dynamic_cast<const reco::RecoChargedCandidate *>(&(*dau));
202  if (chCand != nullptr) {
203  whiteListTk.insert(chCand->track());
204  }
205  }
206  }
207  }
208 
211  if (timeFromValueMap_) {
212  iEvent.getByToken(t0Map_, t0Map);
213  iEvent.getByToken(t0ErrMap_, t0ErrMap);
214  }
215 
217  iEvent.getByToken(PVs_, PVs);
218  reco::VertexRef PV(PVs.id());
219  reco::VertexRefProd PVRefProd(PVs);
220  math::XYZPoint PVpos;
221 
222  std::vector<pat::HcalDepthEnergyFractions> hcalDepthEnergyFractions;
223  hcalDepthEnergyFractions.reserve(cands->size());
224  std::vector<pat::HcalDepthEnergyFractions> hcalDepthEnergyFractions_Ordered;
225  hcalDepthEnergyFractions_Ordered.reserve(cands->size());
226 
228  iEvent.getByToken(TKOrigs_, TKOrigs);
229  auto outPtrP = std::make_unique<std::vector<pat::PackedCandidate>>();
230  std::vector<int> mapping(cands->size());
231  std::vector<int> mappingReverse(cands->size());
232  std::vector<int> mappingTk(TKOrigs->size(), -1);
233 
234  for (unsigned int ic = 0, nc = cands->size(); ic < nc; ++ic) {
235  const reco::PFCandidate &cand = (*cands)[ic];
236  const reco::Track *ctrack = nullptr;
237  if ((abs(cand.pdgId()) == 11 || cand.pdgId() == 22) && cand.gsfTrackRef().isNonnull()) {
238  ctrack = &*cand.gsfTrackRef();
239  } else if (cand.trackRef().isNonnull()) {
240  ctrack = &*cand.trackRef();
241  }
242  if (ctrack) {
243  float dist = 1e99;
244  int pvi = -1;
245  for (size_t ii = 0; ii < PVs->size(); ii++) {
246  float dz = std::abs(ctrack->dz(((*PVs)[ii]).position()));
247  if (dz < dist) {
248  pvi = ii;
249  dist = dz;
250  }
251  }
252  PV = reco::VertexRef(PVs, pvi);
253  math::XYZPoint vtx = cand.vertex();
255  const reco::VertexRef &PVOrig = associatedPV[reco::CandidatePtr(cands, ic)];
256  if (PVOrig.isNonnull())
257  PV = reco::VertexRef(PVs,
258  PVOrig.key()); // WARNING: assume the PV slimmer is keeping same order
259  int quality = associationQuality[reco::CandidatePtr(cands, ic)];
260  // if ((size_t)pvi!=PVOrig.key()) std::cout << "not closest in Z"
261  // << pvi << " " << PVOrig.key() << " " << cand.pt() << " " <<
262  // quality << std::endl; TrajectoryStateOnSurface tsos =
263  // extrapolator.extrapolate(trajectoryStateTransform::initialFreeState(*ctrack,&*magneticField),
264  // RecoVertex::convertPos(PV->position()));
265  // vtx = tsos.globalPosition();
266  // phiAtVtx = tsos.globalDirection().phi();
267  vtx = ctrack->referencePoint();
268  float ptTrk = ctrack->pt();
269  float etaAtVtx = ctrack->eta();
270  float phiAtVtx = ctrack->phi();
271 
273  if (nlost == 0) {
276  }
277  } else {
279  }
280 
281  outPtrP->push_back(
282  pat::PackedCandidate(cand.polarP4(), vtx, ptTrk, etaAtVtx, phiAtVtx, cand.pdgId(), PVRefProd, PV.key()));
283  outPtrP->back().setAssociationQuality(pat::PackedCandidate::PVAssociationQuality(qualityMap[quality]));
284  outPtrP->back().setCovarianceVersion(covarianceVersion_);
285  if (cand.trackRef().isNonnull() && PVOrig.isNonnull() && PVOrig->trackWeight(cand.trackRef()) > 0.5 &&
286  quality == 7) {
287  outPtrP->back().setAssociationQuality(pat::PackedCandidate::UsedInFitTight);
288  }
289  // properties of the best track
290  outPtrP->back().setLostInnerHits(lostHits);
291  if (outPtrP->back().pt() > minPtForTrackProperties_ || outPtrP->back().ptTrk() > minPtForTrackProperties_ ||
292  whiteList.find(ic) != whiteList.end() ||
293  (cand.trackRef().isNonnull() && whiteListTk.find(cand.trackRef()) != whiteListTk.end())) {
294  outPtrP->back().setFirstHit(ctrack->hitPattern().getHitPattern(reco::HitPattern::TRACK_HITS, 0));
295  if (abs(outPtrP->back().pdgId()) == 22) {
296  outPtrP->back().setTrackProperties(*ctrack, covariancePackingSchemas_[4], covarianceVersion_);
297  } else {
298  if (ctrack->hitPattern().numberOfValidPixelHits() > 0) {
299  outPtrP->back().setTrackProperties(*ctrack,
300  covariancePackingSchemas_[0],
301  covarianceVersion_); // high quality
302  } else {
303  outPtrP->back().setTrackProperties(*ctrack, covariancePackingSchemas_[1], covarianceVersion_);
304  }
305  }
306  // outPtrP->back().setTrackProperties(*ctrack,tsos.curvilinearError());
307  } else {
308  if (outPtrP->back().pt() > 0.5) {
309  if (ctrack->hitPattern().numberOfValidPixelHits() > 0)
310  outPtrP->back().setTrackProperties(*ctrack,
311  covariancePackingSchemas_[2],
312  covarianceVersion_); // low quality, with pixels
313  else
314  outPtrP->back().setTrackProperties(*ctrack,
315  covariancePackingSchemas_[3],
316  covarianceVersion_); // low quality, without pixels
317  }
318  }
319 
320  // these things are always for the CKF track
321  outPtrP->back().setTrackHighPurity(cand.trackRef().isNonnull() &&
322  cand.trackRef()->quality(reco::Track::highPurity));
323  if (cand.muonRef().isNonnull()) {
324  outPtrP->back().setMuonID(cand.muonRef()->isStandAloneMuon(), cand.muonRef()->isGlobalMuon());
325  }
326  } else {
327  if (!PVs->empty()) {
328  PV = reco::VertexRef(PVs, 0);
329  PVpos = PV->position();
330  }
331 
332  outPtrP->push_back(pat::PackedCandidate(
333  cand.polarP4(), PVpos, cand.pt(), cand.eta(), cand.phi(), cand.pdgId(), PVRefProd, PV.key()));
334  outPtrP->back().setAssociationQuality(
336  }
337 
338  // neutrals and isolated charged hadrons
339 
340  bool isIsolatedChargedHadron = false;
341  if (storeChargedHadronIsolation_) {
342  const edm::ValueMap<bool> &chargedHadronIsolation = *(chargedHadronIsolationHandle.product());
343  isIsolatedChargedHadron =
344  ((cand.pt() > minPtForChargedHadronProperties_) && (chargedHadronIsolation[reco::PFCandidateRef(cands, ic)]));
345  outPtrP->back().setIsIsolatedChargedHadron(isIsolatedChargedHadron);
346  }
347 
348  if (abs(cand.pdgId()) == 1 || abs(cand.pdgId()) == 130) {
349  outPtrP->back().setHcalFraction(cand.hcalEnergy() / (cand.ecalEnergy() + cand.hcalEnergy()));
350  } else if ((cand.charge() || abs(cand.pdgId()) == 22) && cand.pt() > 0.5) {
351  outPtrP->back().setHcalFraction(cand.hcalEnergy() / (cand.ecalEnergy() + cand.hcalEnergy()));
352  outPtrP->back().setCaloFraction((cand.hcalEnergy() + cand.ecalEnergy()) / cand.energy());
353  } else {
354  outPtrP->back().setHcalFraction(0);
355  outPtrP->back().setCaloFraction(0);
356  }
357 
358  if (isIsolatedChargedHadron) {
359  outPtrP->back().setRawCaloFraction((cand.rawEcalEnergy() + cand.rawHcalEnergy()) / cand.energy());
360  outPtrP->back().setRawHcalFraction(cand.rawHcalEnergy() / (cand.rawEcalEnergy() + cand.rawHcalEnergy()));
361  } else {
362  outPtrP->back().setRawCaloFraction(0);
363  outPtrP->back().setRawHcalFraction(0);
364  }
365 
366  std::vector<float> dummyVector;
367  dummyVector.clear();
368  pat::HcalDepthEnergyFractions hcalDepthEFrac(dummyVector);
369 
370  // storing HcalDepthEnergyFraction information
371  if (std::find(pfCandidateTypesForHcalDepth_.begin(), pfCandidateTypesForHcalDepth_.end(), abs(cand.pdgId())) !=
372  pfCandidateTypesForHcalDepth_.end()) {
373  if (!storeHcalDepthEndcapOnly_ ||
374  fabs(outPtrP->back().eta()) > 1.3) { // storeHcalDepthEndcapOnly_==false -> store all eta of
375  // selected PF types, if true, only |eta|>1.3 of selected
376  // PF types will be stored
377  std::vector<float> hcalDepthEnergyFractionTmp(cand.hcalDepthEnergyFractions().begin(),
378  cand.hcalDepthEnergyFractions().end());
379  hcalDepthEFrac.reset(hcalDepthEnergyFractionTmp);
380  }
381  }
382  hcalDepthEnergyFractions.push_back(hcalDepthEFrac);
383 
384  // specifically this is the PFLinker requirements to apply the e/gamma
385  // regression
386  if (cand.particleId() == reco::PFCandidate::e ||
387  (cand.particleId() == reco::PFCandidate::gamma && cand.mva_nothing_gamma() > 0.)) {
388  outPtrP->back().setGoodEgamma();
389  }
390 
391  if (usePuppi_) {
392  reco::PFCandidateRef pkref(cands, ic);
393 
394  float puppiWeightVal = (*puppiWeight)[pkref];
395  float puppiWeightNoLepVal = (*puppiWeightNoLep)[pkref];
396  outPtrP->back().setPuppiWeight(puppiWeightVal, puppiWeightNoLepVal);
397  }
398 
399  if (storeTiming_) {
400  if (timeFromValueMap_) {
401  if (cand.trackRef().isNonnull()) {
402  auto t0 = (*t0Map)[cand.trackRef()];
403  auto t0Err = (*t0ErrMap)[cand.trackRef()];
404  outPtrP->back().setTime(t0, t0Err);
405  }
406  } else {
407  if (cand.isTimeValid()) {
408  outPtrP->back().setTime(cand.time(), cand.timeError());
409  }
410  }
411  }
412 
413  mapping[ic] = ic; // trivial at the moment!
414  if (cand.trackRef().isNonnull() && cand.trackRef().id() == TKOrigs.id()) {
415  mappingTk[cand.trackRef().key()] = ic;
416  }
417  }
418 
419  auto outPtrPSorted = std::make_unique<std::vector<pat::PackedCandidate>>();
420  std::vector<size_t> order = sort_indexes(*outPtrP);
421  std::vector<size_t> reverseOrder(order.size());
422  for (size_t i = 0, nc = cands->size(); i < nc; i++) {
423  outPtrPSorted->push_back((*outPtrP)[order[i]]);
424  reverseOrder[order[i]] = i;
425  mappingReverse[order[i]] = i;
426  hcalDepthEnergyFractions_Ordered.push_back(hcalDepthEnergyFractions[order[i]]);
427  }
428 
429  // Fix track association for sorted candidates
430  for (size_t i = 0, ntk = mappingTk.size(); i < ntk; i++) {
431  if (mappingTk[i] >= 0)
432  mappingTk[i] = reverseOrder[mappingTk[i]];
433  }
434 
436 
437  // now build the two maps
438  auto pf2pc = std::make_unique<edm::Association<pat::PackedCandidateCollection>>(oh);
439  auto pc2pf = std::make_unique<edm::Association<reco::PFCandidateCollection>>(cands);
442  pf2pcFiller.insert(cands, mappingReverse.begin(), mappingReverse.end());
443  pc2pfFiller.insert(oh, order.begin(), order.end());
444  // include also the mapping track -> packed PFCand
445  pf2pcFiller.insert(TKOrigs, mappingTk.begin(), mappingTk.end());
446 
447  pf2pcFiller.fill();
448  pc2pfFiller.fill();
449  iEvent.put(std::move(pf2pc));
450  iEvent.put(std::move(pc2pf));
451 
452  // HCAL depth energy fraction additions using ValueMap
453  auto hcalDepthEnergyFractionsV = std::make_unique<edm::ValueMap<HcalDepthEnergyFractions>>();
454  edm::ValueMap<HcalDepthEnergyFractions>::Filler fillerHcalDepthEnergyFractions(*hcalDepthEnergyFractionsV);
455  fillerHcalDepthEnergyFractions.insert(
456  cands, hcalDepthEnergyFractions_Ordered.begin(), hcalDepthEnergyFractions_Ordered.end());
457  fillerHcalDepthEnergyFractions.fill();
458 
459  if (not pfCandidateTypesForHcalDepth_.empty())
460  iEvent.put(std::move(hcalDepthEnergyFractionsV), "hcalDepthEnergyFractions");
461 }
462 
packedPFCandidates_cfi.chargedHadronIsolation
chargedHadronIsolation
Definition: packedPFCandidates_cfi.py:11
edm::RefProd< VertexCollection >
edm::StreamID
Definition: StreamID.h:30
pat::PATPackedCandidateProducer::timeFromValueMap_
const bool timeFromValueMap_
Definition: PATPackedCandidateProducer.cc:103
reco::HitPattern::getHitPattern
uint16_t getHitPattern(HitCategory category, int position) const
Definition: HitPattern.h:530
reco::RecoChargedCandidate::track
reco::TrackRef track() const override
reference to a track
Definition: RecoChargedCandidate.cc:9
testProducerWithPsetDescEmpty_cfi.i2
i2
Definition: testProducerWithPsetDescEmpty_cfi.py:46
pat::PATPackedCandidateProducer::TKOrigs_
const edm::EDGetTokenT< reco::TrackCollection > TKOrigs_
Definition: PATPackedCandidateProducer.cc:87
electrons_cff.bool
bool
Definition: electrons_cff.py:393
edm::helper::Filler::insert
void insert(const H &h, I begin, I end)
Definition: ValueMap.h:53
mps_fire.i
i
Definition: mps_fire.py:428
Muon.h
edm::Association::Filler
Definition: Association.h:78
dqmMemoryStats.float
float
Definition: dqmMemoryStats.py:127
pat::PATPackedCandidateProducer::produce
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
Definition: PATPackedCandidateProducer.cc:161
edm::Handle::product
T const * product() const
Definition: Handle.h:70
ESHandle.h
reco::PFCandidate::e
Definition: PFCandidate.h:47
reco::TrackBase::referencePoint
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:667
PFCandidate.h
pat::PATPackedCandidateProducer::storeTiming_
const bool storeTiming_
Definition: PATPackedCandidateProducer.cc:102
pat::PackedCandidate::oneLostInnerHit
Definition: PackedCandidate.h:802
edm::EDGetTokenT< reco::PFCandidateCollection >
edm
HLT enums.
Definition: AlignableModifier.h:19
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
pat::PATPackedCandidateProducer::sort_indexes
static std::vector< size_t > sort_indexes(const std::vector< T > &v)
Definition: PATPackedCandidateProducer.cc:68
reco::VertexCollection
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
pat::PATPackedCandidateProducer::~PATPackedCandidateProducer
~PATPackedCandidateProducer() override
Definition: PATPackedCandidateProducer.cc:159
pat::PATPackedCandidateProducer::calcDz
float calcDz(reco::Candidate::Point p, reco::Candidate::Point v, const reco::Candidate &c) const
Definition: PATPackedCandidateProducer.cc:109
testProducerWithPsetDescEmpty_cfi.i1
i1
Definition: testProducerWithPsetDescEmpty_cfi.py:45
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89287
edm::helper::Filler::fill
void fill()
Definition: ValueMap.h:65
pat::PackedCandidate::moreLostInnerHits
Definition: PackedCandidate.h:803
pat::PATPackedCandidateProducer::SVWhiteLists_
std::vector< edm::EDGetTokenT< edm::View< reco::Candidate > > > SVWhiteLists_
Definition: PATPackedCandidateProducer.cc:90
reco
fixed size matrix
Definition: AlignmentAlgorithmBase.h:45
findQualityFiles.v
v
Definition: findQualityFiles.py:179
pat::PATPackedCandidateProducer::usePuppi_
const bool usePuppi_
Definition: PATPackedCandidateProducer.cc:80
Association.h
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
reco::HitPattern::numberOfLostHits
int numberOfLostHits(HitCategory category) const
Definition: HitPattern.h:860
edm::Handle
Definition: AssociativeIterator.h:50
pat::HcalDepthEnergyFractions::reset
void reset(std::vector< float > v)
Definition: HcalDepthEnergyFractions.h:38
pat::PATPackedCandidateProducer::t0Map_
const edm::EDGetTokenT< edm::ValueMap< float > > t0Map_
Definition: PATPackedCandidateProducer.cc:104
nanoDQM_cfi.PV
PV
Definition: nanoDQM_cfi.py:523
edm::Ref< VertexCollection >
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
pat::PATPackedCandidateProducer::pfCandidateTypesForHcalDepth_
const std::vector< int > pfCandidateTypesForHcalDepth_
Definition: PATPackedCandidateProducer.cc:99
pat::PackedCandidate::validHitInFirstPixelBarrelLayer
Definition: PackedCandidate.h:799
reco::TrackBase::pt
double pt() const
track transverse momentum
Definition: TrackBase.h:637
pat::PATPackedCandidateProducer::minPtForTrackProperties_
const double minPtForTrackProperties_
Definition: PATPackedCandidateProducer.cc:95
GeomDetEnumerators::PixelBarrel
Definition: GeomDetEnumerators.h:11
MakerMacros.h
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
DEFINE_FWK_MODULE
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
pat::PATPackedCandidateProducer::calcDxy
float calcDxy(float dx, float dy, float phi) const
Definition: PATPackedCandidateProducer.cc:108
pat::PATPackedCandidateProducer::PVAsso_
const edm::EDGetTokenT< edm::Association< reco::VertexCollection > > PVAsso_
Definition: PATPackedCandidateProducer.cc:84
FrontierCondition_GT_autoExpress_cfi.t0
t0
Definition: FrontierCondition_GT_autoExpress_cfi.py:148
pat::PATPackedCandidateProducer::candsOrdering
static bool candsOrdering(pat::PackedCandidate const &i, pat::PackedCandidate const &j)
Definition: PATPackedCandidateProducer.cc:47
reco::Track
Definition: Track.h:27
pat::PackedCandidate::PVAssociationQuality
PVAssociationQuality
Definition: PackedCandidate.h:721
pat::PATPackedCandidateProducer::PATPackedCandidateProducer
PATPackedCandidateProducer(const edm::ParameterSet &)
Definition: PATPackedCandidateProducer.cc:115
reco::HitPattern::hasValidHitInPixelLayer
bool hasValidHitInPixelLayer(enum PixelSubdetector::SubDetector, uint16_t layer) const
Definition: HitPattern.cc:337
reco::TrackBase::dz
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:622
pat::PATPackedCandidateProducer::PVs_
const edm::EDGetTokenT< reco::VertexCollection > PVs_
Definition: PATPackedCandidateProducer.cc:83
reco::TrackBase::phi
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
edm::global::EDProducer
Definition: EDProducer.h:32
pat::PATPackedCandidateProducer
Definition: PATPackedCandidateProducer.cc:39
pat::PackedCandidate::noLostInnerHits
Definition: PackedCandidate.h:800
edm::View::size
size_type size() const
Vertex.h
pat::PATPackedCandidateProducer::storeHcalDepthEndcapOnly_
const bool storeHcalDepthEndcapOnly_
Definition: PATPackedCandidateProducer.cc:100
edm::View
Definition: CaloClusterFwd.h:14
HLT_FULL_cff.cands
cands
Definition: HLT_FULL_cff.py:15142
edm::ParameterSet
Definition: ParameterSet.h:47
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
Event.h
pat::PackedCandidate::LostInnerHits
LostInnerHits
Enumerator specifying the.
Definition: PackedCandidate.h:798
pat::PackedCandidate
Definition: PackedCandidate.h:22
PackedCandidate.h
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
pat::PATPackedCandidateProducer::storeChargedHadronIsolation_
const bool storeChargedHadronIsolation_
Definition: PATPackedCandidateProducer.cc:91
reco::TrackBase::eta
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
reco::VertexRef
edm::Ref< VertexCollection > VertexRef
persistent reference to a Vertex
Definition: VertexFwd.h:13
cand
Definition: decayParser.h:32
eventshapeDQM_cfi.order
order
Definition: eventshapeDQM_cfi.py:8
createfilelist.int
int
Definition: createfilelist.py:10
iEvent
int iEvent
Definition: GenABIO.cc:224
pat::PATPackedCandidateProducer::covariancePackingSchemas_
const std::vector< int > covariancePackingSchemas_
Definition: PATPackedCandidateProducer.cc:97
GsfTrack.h
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
reco::PFCandidate::gamma
Definition: PFCandidate.h:49
PVValHelper::dy
Definition: PVValidationHelpers.h:49
reco::RecoChargedCandidate
Definition: RecoChargedCandidate.h:15
edm::Association
Definition: Association.h:18
edm::EventSetup
Definition: EventSetup.h:57
pat
Definition: HeavyIon.h:7
pat::PATPackedCandidateProducer::Cands_
const edm::EDGetTokenT< reco::PFCandidateCollection > Cands_
Definition: PATPackedCandidateProducer.cc:82
HltBtagPostValidation_cff.c
c
Definition: HltBtagPostValidation_cff.py:31
pat::PATPackedCandidateProducer::covarianceVersion_
const int covarianceVersion_
Definition: PATPackedCandidateProducer.cc:96
Jet.h
l1t::PFCandidateCollection
std::vector< l1t::PFCandidate > PFCandidateCollection
Definition: PFCandidate.h:57
reco::HitPattern::TRACK_HITS
Definition: HitPattern.h:155
edm::Ptr< reco::Candidate >
pat::PATPackedCandidateProducer::ChargedHadronIsolation_
const edm::EDGetTokenT< edm::ValueMap< bool > > ChargedHadronIsolation_
Definition: PATPackedCandidateProducer.cc:92
reco::Candidate
Definition: Candidate.h:27
ValueMap.h
VertexFwd.h
HcalDepthEnergyFractions.h
reco::TrackBase::hitPattern
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:504
edm::ProductRegistryHelper::produces
BranchAliasSetterT< ProductType > produces()
declare what type of product will make and with which optional label
Definition: ProductRegistryHelper.h:108
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
edm::OrphanHandle
Definition: EDProductfwd.h:39
pat::PATPackedCandidateProducer::PuppiWeightNoLep_
const edm::EDGetTokenT< edm::ValueMap< float > > PuppiWeightNoLep_
Definition: PATPackedCandidateProducer.cc:89
qcdUeDQM_cfi.quality
quality
Definition: qcdUeDQM_cfi.py:31
extraflags_cff.vtx
vtx
Definition: extraflags_cff.py:18
RecoChargedCandidate.h
PVValHelper::dz
Definition: PVValidationHelpers.h:50
Frameworkfwd.h
electrons_cff.lostHits
lostHits
Definition: electrons_cff.py:428
alcaDQMUpload.encode
def encode(args, files)
Definition: alcaDQMUpload.py:32
pat::PATPackedCandidateProducer::PuppiWeight_
const edm::EDGetTokenT< edm::ValueMap< float > > PuppiWeight_
Definition: PATPackedCandidateProducer.cc:88
edm::ValueMap
Definition: ValueMap.h:107
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
reco::HitPattern::MISSING_INNER_HITS
Definition: HitPattern.h:155
pat::PATPackedCandidateProducer::PVOrigs_
const edm::EDGetTokenT< reco::VertexCollection > PVOrigs_
Definition: PATPackedCandidateProducer.cc:86
pat::PATPackedCandidateProducer::PVAssoQuality_
const edm::EDGetTokenT< edm::ValueMap< int > > PVAssoQuality_
Definition: PATPackedCandidateProducer.cc:85
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
Exception.h
reco::HitPattern::numberOfValidPixelHits
int numberOfValidPixelHits() const
Definition: HitPattern.h:800
reco::PFCandidate
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
edm::Ref::key
key_type key() const
Accessor for product key.
Definition: Ref.h:250
Candidate.h
reco::CandidatePtr
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:25
edm::helper::Filler
Definition: ValueMap.h:22
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::View::end
const_iterator end() const
View.h
ParameterSet.h
edm::EDConsumerBase::consumes
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: EDConsumerBase.h:153
EDProducer.h
reco::Candidate::Point
math::XYZPoint Point
point in the space
Definition: Candidate.h:40
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
pat::PATPackedCandidateProducer::minPtForChargedHadronProperties_
const double minPtForChargedHadronProperties_
Definition: PATPackedCandidateProducer.cc:94
edm::Event
Definition: Event.h:73
pat::PackedCandidate::UsedInFitTight
Definition: PackedCandidate.h:727
taus_updatedMVAIds_cff.mapping
mapping
Definition: taus_updatedMVAIds_cff.py:29
edm::HandleBase::id
ProductID id() const
Definition: HandleBase.cc:29
pat::PATPackedCandidateProducer::t0ErrMap_
const edm::EDGetTokenT< edm::ValueMap< float > > t0ErrMap_
Definition: PATPackedCandidateProducer.cc:105
cuy.ii
ii
Definition: cuy.py:590
PVValHelper::dx
Definition: PVValidationHelpers.h:48
reco::TrackCollection
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
PFCandidateFwd.h
pat::qualityMap
const static int qualityMap[8]
conversion map from quality flags used in PV association and miniAOD one
Definition: PATPackedCandidateProducer.cc:37
reco::TrackBase::highPurity
Definition: TrackBase.h:154
pat::HcalDepthEnergyFractions
Definition: HcalDepthEnergyFractions.h:12