CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
reco::Jet Class Reference

Base class for all types of Jets. More...

#include <Jet.h>

Inheritance diagram for reco::Jet:
reco::CompositePtrCandidate reco::LeafCandidate reco::Candidate pat::PATObject< reco::Jet > reco::BasicJet reco::CaloJet reco::GenJet reco::JPTJet reco::PFClusterJet reco::PFJet reco::TrackJet

Classes

class  EtaPhiMoments
 record to store eta-phi first and second moments More...
 

Public Types

typedef edm::Ptr< CandidateConstituent
 
typedef std::vector< ConstituentConstituents
 
- Public Types inherited from reco::CompositePtrCandidate
typedef std::vector< CandidatePtrdaughters
 collection of references to daughters More...
 
typedef std::vector< CandidatePtrmothers
 collection of references to daughters More...
 
- Public Types inherited from reco::LeafCandidate
typedef int Charge
 electric charge type More...
 
typedef CandidateCollection daughters
 collection of daughter candidates More...
 
typedef unsigned int index
 
typedef math::XYZTLorentzVector LorentzVector
 Lorentz vector. More...
 
typedef math::XYZPoint Point
 point in the space More...
 
typedef
math::PtEtaPhiMLorentzVector 
PolarLorentzVector
 Lorentz vector. More...
 
typedef math::XYZVector Vector
 point in the space More...
 
- Public Types inherited from reco::Candidate
enum  { dimension = 3 }
 
enum  { size = dimension * (dimension + 1)/2 }
 matix size More...
 
typedef int Charge
 electric charge type More...
 
typedef candidate::const_iterator const_iterator
 
typedef math::Error< dimension >
::type 
CovarianceMatrix
 covariance error matrix (3x3) More...
 
typedef unsigned int index
 index type More...
 
typedef candidate::iterator iterator
 
typedef math::XYZTLorentzVector LorentzVector
 Lorentz vector. More...
 
typedef math::XYZPoint Point
 point in the space More...
 
typedef
math::PtEtaPhiMLorentzVector 
PolarLorentzVector
 Lorentz vector. More...
 
typedef size_t size_type
 
typedef math::XYZVector Vector
 point in the space More...
 

Public Member Functions

float etaetaMoment () const
 eta-eta second moment, ET weighted More...
 
float etaphiMoment () const
 eta-phi second moment, ET weighted More...
 
EtaPhiMoments etaPhiStatistics () const
 eta-phi statistics, ET weighted More...
 
float etInAnnulus (float fRmin, float fRmax) const
 ET in annulus between rmin and rmax around jet direction. More...
 
virtual Constituents getJetConstituents () const
 list of constituents More...
 
virtual std::vector< const
reco::Candidate * > 
getJetConstituentsQuick () const
 quick list of constituents More...
 
bool isJet () const
 
 Jet ()
 Default constructor. More...
 
 Jet (const LorentzVector &fP4, const Point &fVertex)
 Initiator. More...
 
 Jet (const LorentzVector &fP4, const Point &fVertex, const Constituents &fConstituents)
 
virtual float jetArea () const
 get jet area More...
 
float maxDistance () const
 maximum distance from jet to constituent More...
 
int nCarrying (float fFraction) const
 return # of constituent carrying fraction of energy More...
 
virtual int nConstituents () const
 

of constituents

More...
 
virtual int nPasses () const
 number of passes taken by algorithm More...
 
float phiphiMoment () const
 phi-phi second moment, ET weighted More...
 
virtual float pileup () const
 pileup energy contribution as calculated by algorithm More...
 
virtual std::string print () const
 Print object. More...
 
virtual void scaleEnergy (double fScale)
 scale energy of the jet More...
 
virtual void setJetArea (float fArea)
 set jet area More...
 
virtual void setNPasses (int fPasses)
 Set number of passes taken by algorithm. More...
 
virtual void setPileup (float fEnergy)
 Set pileup energy contribution as calculated by algorithm. More...
 
virtual ~Jet ()
 Destructor. More...
 
- Public Member Functions inherited from reco::CompositePtrCandidate
void addDaughter (const CandidatePtr &)
 add a daughter via a reference More...
 
virtual const_iterator begin () const
 first daughter const_iterator More...
 
virtual iterator begin ()
 first daughter iterator More...
 
void clearDaughters ()
 clear daughter references More...
 
