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  }
253  setP4(p4() * fScale);
254 }
255 
256 // initialize the jet to a given JEC level during creation starting from Uncorrected
257 void Jet::initializeJEC(unsigned int level, const JetCorrFactors::Flavor& flavor, unsigned int set) {
258  currentJECSet(set);
259  currentJECLevel(level);
260  currentJECFlavor(flavor);
261  setP4(jec_[set].correction(level, flavor) * p4());
262 }
263 
265 int Jet::jecSet(const std::string& set) const {
266  for (std::vector<pat::JetCorrFactors>::const_iterator corrFactor = jec_.begin(); corrFactor != jec_.end();
267  ++corrFactor)
268  if (corrFactor->jecSet() == set) {
269  return (corrFactor - jec_.begin());
270  }
271  return -1;
272 }
273 
275 const std::vector<std::string> Jet::availableJECSets() const {
276  std::vector<std::string> sets;
277  for (std::vector<pat::JetCorrFactors>::const_iterator corrFactor = jec_.begin(); corrFactor != jec_.end();
278  ++corrFactor)
279  sets.push_back(corrFactor->jecSet());
280  return sets;
281 }
282 
283 const std::vector<std::string> Jet::availableJECLevels(const int& set) const {
284  return set >= 0 ? jec_.at(set).correctionLabels() : std::vector<std::string>();
285 }
286 
289 float Jet::jecFactor(const std::string& level, const std::string& flavor, const std::string& set) const {
290  for (unsigned int idx = 0; idx < jec_.size(); ++idx) {
291  if (set.empty() || jec_.at(idx).jecSet() == set) {
292  if (jec_[idx].jecLevel(level) >= 0) {
293  return jecFactor(jec_[idx].jecLevel(level), jec_[idx].jecFlavor(flavor), idx);
294  } else {
295  throw cms::Exception("InvalidRequest") << "This JEC level " << level << " does not exist. \n";
296  }
297  }
298  }
299  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n"
300  << "for a jet energy correction set with label " << set << "\n";
301 }
302 
305 float Jet::jecFactor(const unsigned int& level, const JetCorrFactors::Flavor& flavor, const unsigned int& set) const {
306  if (!jecSetsAvailable()) {
307  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n";
308  }
309  if (!jecSetAvailable(set)) {
310  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n"
311  << "for a jet energy correction set with index " << set << "\n";
312  }
313  return jec_.at(set).correction(level, flavor) /
314  jec_.at(currentJECSet_).correction(currentJECLevel_, currentJECFlavor_);
315 }
316 
319 Jet Jet::correctedJet(const std::string& level, const std::string& flavor, const std::string& set) const {
320  // rescale p4 of the jet; the update of current values is
321  // done within the called jecFactor function
322  for (unsigned int idx = 0; idx < jec_.size(); ++idx) {
323  if (set.empty() || jec_.at(idx).jecSet() == set) {
324  if (jec_[idx].jecLevel(level) >= 0) {
325  return correctedJet(jec_[idx].jecLevel(level), jec_[idx].jecFlavor(flavor), idx);
326  } else {
327  throw cms::Exception("InvalidRequest") << "This JEC level " << level << " does not exist. \n";
328  }
329  }
330  }
331  throw cms::Exception("InvalidRequest") << "This JEC set " << set << " does not exist. \n";
332 }
333 
336 Jet Jet::correctedJet(const unsigned int& level, const JetCorrFactors::Flavor& flavor, const unsigned int& set) const {
337  Jet correctedJet(*this);
338  //rescale p4 of the jet
339  correctedJet.setP4(jecFactor(level, flavor, set) * p4());
340  // update current level, flavor and set
341  correctedJet.currentJECSet(set);
342  correctedJet.currentJECLevel(level);
343  correctedJet.currentJECFlavor(flavor);
344  return correctedJet;
345 }
346 
348 
349 const std::vector<std::pair<std::string, float>>& Jet::getPairDiscri() const { return pairDiscriVector_; }
350 
352 float Jet::bDiscriminator(const std::string& aLabel) const {
353  float discriminator = -1000.;
354  for (int i = (int(pairDiscriVector_.size()) - 1); i >= 0; i--) {
355  if (pairDiscriVector_[i].first == aLabel) {
356  discriminator = pairDiscriVector_[i].second;
357  break;
358  }
359  }
360  return discriminator;
361 }
362 
363 const reco::BaseTagInfo* Jet::tagInfo(const std::string& label) const {
364  for (int i = (int(tagInfoLabels_.size()) - 1); i >= 0; i--) {
365  if (tagInfoLabels_[i] == label) {
366  if (!tagInfosFwdPtr_.empty())
367  return tagInfosFwdPtr_[i].get();
368  else if (!tagInfos_.empty())
369  return &tagInfos_[i];
370  return nullptr;
371  }
372  }
373  return nullptr;
374 }
375 
376 const reco::CandIPTagInfo* Jet::tagInfoCandIP(const std::string& label) const {
377  return tagInfoByTypeOrLabel<reco::CandIPTagInfo>(label);
378 }
379 
380 const reco::TrackIPTagInfo* Jet::tagInfoTrackIP(const std::string& label) const {
381  return tagInfoByTypeOrLabel<reco::TrackIPTagInfo>(label);
382 }
383 
384 const reco::CandSoftLeptonTagInfo* Jet::tagInfoCandSoftLepton(const std::string& label) const {
385  return tagInfoByTypeOrLabel<reco::CandSoftLeptonTagInfo>(label);
386 }
387 
388 const reco::SoftLeptonTagInfo* Jet::tagInfoSoftLepton(const std::string& label) const {
389  return tagInfoByTypeOrLabel<reco::SoftLeptonTagInfo>(label);
390 }
391 
392 const reco::CandSecondaryVertexTagInfo* Jet::tagInfoCandSecondaryVertex(const std::string& label) const {
393  return tagInfoByTypeOrLabel<reco::CandSecondaryVertexTagInfo>(label);
394 }
395 
396 const reco::SecondaryVertexTagInfo* Jet::tagInfoSecondaryVertex(const std::string& label) const {
397  return tagInfoByTypeOrLabel<reco::SecondaryVertexTagInfo>(label);
398 }
399 
400 const reco::BoostedDoubleSVTagInfo* Jet::tagInfoBoostedDoubleSV(const std::string& label) const {
401  return tagInfoByTypeOrLabel<reco::BoostedDoubleSVTagInfo>(label);
402 }
403 
404 const reco::PixelClusterTagInfo* Jet::tagInfoPixelCluster(const std::string& label) const {
405  return tagInfoByTypeOrLabel<reco::PixelClusterTagInfo>(label);
406 }
407 
408 void Jet::addTagInfo(const std::string& label, const TagInfoFwdPtrCollection::value_type& info) {
409  std::string::size_type idx = label.find("TagInfos");
410  if (idx == std::string::npos) {
411  tagInfoLabels_.push_back(label);
412  } else {
413  tagInfoLabels_.push_back(label.substr(0, idx));
414  }
415  tagInfosFwdPtr_.push_back(info);
416 }
417 
419 float Jet::jetCharge() const { return jetCharge_; }
420 
422 const reco::TrackRefVector& Jet::associatedTracks() const { return associatedTracks_; }
423 
425 void Jet::setAssociatedTracks(const reco::TrackRefVector& tracks) { associatedTracks_ = tracks; }
426 
428 void Jet::setCaloTowers(const CaloTowerFwdPtrCollection& caloTowers) {
429  caloTowersFwdPtr_.reserve(caloTowers.size());
430  for (auto const& tower : caloTowers) {
431  caloTowersFwdPtr_.push_back(tower);
432  }
433  embeddedCaloTowers_ = true;
434  caloTowersTemp_.reset();
435 }
436 
438 void Jet::setPFCandidates(const PFCandidateFwdPtrCollection& pfCandidates) {
439  pfCandidatesFwdPtr_.reserve(pfCandidates.size());
440  for (auto const& cand : pfCandidates) {
441  pfCandidatesFwdPtr_.push_back(cand);
442  }
443  embeddedPFCandidates_ = true;
444  pfCandidatesTemp_.reset();
445 }
446 
448 void Jet::setGenJetRef(const edm::FwdRef<reco::GenJetCollection>& gj) { genJetFwdRef_ = gj; }
449 
451 void Jet::setPartonFlavour(int partonFl) { jetFlavourInfo_.setPartonFlavour(partonFl); }
452 
454 void Jet::setHadronFlavour(int hadronFl) { jetFlavourInfo_.setHadronFlavour(hadronFl); }
455 
457 void Jet::setJetFlavourInfo(const reco::JetFlavourInfo& jetFlavourInfo) { jetFlavourInfo_ = jetFlavourInfo; }
458 
460 void Jet::addBDiscriminatorPair(const std::pair<std::string, float>& thePair) { pairDiscriVector_.push_back(thePair); }
461 
463 void Jet::setJetCharge(float jetCharge) { jetCharge_ = jetCharge; }
464 
466 void Jet::cacheCaloTowers() const {
467  // Clear the cache
468  // Here is where we've embedded constituents
469  std::unique_ptr<std::vector<CaloTowerPtr>> caloTowersTemp{new std::vector<CaloTowerPtr>{}};
470  if (embeddedCaloTowers_) {
471  // Refactorized PAT access
472  if (!caloTowersFwdPtr_.empty()) {
473  caloTowersTemp->reserve(caloTowersFwdPtr_.size());
474  for (CaloTowerFwdPtrVector::const_iterator ibegin = caloTowersFwdPtr_.begin(),
475  iend = caloTowersFwdPtr_.end(),
476  icalo = ibegin;
477  icalo != iend;
478  ++icalo) {
479  caloTowersTemp->emplace_back(icalo->ptr());
480  }
481  }
482  // Compatibility access
483  else if (!caloTowers_.empty()) {
484  caloTowersTemp->reserve(caloTowers_.size());
485  for (CaloTowerCollection::const_iterator ibegin = caloTowers_.begin(), iend = caloTowers_.end(), icalo = ibegin;
486  icalo != iend;
487  ++icalo) {
488  caloTowersTemp->emplace_back(&caloTowers_, icalo - ibegin);
489  }
490  }
491  }
492  // Non-embedded access
493  else {
494  const auto nDaughters = numberOfDaughters();
495  caloTowersTemp->reserve(nDaughters);
496  for (unsigned fIndex = 0; fIndex < nDaughters; ++fIndex) {
497  Constituent const& dau = daughterPtr(fIndex);
498  const CaloTower* caloTower = dynamic_cast<const CaloTower*>(dau.get());
499  if (caloTower) {
500  caloTowersTemp->emplace_back(dau.id(), caloTower, dau.key());
501  } else {
502  throw cms::Exception("Invalid Constituent") << "CaloJet constituent is not of CaloTower type";
503  }
504  }
505  }
506  caloTowersTemp_.set(std::move(caloTowersTemp));
507 }
508 
510 void Jet::cachePFCandidates() const {
511  std::unique_ptr<std::vector<reco::PFCandidatePtr>> pfCandidatesTemp{new std::vector<reco::PFCandidatePtr>{}};
512  // Here is where we've embedded constituents
513  if (embeddedPFCandidates_) {
514  // Refactorized PAT access
515  if (!pfCandidatesFwdPtr_.empty()) {
516  pfCandidatesTemp->reserve(pfCandidatesFwdPtr_.size());
517  for (PFCandidateFwdPtrCollection::const_iterator ibegin = pfCandidatesFwdPtr_.begin(),
518  iend = pfCandidatesFwdPtr_.end(),
519  ipf = ibegin;
520  ipf != iend;
521  ++ipf) {
522  pfCandidatesTemp->emplace_back(ipf->ptr());
523  }
524  }
525  // Compatibility access
526  else if (!pfCandidates_.empty()) {
527  pfCandidatesTemp->reserve(pfCandidates_.size());
528  for (reco::PFCandidateCollection::const_iterator ibegin = pfCandidates_.begin(),
529  iend = pfCandidates_.end(),
530  ipf = ibegin;
531  ipf != iend;
532  ++ipf) {
533  pfCandidatesTemp->emplace_back(&pfCandidates_, ipf - ibegin);
534  }
535  }
536  }
537  // Non-embedded access
538  else {
539  const auto nDaughters = numberOfDaughters();
540  pfCandidatesTemp->reserve(nDaughters);
541  for (unsigned fIndex = 0; fIndex < nDaughters; ++fIndex) {
542  Constituent const& dau = daughterPtr(fIndex);
543  const reco::PFCandidate* pfCandidate = dynamic_cast<const reco::PFCandidate*>(dau.get());
544  if (pfCandidate) {
545  pfCandidatesTemp->emplace_back(dau.id(), pfCandidate, dau.key());
546  } else {
547  throw cms::Exception("Invalid Constituent") << "PFJet constituent is not of PFCandidate type";
548  }
549  }
550  }
551  // Set the cache
552  pfCandidatesTemp_.set(std::move(pfCandidatesTemp));
553 }
554 
556 void Jet::cacheDaughters() const {
557  // Jets in MiniAOD produced via JetSubstructurePacker contain a mixture of subjets and particles as daughters
558  std::unique_ptr<std::vector<reco::CandidatePtr>> daughtersTemp{new std::vector<reco::CandidatePtr>{}};
559  const std::vector<reco::CandidatePtr>& jdaus = reco::Jet::daughterPtrVector();
560  for (const reco::CandidatePtr& dau : jdaus) {
561  if (dau->isJet()) {
562  const reco::Jet* subjet = dynamic_cast<const reco::Jet*>(&*dau);
563  if (subjet) {
564  const std::vector<reco::CandidatePtr>& sjdaus = subjet->daughterPtrVector();
565  daughtersTemp->insert(daughtersTemp->end(), sjdaus.begin(), sjdaus.end());
566  }
567  } else
568  daughtersTemp->push_back(dau);
569  }
570  daughtersTemp_.set(std::move(daughtersTemp));
571 }
572 
574 pat::JetPtrCollection const& Jet::subjets(unsigned int index) const {
575  if (index < subjetCollections_.size())
576  return subjetCollections_[index];
577  else {
578  throw cms::Exception("OutOfRange") << "Index " << index << " is out of range" << std::endl;
579  }
580 }
581 
583 pat::JetPtrCollection const& Jet::subjets(std::string const& label) const {
584  auto found = find(subjetLabels_.begin(), subjetLabels_.end(), label);
585  if (found != subjetLabels_.end()) {
586  auto index = std::distance(subjetLabels_.begin(), found);
587  return subjetCollections_[index];
588  } else {
589  throw cms::Exception("SubjetsNotFound")
590  << "Label " << label << " does not match any subjet collection" << std::endl;
591  }
592 }
593 
595 void Jet::addSubjets(pat::JetPtrCollection const& pieces, std::string const& label) {
596  subjetCollections_.push_back(pieces);
597  subjetLabels_.push_back(label);
598 }
type
Definition: HCALResponse.h:21
value_type const * get() const
Definition: RefToBase.h:209
Jet()
default constructor
static const TGPicture * info(bool iBackgroundIsBlack)
double eta() const final
momentum pseudorapidity
Jets made from CaloTowers.
Definition: CaloJet.h:27
virtual void scaleEnergy(double fScale)
scale energy of the jet
bool isAvailable() const
Definition: RefToBase.h:119
const Specific & getSpecific() const
block accessors
Definition: JPTJet.h:136
Base class for all types of Jets.
Definition: Jet.h:20
std::vector< CaloTower >::const_iterator const_iterator
double pt() const final
transverse momentum
bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:301
const edm::RefToBase< reco::Jet > & getCaloJetRef() const
Definition: JPTJet.h:133
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
uint16_t size_type
Jets made from PFObjects.
Definition: PFJet.h:20
ProductID id() const
Definition: RefToBase.h:214
virtual const daughters & daughterPtrVector() const
references to daughtes
Definition: HeavyIon.h:7
size_t numberOfDaughters() const override
number of daughters
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
size_t key() const
Definition: RefToBase.h:219
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.
double energy() const final
energy
T get() const
get a component
Jets made from MC generator particles.
Definition: GenJet.h:23
const LorentzVector & p4() const final
four-momentum Lorentz vector
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
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
virtual CandidatePtr daughterPtr(size_type i) const
reference to daughter at given position
std::vector< edm::FwdPtr< CaloTower > > CaloTowerFwdPtrCollection
Definition: Jet.h:74
std::vector< edm::FwdPtr< reco::PFCandidate > > PFCandidateFwdPtrCollection
Definition: Jet.h:73
hadronFlavour
Definition: jets_cff.py:476
Analysis-level calorimeter jet class.
Definition: Jet.h:77
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:40
fixed size matrix
partonFlavour
Definition: jets_cff.py:475
Jet()
Default constructor.
Definition: Jet.h:36
Templated PAT object container.
Definition: PATObject.h:48
edm::Ptr< CaloTower > CaloTowerPtr
Definition: CaloTowerDefs.h:14
edm::Ptr< PFCandidate > PFCandidatePtr
persistent Ptr to a PFCandidate
double phi() const final
momentum azimuthal angle
static std::string const source
Definition: EdmProvDump.cc:47
void setP4(const LorentzVector &p4) final
set 4-momentum
def move(src, dest)
Definition: eostools.py:511
const Specific & getSpecific() const
Definition: CaloJet.h:143
const Specific & getSpecific() const
Definition: GenJet.h:118