CMS 3D CMS Logo

Jet.cc
Go to the documentation of this file.
1 //
2 //
3 
8 
9 using namespace pat;
10 
12 Jet::Jet()
13  : PATObject<reco::Jet>(reco::Jet()), embeddedCaloTowers_(false), embeddedPFCandidates_(false), jetCharge_(0.) {}
14 
16 Jet::Jet(const reco::Jet& aJet)
17  : PATObject<reco::Jet>(aJet), embeddedCaloTowers_(false), embeddedPFCandidates_(false), jetCharge_(0.0) {
18  tryImportSpecific(aJet);
19 }
20 
22 Jet::Jet(const edm::Ptr<reco::Jet>& aJetRef)
23  : PATObject<reco::Jet>(aJetRef), embeddedCaloTowers_(false), embeddedPFCandidates_(false), jetCharge_(0.0) {
24  tryImportSpecific(*aJetRef);
25 }
26 
28 Jet::Jet(const edm::RefToBase<reco::Jet>& aJetRef)
29  : PATObject<reco::Jet>(aJetRef), embeddedCaloTowers_(false), embeddedPFCandidates_(false), jetCharge_(0.0) {
30  tryImportSpecific(*aJetRef);
31 }
32 
34 Jet::Jet(const edm::RefToBase<pat::Jet>& aJetRef) : Jet(*aJetRef) {
35  refToOrig_ = edm::Ptr<reco::Candidate>(aJetRef.id(), aJetRef.get(), aJetRef.key());
36 }
37 
39 Jet::Jet(const edm::Ptr<pat::Jet>& aJetRef) : Jet(*aJetRef) { refToOrig_ = aJetRef; }
40 
41 std::ostream& reco::operator<<(std::ostream& out, const pat::Jet& obj) {
42  if (!out)
43  return out;
44 
45  out << "\tpat::Jet: ";
46  out << std::setiosflags(std::ios::right);
47  out << std::setiosflags(std::ios::fixed);
48  out << std::setprecision(3);
49  out << " E/pT/eta/phi " << obj.energy() << "/" << obj.pt() << "/" << obj.eta() << "/" << obj.phi();
50  return out;
51 }
52 
54 void Jet::tryImportSpecific(const reco::Jet& source) {
55  const std::type_info& type = typeid(source);
56  if (type == typeid(reco::CaloJet)) {
57  specificCalo_.push_back((static_cast<const reco::CaloJet&>(source)).getSpecific());
58  } else if (type == typeid(reco::JPTJet)) {
59  reco::JPTJet const& jptJet = static_cast<reco::JPTJet const&>(source);
60  specificJPT_.push_back(jptJet.getSpecific());
61  reco::CaloJet const* caloJet = nullptr;
62  if (jptJet.getCaloJetRef().isNonnull() && jptJet.getCaloJetRef().isAvailable()) {
63  caloJet = dynamic_cast<reco::CaloJet const*>(jptJet.getCaloJetRef().get());
64  }
65  if (caloJet != nullptr) {
66  specificCalo_.push_back(caloJet->getSpecific());
67  } else {
68  edm::LogWarning("OptionalProductNotFound")
69  << " in pat::Jet, Attempted to add Calo Specifics to JPT Jets, but failed."
70  << " Jet ID for JPT Jets will not be available for you." << std::endl;
71  }
72  } else if (type == typeid(reco::PFJet)) {
73  specificPF_.push_back((static_cast<const reco::PFJet&>(source)).getSpecific());
74  }
75 }
76 
78 Jet::~Jet() {}
79 
81 
82 CaloTowerPtr Jet::getCaloConstituent(unsigned fIndex) const {
83  if (embeddedCaloTowers_) {
84  // Refactorized PAT access
85  if (!caloTowersFwdPtr_.empty()) {
86  return (fIndex < caloTowersFwdPtr_.size() ? caloTowersFwdPtr_[fIndex].ptr() : CaloTowerPtr());
87  }
88  // Compatibility PAT access
89  else {
90  if (!caloTowers_.empty()) {
91  return (fIndex < caloTowers_.size() ? CaloTowerPtr(&caloTowers_, fIndex) : CaloTowerPtr());
92  }
93  }
94  }
95  // Non-embedded access
96  else {
97  Constituent dau = daughterPtr(fIndex);
98  const CaloTower* caloTower = dynamic_cast<const CaloTower*>(dau.get());
99  if (caloTower != nullptr) {
100  return CaloTowerPtr(dau.id(), caloTower, dau.key());
101  } else {
102  throw cms::Exception("Invalid Constituent") << "CaloJet constituent is not of CaloTower type";
103  }
104  }
105 
106  return CaloTowerPtr();
107 }
108 
109 std::vector<CaloTowerPtr> const& Jet::getCaloConstituents() const {
110  if (!caloTowersTemp_.isSet() || !caloTowers_.empty())
111  cacheCaloTowers();
112  return *caloTowersTemp_;
113 }
114 
116 
117 reco::PFCandidatePtr Jet::getPFConstituent(unsigned fIndex) const {
118  if (embeddedPFCandidates_) {
119  // Refactorized PAT access
120  if (!pfCandidatesFwdPtr_.empty()) {
121  return (fIndex < pfCandidatesFwdPtr_.size() ? pfCandidatesFwdPtr_[fIndex].ptr() : reco::PFCandidatePtr());
122  }
123  // Compatibility PAT access
124  else {
125  if (!pfCandidates_.empty()) {
126  return (fIndex < pfCandidates_.size() ? reco::PFCandidatePtr(&pfCandidates_, fIndex) : reco::PFCandidatePtr());
127  }
128  }
129  }
130  // Non-embedded access
131  else {
132  Constituent dau = daughterPtr(fIndex);
133  const reco::PFCandidate* pfCandidate = dynamic_cast<const reco::PFCandidate*>(dau.get());
134  if (pfCandidate) {
135  return reco::PFCandidatePtr(dau.id(), pfCandidate, dau.key());
136  } else {
137  throw cms::Exception("Invalid Constituent") << "PFJet constituent is not of PFCandidate type";
138  }
139  }
140 
141  return reco::PFCandidatePtr();
142 }
143 
144 std::vector<reco::PFCandidatePtr> const& Jet::getPFConstituents() const {
145  if (!pfCandidatesTemp_.isSet() || !pfCandidates_.empty())
146  cachePFCandidates();
147  return *pfCandidatesTemp_;
148 }
149 
150 const reco::Candidate* Jet::daughter(size_t i) const {
151  if (isCaloJet() || isJPTJet()) {
152  if (embeddedCaloTowers_) {
153  if (!caloTowersFwdPtr_.empty())
154  return caloTowersFwdPtr_[i].get();
155  else if (!caloTowers_.empty())
156  return &caloTowers_[i];
157  else
158  return reco::Jet::daughter(i);
159  }
160  }
161  if (isPFJet()) {
162  if (embeddedPFCandidates_) {
163  if (!pfCandidatesFwdPtr_.empty())
164  return pfCandidatesFwdPtr_[i].get();
165  else if (!pfCandidates_.empty())
166  return &pfCandidates_[i];
167  else
168  return reco::Jet::daughter(i);
169  }
170  }
171  if (!subjetCollections_.empty()) {
172  if (!daughtersTemp_.isSet())
173  cacheDaughters();
174  return daughtersTemp_->at(i).get();
175  }
176  return reco::Jet::daughter(i);
177 }
178 
179 reco::CandidatePtr Jet::daughterPtr(size_t i) const {
180  if (!subjetCollections_.empty()) {
181  if (!daughtersTemp_.isSet())
182  cacheDaughters();
183  return daughtersTemp_->at(i);
184  }
185  return reco::Jet::daughterPtr(i);
186 }
187 
189  if (!subjetCollections_.empty()) {
190  if (!daughtersTemp_.isSet())
191  cacheDaughters();
192  return *daughtersTemp_;
193  }
195 }
196 
197 size_t Jet::numberOfDaughters() const {
198  if (isCaloJet() || isJPTJet()) {
199  if (embeddedCaloTowers_) {
200  if (!caloTowersFwdPtr_.empty())
201  return caloTowersFwdPtr_.size();
202  else if (!caloTowers_.empty())
203  return caloTowers_.size();
204  else
206  }
207  }
208  if (isPFJet()) {
209  if (embeddedPFCandidates_) {
210  if (!pfCandidatesFwdPtr_.empty())
211  return pfCandidatesFwdPtr_.size();
212  else if (!pfCandidates_.empty())
213  return pfCandidates_.size();
214  else
216  }
217  }
218  if (!subjetCollections_.empty()) {
219  if (!daughtersTemp_.isSet())
220  cacheDaughters();
221  return daughtersTemp_->size();
222  }
224 }
225 
227 const reco::GenJet* Jet::genJet() const {
228  if (!genJet_.empty())
229  return &(genJet_.front());
230  else if (!genJetRef_.empty())
231  return genJetRef_[0].get();
232  else
233  return genJetFwdRef_.get();
234 }
235 
237 int Jet::partonFlavour() const { return jetFlavourInfo_.getPartonFlavour(); }
238 
240 int Jet::hadronFlavour() const { return jetFlavourInfo_.getHadronFlavour(); }
241 
243 const reco::JetFlavourInfo& Jet::jetFlavourInfo() const { return jetFlavourInfo_; }
244 
246 
248 void Jet::scaleEnergy(double fScale, const std::string& level) {
249  if (jecSetsAvailable()) {
250  std::vector<float> factors = {float(jec_[0].correction(0, JetCorrFactors::NONE) / fScale)};
251  jec_[0].insertFactor(0, std::make_pair(level, factors));
252  ++currentJECLevel_;
253  }
254  setP4(p4() * fScale);
255 }
256 
257 // initialize the jet to a given JEC level during creation starting from Uncorrected
258 void Jet::initializeJEC(unsigned int level, const JetCorrFactors::Flavor& flavor, unsigned int set) {
259  currentJECSet(set);
260  currentJECLevel(level);
261  currentJECFlavor(flavor);
262  setP4(jec_[set].correction(level, flavor) * p4());
263 }
264 
266 int Jet::jecSet(const std::string& set) const {
267  for (std::vector<pat::JetCorrFactors>::const_iterator corrFactor = jec_.begin(); corrFactor != jec_.end();
268  ++corrFactor)
269  if (corrFactor->jecSet() == set) {
270  return (corrFactor - jec_.begin());
271  }
272  return -1;
273 }
274 
276 const std::vector<std::string> Jet::availableJECSets() const {
277  std::vector<std::string> sets;
278  for (std::vector<pat::JetCorrFactors>::const_iterator corrFactor = jec_.begin(); corrFactor != jec_.end();
279  ++corrFactor)
280  sets.push_back(corrFactor->jecSet());
281  return sets;
282 }
283 
284 const std::vector<std::string> Jet::availableJECLevels(const int& set) const {
285  return set >= 0 ? jec_.at(set).correctionLabels() : std::vector<std::string>();
286 }
287 
290 float Jet::jecFactor(const std::string& level, const std::string& flavor, const std::string& set) const {
291  for (unsigned int idx = 0; idx < jec_.size(); ++idx) {
292  if (set.empty() || jec_.at(idx).jecSet() == set) {
293  if (jec_[idx].jecLevel(level) >= 0) {
294  return jecFactor(jec_[idx].jecLevel(level), jec_[idx].jecFlavor(flavor), idx);
295  } else {
296  throw cms::Exception("InvalidRequest") << "This JEC level " << level << " does not exist. \n";
297  }
298  }
299  }
300  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n"
301  << "for a jet energy correction set with label " << set << "\n";
302 }
303 
306 float Jet::jecFactor(const unsigned int& level, const JetCorrFactors::Flavor& flavor, const unsigned int& set) const {
307  if (!jecSetsAvailable()) {
308  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n";
309  }
310  if (!jecSetAvailable(set)) {
311  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n"
312  << "for a jet energy correction set with index " << set << "\n";
313  }
314  return jec_.at(set).correction(level, flavor) /
315  jec_.at(currentJECSet_).correction(currentJECLevel_, currentJECFlavor_);
316 }
317 
320 Jet Jet::correctedJet(const std::string& level, const std::string& flavor, const std::string& set) const {
321  // rescale p4 of the jet; the update of current values is
322  // done within the called jecFactor function
323  for (unsigned int idx = 0; idx < jec_.size(); ++idx) {
324  if (set.empty() || jec_.at(idx).jecSet() == set) {
325  if (jec_[idx].jecLevel(level) >= 0) {
326  return correctedJet(jec_[idx].jecLevel(level), jec_[idx].jecFlavor(flavor), idx);
327  } else {
328  throw cms::Exception("InvalidRequest") << "This JEC level " << level << " does not exist. \n";
329  }
330  }
331  }
332  throw cms::Exception("InvalidRequest") << "This JEC set " << set << " does not exist. \n";
333 }
334 
337 Jet Jet::correctedJet(const unsigned int& level, const JetCorrFactors::Flavor& flavor, const unsigned int& set) const {
338  Jet correctedJet(*this);
339  //rescale p4 of the jet
340  correctedJet.setP4(jecFactor(level, flavor, set) * p4());
341  // update current level, flavor and set
342  correctedJet.currentJECSet(set);
343  correctedJet.currentJECLevel(level);
344  correctedJet.currentJECFlavor(flavor);
345  return correctedJet;
346 }
347 
349 
350 const std::vector<std::pair<std::string, float>>& Jet::getPairDiscri() const { return pairDiscriVector_; }
351 
353 float Jet::bDiscriminator(const std::string& aLabel) const {
354  float discriminator = -1000.;
355  for (int i = (int(pairDiscriVector_.size()) - 1); i >= 0; i--) {
356  if (pairDiscriVector_[i].first == aLabel) {
357  discriminator = pairDiscriVector_[i].second;
358  break;
359  }
360  }
361  return discriminator;
362 }
363 
364 const reco::BaseTagInfo* Jet::tagInfo(const std::string& label) const {
365  for (int i = (int(tagInfoLabels_.size()) - 1); i >= 0; i--) {
366  if (tagInfoLabels_[i] == label) {
367  if (!tagInfosFwdPtr_.empty())
368  return tagInfosFwdPtr_[i].get();
369  else if (!tagInfos_.empty())
370  return &tagInfos_[i];
371  return nullptr;
372  }
373  }
374  return nullptr;
375 }
376 
377 const reco::CandIPTagInfo* Jet::tagInfoCandIP(const std::string& label) const {
378  return tagInfoByTypeOrLabel<reco::CandIPTagInfo>(label);
379 }
380 
381 const reco::TrackIPTagInfo* Jet::tagInfoTrackIP(const std::string& label) const {
382  return tagInfoByTypeOrLabel<reco::TrackIPTagInfo>(label);
383 }
384 
385 const reco::CandSoftLeptonTagInfo* Jet::tagInfoCandSoftLepton(const std::string& label) const {
386  return tagInfoByTypeOrLabel<reco::CandSoftLeptonTagInfo>(label);
387 }
388 
389 const reco::SoftLeptonTagInfo* Jet::tagInfoSoftLepton(const std::string& label) const {
390  return tagInfoByTypeOrLabel<reco::SoftLeptonTagInfo>(label);
391 }
392 
393 const reco::CandSecondaryVertexTagInfo* Jet::tagInfoCandSecondaryVertex(const std::string& label) const {
394  return tagInfoByTypeOrLabel<reco::CandSecondaryVertexTagInfo>(label);
395 }
396 
397 const reco::SecondaryVertexTagInfo* Jet::tagInfoSecondaryVertex(const std::string& label) const {
398  return tagInfoByTypeOrLabel<reco::SecondaryVertexTagInfo>(label);
399 }
400 
401 const reco::BoostedDoubleSVTagInfo* Jet::tagInfoBoostedDoubleSV(const std::string& label) const {
402  return tagInfoByTypeOrLabel<reco::BoostedDoubleSVTagInfo>(label);
403 }
404 
405 const reco::PixelClusterTagInfo* Jet::tagInfoPixelCluster(const std::string& label) const {
406  return tagInfoByTypeOrLabel<reco::PixelClusterTagInfo>(label);
407 }
408 
409 void Jet::addTagInfo(const std::string& label, const TagInfoFwdPtrCollection::value_type& info) {
410  std::string::size_type idx = label.find("TagInfos");
411  if (idx == std::string::npos) {
412  tagInfoLabels_.push_back(label);
413  } else {
414  tagInfoLabels_.push_back(label.substr(0, idx));
415  }
416  tagInfosFwdPtr_.push_back(info);
417 }
418 
420 float Jet::jetCharge() const { return jetCharge_; }
421 
423 const reco::TrackRefVector& Jet::associatedTracks() const { return associatedTracks_; }
424 
426 void Jet::setAssociatedTracks(const reco::TrackRefVector& tracks) { associatedTracks_ = tracks; }
427 
429 void Jet::setCaloTowers(const CaloTowerFwdPtrCollection& caloTowers) {
430  caloTowersFwdPtr_.reserve(caloTowers.size());
431  for (auto const& tower : caloTowers) {
432  caloTowersFwdPtr_.push_back(tower);
433  }
434  embeddedCaloTowers_ = true;
435  caloTowersTemp_.reset();
436 }
437 
439 void Jet::setPFCandidates(const PFCandidateFwdPtrCollection& pfCandidates) {
440  pfCandidatesFwdPtr_.reserve(pfCandidates.size());
441  for (auto const& cand : pfCandidates) {
442  pfCandidatesFwdPtr_.push_back(cand);
443  }
444  embeddedPFCandidates_ = true;
445  pfCandidatesTemp_.reset();
446 }
447 
449 void Jet::setGenJetRef(const edm::FwdRef<reco::GenJetCollection>& gj) { genJetFwdRef_ = gj; }
450 
452 void Jet::setPartonFlavour(int partonFl) { jetFlavourInfo_.setPartonFlavour(partonFl); }
453 
455 void Jet::setHadronFlavour(int hadronFl) { jetFlavourInfo_.setHadronFlavour(hadronFl); }
456 
458 void Jet::setJetFlavourInfo(const reco::JetFlavourInfo& jetFlavourInfo) { jetFlavourInfo_ = jetFlavourInfo; }
459 
461 void Jet::addBDiscriminatorPair(const std::pair<std::string, float>& thePair) { pairDiscriVector_.push_back(thePair); }
462 
464 void Jet::setJetCharge(float jetCharge) { jetCharge_ = jetCharge; }
465 
467 void Jet::cacheCaloTowers() const {
468  // Clear the cache
469  // Here is where we've embedded constituents
470  std::unique_ptr<std::vector<CaloTowerPtr>> caloTowersTemp{new std::vector<CaloTowerPtr>{}};
471  if (embeddedCaloTowers_) {
472  // Refactorized PAT access
473  if (!caloTowersFwdPtr_.empty()) {
474  caloTowersTemp->reserve(caloTowersFwdPtr_.size());
475  for (CaloTowerFwdPtrVector::const_iterator ibegin = caloTowersFwdPtr_.begin(),
476  iend = caloTowersFwdPtr_.end(),
477  icalo = ibegin;
478  icalo != iend;
479  ++icalo) {
480  caloTowersTemp->emplace_back(icalo->ptr());
481  }
482  }
483  // Compatibility access
484  else if (!caloTowers_.empty()) {
485  caloTowersTemp->reserve(caloTowers_.size());
486  for (CaloTowerCollection::const_iterator ibegin = caloTowers_.begin(), iend = caloTowers_.end(), icalo = ibegin;
487  icalo != iend;
488  ++icalo) {
489  caloTowersTemp->emplace_back(&caloTowers_, icalo - ibegin);
490  }
491  }
492  }
493  // Non-embedded access
494  else {
495  const auto nDaughters = numberOfDaughters();
496  caloTowersTemp->reserve(nDaughters);
497  for (unsigned fIndex = 0; fIndex < nDaughters; ++fIndex) {
498  Constituent const& dau = daughterPtr(fIndex);
499  const CaloTower* caloTower = dynamic_cast<const CaloTower*>(dau.get());
500  if (caloTower) {
501  caloTowersTemp->emplace_back(dau.id(), caloTower, dau.key());
502  } else {
503  throw cms::Exception("Invalid Constituent") << "CaloJet constituent is not of CaloTower type";
504  }
505  }
506  }
507  caloTowersTemp_.set(std::move(caloTowersTemp));
508 }
509 
511 void Jet::cachePFCandidates() const {
512  std::unique_ptr<std::vector<reco::PFCandidatePtr>> pfCandidatesTemp{new std::vector<reco::PFCandidatePtr>{}};
513  // Here is where we've embedded constituents
514  if (embeddedPFCandidates_) {
515  // Refactorized PAT access
516  if (!pfCandidatesFwdPtr_.empty()) {
517  pfCandidatesTemp->reserve(pfCandidatesFwdPtr_.size());
518  for (PFCandidateFwdPtrCollection::const_iterator ibegin = pfCandidatesFwdPtr_.begin(),
519  iend = pfCandidatesFwdPtr_.end(),
520  ipf = ibegin;
521  ipf != iend;
522  ++ipf) {
523  pfCandidatesTemp->emplace_back(ipf->ptr());
524  }
525  }
526  // Compatibility access
527  else if (!pfCandidates_.empty()) {
528  pfCandidatesTemp->reserve(pfCandidates_.size());
529  for (reco::PFCandidateCollection::const_iterator ibegin = pfCandidates_.begin(),
530  iend = pfCandidates_.end(),
531  ipf = ibegin;
532  ipf != iend;
533  ++ipf) {
534  pfCandidatesTemp->emplace_back(&pfCandidates_, ipf - ibegin);
535  }
536  }
537  }
538  // Non-embedded access
539  else {
540  const auto nDaughters = numberOfDaughters();
541  pfCandidatesTemp->reserve(nDaughters);
542  for (unsigned fIndex = 0; fIndex < nDaughters; ++fIndex) {
543  Constituent const& dau = daughterPtr(fIndex);
544  const reco::PFCandidate* pfCandidate = dynamic_cast<const reco::PFCandidate*>(dau.get());
545  if (pfCandidate) {
546  pfCandidatesTemp->emplace_back(dau.id(), pfCandidate, dau.key());
547  } else {
548  throw cms::Exception("Invalid Constituent") << "PFJet constituent is not of PFCandidate type";
549  }
550  }
551  }
552  // Set the cache
553  pfCandidatesTemp_.set(std::move(pfCandidatesTemp));
554 }
555 
557 void Jet::cacheDaughters() const {
558  // Jets in MiniAOD produced via JetSubstructurePacker contain a mixture of subjets and particles as daughters
559  std::unique_ptr<std::vector<reco::CandidatePtr>> daughtersTemp{new std::vector<reco::CandidatePtr>{}};
560  const std::vector<reco::CandidatePtr>& jdaus = reco::Jet::daughterPtrVector();
561  for (const reco::CandidatePtr& dau : jdaus) {
562  if (dau->isJet()) {
563  const reco::Jet* subjet = dynamic_cast<const reco::Jet*>(&*dau);
564  if (subjet) {
565  const std::vector<reco::CandidatePtr>& sjdaus = subjet->daughterPtrVector();
566  daughtersTemp->insert(daughtersTemp->end(), sjdaus.begin(), sjdaus.end());
567  }
568  } else
569  daughtersTemp->push_back(dau);
570  }
571  daughtersTemp_.set(std::move(daughtersTemp));
572 }
573 
575 pat::JetPtrCollection const& Jet::subjets(unsigned int index) const {
576  if (index < subjetCollections_.size())
577  return subjetCollections_[index];
578  else {
579  throw cms::Exception("OutOfRange") << "Index " << index << " is out of range" << std::endl;
580  }
581 }
582 
584 pat::JetPtrCollection const& Jet::subjets(std::string const& label) const {
585  auto found = find(subjetLabels_.begin(), subjetLabels_.end(), label);
586  if (found != subjetLabels_.end()) {
587  auto index = std::distance(subjetLabels_.begin(), found);
588  return subjetCollections_[index];
589  } else {
590  throw cms::Exception("SubjetsNotFound")
591  << "Label " << label << " does not match any subjet collection" << std::endl;
592  }
593 }
594 
596 void Jet::addSubjets(pat::JetPtrCollection const& pieces, std::string const& label) {
597  subjetCollections_.push_back(pieces);
598  subjetLabels_.push_back(label);
599 }
Jet()
default constructor
bool isAvailable() const
Definition: RefToBase.h:126
virtual CandidatePtr daughterPtr(size_type i) const
reference to daughter at given position
static const TGPicture * info(bool iBackgroundIsBlack)
Jets made from CaloTowers.
Definition: CaloJet.h:27
virtual void scaleEnergy(double fScale)
scale energy of the jet
bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:290
Base class for all types of Jets.
Definition: Jet.h:20
std::vector< CaloTower >::const_iterator const_iterator
virtual const daughters & daughterPtrVector() const
references to daughtes
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
T get() const
get a component
uint16_t size_type
Jets made from PFObjects.
Definition: PFJet.h:20
const LorentzVector & p4() const final
four-momentum Lorentz vector
const Specific & getSpecific() const
Definition: CaloJet.h:143
ProductID id() const
Definition: RefToBase.h:221
Definition: HeavyIon.h:7
daughters dau
collection of references to daughters
char const * label
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:66
Definition: Jet.py:1
Jets made from CaloJets corrected for ZSP and tracks.
Definition: JPTJet.h:28
std::vector< edm::Ptr< pat::Jet > > JetPtrCollection
Definition: Jet.h:75
Class storing the jet flavour information.
Jets made from MC generator particles.
Definition: GenJet.h:23
const edm::RefToBase< reco::Jet > & getCaloJetRef() const
Definition: JPTJet.h:118
unsigned int index
Definition: LeafCandidate.h:31
~Jet() override
Destructor.
Definition: Jet.h:41
edm::Ptr< Candidate > Constituent
Definition: Jet.h:22
std::vector< CandidatePtr > daughters
collection of references to daughters
size_t numberOfDaughters() const override
number of daughters
size_t key() const
Definition: RefToBase.h:226
const Specific & getSpecific() const
block accessors
Definition: JPTJet.h:121
std::vector< edm::FwdPtr< CaloTower > > CaloTowerFwdPtrCollection
Definition: Jet.h:74
std::vector< edm::FwdPtr< reco::PFCandidate > > PFCandidateFwdPtrCollection
Definition: Jet.h:73
Analysis-level calorimeter jet class.
Definition: Jet.h:77
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:41
fixed size matrix
Jet()
Default constructor.
Definition: Jet.h:36
Templated PAT object container.
Definition: PATObject.h:43
edm::Ptr< CaloTower > CaloTowerPtr
Definition: CaloTowerDefs.h:14
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
Log< level::Warning, false > LogWarning
Definition: TkAlStyle.h:43
edm::Ptr< PFCandidate > PFCandidatePtr
persistent Ptr to a PFCandidate
value_type const * get() const
Definition: RefToBase.h:216
static std::string const source
Definition: EdmProvDump.cc:49
void setP4(const LorentzVector &p4) final
set 4-momentum
def move(src, dest)
Definition: eostools.py:511