virtual CompositePtrCandidateclone () const
 returns a clone of the candidate More...
 
 CompositePtrCandidate ()
 default constructor More...
 
 CompositePtrCandidate (Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values More...
 
 CompositePtrCandidate (Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values More...
 
 CompositePtrCandidate (const Candidate &p)
 constructor from a Candidate More...
 
virtual const Candidatedaughter (size_type) const
 return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) More...
 
virtual Candidatedaughter (size_type)
 return daughter at a given position, i = 0, ... numberOfDaughters() - 1 More...
 
CandidatePtr daughterPtr (size_type i) const
 reference to daughter at given position More...
 
const daughtersdaughterPtrVector () const
 references to daughtes More...
 
virtual const_iterator end () const
 last daughter const_iterator More...
 
virtual iterator end ()
 last daughter iterator More...
 
virtual const Candidatemother (size_t i=0) const
 return pointer to mother More...
 
virtual size_t numberOfDaughters () const
 number of daughters More...
 
virtual size_t numberOfMothers () const
 number of mothers More...
 
virtual size_type numberOfSourceCandidatePtrs () const
 
virtual CandidatePtr sourceCandidatePtr (size_type i) const
 
virtual ~CompositePtrCandidate ()
 destructor More...
 
- Public Member Functions inherited from reco::LeafCandidate
template<typename S >
daughter_iterator< S >::type beginFilter (const S &s) const
 
virtual Vector boostToCM () const
 
virtual int charge () const
 electric charge More...
 
virtual Candidatedaughter (const std::string &s)
 return daughter with a specified role name More...
 
virtual const Candidatedaughter (const std::string &s) const
 return daughter with a specified role name More...
 
template<typename S >
daughter_iterator< S >::type endFilter (const S &s) const
 
virtual double energy () const
 energy More...
 
virtual double et () const
 transverse energy More...
 
virtual double eta () const
 momentum pseudorapidity More...
 
virtual void fillVertexCovariance (CovarianceMatrix &v) const
 fill SMatrix More...
 
template<typename T >
T get () const
 get a component More...
 
template<typename T , typename Tag >
T get () const
 get a component More...
 
template<typename T >
T get (size_type i) const
 get a component More...
 
template<typename T , typename Tag >
T get (size_type i) const
 get a component More...
 
virtual bool hasMasterClone () const
 
virtual bool hasMasterClonePtr () const
 
virtual bool isCaloMuon () const
 
virtual bool isConvertedPhoton () const
 
virtual bool isElectron () const
 
virtual bool isGlobalMuon () const
 
virtual bool isMuon () const
 
virtual bool isPhoton () const
 
virtual bool isStandAloneMuon () const
 
virtual bool isTrackerMuon () const
 
 LeafCandidate ()
 default constructor More...
 
 LeafCandidate (const Candidate &c)
 
 LeafCandidate (Charge q, const LorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values More...
 
 LeafCandidate (Charge q, const PolarLorentzVector &p4, const Point &vtx=Point(0, 0, 0), int pdgId=0, int status=0, bool integerCharge=true)
 constructor from values More...
 
virtual bool longLived () const
 is long lived? More...
 
virtual double mass () const
 mass More...
 
virtual bool massConstraint () const
 do mass constraint? More...
 
virtual double massSqr () const
 mass squared More...
 
virtual const CandidateBaseRefmasterClone () const
 
virtual const CandidatePtrmasterClonePtr () const
 
template<typename Ref >
Ref masterRef () const
 cast master clone reference to a concrete type More...
 
virtual Vector momentum () const
 spatial momentum vector More...
 
virtual double mt () const
 transverse mass More...
 
virtual double mtSqr () const
 transverse mass squared More...
 
template<typename T >
size_type numberOf () const
 number of components More...
 
template<typename T , typename Tag >
size_type numberOf () const
 number of components More...
 
virtual double p () const
 magnitude of momentum vector More...
 
virtual const LorentzVectorp4 () const
 four-momentum Lorentz vector More...
 
virtual int pdgId () const
 PDG identifier. More...
 
virtual double phi () const
 momentum azimuthal angle More...
 
virtual const PolarLorentzVectorpolarP4 () const
 four-momentum Lorentz vector More...
 
virtual double pt () const
 transverse momentum More...
 
virtual double px () const
 x coordinate of momentum vector More...
 
virtual double py () const
 y coordinate of momentum vector More...
 
virtual double pz () const
 z coordinate of momentum vector More...
 
virtual double rapidity () const
 rapidity More...
 
virtual void setCharge (Charge q)
 set electric charge More...
 
virtual void setLongLived ()
 set long lived flag More...
 
virtual void setMass (double m)
 set particle mass More...
 
virtual void setMassConstraint ()
 set mass constraint flag More...
 
virtual void setP4 (const LorentzVector &p4)
 set 4-momentum More...
 
virtual void setP4 (const PolarLorentzVector &p4)
 set 4-momentum More...
 
virtual void setPdgId (int pdgId)
 
virtual void setPz (double pz)
 
virtual void setStatus (int status)
 set status word More...
 
virtual void setThreeCharge (Charge qx3)
 set electric charge More...
 
virtual void setVertex (const Point &vertex)
 set vertex More...
 
virtual int status () const
 status word More...
 
virtual double theta () const
 momentum polar angle More...
 
virtual int threeCharge () const
 electric charge More...
 
virtual const Pointvertex () const
 vertex position More...
 
virtual double vertexChi2 () const
 chi-squares More...
 
virtual double vertexCovariance (int i, int j) const
 (i, j)-th element of error matrix, i, j = 0, ... 2 More...
 
CovarianceMatrix vertexCovariance () const
 return SMatrix More...
 
virtual double vertexNdof () const
 
virtual double vertexNormalizedChi2 () const
 chi-squared divided by n.d.o.f. More...
 
virtual double vx () const
 x coordinate of vertex position More...
 
virtual double vy () const
 y coordinate of vertex position More...
 
virtual double vz () const
 z coordinate of vertex position More...
 
virtual double y () const
 rapidity More...
 
virtual ~LeafCandidate ()
 destructor More...
 
- Public Member Functions inherited from reco::Candidate
template<typename S >
daughter_iterator< S >::type beginFilter (const S &s) const
 
 Candidate ()
 default constructor More...
 
template<typename S >
daughter_iterator< S >::type endFilter (const S &s) const
 
template<typename T >
T get () const
 get a component More...
 
template<typename T , typename Tag >
T get () const
 get a component More...
 
template<typename T >
T get (size_type i) const
 get a component More...
 
template<typename T , typename Tag >
T get (size_type i) const
 get a component More...
 
template<typename Ref >
Ref masterRef () const
 cast master clone reference to a concrete type More...
 
template<typename T >
size_type numberOf () const
 number of components More...
 
template<typename T , typename Tag >
size_type numberOf () const
 number of components More...
 
virtual void setSourceCandidatePtr (const CandidatePtr &ptr)
 Set the ptr to the source Candidate. More...
 
virtual ~Candidate ()
 destructor More...
 

Static Public Member Functions

static float detectorEta (float fZVertex, float fPhysicsEta)
 static function to convert physics eta to detector eta More...
 
static Candidate::LorentzVector detectorP4 (const Candidate::Point &vertex, const Candidate &inParticle)
 
static float physicsEta (float fZVertex, float fDetectorEta)
 static function to convert detector eta to physics eta More...
 
static Candidate::LorentzVector physicsP4 (const Candidate::Point &newVertex, const Candidate &inParticle, const Candidate::Point &oldVertex=Candidate::Point(0, 0, 0))
 

Private Attributes

float mJetArea
 
int mPassNumber
 
float mPileupEnergy
 

Additional Inherited Members

- Static Public Attributes inherited from reco::LeafCandidate
static const unsigned int longLivedTag = 65536
 long lived flag More...
 
static const unsigned int massConstraintTag = 131072
 do mass constraint flag More...
 
- Protected Member Functions inherited from reco::LeafCandidate
void cacheCartesian () const
 set internal cache More...
 
void cachePolar () const
 set internal cache More...
 
void clearCache () const
 clear internal cache More...
 
- Protected Attributes inherited from reco::LeafCandidate
edm::BoolCache cacheCartesianFixed_
 
edm::BoolCache cachePolarFixed_
 has cache been set? More...
 
float eta_
 
float mass_
 
LorentzVector p4Cartesian_
 internal cache for p4 More...
 
PolarLorentzVector p4Polar_
 internal cache for p4 More...
 
int pdgId_
 PDG identifier. More...
 
float phi_
 
float pt_
 four-momentum Lorentz vector More...
 
Charge qx3_
 electric charge More...
 
int status_
 status word More...
 
Point vertex_
 vertex position More...
 

Detailed Description

Base class for all types of Jets.

GenericJet describes jets made from arbitrary constituents, No direct constituents reference is stored for now

Author
Fedor Ratnikov, UMd
Version
Mar 23, 2007 by F.R.
Id:
GenericJet.h,v 1.7 2007/08/20 17:53:30 fedor Exp

Jet describes properties common for all kinds of jets, essentially kinematics. Base class for all types of Jets.

Author
Fedor Ratnikov, UMd
Version
Original: April 22, 2005 by Fernando Varela Rodriguez.
May 23, 2006 by F.R.
Id:
Jet.h,v 1.28 2008/10/14 12:26:58 oehler Exp

Definition at line 21 of file Jet.h.

Member Typedef Documentation

Definition at line 23 of file Jet.h.

typedef std::vector<Constituent> reco::Jet::Constituents

Definition at line 24 of file Jet.h.

Constructor & Destructor Documentation

reco::Jet::Jet ( )
inline

Default constructor.

Definition at line 37 of file Jet.h.

37 : mJetArea (0), mPileupEnergy (0), mPassNumber (0) {}
int mPassNumber
Definition: Jet.h:110
float mJetArea
Definition: Jet.h:108
float mPileupEnergy
Definition: Jet.h:109
Jet::Jet ( const LorentzVector fP4,
const Point fVertex 
)

Initiator.

Definition at line 173 of file Jet.cc.

175  : CompositePtrCandidate (0, fP4, fVertex),
176  mJetArea (0),
177  mPileupEnergy (0),
178  mPassNumber (0)
179 {}
int mPassNumber
Definition: Jet.h:110
CompositePtrCandidate()
default constructor
float mJetArea
Definition: Jet.h:108
float mPileupEnergy
Definition: Jet.h:109
Jet::Jet ( const LorentzVector fP4,
const Point fVertex,
const Constituents fConstituents 
)

Definition at line 160 of file Jet.cc.

References reco::CompositePtrCandidate::addDaughter(), and i.

163  : CompositePtrCandidate (0, fP4, fVertex),
164  mJetArea (0),
165  mPileupEnergy (0),
166  mPassNumber (0)
167 {
168  for (unsigned i = 0; i < fConstituents.size (); i++) {
169  addDaughter (fConstituents [i]);
170  }
171 }
int i
Definition: DBlmapReader.cc:9
int mPassNumber
Definition: Jet.h:110
CompositePtrCandidate()
default constructor
float mJetArea
Definition: Jet.h:108
void addDaughter(const CandidatePtr &)
add a daughter via a reference
float mPileupEnergy
Definition: Jet.h:109
virtual reco::Jet::~Jet ( )
inlinevirtual

Destructor.

Reimplemented in pat::Jet.

Definition at line 42 of file Jet.h.

42 {}

Member Function Documentation

float Jet::detectorEta ( float  fZVertex,
float  fPhysicsEta 
)
static

static function to convert physics eta to detector eta

Definition at line 324 of file Jet.cc.

Referenced by reco::GenJet::detectorEta().

324  {
325  CaloPointZ refPoint (fZVertex, fPhysicsEta);
326  return refPoint.etaReference (0.);
327 }
Candidate::LorentzVector Jet::detectorP4 ( const Candidate::Point vertex,
const Candidate inParticle 
)
static

Definition at line 338 of file Jet.cc.

References reco::Candidate::energy(), reco::Candidate::momentum(), runTheMatrix::np, reco::LeafCandidate::p(), and p3.

Referenced by reco::CaloJet::detectorP4().

338  {
339  CaloPoint3D<Point> caloPoint(vertex,inParticle.momentum()); // Jet position in Calo.
340  static const Point np(0,0,0);
341  Vector detectorDir = caloPoint.caloPoint() - np;
342  double p = inParticle.momentum().r();
343  Vector p3 = p * detectorDir.unit();
344  LorentzVector returnVector(p3.x(), p3.y(), p3.z(), inParticle.energy());
345  return returnVector;
346 }
virtual double p() const
magnitude of momentum vector
virtual double energy() const =0
energy
virtual const Point & vertex() const
vertex position
math::XYZTLorentzVector LorentzVector
virtual Vector momentum() const =0
spatial momentum vector
fixed size vector
Definition: Vector.h:23
math::XYZPoint Point
double p3[4]
Definition: TauolaWrapper.h:91
float Jet::etaetaMoment ( ) const

eta-eta second moment, ET weighted

eta-eta second moment

Definition at line 222 of file Jet.cc.

References getJetConstituentsQuick(), i, relativeConstraints::value, and CommonMethods::weight().

Referenced by fireworks::makeEveJetCone(), and JetIDSelectionFunctor::operator()().

222  {
223  std::vector<const Candidate*> towers = getJetConstituentsQuick ();
224  double sumw = 0;
225  double sum = 0;
226  double sum2 = 0;
227  int i = towers.size();
228  while (--i >= 0) {
229  double value = towers[i]->eta();
230  double weight = towers[i]->et();
231  sumw += weight;
232  sum += value * weight;
233  sum2 += value * value * weight;
234  }
235  return sumw > 0 ? (sum2 - sum*sum/sumw ) / sumw : 0;
236 }
int i
Definition: DBlmapReader.cc:9
virtual std::vector< const reco::Candidate * > getJetConstituentsQuick() const
quick list of constituents
Definition: Jet.cc:357
float Jet::etaphiMoment ( ) const

eta-phi second moment, ET weighted

eta-phi second moment

Definition at line 257 of file Jet.cc.

References reco::deltaPhi(), getJetConstituentsQuick(), i, reco::LeafCandidate::phi(), and CommonMethods::weight().

257  {
258  double phiRef = phi();
259  std::vector<const Candidate*> towers = getJetConstituentsQuick ();
260  double sumw = 0;
261  double sumA = 0;
262  double sumB = 0;
263  double sumAB = 0;
264  int i = towers.size();
265  while (--i >= 0) {
266  double valueA = towers[i]->eta();
267  double valueB = deltaPhi (towers[i]->phi(), phiRef);
268  double weight = towers[i]->et();
269  sumw += weight;
270  sumA += valueA * weight;
271  sumB += valueB * weight;
272  sumAB += valueA * valueB * weight;
273  }
274  return sumw > 0 ? (sumAB - sumA*sumB/sumw ) / sumw : 0;
275 }
int i
Definition: DBlmapReader.cc:9
double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:12
virtual std::vector< const reco::Candidate * > getJetConstituentsQuick() const
quick list of constituents
Definition: Jet.cc:357
virtual double phi() const
momentum azimuthal angle
Jet::EtaPhiMoments Jet::etaPhiStatistics ( ) const

eta-phi statistics, ET weighted

eta-phi statistics

Definition at line 182 of file Jet.cc.

References reco::deltaPhi(), reco::LeafCandidate::eta(), reco::Jet::EtaPhiMoments::etaEtaMoment, reco::Jet::EtaPhiMoments::etaMean, reco::Jet::EtaPhiMoments::etaPhiMoment, getJetConstituentsQuick(), i, reco::LeafCandidate::phi(), reco::Jet::EtaPhiMoments::phiMean, reco::Jet::EtaPhiMoments::phiPhiMoment, query::result, and CommonMethods::weight().

182  {
183  std::vector<const Candidate*> towers = getJetConstituentsQuick ();
184  double phiRef = phi();
185  double sumw = 0;
186  double sumEta = 0;
187  double sumEta2 = 0;
188  double sumPhi = 0;
189  double sumPhi2 = 0;
190  double sumEtaPhi = 0;
191  int i = towers.size();
192  while (--i >= 0) {
193  double eta = towers[i]->eta();
194  double phi = deltaPhi (towers[i]->phi(), phiRef);
195  double weight = towers[i]->et();
196  sumw += weight;
197  sumEta += eta * weight;
198  sumEta2 += eta * eta * weight;
199  sumPhi += phi * weight;
200  sumPhi2 += phi * phi * weight;
201  sumEtaPhi += eta * phi * weight;
202  }
204  if (sumw > 0) {
205  result.etaMean = sumEta / sumw;
206  result.phiMean = deltaPhi (phiRef + sumPhi, 0.);
207  result.etaEtaMoment = (sumEta2 - sumEta * sumEta / sumw) / sumw;
208  result.phiPhiMoment = (sumPhi2 - sumPhi * sumPhi / sumw) / sumw;
209  result.etaPhiMoment = (sumEtaPhi - sumEta * sumPhi / sumw) / sumw;
210  }
211  else {
212  result.etaMean = 0;
213  result.phiMean = 0;
214  result.etaEtaMoment = 0;
215  result.phiPhiMoment = 0;
216  result.etaPhiMoment = 0;
217  }
218  return result;
219 }
int i
Definition: DBlmapReader.cc:9
virtual double eta() const
momentum pseudorapidity
record to store eta-phi first and second moments
Definition: Jet.h:27
tuple result
Definition: query.py:137
double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:12
virtual std::vector< const reco::Candidate * > getJetConstituentsQuick() const
quick list of constituents
Definition: Jet.cc:357
virtual double phi() const
momentum azimuthal angle
float Jet::etInAnnulus ( float  fRmin,
float  fRmax 
) const

ET in annulus between rmin and rmax around jet direction.

et in annulus between rmin and rmax around jet direction

Definition at line 278 of file Jet.cc.

References reco::deltaR(), getJetConstituentsQuick(), i, and query::result.

278  {
279  float result = 0;
280  std::vector<const Candidate*> towers = getJetConstituentsQuick ();
281  int i = towers.size ();
282  while (--i >= 0) {
283  double r = deltaR (*this, *(towers[i]));
284  if (r >= fRmin && r < fRmax) result += towers[i]->et ();
285  }
286  return result;
287 }
int i
Definition: DBlmapReader.cc:9
double deltaR(double eta1, double phi1, double eta2, double phi2)
Definition: deltaR.h:19
tuple result
Definition: query.py:137
virtual std::vector< const reco::Candidate * > getJetConstituentsQuick() const
quick list of constituents
Definition: Jet.cc:357
Jet::Constituents Jet::getJetConstituents ( ) const
virtual

list of constituents

Definition at line 349 of file Jet.cc.

References reco::CompositePtrCandidate::daughterPtr(), i, reco::CompositePtrCandidate::numberOfDaughters(), and query::result.

Referenced by reco::helper::CastorJetIDHelper::calculate(), fireworks::makeEveJetCone(), reco::tau::helpers::nCharged(), reco::tau::helpers::nGammas(), JetPlusTrackProducer::produce(), CastorClusterProducer::produce(), and JetPlusTrackProducerAA::produce().

349  {
351  for (unsigned i = 0; i < numberOfDaughters(); i++) {
352  result.push_back (daughterPtr (i));
353  }
354  return result;
355 }
int i
Definition: DBlmapReader.cc:9
CandidatePtr daughterPtr(size_type i) const
reference to daughter at given position
std::vector< Constituent > Constituents
Definition: Jet.h:24
virtual size_t numberOfDaughters() const
number of daughters
tuple result
Definition: query.py:137
std::vector< const Candidate * > Jet::getJetConstituentsQuick ( ) const
virtual

quick list of constituents

Definition at line 357 of file Jet.cc.

References reco::CompositePtrCandidate::daughter(), i, reco::CompositePtrCandidate::numberOfDaughters(), and query::result.

Referenced by FWPFTauProxyBuilder::buildViewType(), etaetaMoment(), etaphiMoment(), etaPhiStatistics(), etInAnnulus(), maxDistance(), nCarrying(), and phiphiMoment().

357  {
358  std::vector<const Candidate*> result;
359  int nDaughters = numberOfDaughters();
360  for (int i = 0; i < nDaughters; ++i) {
361  result.push_back (daughter (i));
362  }
363  return result;
364 }
int i
Definition: DBlmapReader.cc:9
virtual size_t numberOfDaughters() const
number of daughters
tuple result
Definition: query.py:137
virtual const Candidate * daughter(size_type) const
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
bool Jet::isJet ( ) const
virtual

Reimplemented from reco::LeafCandidate.

Definition at line 390 of file Jet.cc.

390  {
391  return true;
392 }
virtual float reco::Jet::jetArea ( ) const
inlinevirtual

get jet area

Definition at line 93 of file Jet.h.

References mJetArea.

Referenced by L1FastjetCorrector::correction().

93 {return mJetArea;}
float mJetArea
Definition: Jet.h:108
float Jet::maxDistance ( ) const

maximum distance from jet to constituent

Definition at line 305 of file Jet.cc.

References reco::deltaR(), getJetConstituentsQuick(), i, and query::result.

305  {
306  float result = 0;
307  std::vector<const Candidate*> towers = getJetConstituentsQuick ();
308  for (unsigned i = 0; i < towers.size(); ++i) {
309  float dR = deltaR (*(towers[i]), *this);
310  if (dR > result) result = dR;
311  }
312  return result;
313 }
int i
Definition: DBlmapReader.cc:9
double deltaR(double eta1, double phi1, double eta2, double phi2)
Definition: deltaR.h:19
tuple result
Definition: query.py:137
virtual std::vector< const reco::Candidate * > getJetConstituentsQuick() const
quick list of constituents
Definition: Jet.cc:357
int Jet::nCarrying ( float  fFraction) const

return # of constituent carrying fraction of energy

return # of constituent carring fraction of energy. Assume ordered towers

Definition at line 290 of file Jet.cc.

References reco::LeafCandidate::et(), getJetConstituentsQuick(), i, and query::result.

Referenced by reco::CaloJet::n60(), pat::Jet::n60(), reco::CaloJet::n90(), and pat::Jet::n90().

290  {
291  std::vector<const Candidate*> towers = getJetConstituentsQuick ();
292  if (fFraction >= 1) return towers.size();
293  double totalEt = 0;
294  for (unsigned i = 0; i < towers.size(); ++i) totalEt += towers[i]->et();
295  double fractionEnergy = totalEt * fFraction;
296  unsigned result = 0;
297  for (; result < towers.size(); ++result) {
298  fractionEnergy -= towers[result]->et();
299  if (fractionEnergy <= 0) return result+1;
300  }
301  return 0;
302 }
int i
Definition: DBlmapReader.cc:9
virtual double et() const
transverse energy
tuple result
Definition: query.py:137
virtual std::vector< const reco::Candidate * > getJetConstituentsQuick() const
quick list of constituents
Definition: Jet.cc:357
virtual int reco::Jet::nConstituents ( ) const
inlinevirtual

of constituents

Definition at line 66 of file Jet.h.

References reco::CompositePtrCandidate::numberOfDaughters().

Referenced by main(), and print().

66 {return numberOfDaughters();}
virtual size_t numberOfDaughters() const
number of daughters
virtual int reco::Jet::nPasses ( ) const
inlinevirtual

number of passes taken by algorithm

Definition at line 103 of file Jet.h.

References mPassNumber.

103 {return mPassNumber;}
int mPassNumber
Definition: Jet.h:110
float Jet::phiphiMoment ( ) const

phi-phi second moment, ET weighted

phi-phi second moment

Definition at line 239 of file Jet.cc.

References reco::deltaPhi(), getJetConstituentsQuick(), i, reco::LeafCandidate::phi(), relativeConstraints::value, and CommonMethods::weight().

Referenced by fireworks::makeEveJetCone(), and JetIDSelectionFunctor::operator()().

239  {
240  double phiRef = phi();
241  std::vector<const Candidate*> towers = getJetConstituentsQuick ();
242  double sumw = 0;
243  double sum = 0;
244  double sum2 = 0;
245  int i = towers.size();
246  while (--i >= 0) {
247  double value = deltaPhi (towers[i]->phi(), phiRef);
248  double weight = towers[i]->et();
249  sumw += weight;
250  sum += value * weight;
251  sum2 += value * value * weight;
252  }
253  return sumw > 0 ? (sum2 - sum*sum/sumw ) / sumw : 0;
254 }
int i
Definition: DBlmapReader.cc:9
double deltaPhi(double phi1, double phi2)
Definition: deltaPhi.h:12
virtual std::vector< const reco::Candidate * > getJetConstituentsQuick() const
quick list of constituents
Definition: Jet.cc:357
virtual double phi() const
momentum azimuthal angle
float Jet::physicsEta ( float  fZVertex,
float  fDetectorEta 
)
static

static function to convert detector eta to physics eta

Definition at line 317 of file Jet.cc.

317  {
318  CaloPointZ refPoint (0., fDetectorEta);
319  return refPoint.etaReference (fZVertex);
320 }
Candidate::LorentzVector Jet::physicsP4 ( const Candidate::Point newVertex,
const Candidate inParticle,
const Candidate::Point oldVertex = Candidate::Point(0,0,0) 
)
static

Definition at line 329 of file Jet.cc.

References reco::Candidate::energy(), reco::Candidate::momentum(), reco::LeafCandidate::p(), and p3.

Referenced by reco::CaloJet::physicsP4().

329  {
330  CaloPoint3D<Point> caloPoint(oldVertex,inParticle.momentum()); // Jet position in Calo.
331  Vector physicsDir = caloPoint.caloPoint() - newVertex;
332  double p = inParticle.momentum().r();
333  Vector p3 = p * physicsDir.unit();
334  LorentzVector returnVector(p3.x(), p3.y(), p3.z(), inParticle.energy());
335  return returnVector;
336 }
virtual double p() const
magnitude of momentum vector
virtual double energy() const =0
energy
math::XYZTLorentzVector LorentzVector
virtual Vector momentum() const =0
spatial momentum vector
fixed size vector
Definition: Vector.h:23
double p3[4]
Definition: TauolaWrapper.h:91
virtual float reco::Jet::pileup ( ) const
inlinevirtual

pileup energy contribution as calculated by algorithm

Definition at line 98 of file Jet.h.

References mPileupEnergy.

98 {return mPileupEnergy;}
float mPileupEnergy
Definition: Jet.h:109
std::string Jet::print ( void  ) const
virtual

Print object.

Reimplemented in reco::PFJet, reco::CaloJet, reco::JPTJet, reco::GenJet, reco::TrackJet, reco::PFClusterJet, and reco::BasicJet.

Definition at line 366 of file Jet.cc.

References reco::CompositePtrCandidate::daughterPtr(), reco::LeafCandidate::eta(), edm::Ptr< T >::id(), edm::Ptr< T >::isNonnull(), edm::Ptr< T >::key(), nConstituents(), reco::CompositePtrCandidate::numberOfDaughters(), dbtoconf::out, reco::LeafCandidate::p(), reco::LeafCandidate::phi(), reco::LeafCandidate::pt(), reco::LeafCandidate::px(), reco::LeafCandidate::py(), and reco::LeafCandidate::pz().

Referenced by reco::BasicJet::print(), reco::PFClusterJet::print(), reco::TrackJet::print(), reco::GenJet::print(), reco::JPTJet::print(), reco::CaloJet::print(), and reco::PFJet::print().

366  {
367  std::ostringstream out;
368  out << "Jet p/px/py/pz/pt: " << p() << '/' << px () << '/' << py() << '/' << pz() << '/' << pt() << std::endl
369  << " eta/phi: " << eta () << '/' << phi () << std::endl
370  << " # of constituents: " << nConstituents () << std::endl;
371  out << " Constituents:" << std::endl;
372  for (unsigned index = 0; index < numberOfDaughters(); index++) {
373  Constituent constituent = daughterPtr (index); // deref
374  if (constituent.isNonnull()) {
375  out << " #" << index << " p/pt/eta/phi: "
376  << constituent->p() << '/' << constituent->pt() << '/' << constituent->eta() << '/' << constituent->phi()
377  << " productId/index: " << constituent.id() << '/' << constituent.key() << std::endl;
378  }
379  else {
380  out << " #" << index << " constituent is not available in the event" << std::endl;
381  }
382  }
383  return out.str ();
384 }
virtual double p() const
magnitude of momentum vector
CandidatePtr daughterPtr(size_type i) const
reference to daughter at given position
virtual double eta() const
momentum pseudorapidity
virtual size_t numberOfDaughters() const
number of daughters
unsigned int index
Definition: LeafCandidate.h:33
tuple out
Definition: dbtoconf.py:99
edm::Ptr< Candidate > Constituent
Definition: Jet.h:23
virtual double px() const
x coordinate of momentum vector
virtual double pt() const
transverse momentum
virtual double pz() const
z coordinate of momentum vector
virtual int nConstituents() const
of constituents
Definition: Jet.h:66
virtual double phi() const
momentum azimuthal angle
virtual double py() const
y coordinate of momentum vector
void Jet::scaleEnergy ( double  fScale)
virtual

scale energy of the jet

Definition at line 386 of file Jet.cc.

References reco::LeafCandidate::p4(), and reco::LeafCandidate::setP4().

Referenced by TopSingleLepton::MonitorEnsemble::fill(), TopDiLeptonOffline::MonitorEnsemble::fill(), CorrectJet::operator()(), JetEnergyShift::produce(), JetPlusTrackProducer::produce(), and JetPlusTrackProducerAA::produce().

386  {
387  setP4 (p4() * fScale);
388 }
virtual void setP4(const LorentzVector &p4)
set 4-momentum
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
virtual void reco::Jet::setJetArea ( float  fArea)
inlinevirtual

set jet area

Definition at line 91 of file Jet.h.

References mJetArea.

Referenced by FastjetJetProducer::produceTrackJets(), cms::SubEventGenJetProducer::runAlgorithm(), and cms::CompoundJetProducer::writeCompoundJets().

91 {mJetArea = fArea;}
float mJetArea
Definition: Jet.h:108
virtual void reco::Jet::setNPasses ( int  fPasses)
inlinevirtual

Set number of passes taken by algorithm.

Definition at line 101 of file Jet.h.

References mPassNumber.

101 {mPassNumber = fPasses;}
int mPassNumber
Definition: Jet.h:110
virtual void reco::Jet::setPileup ( float  fEnergy)
inlinevirtual

Set pileup energy contribution as calculated by algorithm.

Definition at line 96 of file Jet.h.

References mPileupEnergy.

Referenced by FastjetJetProducer::produceTrackJets(), and cms::SubEventGenJetProducer::runAlgorithm().

96 {mPileupEnergy = fEnergy;}
float mPileupEnergy
Definition: Jet.h:109

Member Data Documentation

float reco::Jet::mJetArea
private

Definition at line 108 of file Jet.h.

Referenced by jetArea(), and setJetArea().

int reco::Jet::mPassNumber
private

Definition at line 110 of file Jet.h.

Referenced by nPasses(), and setNPasses().

float reco::Jet::mPileupEnergy
private

Definition at line 109 of file Jet.h.

Referenced by pileup(), and setPileup().