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