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 // $Id: Jet.cc,v 1.44 2011/06/08 20:40:19 rwolf Exp $
3 //
4 
9 
10 using namespace pat;
11 
14  PATObject<reco::Jet>(reco::Jet()),
15  embeddedCaloTowers_(false),
16  embeddedPFCandidates_(false),
17  partonFlavour_(0),
18  jetCharge_(0.),
19  isCaloTowerCached_(false),
20  isPFCandidateCached_(false)
21 {
22 }
23 
25 Jet::Jet(const reco::Jet & aJet) :
26  PATObject<reco::Jet>(aJet),
27  embeddedCaloTowers_(false),
28  embeddedPFCandidates_(false),
29  partonFlavour_(0),
30  jetCharge_(0.0),
31  isCaloTowerCached_(false),
32  isPFCandidateCached_(false)
33 {
34  tryImportSpecific(aJet);
35 }
36 
38 Jet::Jet(const edm::Ptr<reco::Jet> & aJetRef) :
39  PATObject<reco::Jet>(aJetRef),
40  embeddedCaloTowers_(false),
41  embeddedPFCandidates_(false),
42  partonFlavour_(0),
43  jetCharge_(0.0),
44  isCaloTowerCached_(false),
45  isPFCandidateCached_(false)
46 {
47  tryImportSpecific(*aJetRef);
48 }
49 
52  PATObject<reco::Jet>(aJetRef),
53  embeddedCaloTowers_(false),
54  embeddedPFCandidates_(false),
55  partonFlavour_(0),
56  jetCharge_(0.0),
57  isCaloTowerCached_(false),
58  isPFCandidateCached_(false)
59 {
60  tryImportSpecific(*aJetRef);
61 }
62 
63 std::ostream&
64 reco::operator<<(std::ostream& out, const pat::Jet& obj)
65 {
66  if(!out) return out;
67 
68  out << "\tpat::Jet: ";
69  out << std::setiosflags(std::ios::right);
70  out << std::setiosflags(std::ios::fixed);
71  out << std::setprecision(3);
72  out << " E/pT/eta/phi "
73  << obj.energy()<<"/"
74  << obj.pt()<<"/"
75  << obj.eta()<<"/"
76  << obj.phi();
77  return out;
78 }
79 
82 {
83  const std::type_info & type = typeid(source);
84  if( type == typeid(reco::CaloJet) ){
85  specificCalo_.push_back( (static_cast<const reco::CaloJet&>(source)).getSpecific() );
86  } else if( type == typeid(reco::JPTJet) ){
87  reco::JPTJet const & jptJet = static_cast<reco::JPTJet const &>(source);
88  specificJPT_.push_back( jptJet.getSpecific() );
89  reco::CaloJet const * caloJet = 0;
90  if ( jptJet.getCaloJetRef().isNonnull() && jptJet.getCaloJetRef().isAvailable() ) {
91  caloJet = dynamic_cast<reco::CaloJet const *>( jptJet.getCaloJetRef().get() );
92  }
93  if ( caloJet != 0 ) {
94  specificCalo_.push_back( caloJet->getSpecific() );
95  }
96  else {
97  edm::LogWarning("OptionalProductNotFound") << " in pat::Jet, Attempted to add Calo Specifics to JPT Jets, but failed."
98  << " Jet ID for JPT Jets will not be available for you." << std::endl;
99  }
100  } else if( type == typeid(reco::PFJet) ){
101  specificPF_.push_back( (static_cast<const reco::PFJet&>(source)).getSpecific() );
102  }
103 }
104 
107 }
108 
110 
111 CaloTowerPtr Jet::getCaloConstituent (unsigned fIndex) const {
112  if (embeddedCaloTowers_) {
113  // Refactorized PAT access
114  if ( caloTowersFwdPtr_.size() > 0 ) {
115  return (fIndex < caloTowersFwdPtr_.size() ?
116  caloTowersFwdPtr_[fIndex].ptr() : CaloTowerPtr());
117  }
118  // Compatibility PAT access
119  else {
120  if ( caloTowers_.size() > 0 ) {
121  return (fIndex < caloTowers_.size() ?
122  CaloTowerPtr(&caloTowers_, fIndex) : CaloTowerPtr());
123 
124  }
125  }
126  }
127  // Non-embedded access
128  else {
129  Constituent dau = daughterPtr (fIndex);
130  const CaloTower* caloTower = dynamic_cast <const CaloTower*> (dau.get());
131  if (caloTower != 0) {
132  return CaloTowerPtr(dau.id(), caloTower, dau.key() );
133  }
134  else {
135  throw cms::Exception("Invalid Constituent") << "CaloJet constituent is not of CaloTower type";
136  }
137 
138  }
139 
140  return CaloTowerPtr ();
141 }
142 
143 
144 
145 std::vector<CaloTowerPtr> const & Jet::getCaloConstituents () const {
147  return caloTowersTemp_;
148 }
149 
150 
152 
154  if (embeddedPFCandidates_) {
155  // Refactorized PAT access
156  if ( pfCandidatesFwdPtr_.size() > 0 ) {
157  return (fIndex < pfCandidatesFwdPtr_.size() ?
158  pfCandidatesFwdPtr_[fIndex].ptr() : reco::PFCandidatePtr());
159  }
160  // Compatibility PAT access
161  else {
162  if ( pfCandidates_.size() > 0 ) {
163  return (fIndex < pfCandidates_.size() ?
165 
166  }
167  }
168  }
169  // Non-embedded access
170  else {
171  Constituent dau = daughterPtr (fIndex);
172  const reco::PFCandidate* pfCandidate = dynamic_cast <const reco::PFCandidate*> (dau.get());
173  if (pfCandidate) {
174  return reco::PFCandidatePtr(dau.id(), pfCandidate, dau.key() );
175  }
176  else {
177  throw cms::Exception("Invalid Constituent") << "PFJet constituent is not of PFCandidate type";
178  }
179 
180  }
181 
182  return reco::PFCandidatePtr ();
183 }
184 
185 std::vector<reco::PFCandidatePtr> const & Jet::getPFConstituents () const {
186  if ( !isPFCandidateCached_ || pfCandidates_.size() > 0 ) cachePFCandidates();
187  return pfCandidatesTemp_;
188 }
189 
190 
191 
193 const reco::GenJet * Jet::genJet() const {
194  if (genJet_.size()) return &(genJet_.front());
195  else if ( genJetRef_.size() ) return genJetRef_[0].get();
196  else return genJetFwdRef_.get();
197 }
198 
200 int Jet::partonFlavour() const {
201  return partonFlavour_;
202 }
203 
205 
206 // initialize the jet to a given JEC level during creation starting from Uncorrected
207 void Jet::initializeJEC(unsigned int level, const JetCorrFactors::Flavor& flavor, unsigned int set)
208 {
209  currentJECSet(set);
210  currentJECLevel(level);
211  currentJECFlavor(flavor);
212  setP4(jec_[set].correction(level, flavor)*p4());
213 }
214 
216 int Jet::jecSet(const std::string& set) const
217 {
218  for(std::vector<pat::JetCorrFactors>::const_iterator corrFactor=jec_.begin(); corrFactor!=jec_.end(); ++corrFactor)
219  if( corrFactor->jecSet()==set ){ return (corrFactor-jec_.begin()); }
220  return -1;
221 }
222 
224 const std::vector<std::string> Jet::availableJECSets() const
225 {
226  std::vector<std::string> sets;
227  for(std::vector<pat::JetCorrFactors>::const_iterator corrFactor=jec_.begin(); corrFactor!=jec_.end(); ++corrFactor)
228  sets.push_back(corrFactor->jecSet());
229  return sets;
230 }
231 
232 const std::vector<std::string> Jet::availableJECLevels(const int& set) const
233 {
234  return set>=0 ? jec_.at(set).correctionLabels() : std::vector<std::string>();
235 }
236 
239 float Jet::jecFactor(const std::string& level, const std::string& flavor, const std::string& set) const
240 {
241  for(unsigned int idx=0; idx<jec_.size(); ++idx){
242  if(set.empty() || jec_.at(idx).jecSet()==set){
243  if(jec_[idx].jecLevel(level)>=0){
244  return jecFactor(jec_[idx].jecLevel(level), jec_[idx].jecFlavor(flavor), idx);
245  }
246  else{
247  throw cms::Exception("InvalidRequest") << "This JEC level " << level << " does not exist. \n";
248  }
249  }
250  }
251  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n"
252  << "for a jet energy correction set with label " << set << "\n";
253 }
254 
257 float Jet::jecFactor(const unsigned int& level, const JetCorrFactors::Flavor& flavor, const unsigned int& set) const
258 {
259  if(!jecSetsAvailable()){
260  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n";
261  }
262  if(!jecSetAvailable(set)){
263  throw cms::Exception("InvalidRequest") << "This jet does not carry any jet energy correction factor information \n"
264  << "for a jet energy correction set with index " << set << "\n";
265  }
266  return jec_.at(set).correction(level, flavor)/jec_.at(currentJECSet_).correction(currentJECLevel_, currentJECFlavor_);
267 }
268 
271 Jet Jet::correctedJet(const std::string& level, const std::string& flavor, const std::string& set) const
272 {
273  // rescale p4 of the jet; the update of current values is
274  // done within the called jecFactor function
275  for(unsigned int idx=0; idx<jec_.size(); ++idx){
276  if(set.empty() || jec_.at(idx).jecSet()==set){
277  if(jec_[idx].jecLevel(level)>=0){
278  return correctedJet(jec_[idx].jecLevel(level), jec_[idx].jecFlavor(flavor), idx);
279  }
280  else{
281  throw cms::Exception("InvalidRequest") << "This JEC level " << level << " does not exist. \n";
282  }
283  }
284  }
285  throw cms::Exception("InvalidRequest") << "This JEC set " << set << " does not exist. \n";
286 }
287 
290 Jet Jet::correctedJet(const unsigned int& level, const JetCorrFactors::Flavor& flavor, const unsigned int& set) const
291 {
292  Jet correctedJet(*this);
293  //rescale p4 of the jet
294  correctedJet.setP4(jecFactor(level, flavor, set)*p4());
295  // update current level, flavor and set
296  correctedJet.currentJECSet(set); correctedJet.currentJECLevel(level); correctedJet.currentJECFlavor(flavor);
297  return correctedJet;
298 }
299 
300 
302 
303 const std::vector<std::pair<std::string, float> > & Jet::getPairDiscri() const {
304  return pairDiscriVector_;
305 }
306 
308 float Jet::bDiscriminator(const std::string & aLabel) const {
309  float discriminator = -1000.;
310  const std::string & theLabel = ((aLabel == "" || aLabel == "default")) ? "trackCountingHighEffBJetTags" : aLabel;
311  for(unsigned int i=0; i!=pairDiscriVector_.size(); i++){
312  if(pairDiscriVector_[i].first == theLabel){
313  discriminator = pairDiscriVector_[i].second;
314  }
315  }
316  return discriminator;
317 }
318 
320  std::vector<std::string>::const_iterator it = std::find(tagInfoLabels_.begin(), tagInfoLabels_.end(), label);
321  if (it != tagInfoLabels_.end()) {
322  if ( tagInfosFwdPtr_.size() > 0 ) return tagInfosFwdPtr_[it - tagInfoLabels_.begin()].get();
323  else if ( tagInfos_.size() > 0 ) return & tagInfos_[it - tagInfoLabels_.begin()];
324  return 0;
325  }
326  return 0;
327 }
328 
329 
330 template<typename T>
331 const T * Jet::tagInfoByType() const {
332  // First check the factorized PAT version
333  for (size_t i = 0, n = tagInfosFwdPtr_.size(); i < n; ++i) {
335  reco::BaseTagInfo const * baseTagInfo = val.get();
336  if ( typeid(*baseTagInfo) == typeid(T) ) {
337  return static_cast<const T *>( baseTagInfo );
338  }
339  }
340  // Then check compatibility version
341  for (size_t i = 0, n = tagInfos_.size(); i < n; ++i) {
343  reco::BaseTagInfo const * baseTagInfo = &val;
344  if ( typeid(*baseTagInfo) == typeid(T) ) {
345  return static_cast<const T *>( baseTagInfo );
346  }
347  }
348  return 0;
349 }
350 
351 
352 
353 const reco::TrackIPTagInfo *
355  return (label.empty() ? tagInfoByType<reco::TrackIPTagInfo>()
356  : dynamic_cast<const reco::TrackIPTagInfo *>(tagInfo(label)) );
357 }
358 
361  return (label.empty() ? tagInfoByType<reco::SoftLeptonTagInfo>()
362  : dynamic_cast<const reco::SoftLeptonTagInfo *>(tagInfo(label)) );
363 }
364 
367  return (label.empty() ? tagInfoByType<reco::SecondaryVertexTagInfo>()
368  : dynamic_cast<const reco::SecondaryVertexTagInfo *>(tagInfo(label)) );
369 }
370 
371 void
374  std::string::size_type idx = label.find("TagInfos");
375  if (idx == std::string::npos) {
376  tagInfoLabels_.push_back(label);
377  } else {
378  tagInfoLabels_.push_back(label.substr(0,idx));
379  }
380  tagInfosFwdPtr_.push_back(info);
381 }
382 
383 
384 
386 float Jet::jetCharge() const {
387  return jetCharge_;
388 }
389 
392  return associatedTracks_;
393 }
394 
398 }
399 
402  for(unsigned int i = 0; i < caloTowers.size(); ++i) {
403  caloTowersFwdPtr_.push_back( caloTowers.at(i) );
404  }
405  embeddedCaloTowers_ = true;
406  isCaloTowerCached_ = false;
407 }
408 
409 
412  for(unsigned int i = 0; i < pfCandidates.size(); ++i) {
413  pfCandidatesFwdPtr_.push_back(pfCandidates.at(i));
414  }
415  embeddedPFCandidates_ = true;
416  isPFCandidateCached_ = false;
417 }
418 
419 
422 {
423  genJetFwdRef_ = gj;
424 }
425 
426 
427 
429 void Jet::setPartonFlavour(int partonFl) {
430  partonFlavour_ = partonFl;
431 }
432 
434 void Jet::addBDiscriminatorPair(const std::pair<std::string, float> & thePair) {
435  pairDiscriVector_.push_back(thePair);
436 }
437 
439 void Jet::setJetCharge(float jetCharge) {
441 }
442 
443 
444 
446 void Jet::cacheCaloTowers() const {
447  // Clear the cache
448  caloTowersTemp_.clear();
449  // Here is where we've embedded constituents
450  if ( embeddedCaloTowers_ ) {
451  // Refactorized PAT access
452  if ( caloTowersFwdPtr_.size() > 0 ) {
453  for ( CaloTowerFwdPtrVector::const_iterator ibegin=caloTowersFwdPtr_.begin(),
454  iend = caloTowersFwdPtr_.end(),
455  icalo = ibegin;
456  icalo != iend; ++icalo ) {
457  caloTowersTemp_.push_back( CaloTowerPtr(icalo->ptr() ) );
458  }
459  }
460  // Compatibility access
461  else if ( caloTowers_.size() > 0 ) {
463  iend = caloTowers_.end(),
464  icalo = ibegin;
465  icalo != iend; ++icalo ) {
466  caloTowersTemp_.push_back( CaloTowerPtr(&caloTowers_, icalo - ibegin ) );
467  }
468  }
469  }
470  // Non-embedded access
471  else {
472  for ( unsigned fIndex = 0; fIndex < numberOfDaughters(); ++fIndex ) {
473  Constituent const & dau = daughterPtr (fIndex);
474  const CaloTower* caloTower = dynamic_cast <const CaloTower*> (dau.get());
475  if (caloTower) {
476  caloTowersTemp_.push_back( CaloTowerPtr(dau.id(), caloTower,dau.key() ) );
477  }
478  else {
479  throw cms::Exception("Invalid Constituent") << "CaloJet constituent is not of CaloTower type";
480  }
481  }
482  }
483  // Set the cache flag
484  isCaloTowerCached_=true;
485 }
486 
489  // Clear the cache
490  pfCandidatesTemp_.clear();
491  // Here is where we've embedded constituents
492  if ( embeddedPFCandidates_ ) {
493  // Refactorized PAT access
494  if ( pfCandidatesFwdPtr_.size() > 0 ) {
495  for ( PFCandidateFwdPtrCollection::const_iterator ibegin=pfCandidatesFwdPtr_.begin(),
496  iend = pfCandidatesFwdPtr_.end(),
497  ipf = ibegin;
498  ipf != iend; ++ipf ) {
499  pfCandidatesTemp_.push_back( reco::PFCandidatePtr(ipf->ptr() ) );
500  }
501  }
502  // Compatibility access
503  else if ( pfCandidates_.size() > 0 ) {
504  for ( reco::PFCandidateCollection::const_iterator ibegin=pfCandidates_.begin(),
505  iend = pfCandidates_.end(),
506  ipf = ibegin;
507  ipf != iend; ++ipf ) {
508  pfCandidatesTemp_.push_back( reco::PFCandidatePtr(&pfCandidates_, ipf - ibegin ) );
509  }
510  }
511  }
512  // Non-embedded access
513  else {
514  for ( unsigned fIndex = 0; fIndex < numberOfDaughters(); ++fIndex ) {
515  Constituent const & dau = daughterPtr (fIndex);
516  const reco::PFCandidate* pfCandidate = dynamic_cast <const reco::PFCandidate*> (dau.get());
517  if (pfCandidate) {
518  pfCandidatesTemp_.push_back( reco::PFCandidatePtr(dau.id(), pfCandidate,dau.key() ) );
519  }
520  else {
521  throw cms::Exception("Invalid Constituent") << "PFJet constituent is not of PFCandidate type";
522  }
523  }
524  }
525  // Set the cache flag
527 }
type
Definition: HCALResponse.h:21
virtual double energy() const GCC11_FINAL
energy
void setGenJetRef(const edm::FwdRef< reco::GenJetCollection > &gj)
method to set the matched generated jet reference, embedding if requested
Definition: Jet.cc:421
float jecFactor(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:239
int i
Definition: DBlmapReader.cc:9
const reco::SecondaryVertexTagInfo * tagInfoSecondaryVertex(const std::string &label="") const
Definition: Jet.cc:366
reco::GenJetRefVector genJetRef_
Definition: Jet.h:511
CaloTowerFwdPtrVector caloTowersFwdPtr_
Definition: Jet.h:499
std::vector< CaloTowerPtr > caloTowersTemp_
Definition: Jet.h:497
const std::vector< std::string > availableJECLevels(const int &set=0) const
Definition: Jet.cc:232
bool jecSetsAvailable() const
Definition: Jet.h:112
Jets made from CaloTowers.
Definition: CaloJet.h:30
reco::TrackRefVector associatedTracks_
Definition: Jet.h:541
reco::PFCandidateCollection pfCandidates_
Definition: Jet.h:504
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
int partonFlavour_
Definition: Jet.h:513
std::vector< std::pair< std::string, float > > pairDiscriVector_
Definition: Jet.h:532
const reco::GenJet * genJet() const
return the matched generated jet
Definition: Jet.cc:193
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:21
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:271
TagInfoFwdPtrCollection tagInfosFwdPtr_
Definition: Jet.h:535
edm::FwdRef< reco::GenJetCollection > genJetFwdRef_
Definition: Jet.h:512
size_type size() const
Definition: OwnVector.h:247
std::vector< CaloTower >::const_iterator const_iterator
void cacheCaloTowers() const
method to cache the constituents to allow &quot;user-friendly&quot; access
Definition: Jet.cc:446
void tryImportSpecific(const reco::Jet &source)
constructor helper that tries to import the specific info from the source jet
Definition: Jet.cc:81
const edm::RefToBase< reco::Jet > & getCaloJetRef() const
Definition: JPTJet.h:130
virtual ~Jet()
destructor
Definition: Jet.cc:106
void setCaloTowers(const CaloTowerFwdPtrCollection &caloTowers)
method to store the CaloJet constituents internally
Definition: Jet.cc:401
const reco::TrackIPTagInfo * tagInfoTrackIP(const std::string &label="") const
Definition: Jet.cc:354
const reco::TrackRefVector & associatedTracks() const
method to return a vector of refs to the tracks associated to this jet
Definition: Jet.cc:391
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
uint16_t size_type
const T * tagInfoByType() const
Definition: Jet.cc:331
Jets made from PFObjects.
Definition: PFJet.h:22
std::vector< reco::PFCandidatePtr > const & getPFConstituents() const
Definition: Jet.cc:185
void addTagInfo(const std::string &label, const TagInfoFwdPtrCollection::value_type &info)
Definition: Jet.cc:372
bool isAvailable() const
Definition: RefToBase.h:112
std::vector< PFSpecific > specificPF_
Definition: Jet.h:547
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:534
void setAssociatedTracks(const reco::TrackRefVector &tracks)
method to set the vector of refs to the tracks associated to this jet
Definition: Jet.cc:396
virtual float phi() const GCC11_FINAL
momentum azimuthal angle
std::ostream & operator<<(std::ostream &, BeamSpot beam)
Definition: BeamSpot.cc:72
std::vector< CaloSpecific > specificCalo_
Definition: Jet.h:545
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:207
CaloTowerPtr getCaloConstituent(unsigned fIndex) const
convert generic constituent to specific type
Definition: Jet.cc:111
Jets made from CaloJets corrected for ZSP and tracks.
Definition: JPTJet.h:29
unsigned int currentJECLevel_
Definition: Jet.h:525
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:308
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:216
bool embeddedCaloTowers_
Definition: Jet.h:496
Jets made from MC generator particles.
Definition: GenJet.h:25
const reco::BaseTagInfo * tagInfo(const std::string &label) const
Definition: Jet.cc:319
void setPartonFlavour(int partonFl)
method to set the flavour of the parton underlying the jet
Definition: Jet.cc:429
bool first
Definition: L1TdeRCT.cc:94
Container::value_type value_type
bool isPFCandidateCached_
Definition: Jet.h:568
int partonFlavour() const
return the flavour of the parton underlying the jet
Definition: Jet.cc:200
JetCorrFactors::Flavor currentJECFlavor() const
return flavour of the current step of jet energy corrections
Definition: Jet.h:124
std::vector< CaloTowerPtr > const & getCaloConstituents() const
Definition: Jet.cc:145
std::vector< pat::JetCorrFactors > jec_
Definition: Jet.h:520
Jet()
default constructor
Definition: Jet.cc:13
virtual float eta() const GCC11_FINAL
momentum pseudorapidity
std::vector< std::string > tagInfoLabels_
Definition: Jet.h:533
float jetCharge_
Definition: Jet.h:540
tuple out
Definition: dbtoconf.py:99
const_iterator end() const
const reco::SoftLeptonTagInfo * tagInfoSoftLepton(const std::string &label="") const
Definition: Jet.cc:360
key_type key() const
Definition: Ptr.h:169
void setJetCharge(float jetCharge)
method to set the jet charge
Definition: Jet.cc:439
virtual size_t numberOfDaughters() const
Definition: Jet.h:430
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:68
std::vector< JPTSpecific > specificJPT_
Definition: Jet.h:546
std::vector< edm::FwdPtr< reco::PFCandidate > > PFCandidateFwdPtrCollection
Definition: Jet.h:67
void addBDiscriminatorPair(const std::pair< std::string, float > &thePair)
method to add a algolabel-discriminator pair
Definition: Jet.cc:434
std::string currentJECLevel() const
return the name of the current step of jet energy corrections
Definition: Jet.h:122
Analysis-level calorimeter jet class.
Definition: Jet.h:71
CaloTowerCollection caloTowers_
Definition: Jet.h:498
const std::vector< std::string > availableJECSets() const
-— methods for jet corrections -—
Definition: Jet.cc:224
bool isCaloTowerCached_
cache calo towers
Definition: Jet.h:566
void cachePFCandidates() const
method to cache the constituents to allow &quot;user-friendly&quot; access
Definition: Jet.cc:488
Particle reconstructed by the particle flow algorithm.
Definition: PFCandidate.h:35
reco::PFCandidateFwdPtrVector pfCandidatesFwdPtr_
Definition: Jet.h:505
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:411
size_type size() const
Size of the RefVector.
Definition: RefVector.h:89
Templated PAT object container.
Definition: PATObject.h:43
reco::PFCandidatePtr getPFConstituent(unsigned fIndex) const
convert generic constituent to specific type
Definition: Jet.cc:153
std::vector< reco::PFCandidatePtr > pfCandidatesTemp_
Definition: Jet.h:503
tuple level
Definition: testEve_cfg.py:34
unsigned int currentJECSet_
Definition: Jet.h:523
std::vector< reco::GenJet > genJet_
Definition: Jet.h:510
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:528
bool embeddedPFCandidates_
Definition: Jet.h:502
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:120
const_iterator begin() const
const std::vector< std::pair< std::string, float > > & getPairDiscri() const
get vector of paire labelname-disciValue
Definition: Jet.cc:303
float jetCharge() const
method to return the JetCharge computed when creating the Jet
Definition: Jet.cc:386
bool jecSetAvailable(const std::string &set) const
Definition: Jet.h:115
const Specific & getSpecific() const
Definition: CaloJet.h:150