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