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 
178 
180 const reco::GenJet * Jet::genJet() const {
181  if (genJet_.size()) return &(genJet_.front());
182  else if ( genJetRef_.size() ) return genJetRef_[0].get();
183  else return genJetFwdRef_.get();
184 }
185 
187 int Jet::partonFlavour() const {
189 }
190 
192 int Jet::hadronFlavour() const {
194 }
195 
198  return jetFlavourInfo_;
199 }
200 
202 
203 // initialize the jet to a given JEC level during creation starting from Uncorrected
204 void Jet::initializeJEC(unsigned int level, const JetCorrFactors::Flavor& flavor, unsigned int set)
205 {
206  currentJECSet(set);
207  currentJECLevel(level);
208  currentJECFlavor(flavor);
209  setP4(jec_[set].correction(level, flavor)*p4());
210 }
211 
213 int Jet::jecSet(const std::string& set) const
214 {
215  for(std::vector<pat::JetCorrFactors>::const_iterator corrFactor=jec_.begin(); corrFactor!=jec_.end(); ++corrFactor)
216  if( corrFactor->jecSet()==set ){ return (corrFactor-jec_.begin()); }
217  return -1;
218 }
219 
221 const std::vector<std::string> Jet::availableJECSets() const
222 {
223  std::vector<std::string> sets;
224  for(std::vector<pat::JetCorrFactors>::const_iterator corrFactor=jec_.begin(); corrFactor!=jec_.end(); ++corrFactor)
225  sets.push_back(corrFactor->jecSet());
226  return sets;
227 }
228 
229 const std::vector<std::string> Jet::availableJECLevels(const int& set) const
230 {
231  return set>=0 ? jec_.at(set).correctionLabels() : std::vector<std::string>();
232 }
233 
236 float Jet::jecFactor(const std::string& level, const std::string& flavor, const std::string& set) const
237 {
238  for(unsigned int idx=0; idx<jec_.size(); ++idx){
239  if(set.empty() || jec_.at(idx).jecSet()==set){
240  if(jec_[idx].jecLevel(level)>=0){
241  return jecFactor(jec_[idx].jecLevel(level), jec_[idx].jecFlavor(flavor), idx);
242  }
243  else{
244  throw cms::Exception("InvalidRequest") << "This JEC level " << level << " does not exist. \n";
245  }
246  }
247  }
248  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n"
249  << "for a jet energy correction set with label " << set << "\n";
250 }
251 
254 float Jet::jecFactor(const unsigned int& level, const JetCorrFactors::Flavor& flavor, const unsigned int& set) const
255 {
256  if(!jecSetsAvailable()){
257  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n";
258  }
259  if(!jecSetAvailable(set)){
260  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n"
261  << "for a jet energy correction set with index " << set << "\n";
262  }
263  return jec_.at(set).correction(level, flavor)/jec_.at(currentJECSet_).correction(currentJECLevel_, currentJECFlavor_);
264 }
265 
268 Jet Jet::correctedJet(const std::string& level, const std::string& flavor, const std::string& set) const
269 {
270  // rescale p4 of the jet; the update of current values is
271  // done within the called jecFactor function
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 correctedJet(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 JEC set " << set << " does not exist. \n";
283 }
284 
287 Jet Jet::correctedJet(const unsigned int& level, const JetCorrFactors::Flavor& flavor, const unsigned int& set) const
288 {
289  Jet correctedJet(*this);
290  //rescale p4 of the jet
291  correctedJet.setP4(jecFactor(level, flavor, set)*p4());
292  // update current level, flavor and set
293  correctedJet.currentJECSet(set); correctedJet.currentJECLevel(level); correctedJet.currentJECFlavor(flavor);
294  return correctedJet;
295 }
296 
297 
299 
300 const std::vector<std::pair<std::string, float> > & Jet::getPairDiscri() const {
301  return pairDiscriVector_;
302 }
303 
305 float Jet::bDiscriminator(const std::string & aLabel) const {
306  float discriminator = -1000.;
307  const std::string & theLabel = ((aLabel == "" || aLabel == "default")) ? "trackCountingHighEffBJetTags" : aLabel;
308  for(unsigned int i=0; i!=pairDiscriVector_.size(); i++){
309  if(pairDiscriVector_[i].first == theLabel){
310  discriminator = pairDiscriVector_[i].second;
311  }
312  }
313  return discriminator;
314 }
315 
317  std::vector<std::string>::const_iterator it = std::find(tagInfoLabels_.begin(), tagInfoLabels_.end(), label);
318  if (it != tagInfoLabels_.end()) {
319  if ( tagInfosFwdPtr_.size() > 0 ) return tagInfosFwdPtr_[it - tagInfoLabels_.begin()].get();
320  else if ( tagInfos_.size() > 0 ) return & tagInfos_[it - tagInfoLabels_.begin()];
321  return 0;
322  }
323  return 0;
324 }
325 
326 
327 template<typename T>
328 const T * Jet::tagInfoByType() const {
329  // First check the factorized PAT version
330  for (size_t i = 0, n = tagInfosFwdPtr_.size(); i < n; ++i) {
332  reco::BaseTagInfo const * baseTagInfo = val.get();
333  if ( typeid(*baseTagInfo) == typeid(T) ) {
334  return static_cast<const T *>( baseTagInfo );
335  }
336  }
337  // Then check compatibility version
338  for (size_t i = 0, n = tagInfos_.size(); i < n; ++i) {
340  reco::BaseTagInfo const * baseTagInfo = &val;
341  if ( typeid(*baseTagInfo) == typeid(T) ) {
342  return static_cast<const T *>( baseTagInfo );
343  }
344  }
345  return 0;
346 }
347 
348 
349 
350 const reco::TrackIPTagInfo *
352  return (label.empty() ? tagInfoByType<reco::TrackIPTagInfo>()
353  : dynamic_cast<const reco::TrackIPTagInfo *>(tagInfo(label)) );
354 }
355 
358  return (label.empty() ? tagInfoByType<reco::SoftLeptonTagInfo>()
359  : dynamic_cast<const reco::SoftLeptonTagInfo *>(tagInfo(label)) );
360 }
361 
364  return (label.empty() ? tagInfoByType<reco::SecondaryVertexTagInfo>()
365  : dynamic_cast<const reco::SecondaryVertexTagInfo *>(tagInfo(label)) );
366 }
367 
368 void
371  std::string::size_type idx = label.find("TagInfos");
372  if (idx == std::string::npos) {
373  tagInfoLabels_.push_back(label);
374  } else {
375  tagInfoLabels_.push_back(label.substr(0,idx));
376  }
377  tagInfosFwdPtr_.push_back(info);
378 }
379 
380 
381 
383 float Jet::jetCharge() const {
384  return jetCharge_;
385 }
386 
389  return associatedTracks_;
390 }
391 
395 }
396 
399  caloTowersFwdPtr_.reserve(caloTowers.size());
400  for(auto const& tower : caloTowers) {
401  caloTowersFwdPtr_.push_back( tower );
402  }
403  embeddedCaloTowers_ = true;
404  caloTowersTemp_.reset();
405 }
406 
407 
410  pfCandidatesFwdPtr_.reserve(pfCandidates.size());
411  for(auto const& cand : pfCandidates) {
412  pfCandidatesFwdPtr_.push_back(cand);
413  }
414  embeddedPFCandidates_ = true;
416 }
417 
418 
421 {
422  genJetFwdRef_ = gj;
423 }
424 
425 
426 
428 void Jet::setPartonFlavour(int partonFl) {
430 }
431 
433 void Jet::setHadronFlavour(int hadronFl) {
435 }
436 
438 void Jet::setJetFlavourInfo(const reco::JetFlavourInfo & jetFlavourInfo) {
440 }
441 
443 void Jet::addBDiscriminatorPair(const std::pair<std::string, float> & thePair) {
444  pairDiscriVector_.push_back(thePair);
445 }
446 
448 void Jet::setJetCharge(float jetCharge) {
450 }
451 
452 
453 
455 void Jet::cacheCaloTowers() const {
456  // Clear the cache
457  // Here is where we've embedded constituents
458  std::unique_ptr<std::vector<CaloTowerPtr>> caloTowersTemp{ new std::vector<CaloTowerPtr>{}};
459  if ( embeddedCaloTowers_ ) {
460  // Refactorized PAT access
461  if ( caloTowersFwdPtr_.size() > 0 ) {
462  caloTowersTemp->reserve(caloTowersFwdPtr_.size());
463  for ( CaloTowerFwdPtrVector::const_iterator ibegin=caloTowersFwdPtr_.begin(),
464  iend = caloTowersFwdPtr_.end(),
465  icalo = ibegin;
466  icalo != iend; ++icalo ) {
467  caloTowersTemp->emplace_back( icalo->ptr() );
468  }
469  }
470  // Compatibility access
471  else if ( caloTowers_.size() > 0 ) {
472  caloTowersTemp->reserve(caloTowers_.size());
474  iend = caloTowers_.end(),
475  icalo = ibegin;
476  icalo != iend; ++icalo ) {
477  caloTowersTemp->emplace_back( &caloTowers_, icalo - ibegin );
478  }
479  }
480  }
481  // Non-embedded access
482  else {
483  const auto nDaughters = numberOfDaughters();
484  caloTowersTemp->reserve(nDaughters);
485  for ( unsigned fIndex = 0; fIndex < nDaughters; ++fIndex ) {
486  Constituent const & dau = daughterPtr (fIndex);
487  const CaloTower* caloTower = dynamic_cast <const CaloTower*> (dau.get());
488  if (caloTower) {
489  caloTowersTemp->emplace_back( dau.id(), caloTower,dau.key() );
490  }
491  else {
492  throw cms::Exception("Invalid Constituent") << "CaloJet constituent is not of CaloTower type";
493  }
494  }
495  }
496  caloTowersTemp_.set(std::move(caloTowersTemp));
497 }
498 
501 
502  std::unique_ptr<std::vector<reco::PFCandidatePtr>> pfCandidatesTemp{ new std::vector<reco::PFCandidatePtr>{}};
503  // Here is where we've embedded constituents
504  if ( embeddedPFCandidates_ ) {
505  // Refactorized PAT access
506  if ( pfCandidatesFwdPtr_.size() > 0 ) {
507  pfCandidatesTemp->reserve(pfCandidatesFwdPtr_.size());
508  for ( PFCandidateFwdPtrCollection::const_iterator ibegin=pfCandidatesFwdPtr_.begin(),
509  iend = pfCandidatesFwdPtr_.end(),
510  ipf = ibegin;
511  ipf != iend; ++ipf ) {
512  pfCandidatesTemp->emplace_back( ipf->ptr() );
513  }
514  }
515  // Compatibility access
516  else if ( pfCandidates_.size() > 0 ) {
517  pfCandidatesTemp->reserve(pfCandidates_.size());
518  for ( reco::PFCandidateCollection::const_iterator ibegin=pfCandidates_.begin(),
519  iend = pfCandidates_.end(),
520  ipf = ibegin;
521  ipf != iend; ++ipf ) {
522  pfCandidatesTemp->emplace_back( &pfCandidates_, ipf - ibegin );
523  }
524  }
525  }
526  // Non-embedded access
527  else {
528  const auto nDaughters = numberOfDaughters();
529  pfCandidatesTemp->reserve(nDaughters);
530  for ( unsigned fIndex = 0; fIndex < nDaughters; ++fIndex ) {
531  Constituent const & dau = daughterPtr (fIndex);
532  const reco::PFCandidate* pfCandidate = dynamic_cast <const reco::PFCandidate*> (dau.get());
533  if (pfCandidate) {
534  pfCandidatesTemp->emplace_back( dau.id(), pfCandidate,dau.key() );
535  }
536  else {
537  throw cms::Exception("Invalid Constituent") << "PFJet constituent is not of PFCandidate type";
538  }
539  }
540  }
541  // Set the cache
542  pfCandidatesTemp_.set(std::move(pfCandidatesTemp));
543 }
type
Definition: HCALResponse.h:21
virtual double energy() const GCC11_FINAL
energy
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:420
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:236
int i
Definition: DBlmapReader.cc:9
const reco::SecondaryVertexTagInfo * tagInfoSecondaryVertex(const std::string &label="") const
Definition: Jet.cc:363
reco::GenJetRefVector genJetRef_
Definition: Jet.h:522
CaloTowerFwdPtrVector caloTowersFwdPtr_
Definition: Jet.h:510
const std::vector< std::string > availableJECLevels(const int &set=0) const
Definition: Jet.cc:229
static const TGPicture * info(bool iBackgroundIsBlack)
bool jecSetsAvailable() const
Definition: Jet.h:119
Jets made from CaloTowers.
Definition: CaloJet.h:29
reco::TrackRefVector associatedTracks_
Definition: Jet.h:552
reco::PFCandidateCollection pfCandidates_
Definition: Jet.h:515
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
std::vector< std::pair< std::string, float > > pairDiscriVector_
Definition: Jet.h:543
const reco::GenJet * genJet() const
return the matched generated jet
Definition: Jet.cc:180
CandidatePtr daughterPtr(size_type i) const
reference to daughter at given position
const Specific & getSpecific() const
block accessors
Definition: JPTJet.h:133
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:268
void setHadronFlavour(const int hadronFlavour)
Set the hadron-based flavour.
TagInfoFwdPtrCollection tagInfosFwdPtr_
Definition: Jet.h:546
edm::FwdRef< reco::GenJetCollection > genJetFwdRef_
Definition: Jet.h:523
size_type size() const
Definition: OwnVector.h:247
std::vector< CaloTower >::const_iterator const_iterator
void setJetFlavourInfo(const reco::JetFlavourInfo &jetFlavourInfo)
method to set the JetFlavourInfo of the jet
Definition: Jet.cc:438
void cacheCaloTowers() const
cache calo towers
Definition: Jet.cc:455
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:398
const reco::TrackIPTagInfo * tagInfoTrackIP(const std::string &label="") const
Definition: Jet.cc:351
const reco::TrackRefVector & associatedTracks() const
method to return a vector of refs to the tracks associated to this jet
Definition: Jet.cc:388
edm::AtomicPtrCache< std::vector< CaloTowerPtr > > caloTowersTemp_
Definition: Jet.h:508
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:328
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:369
bool isAvailable() const
Definition: RefToBase.h:112
std::vector< PFSpecific > specificPF_
Definition: Jet.h:558
std::vector< PFCandidatePtr > pfCandidates(const PFJet &jet, int particleId, bool sort=true)
daughters dau
collection of references to daughters
edm::OwnVector< reco::BaseTagInfo > tagInfos_
Definition: Jet.h:545
int hadronFlavour() const
return the hadron-based flavour of the jet
Definition: Jet.cc:192
const reco::JetFlavourInfo & jetFlavourInfo() const
return the JetFlavourInfo of the jet
Definition: Jet.cc:197
void setAssociatedTracks(const reco::TrackRefVector &tracks)
method to set the vector of refs to the tracks associated to this jet
Definition: Jet.cc:393
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
reco::JetFlavourInfo jetFlavourInfo_
Definition: Jet.h:524
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:71
std::vector< CaloSpecific > specificCalo_
Definition: Jet.h:556
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:204
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:536
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:305
Class storing the jet flavour information.
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:213
bool embeddedCaloTowers_
Definition: Jet.h:507
Jets made from MC generator particles.
Definition: GenJet.h:24
const reco::BaseTagInfo * tagInfo(const std::string &label) const
Definition: Jet.cc:316
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:428
bool first
Definition: L1TdeRCT.cc:79
Container::value_type value_type
int partonFlavour() const
return the parton-based flavour of the jet
Definition: Jet.cc:187
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:531
Jet()
default constructor
Definition: Jet.cc:12
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
std::vector< std::string > tagInfoLabels_
Definition: Jet.h:544
float jetCharge_
Definition: Jet.h:551
tuple out
Definition: dbtoconf.py:99
const_iterator end() const
const reco::SoftLeptonTagInfo * tagInfoSoftLepton(const std::string &label="") const
Definition: Jet.cc:357
key_type key() const
Definition: Ptr.h:169
void setJetCharge(float jetCharge)
method to set the jet charge
Definition: Jet.cc:448
virtual size_t numberOfDaughters() const
Definition: Jet.h:441
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:557
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:443
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
CaloTowerCollection caloTowers_
Definition: Jet.h:509
const std::vector< std::string > availableJECSets() const
-— methods for jet corrections -—
Definition: Jet.cc:221
void cachePFCandidates() const
method to cache the constituents to allow &quot;user-friendly&quot; access
Definition: Jet.cc:500
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:38
reco::PFCandidateFwdPtrVector pfCandidatesFwdPtr_
Definition: Jet.h:516
size_type size() const
virtual void setP4(const LorentzVector &p4) GCC11_FINAL
set 4-momentum
void setPFCandidates(const PFCandidateFwdPtrCollection &pfCandidates)
method to store the PFCandidate constituents internally
Definition: Jet.cc:409
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:534
std::vector< reco::GenJet > genJet_
Definition: Jet.h:521
void setHadronFlavour(int hadronFl)
method to set the hadron-based flavour of the jet
Definition: Jet.cc:433
edm::AtomicPtrCache< std::vector< reco::PFCandidatePtr > > pfCandidatesTemp_
Definition: Jet.h:514
virtual float pt() const GCC11_FINAL
transverse momentum
long double T
edm::Ptr< PFCandidate > PFCandidatePtr
persistent Ptr to a PFCandidate
bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:279
JetCorrFactors::Flavor currentJECFlavor_
Definition: Jet.h:539
bool embeddedPFCandidates_
Definition: Jet.h:513
static std::string const source
Definition: EdmProvDump.cc:43
value_type const * get() const
Definition: RefToBase.h:212
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:300
float jetCharge() const
method to return the JetCharge computed when creating the Jet
Definition: Jet.cc:383
bool jecSetAvailable(const std::string &set) const
Definition: Jet.h:122
const Specific & getSpecific() const
Definition: CaloJet.h:149