CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Jet.cc
Go to the documentation of this file.
1 //
2 //
3 
8 
9 using namespace pat;
10 
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 
42  PATObject<reco::Jet>(aJetRef),
43  embeddedCaloTowers_(false),
44  embeddedPFCandidates_(false),
45  jetCharge_(0.0)
46 {
47  tryImportSpecific(*aJetRef);
48 }
49 
50 std::ostream&
51 reco::operator<<(std::ostream& out, const pat::Jet& obj)
52 {
53  if(!out) return out;
54 
55  out << "\tpat::Jet: ";
56  out << std::setiosflags(std::ios::right);
57  out << std::setiosflags(std::ios::fixed);
58  out << std::setprecision(3);
59  out << " E/pT/eta/phi "
60  << obj.energy()<<"/"
61  << obj.pt()<<"/"
62  << obj.eta()<<"/"
63  << obj.phi();
64  return out;
65 }
66 
69 {
70  const std::type_info & type = typeid(source);
71  if( type == typeid(reco::CaloJet) ){
72  specificCalo_.push_back( (static_cast<const reco::CaloJet&>(source)).getSpecific() );
73  } else if( type == typeid(reco::JPTJet) ){
74  reco::JPTJet const & jptJet = static_cast<reco::JPTJet const &>(source);
75  specificJPT_.push_back( jptJet.getSpecific() );
76  reco::CaloJet const * caloJet = 0;
77  if ( jptJet.getCaloJetRef().isNonnull() && jptJet.getCaloJetRef().isAvailable() ) {
78  caloJet = dynamic_cast<reco::CaloJet const *>( jptJet.getCaloJetRef().get() );
79  }
80  if ( caloJet != 0 ) {
81  specificCalo_.push_back( caloJet->getSpecific() );
82  }
83  else {
84  edm::LogWarning("OptionalProductNotFound") << " in pat::Jet, Attempted to add Calo Specifics to JPT Jets, but failed."
85  << " Jet ID for JPT Jets will not be available for you." << std::endl;
86  }
87  } else if( type == typeid(reco::PFJet) ){
88  specificPF_.push_back( (static_cast<const reco::PFJet&>(source)).getSpecific() );
89  }
90 }
91 
94 }
95 
97 
98 CaloTowerPtr Jet::getCaloConstituent (unsigned fIndex) const {
99  if (embeddedCaloTowers_) {
100  // Refactorized PAT access
101  if ( caloTowersFwdPtr_.size() > 0 ) {
102  return (fIndex < caloTowersFwdPtr_.size() ?
103  caloTowersFwdPtr_[fIndex].ptr() : CaloTowerPtr());
104  }
105  // Compatibility PAT access
106  else {
107  if ( caloTowers_.size() > 0 ) {
108  return (fIndex < caloTowers_.size() ?
109  CaloTowerPtr(&caloTowers_, fIndex) : CaloTowerPtr());
110 
111  }
112  }
113  }
114  // Non-embedded access
115  else {
116  Constituent dau = daughterPtr (fIndex);
117  const CaloTower* caloTower = dynamic_cast <const CaloTower*> (dau.get());
118  if (caloTower != 0) {
119  return CaloTowerPtr(dau.id(), caloTower, dau.key() );
120  }
121  else {
122  throw cms::Exception("Invalid Constituent") << "CaloJet constituent is not of CaloTower type";
123  }
124 
125  }
126 
127  return CaloTowerPtr ();
128 }
129 
130 
131 
132 std::vector<CaloTowerPtr> const & Jet::getCaloConstituents () const {
133  if ( !caloTowersTemp_.isSet() || caloTowers_.size() > 0 ) cacheCaloTowers();
134  return *caloTowersTemp_;
135 }
136 
137 
139 
141  if (embeddedPFCandidates_) {
142  // Refactorized PAT access
143  if ( pfCandidatesFwdPtr_.size() > 0 ) {
144  return (fIndex < pfCandidatesFwdPtr_.size() ?
145  pfCandidatesFwdPtr_[fIndex].ptr() : reco::PFCandidatePtr());
146  }
147  // Compatibility PAT access
148  else {
149  if ( pfCandidates_.size() > 0 ) {
150  return (fIndex < pfCandidates_.size() ?
152 
153  }
154  }
155  }
156  // Non-embedded access
157  else {
158  Constituent dau = daughterPtr (fIndex);
159  const reco::PFCandidate* pfCandidate = dynamic_cast <const reco::PFCandidate*> (dau.get());
160  if (pfCandidate) {
161  return reco::PFCandidatePtr(dau.id(), pfCandidate, dau.key() );
162  }
163  else {
164  throw cms::Exception("Invalid Constituent") << "PFJet constituent is not of PFCandidate type";
165  }
166 
167  }
168 
169  return reco::PFCandidatePtr ();
170 }
171 
172 std::vector<reco::PFCandidatePtr> const & Jet::getPFConstituents () const {
173  if ( !pfCandidatesTemp_.isSet() || pfCandidates_.size() > 0 ) cachePFCandidates();
174  return *pfCandidatesTemp_;
175 }
176 
177 const reco::Candidate * Jet::daughter(size_t i) const {
178  if (isCaloJet() || isJPTJet() ) {
179  if ( embeddedCaloTowers_ ) {
180  if ( caloTowersFwdPtr_.size() > 0 ) return caloTowersFwdPtr_[i].get();
181  else if ( caloTowers_.size() > 0 ) return &caloTowers_[i];
182  else return reco::Jet::daughter(i);
183  }
184  }
185  if (isPFJet()) {
186  if ( embeddedPFCandidates_ ) {
187  if ( pfCandidatesFwdPtr_.size() > 0 ) return pfCandidatesFwdPtr_[i].get();
188  else if ( pfCandidates_.size() > 0 ) return &pfCandidates_[i];
189  else return reco::Jet::daughter(i);
190  }
191  }
192  return reco::Jet::daughter(i);
193 }
194 
195 size_t Jet::numberOfDaughters() const {
196  if (isCaloJet() || isJPTJet()) {
197  if ( embeddedCaloTowers_ ) {
198  if ( caloTowersFwdPtr_.size() > 0 ) return caloTowersFwdPtr_.size();
199  else if ( caloTowers_.size() > 0 ) return caloTowers_.size();
200  else return reco::Jet::numberOfDaughters();
201  }
202  }
203  if (isPFJet()) {
204  if ( embeddedPFCandidates_ ) {
205  if ( pfCandidatesFwdPtr_.size() > 0 ) return pfCandidatesFwdPtr_.size();
206  else if ( pfCandidates_.size() > 0 ) return pfCandidates_.size();
207  else return reco::Jet::numberOfDaughters();
208  }
209  }
211 }
212 
214 const reco::GenJet * Jet::genJet() const {
215  if (genJet_.size()) return &(genJet_.front());
216  else if ( genJetRef_.size() ) return genJetRef_[0].get();
217  else return genJetFwdRef_.get();
218 }
219 
221 int Jet::partonFlavour() const {
223 }
224 
226 int Jet::hadronFlavour() const {
228 }
229 
232  return jetFlavourInfo_;
233 }
234 
236 
237 // initialize the jet to a given JEC level during creation starting from Uncorrected
238 void Jet::initializeJEC(unsigned int level, const JetCorrFactors::Flavor& flavor, unsigned int set)
239 {
240  currentJECSet(set);
241  currentJECLevel(level);
242  currentJECFlavor(flavor);
243  setP4(jec_[set].correction(level, flavor)*p4());
244 }
245 
247 int Jet::jecSet(const std::string& set) const
248 {
249  for(std::vector<pat::JetCorrFactors>::const_iterator corrFactor=jec_.begin(); corrFactor!=jec_.end(); ++corrFactor)
250  if( corrFactor->jecSet()==set ){ return (corrFactor-jec_.begin()); }
251  return -1;
252 }
253 
255 const std::vector<std::string> Jet::availableJECSets() const
256 {
257  std::vector<std::string> sets;
258  for(std::vector<pat::JetCorrFactors>::const_iterator corrFactor=jec_.begin(); corrFactor!=jec_.end(); ++corrFactor)
259  sets.push_back(corrFactor->jecSet());
260  return sets;
261 }
262 
263 const std::vector<std::string> Jet::availableJECLevels(const int& set) const
264 {
265  return set>=0 ? jec_.at(set).correctionLabels() : std::vector<std::string>();
266 }
267 
270 float Jet::jecFactor(const std::string& level, const std::string& flavor, const std::string& set) const
271 {
272  for(unsigned int idx=0; idx<jec_.size(); ++idx){
273  if(set.empty() || jec_.at(idx).jecSet()==set){
274  if(jec_[idx].jecLevel(level)>=0){
275  return jecFactor(jec_[idx].jecLevel(level), jec_[idx].jecFlavor(flavor), idx);
276  }
277  else{
278  throw cms::Exception("InvalidRequest") << "This JEC level " << level << " does not exist. \n";
279  }
280  }
281  }
282  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n"
283  << "for a jet energy correction set with label " << set << "\n";
284 }
285 
288 float Jet::jecFactor(const unsigned int& level, const JetCorrFactors::Flavor& flavor, const unsigned int& set) const
289 {
290  if(!jecSetsAvailable()){
291  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n";
292  }
293  if(!jecSetAvailable(set)){
294  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n"
295  << "for a jet energy correction set with index " << set << "\n";
296  }
297  return jec_.at(set).correction(level, flavor)/jec_.at(currentJECSet_).correction(currentJECLevel_, currentJECFlavor_);
298 }
299 
302 Jet Jet::correctedJet(const std::string& level, const std::string& flavor, const std::string& set) const
303 {
304  // rescale p4 of the jet; the update of current values is
305  // done within the called jecFactor function
306  for(unsigned int idx=0; idx<jec_.size(); ++idx){
307  if(set.empty() || jec_.at(idx).jecSet()==set){
308  if(jec_[idx].jecLevel(level)>=0){
309  return correctedJet(jec_[idx].jecLevel(level), jec_[idx].jecFlavor(flavor), idx);
310  }
311  else{
312  throw cms::Exception("InvalidRequest") << "This JEC level " << level << " does not exist. \n";
313  }
314  }
315  }
316  throw cms::Exception("InvalidRequest") << "This JEC set " << set << " does not exist. \n";
317 }
318 
321 Jet Jet::correctedJet(const unsigned int& level, const JetCorrFactors::Flavor& flavor, const unsigned int& set) const
322 {
323  Jet correctedJet(*this);
324  //rescale p4 of the jet
325  correctedJet.setP4(jecFactor(level, flavor, set)*p4());
326  // update current level, flavor and set
327  correctedJet.currentJECSet(set); correctedJet.currentJECLevel(level); correctedJet.currentJECFlavor(flavor);
328  return correctedJet;
329 }
330 
331 
333 
334 const std::vector<std::pair<std::string, float> > & Jet::getPairDiscri() const {
335  return pairDiscriVector_;
336 }
337 
339 float Jet::bDiscriminator(const std::string & aLabel) const {
340  float discriminator = -1000.;
341  const std::string & theLabel = ((aLabel == "" || aLabel == "default")) ? "trackCountingHighEffBJetTags" : aLabel;
342  for(unsigned int i=0; i!=pairDiscriVector_.size(); i++){
343  if(pairDiscriVector_[i].first == theLabel){
344  discriminator = pairDiscriVector_[i].second;
345  }
346  }
347  return discriminator;
348 }
349 
351  std::vector<std::string>::const_iterator it = std::find(tagInfoLabels_.begin(), tagInfoLabels_.end(), label);
352  if (it != tagInfoLabels_.end()) {
353  if ( tagInfosFwdPtr_.size() > 0 ) return tagInfosFwdPtr_[it - tagInfoLabels_.begin()].get();
354  else if ( tagInfos_.size() > 0 ) return & tagInfos_[it - tagInfoLabels_.begin()];
355  return 0;
356  }
357  return 0;
358 }
359 
360 
361 template<typename T>
362 const T * Jet::tagInfoByType() const {
363  // First check the factorized PAT version
364  for (size_t i = 0, n = tagInfosFwdPtr_.size(); i < n; ++i) {
366  reco::BaseTagInfo const * baseTagInfo = val.get();
367  if ( typeid(*baseTagInfo) == typeid(T) ) {
368  return static_cast<const T *>( baseTagInfo );
369  }
370  }
371  // Then check compatibility version
372  for (size_t i = 0, n = tagInfos_.size(); i < n; ++i) {
374  reco::BaseTagInfo const * baseTagInfo = &val;
375  if ( typeid(*baseTagInfo) == typeid(T) ) {
376  return static_cast<const T *>( baseTagInfo );
377  }
378  }
379  return 0;
380 }
381 
382 
383 
384 const reco::TrackIPTagInfo *
386  return (label.empty() ? tagInfoByType<reco::TrackIPTagInfo>()
387  : dynamic_cast<const reco::TrackIPTagInfo *>(tagInfo(label)) );
388 }
389 
392  return (label.empty() ? tagInfoByType<reco::SoftLeptonTagInfo>()
393  : dynamic_cast<const reco::SoftLeptonTagInfo *>(tagInfo(label)) );
394 }
395 
398  return (label.empty() ? tagInfoByType<reco::SecondaryVertexTagInfo>()
399  : dynamic_cast<const reco::SecondaryVertexTagInfo *>(tagInfo(label)) );
400 }
401 
402 void
405  std::string::size_type idx = label.find("TagInfos");
406  if (idx == std::string::npos) {
407  tagInfoLabels_.push_back(label);
408  } else {
409  tagInfoLabels_.push_back(label.substr(0,idx));
410  }
411  tagInfosFwdPtr_.push_back(info);
412 }
413 
414 
415 
417 float Jet::jetCharge() const {
418  return jetCharge_;
419 }
420 
423  return associatedTracks_;
424 }
425 
429 }
430 
433  caloTowersFwdPtr_.reserve(caloTowers.size());
434  for(auto const& tower : caloTowers) {
435  caloTowersFwdPtr_.push_back( tower );
436  }
437  embeddedCaloTowers_ = true;
438  caloTowersTemp_.reset();
439 }
440 
441 
444  pfCandidatesFwdPtr_.reserve(pfCandidates.size());
445  for(auto const& cand : pfCandidates) {
446  pfCandidatesFwdPtr_.push_back(cand);
447  }
448  embeddedPFCandidates_ = true;
450 }
451 
452 
455 {
456  genJetFwdRef_ = gj;
457 }
458 
459 
460 
462 void Jet::setPartonFlavour(int partonFl) {
464 }
465 
467 void Jet::setHadronFlavour(int hadronFl) {
469 }
470 
472 void Jet::setJetFlavourInfo(const reco::JetFlavourInfo & jetFlavourInfo) {
474 }
475 
477 void Jet::addBDiscriminatorPair(const std::pair<std::string, float> & thePair) {
478  pairDiscriVector_.push_back(thePair);
479 }
480 
482 void Jet::setJetCharge(float jetCharge) {
484 }
485 
486 
487 
489 void Jet::cacheCaloTowers() const {
490  // Clear the cache
491  // Here is where we've embedded constituents
492  std::unique_ptr<std::vector<CaloTowerPtr>> caloTowersTemp{ new std::vector<CaloTowerPtr>{}};
493  if ( embeddedCaloTowers_ ) {
494  // Refactorized PAT access
495  if ( caloTowersFwdPtr_.size() > 0 ) {
496  caloTowersTemp->reserve(caloTowersFwdPtr_.size());
497  for ( CaloTowerFwdPtrVector::const_iterator ibegin=caloTowersFwdPtr_.begin(),
498  iend = caloTowersFwdPtr_.end(),
499  icalo = ibegin;
500  icalo != iend; ++icalo ) {
501  caloTowersTemp->emplace_back( icalo->ptr() );
502  }
503  }
504  // Compatibility access
505  else if ( caloTowers_.size() > 0 ) {
506  caloTowersTemp->reserve(caloTowers_.size());
508  iend = caloTowers_.end(),
509  icalo = ibegin;
510  icalo != iend; ++icalo ) {
511  caloTowersTemp->emplace_back( &caloTowers_, icalo - ibegin );
512  }
513  }
514  }
515  // Non-embedded access
516  else {
517  const auto nDaughters = numberOfDaughters();
518  caloTowersTemp->reserve(nDaughters);
519  for ( unsigned fIndex = 0; fIndex < nDaughters; ++fIndex ) {
520  Constituent const & dau = daughterPtr (fIndex);
521  const CaloTower* caloTower = dynamic_cast <const CaloTower*> (dau.get());
522  if (caloTower) {
523  caloTowersTemp->emplace_back( dau.id(), caloTower,dau.key() );
524  }
525  else {
526  throw cms::Exception("Invalid Constituent") << "CaloJet constituent is not of CaloTower type";
527  }
528  }
529  }
530  caloTowersTemp_.set(std::move(caloTowersTemp));
531 }
532 
535 
536  std::unique_ptr<std::vector<reco::PFCandidatePtr>> pfCandidatesTemp{ new std::vector<reco::PFCandidatePtr>{}};
537  // Here is where we've embedded constituents
538  if ( embeddedPFCandidates_ ) {
539  // Refactorized PAT access
540  if ( pfCandidatesFwdPtr_.size() > 0 ) {
541  pfCandidatesTemp->reserve(pfCandidatesFwdPtr_.size());
542  for ( PFCandidateFwdPtrCollection::const_iterator ibegin=pfCandidatesFwdPtr_.begin(),
543  iend = pfCandidatesFwdPtr_.end(),
544  ipf = ibegin;
545  ipf != iend; ++ipf ) {
546  pfCandidatesTemp->emplace_back( ipf->ptr() );
547  }
548  }
549  // Compatibility access
550  else if ( pfCandidates_.size() > 0 ) {
551  pfCandidatesTemp->reserve(pfCandidates_.size());
552  for ( reco::PFCandidateCollection::const_iterator ibegin=pfCandidates_.begin(),
553  iend = pfCandidates_.end(),
554  ipf = ibegin;
555  ipf != iend; ++ipf ) {
556  pfCandidatesTemp->emplace_back( &pfCandidates_, ipf - ibegin );
557  }
558  }
559  }
560  // Non-embedded access
561  else {
562  const auto nDaughters = numberOfDaughters();
563  pfCandidatesTemp->reserve(nDaughters);
564  for ( unsigned fIndex = 0; fIndex < nDaughters; ++fIndex ) {
565  Constituent const & dau = daughterPtr (fIndex);
566  const reco::PFCandidate* pfCandidate = dynamic_cast <const reco::PFCandidate*> (dau.get());
567  if (pfCandidate) {
568  pfCandidatesTemp->emplace_back( dau.id(), pfCandidate,dau.key() );
569  }
570  else {
571  throw cms::Exception("Invalid Constituent") << "PFJet constituent is not of PFCandidate type";
572  }
573  }
574  }
575  // Set the cache
576  pfCandidatesTemp_.set(std::move(pfCandidatesTemp));
577 }
type
Definition: HCALResponse.h:21
void setPartonFlavour(const int partonFlavour)
Set the parton-based flavour.
void setGenJetRef(const edm::FwdRef< reco::GenJetCollection > &gj)
method to set the matched generated jet reference, embedding if requested
Definition: Jet.cc:454
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:270
int i
Definition: DBlmapReader.cc:9
const reco::SecondaryVertexTagInfo * tagInfoSecondaryVertex(const std::string &label="") const
Definition: Jet.cc:397
reco::GenJetRefVector genJetRef_
Definition: Jet.h:490
CaloTowerFwdPtrVector caloTowersFwdPtr_
Definition: Jet.h:478
const std::vector< std::string > availableJECLevels(const int &set=0) const
Definition: Jet.cc:263
static const TGPicture * info(bool iBackgroundIsBlack)
bool jecSetsAvailable() const
Definition: Jet.h:119
Jets made from CaloTowers.
Definition: CaloJet.h:29
virtual float pt() const
transverse momentum
reco::TrackRefVector associatedTracks_
Definition: Jet.h:520
reco::PFCandidateCollection pfCandidates_
Definition: Jet.h:483
std::vector< std::pair< std::string, float > > pairDiscriVector_
Definition: Jet.h:511
const reco::GenJet * genJet() const
return the matched generated jet
Definition: Jet.cc:214
CandidatePtr daughterPtr(size_type i) const
reference to daughter at given position
const Specific & getSpecific() const
block accessors
Definition: JPTJet.h:133
virtual float phi() const
momentum azimuthal angle
Base class for all types of Jets.
Definition: Jet.h:20
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:302
void setHadronFlavour(const int hadronFlavour)
Set the hadron-based flavour.
TagInfoFwdPtrCollection tagInfosFwdPtr_
Definition: Jet.h:514
edm::FwdRef< reco::GenJetCollection > genJetFwdRef_
Definition: Jet.h:491
size_type size() const
Definition: OwnVector.h:248
std::vector< CaloTower >::const_iterator const_iterator
void setJetFlavourInfo(const reco::JetFlavourInfo &jetFlavourInfo)
method to set the JetFlavourInfo of the jet
Definition: Jet.cc:472
virtual void setP4(const LorentzVector &p4)
set 4-momentum
void cacheCaloTowers() const
cache calo towers
Definition: Jet.cc:489
void tryImportSpecific(const reco::Jet &source)
constructor helper that tries to import the specific info from the source jet
Definition: Jet.cc:68
const edm::RefToBase< reco::Jet > & getCaloJetRef() const
Definition: JPTJet.h:130
virtual ~Jet()
destructor
Definition: Jet.cc:93
void setCaloTowers(const CaloTowerFwdPtrCollection &caloTowers)
method to store the CaloJet constituents internally
Definition: Jet.cc:432
const reco::TrackIPTagInfo * tagInfoTrackIP(const std::string &label="") const
Definition: Jet.cc:385
const reco::TrackRefVector & associatedTracks() const
method to return a vector of refs to the tracks associated to this jet
Definition: Jet.cc:422
edm::AtomicPtrCache< std::vector< CaloTowerPtr > > caloTowersTemp_
Definition: Jet.h:476
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
void reset()
unsets the value and deletes the memory
uint16_t size_type
const T * tagInfoByType() const
Definition: Jet.cc:362
Jets made from PFObjects.
Definition: PFJet.h:21
bool isSet() const
std::vector< reco::PFCandidatePtr > const & getPFConstituents() const
Definition: Jet.cc:172
void addTagInfo(const std::string &label, const TagInfoFwdPtrCollection::value_type &info)
Definition: Jet.cc:403
bool isAvailable() const
Definition: RefToBase.h:112
std::vector< PFSpecific > specificPF_
Definition: Jet.h:526
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
daughters dau
collection of references to daughters
bool isCaloJet() const
check to see if the jet is a reco::CaloJet
Definition: Jet.h:233
edm::OwnVector< reco::BaseTagInfo > tagInfos_
Definition: Jet.h:513
int hadronFlavour() const
return the hadron-based flavour of the jet
Definition: Jet.cc:226
const reco::JetFlavourInfo & jetFlavourInfo() const
return the JetFlavourInfo of the jet
Definition: Jet.cc:231
void setAssociatedTracks(const reco::TrackRefVector &tracks)
method to set the vector of refs to the tracks associated to this jet
Definition: Jet.cc:427
virtual double energy() const
energy
virtual size_t numberOfDaughters() const
number of daughters
reco::JetFlavourInfo jetFlavourInfo_
Definition: Jet.h:492
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:71
std::vector< CaloSpecific > specificCalo_
Definition: Jet.h:524
T const * get() const
Returns C++ pointer to the item.
Definition: Ptr.h:143
void initializeJEC(unsigned int level, const JetCorrFactors::Flavor &flavor=JetCorrFactors::NONE, unsigned int set=0)
initialize the jet to a given JEC level during creation starting from Uncorrected ...
Definition: Jet.cc:238
virtual float eta() const
momentum pseudorapidity
CaloTowerPtr getCaloConstituent(unsigned fIndex) const
convert generic constituent to specific type
Definition: Jet.cc:98
Jets made from CaloJets corrected for ZSP and tracks.
Definition: JPTJet.h:29
unsigned int currentJECLevel_
Definition: Jet.h:504
edm::Ptr< CaloTower > CaloTowerPtr
Definition: CaloTowerFwd.h:12
ProductID id() const
Accessor for product ID.
Definition: Ptr.h:164
T const * get() const
Returns C++ pointer to the item.
Definition: FwdRef.h:157
float bDiscriminator(const std::string &theLabel) const
-— methods for accessing b-tagging info -—
Definition: Jet.cc:339
Class storing the jet flavour information.
virtual const reco::Candidate * daughter(size_t i) const
Definition: Jet.cc:177
int jecSet(const std::string &label) const
return true if this jet carries the jet correction factors of a different set, for systematic studies...
Definition: Jet.cc:247
bool embeddedCaloTowers_
Definition: Jet.h:475
Jets made from MC generator particles.
Definition: GenJet.h:24
const reco::BaseTagInfo * tagInfo(const std::string &label) const
Definition: Jet.cc:350
const int getPartonFlavour() const
Return the parton-based flavour.
void setPartonFlavour(int partonFl)
method to set the parton-based flavour of the jet
Definition: Jet.cc:462
bool first
Definition: L1TdeRCT.cc:75
Container::value_type value_type
int partonFlavour() const
return the parton-based flavour of the jet
Definition: Jet.cc:221
bool isPFJet() const
check to see if the jet is a reco::PFJet
Definition: Jet.h:237
JetCorrFactors::Flavor currentJECFlavor() const
return flavour of the current step of jet energy corrections
Definition: Jet.h:131
std::vector< CaloTowerPtr > const & getCaloConstituents() const
Definition: Jet.cc:132
std::vector< pat::JetCorrFactors > jec_
Definition: Jet.h:499
Jet()
default constructor
Definition: Jet.cc:12
std::vector< std::string > tagInfoLabels_
Definition: Jet.h:512
float jetCharge_
Definition: Jet.h:519
tuple out
Definition: dbtoconf.py:99
const_iterator end() const
bool isJPTJet() const
check to see if the jet is a reco::JPTJet
Definition: Jet.h:235
const reco::SoftLeptonTagInfo * tagInfoSoftLepton(const std::string &label="") const
Definition: Jet.cc:391
key_type key() const
Definition: Ptr.h:169
void setJetCharge(float jetCharge)
method to set the jet charge
Definition: Jet.cc:482
bool set(std::unique_ptr< T > iNewValue) const
tuple tracks
Definition: testEve_cfg.py:39
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
std::vector< edm::FwdPtr< CaloTower > > CaloTowerFwdPtrCollection
Definition: Jet.h:70
std::vector< JPTSpecific > specificJPT_
Definition: Jet.h:525
std::vector< edm::FwdPtr< reco::PFCandidate > > PFCandidateFwdPtrCollection
Definition: Jet.h:69
void addBDiscriminatorPair(const std::pair< std::string, float > &thePair)
method to add a algolabel-discriminator pair
Definition: Jet.cc:477
std::string currentJECLevel() const
return the name of the current step of jet energy corrections
Definition: Jet.h:129
Analysis-level calorimeter jet class.
Definition: Jet.h:73
virtual size_t numberOfDaughters() const
Definition: Jet.cc:195
CaloTowerCollection caloTowers_
Definition: Jet.h:477
const std::vector< std::string > availableJECSets() const
-— methods for jet corrections -—
Definition: Jet.cc:255
void cachePFCandidates() const
method to cache the constituents to allow &quot;user-friendly&quot; access
Definition: Jet.cc:534
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:38
reco::PFCandidateFwdPtrVector pfCandidatesFwdPtr_
Definition: Jet.h:484
size_type size() const
void setPFCandidates(const PFCandidateFwdPtrCollection &pfCandidates)
method to store the PFCandidate constituents internally
Definition: Jet.cc:443
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
Templated PAT object container.
Definition: PATObject.h:41
reco::PFCandidatePtr getPFConstituent(unsigned fIndex) const
convert generic constituent to specific type
Definition: Jet.cc:140
const int getHadronFlavour() const
Return the hadron-based flavour.
tuple level
Definition: testEve_cfg.py:34
volatile std::atomic< bool > shutdown_flag false
unsigned int currentJECSet_
Definition: Jet.h:502
std::vector< reco::GenJet > genJet_
Definition: Jet.h:489
void setHadronFlavour(int hadronFl)
method to set the hadron-based flavour of the jet
Definition: Jet.cc:467
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > pfCandidatesTemp_
Definition: Jet.h:482
long double T
edm::Ptr< PFCandidate > PFCandidatePtr
persistent Ptr to a PFCandidate
bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:279
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
JetCorrFactors::Flavor currentJECFlavor_
Definition: Jet.h:507
bool embeddedPFCandidates_
Definition: Jet.h:481
static std::string const source
Definition: EdmProvDump.cc:43
value_type const * get() const
Definition: RefToBase.h:212
virtual const Candidate * daughter(size_type) const
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
std::string currentJECSet() const
returns the label of the current set of jet energy corrections
Definition: Jet.h:127
const_iterator begin() const
const std::vector< std::pair< std::string, float > > & getPairDiscri() const
get vector of paire labelname-disciValue
Definition: Jet.cc:334
float jetCharge() const
method to return the JetCharge computed when creating the Jet
Definition: Jet.cc:417
bool jecSetAvailable(const std::string &set) const
Definition: Jet.h:122
const Specific & getSpecific() const
Definition: CaloJet.h:149