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 
97  const int covarianceVersion_;
98  const std::vector<int> covariancePackingSchemas_;
99 
100  const std::vector<int> pfCandidateTypesForHcalDepth_;
102 
103  const bool storeTiming_;
104  const bool timeFromValueMap_;
107 
108  // for debugging
109  float calcDxy(float dx, float dy, float phi) const { return -dx * std::sin(phi) + dy * std::cos(phi); }
111  return p.Z() - v.Z() - ((p.X() - v.X()) * c.px() + (p.Y() - v.Y()) * c.py()) * c.pz() / (c.pt() * c.pt());
112  }
113  };
114 } // namespace pat
115 
117  : usePuppi_(!iConfig.getParameter<edm::InputTag>("PuppiSrc").encode().empty() ||
118  !iConfig.getParameter<edm::InputTag>("PuppiNoLepSrc").encode().empty()),
119  Cands_(consumes<reco::PFCandidateCollection>(iConfig.getParameter<edm::InputTag>("inputCollection"))),
120  PVs_(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("inputVertices"))),
121  PVAsso_(
122  consumes<edm::Association<reco::VertexCollection>>(iConfig.getParameter<edm::InputTag>("vertexAssociator"))),
123  PVAssoQuality_(consumes<edm::ValueMap<int>>(iConfig.getParameter<edm::InputTag>("vertexAssociator"))),
124  PVOrigs_(consumes<reco::VertexCollection>(iConfig.getParameter<edm::InputTag>("originalVertices"))),
125  TKOrigs_(consumes<reco::TrackCollection>(iConfig.getParameter<edm::InputTag>("originalTracks"))),
126  PuppiWeight_(usePuppi_ ? consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("PuppiSrc"))
127  : edm::EDGetTokenT<edm::ValueMap<float>>()),
128  PuppiWeightNoLep_(usePuppi_ ? consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("PuppiNoLepSrc"))
129  : edm::EDGetTokenT<edm::ValueMap<float>>()),
130  storeChargedHadronIsolation_(!iConfig.getParameter<edm::InputTag>("chargedHadronIsolation").encode().empty()),
131  ChargedHadronIsolation_(
132  consumes<edm::ValueMap<bool>>(iConfig.getParameter<edm::InputTag>("chargedHadronIsolation"))),
133  minPtForChargedHadronProperties_(iConfig.getParameter<double>("minPtForChargedHadronProperties")),
134  minPtForTrackProperties_(iConfig.getParameter<double>("minPtForTrackProperties")),
135  minPtForLowQualityTrackProperties_(iConfig.getParameter<double>("minPtForLowQualityTrackProperties")),
136  covarianceVersion_(iConfig.getParameter<int>("covarianceVersion")),
137  covariancePackingSchemas_(iConfig.getParameter<std::vector<int>>("covariancePackingSchemas")),
138  pfCandidateTypesForHcalDepth_(iConfig.getParameter<std::vector<int>>("pfCandidateTypesForHcalDepth")),
139  storeHcalDepthEndcapOnly_(iConfig.getParameter<bool>("storeHcalDepthEndcapOnly")),
140  storeTiming_(iConfig.getParameter<bool>("storeTiming")),
141  timeFromValueMap_(!iConfig.getParameter<edm::InputTag>("timeMap").encode().empty() &&
142  !iConfig.getParameter<edm::InputTag>("timeMapErr").encode().empty()),
143  t0Map_(timeFromValueMap_ ? consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("timeMap"))
144  : edm::EDGetTokenT<edm::ValueMap<float>>()),
145  t0ErrMap_(timeFromValueMap_ ? consumes<edm::ValueMap<float>>(iConfig.getParameter<edm::InputTag>("timeMapErr"))
146  : edm::EDGetTokenT<edm::ValueMap<float>>()) {
147  std::vector<edm::InputTag> sv_tags =
148  iConfig.getParameter<std::vector<edm::InputTag>>("secondaryVerticesForWhiteList");
149  for (const auto &itag : sv_tags) {
151  }
152 
153  produces<std::vector<pat::PackedCandidate>>();
154  produces<edm::Association<pat::PackedCandidateCollection>>();
155  produces<edm::Association<reco::PFCandidateCollection>>();
156 
157  if (not pfCandidateTypesForHcalDepth_.empty())
158  produces<edm::ValueMap<pat::HcalDepthEnergyFractions>>("hcalDepthEnergyFractions");
159 }
160 
162 
165  iEvent.getByToken(Cands_, cands);
166 
168  edm::Handle<edm::ValueMap<float>> puppiWeightNoLep;
169  if (usePuppi_) {
170  iEvent.getByToken(PuppiWeight_, puppiWeight);
171  iEvent.getByToken(PuppiWeightNoLep_, puppiWeightNoLep);
172  }
173 
175  iEvent.getByToken(PVOrigs_, PVOrigs);
176 
178  iEvent.getByToken(PVAsso_, assoHandle);
179  edm::Handle<edm::ValueMap<int>> assoQualityHandle;
180  iEvent.getByToken(PVAssoQuality_, assoQualityHandle);
181  const edm::Association<reco::VertexCollection> &associatedPV = *(assoHandle.product());
182  const edm::ValueMap<int> &associationQuality = *(assoQualityHandle.product());
183 
184  edm::Handle<edm::ValueMap<bool>> chargedHadronIsolationHandle;
185  if (storeChargedHadronIsolation_)
186  iEvent.getByToken(ChargedHadronIsolation_, chargedHadronIsolationHandle);
187 
188  std::set<unsigned int> whiteList;
189  std::set<reco::TrackRef> whiteListTk;
190  for (auto itoken : SVWhiteLists_) {
191  edm::Handle<edm::View<reco::Candidate>> svWhiteListHandle;
192  iEvent.getByToken(itoken, svWhiteListHandle);
193  const edm::View<reco::Candidate> &svWhiteList = *(svWhiteListHandle.product());
194  for (unsigned int i = 0; i < svWhiteList.size(); i++) {
195  // Whitelist via Ptrs
196  for (unsigned int j = 0; j < svWhiteList[i].numberOfSourceCandidatePtrs(); j++) {
197  const edm::Ptr<reco::Candidate> &c = svWhiteList[i].sourceCandidatePtr(j);
198  if (c.id() == cands.id())
199  whiteList.insert(c.key());
200  }
201  // Whitelist via RecoCharged
202  for (auto dau = svWhiteList[i].begin(); dau != svWhiteList[i].end(); dau++) {
203  const reco::RecoChargedCandidate *chCand = dynamic_cast<const reco::RecoChargedCandidate *>(&(*dau));
204  if (chCand != nullptr) {
205  whiteListTk.insert(chCand->track());
206  }
207  }
208  }
209  }
210 
213  if (timeFromValueMap_) {
214  iEvent.getByToken(t0Map_, t0Map);
215  iEvent.getByToken(t0ErrMap_, t0ErrMap);
216  }
217 
219  iEvent.getByToken(PVs_, PVs);
220  reco::VertexRef PV(PVs.id());
221  reco::VertexRefProd PVRefProd(PVs);
222  math::XYZPoint PVpos;
223 
224  std::vector<pat::HcalDepthEnergyFractions> hcalDepthEnergyFractions;
225  hcalDepthEnergyFractions.reserve(cands->size());
226  std::vector<pat::HcalDepthEnergyFractions> hcalDepthEnergyFractions_Ordered;
227  hcalDepthEnergyFractions_Ordered.reserve(cands->size());
228 
230  iEvent.getByToken(TKOrigs_, TKOrigs);
231  auto outPtrP = std::make_unique<std::vector<pat::PackedCandidate>>();
232  std::vector<int> mapping(cands->size());
233  std::vector<int> mappingReverse(cands->size());
234  std::vector<int> mappingTk(TKOrigs->size(), -1);
235 
236  for (unsigned int ic = 0, nc = cands->size(); ic < nc; ++ic) {
237  const reco::PFCandidate &cand = (*cands)[ic];
238  const reco::Track *ctrack = nullptr;
239  if ((abs(cand.pdgId()) == 11 || cand.pdgId() == 22) && cand.gsfTrackRef().isNonnull()) {
240  ctrack = &*cand.gsfTrackRef();
241  } else if (cand.trackRef().isNonnull()) {
242  ctrack = &*cand.trackRef();
243  }
244  if (ctrack) {
245  float dist = 1e99;
246  int pvi = -1;
247  for (size_t ii = 0; ii < PVs->size(); ii++) {
248  float dz = std::abs(ctrack->dz(((*PVs)[ii]).position()));
249  if (dz < dist) {
250  pvi = ii;
251  dist = dz;
252  }
253  }
254  PV = reco::VertexRef(PVs, pvi);
255  math::XYZPoint vtx = cand.vertex();
257  const reco::VertexRef &PVOrig = associatedPV[reco::CandidatePtr(cands, ic)];
258  if (PVOrig.isNonnull())
259  PV = reco::VertexRef(PVs,
260  PVOrig.key()); // WARNING: assume the PV slimmer is keeping same order
261  int quality = associationQuality[reco::CandidatePtr(cands, ic)];
262  // if ((size_t)pvi!=PVOrig.key()) std::cout << "not closest in Z"
263  // << pvi << " " << PVOrig.key() << " " << cand.pt() << " " <<
264  // quality << std::endl; TrajectoryStateOnSurface tsos =
265  // extrapolator.extrapolate(trajectoryStateTransform::initialFreeState(*ctrack,&*magneticField),
266  // RecoVertex::convertPos(PV->position()));
267  // vtx = tsos.globalPosition();
268  // phiAtVtx = tsos.globalDirection().phi();
269  vtx = ctrack->referencePoint();
270  float ptTrk = ctrack->pt();
271  float etaAtVtx = ctrack->eta();
272  float phiAtVtx = ctrack->phi();
273 
275  if (nlost == 0) {
278  }
279  } else {
281  }
282 
283  outPtrP->push_back(
284  pat::PackedCandidate(cand.polarP4(), vtx, ptTrk, etaAtVtx, phiAtVtx, cand.pdgId(), PVRefProd, PV.key()));
285  outPtrP->back().setAssociationQuality(pat::PackedCandidate::PVAssociationQuality(qualityMap[quality]));
286  outPtrP->back().setCovarianceVersion(covarianceVersion_);
287  if (cand.trackRef().isNonnull() && PVOrig.isNonnull() && PVOrig->trackWeight(cand.trackRef()) > 0.5 &&
288  quality == 7) {
289  outPtrP->back().setAssociationQuality(pat::PackedCandidate::UsedInFitTight);
290  }
291  // properties of the best track
292  outPtrP->back().setLostInnerHits(lostHits);
293  if (outPtrP->back().pt() > minPtForTrackProperties_ || outPtrP->back().ptTrk() > minPtForTrackProperties_ ||
294  whiteList.find(ic) != whiteList.end() ||
295  (cand.trackRef().isNonnull() && whiteListTk.find(cand.trackRef()) != whiteListTk.end())) {
296  outPtrP->back().setFirstHit(ctrack->hitPattern().getHitPattern(reco::HitPattern::TRACK_HITS, 0));
297  if (abs(outPtrP->back().pdgId()) == 22) {
298  outPtrP->back().setTrackProperties(*ctrack, covariancePackingSchemas_[4], covarianceVersion_);
299  } else {
300  if (ctrack->hitPattern().numberOfValidPixelHits() > 0) {
301  outPtrP->back().setTrackProperties(*ctrack,
302  covariancePackingSchemas_[0],
303  covarianceVersion_); // high quality
304  } else {
305  outPtrP->back().setTrackProperties(*ctrack, covariancePackingSchemas_[1], covarianceVersion_);
306  }
307  }
308  // outPtrP->back().setTrackProperties(*ctrack,tsos.curvilinearError());
309  } else {
310  if (outPtrP->back().pt() > minPtForLowQualityTrackProperties_) {
311  if (ctrack->hitPattern().numberOfValidPixelHits() > 0)
312  outPtrP->back().setTrackProperties(*ctrack,
313  covariancePackingSchemas_[2],
314  covarianceVersion_); // low quality, with pixels
315  else
316  outPtrP->back().setTrackProperties(*ctrack,
317  covariancePackingSchemas_[3],
318  covarianceVersion_); // low quality, without pixels
319  }
320  }
321 
322  // these things are always for the CKF track
323  outPtrP->back().setTrackHighPurity(cand.trackRef().isNonnull() &&
324  cand.trackRef()->quality(reco::Track::highPurity));
325  if (cand.muonRef().isNonnull()) {
326  outPtrP->back().setMuonID(cand.muonRef()->isStandAloneMuon(), cand.muonRef()->isGlobalMuon());
327  }
328  } else {
329  if (!PVs->empty()) {
330  PV = reco::VertexRef(PVs, 0);
331  PVpos = PV->position();
332  }
333 
334  outPtrP->push_back(pat::PackedCandidate(
335  cand.polarP4(), PVpos, cand.pt(), cand.eta(), cand.phi(), cand.pdgId(), PVRefProd, PV.key()));
336  outPtrP->back().setAssociationQuality(
338  }
339 
340  // neutrals and isolated charged hadrons
341 
342  bool isIsolatedChargedHadron = false;
343  if (storeChargedHadronIsolation_) {
344  const edm::ValueMap<bool> &chargedHadronIsolation = *(chargedHadronIsolationHandle.product());
345  isIsolatedChargedHadron =
346  ((cand.pt() > minPtForChargedHadronProperties_) && (chargedHadronIsolation[reco::PFCandidateRef(cands, ic)]));
347  outPtrP->back().setIsIsolatedChargedHadron(isIsolatedChargedHadron);
348  }
349 
350  if (abs(cand.pdgId()) == 1 || abs(cand.pdgId()) == 130) {
351  outPtrP->back().setHcalFraction(cand.hcalEnergy() / (cand.ecalEnergy() + cand.hcalEnergy()));
352  } else if ((cand.charge() || abs(cand.pdgId()) == 22) && cand.pt() > 0.5) {
353  outPtrP->back().setHcalFraction(cand.hcalEnergy() / (cand.ecalEnergy() + cand.hcalEnergy()));
354  outPtrP->back().setCaloFraction((cand.hcalEnergy() + cand.ecalEnergy()) / cand.energy());
355  } else {
356  outPtrP->back().setHcalFraction(0);
357  outPtrP->back().setCaloFraction(0);
358  }
359 
360  if (isIsolatedChargedHadron) {
361  outPtrP->back().setRawCaloFraction((cand.rawEcalEnergy() + cand.rawHcalEnergy()) / cand.energy());
362  outPtrP->back().setRawHcalFraction(cand.rawHcalEnergy() / (cand.rawEcalEnergy() + cand.rawHcalEnergy()));
363  } else {
364  outPtrP->back().setRawCaloFraction(0);
365  outPtrP->back().setRawHcalFraction(0);
366  }
367 
368  std::vector<float> dummyVector;
369  dummyVector.clear();
370  pat::HcalDepthEnergyFractions hcalDepthEFrac(dummyVector);
371 
372  // storing HcalDepthEnergyFraction information
373  if (std::find(pfCandidateTypesForHcalDepth_.begin(), pfCandidateTypesForHcalDepth_.end(), abs(cand.pdgId())) !=
374  pfCandidateTypesForHcalDepth_.end()) {
375  if (!storeHcalDepthEndcapOnly_ ||
376  fabs(outPtrP->back().eta()) > 1.3) { // storeHcalDepthEndcapOnly_==false -> store all eta of
377  // selected PF types, if true, only |eta|>1.3 of selected
378  // PF types will be stored
379  std::vector<float> hcalDepthEnergyFractionTmp(cand.hcalDepthEnergyFractions().begin(),
380  cand.hcalDepthEnergyFractions().end());
381  hcalDepthEFrac.reset(hcalDepthEnergyFractionTmp);
382  }
383  }
384  hcalDepthEnergyFractions.push_back(hcalDepthEFrac);
385 
386  // specifically this is the PFLinker requirements to apply the e/gamma
387  // regression
388  if (cand.particleId() == reco::PFCandidate::e ||
389  (cand.particleId() == reco::PFCandidate::gamma && cand.mva_nothing_gamma() > 0.)) {
390  outPtrP->back().setGoodEgamma();
391  }
392 
393  if (usePuppi_) {
394  reco::PFCandidateRef pkref(cands, ic);
395 
396  float puppiWeightVal = (*puppiWeight)[pkref];
397  float puppiWeightNoLepVal = (*puppiWeightNoLep)[pkref];
398  outPtrP->back().setPuppiWeight(puppiWeightVal, puppiWeightNoLepVal);
399  }
400 
401  if (storeTiming_) {
402  if (timeFromValueMap_) {
403  if (cand.trackRef().isNonnull()) {
404  auto t0 = (*t0Map)[cand.trackRef()];
405  auto t0Err = (*t0ErrMap)[cand.trackRef()];
406  outPtrP->back().setTime(t0, t0Err);
407  }
408  } else {
409  if (cand.isTimeValid()) {
410  outPtrP->back().setTime(cand.time(), cand.timeError());
411  }
412  }
413  }
414 
415  mapping[ic] = ic; // trivial at the moment!
416  if (cand.trackRef().isNonnull() && cand.trackRef().id() == TKOrigs.id()) {
417  mappingTk[cand.trackRef().key()] = ic;
418  }
419  }
420 
421  auto outPtrPSorted = std::make_unique<std::vector<pat::PackedCandidate>>();
422  std::vector<size_t> order = sort_indexes(*outPtrP);
423  std::vector<size_t> reverseOrder(order.size());
424  for (size_t i = 0, nc = cands->size(); i < nc; i++) {
425  outPtrPSorted->push_back((*outPtrP)[order[i]]);
426  reverseOrder[order[i]] = i;
427  mappingReverse[order[i]] = i;
428  hcalDepthEnergyFractions_Ordered.push_back(hcalDepthEnergyFractions[order[i]]);
429  }
430 
431  // Fix track association for sorted candidates
432  for (size_t i = 0, ntk = mappingTk.size(); i < ntk; i++) {
433  if (mappingTk[i] >= 0)
434  mappingTk[i] = reverseOrder[mappingTk[i]];
435  }
436 
438 
439  // now build the two maps
440  auto pf2pc = std::make_unique<edm::Association<pat::PackedCandidateCollection>>(oh);
441  auto pc2pf = std::make_unique<edm::Association<reco::PFCandidateCollection>>(cands);
444  pf2pcFiller.insert(cands, mappingReverse.begin(), mappingReverse.end());
445  pc2pfFiller.insert(oh, order.begin(), order.end());
446  // include also the mapping track -> packed PFCand
447  pf2pcFiller.insert(TKOrigs, mappingTk.begin(), mappingTk.end());
448 
449  pf2pcFiller.fill();
450  pc2pfFiller.fill();
451  iEvent.put(std::move(pf2pc));
452  iEvent.put(std::move(pc2pf));
453 
454  // HCAL depth energy fraction additions using ValueMap
455  auto hcalDepthEnergyFractionsV = std::make_unique<edm::ValueMap<HcalDepthEnergyFractions>>();
456  edm::ValueMap<HcalDepthEnergyFractions>::Filler fillerHcalDepthEnergyFractions(*hcalDepthEnergyFractionsV);
457  fillerHcalDepthEnergyFractions.insert(
458  cands, hcalDepthEnergyFractions_Ordered.begin(), hcalDepthEnergyFractions_Ordered.end());
459  fillerHcalDepthEnergyFractions.fill();
460 
461  if (not pfCandidateTypesForHcalDepth_.empty())
462  iEvent.put(std::move(hcalDepthEnergyFractionsV), "hcalDepthEnergyFractions");
463 }
464 
int numberOfValidPixelHits() const
Definition: HitPattern.h:831
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
int numberOfLostHits(HitCategory category) const
Definition: HitPattern.h:891
ProductID id() const
Definition: HandleBase.cc:29
#define DEFINE_FWK_MODULE(type)
Definition: MakerMacros.h:16
std::vector< l1t::PFCandidate > PFCandidateCollection
Definition: PFCandidate.h:57
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
T const * product() const
Definition: Handle.h:70
void insert(const H &h, I begin, I end)
Definition: ValueMap.h:53
std::vector< Track > TrackCollection
collection of Tracks
Definition: TrackFwd.h:14
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
static const int qualityMap[8]
conversion map from quality flags used in PV association and miniAOD one
const Point & referencePoint() const
Reference point on the track.
Definition: TrackBase.h:667
const edm::EDGetTokenT< reco::PFCandidateCollection > Cands_
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
std::vector< Vertex > VertexCollection
Definition: Vertex.h:31
key_type key() const
Accessor for product key.
Definition: Ref.h:250
const edm::EDGetTokenT< edm::ValueMap< int > > PVAssoQuality_
size_type size() const
EDGetTokenT< ProductType > consumes(edm::InputTag const &tag)
Definition: HeavyIon.h:7
const edm::EDGetTokenT< edm::ValueMap< float > > PuppiWeightNoLep_
double pt() const
track transverse momentum
Definition: TrackBase.h:637
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
int iEvent
Definition: GenABIO.cc:224
PATPackedCandidateProducer(const edm::ParameterSet &)
void reset(std::vector< float > v)
const edm::EDGetTokenT< edm::ValueMap< float > > t0ErrMap_
reco::TrackRef track() const override
reference to a track
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
double phi() const
azimuthal angle of momentum vector
Definition: TrackBase.h:649
static std::vector< size_t > sort_indexes(const std::vector< T > &v)
const edm::EDGetTokenT< reco::TrackCollection > TKOrigs_
float calcDz(reco::Candidate::Point p, reco::Candidate::Point v, const reco::Candidate &c) const
edm::Ref< VertexCollection > VertexRef
persistent reference to a Vertex
Definition: VertexFwd.h:13
void produce(edm::StreamID, edm::Event &, const edm::EventSetup &) const override
uint16_t getHitPattern(HitCategory category, int position) const
Definition: HitPattern.h:537
ii
Definition: cuy.py:589
LostInnerHits
Enumerator specifying the.
double eta() const
pseudorapidity of momentum vector
Definition: TrackBase.h:652
const edm::EDGetTokenT< edm::ValueMap< bool > > ChargedHadronIsolation_
edm::Ptr< Candidate > CandidatePtr
persistent reference to an object in a collection of Candidate objects
Definition: CandidateFwd.h:25
const HitPattern & hitPattern() const
Access the hit pattern, indicating in which Tracker layers the track has hits.
Definition: TrackBase.h:504
const std::vector< int > covariancePackingSchemas_
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
def encode(args, files)
const edm::EDGetTokenT< edm::ValueMap< float > > PuppiWeight_
const edm::EDGetTokenT< reco::VertexCollection > PVOrigs_
float calcDxy(float dx, float dy, float phi) const
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
std::vector< edm::EDGetTokenT< edm::View< reco::Candidate > > > SVWhiteLists_
fixed size matrix
HLT enums.
const std::vector< int > pfCandidateTypesForHcalDepth_
math::XYZPoint Point
point in the space
Definition: Candidate.h:40
const edm::EDGetTokenT< edm::Association< reco::VertexCollection > > PVAsso_
const edm::EDGetTokenT< reco::VertexCollection > PVs_
string quality
const edm::EDGetTokenT< edm::ValueMap< float > > t0Map_
static bool candsOrdering(pat::PackedCandidate const &i, pat::PackedCandidate const &j)
const_iterator end() const
def move(src, dest)
Definition: eostools.py:511
bool hasValidHitInPixelLayer(enum PixelSubdetector::SubDetector, uint16_t layer) const
Definition: HitPattern.cc:358