A++ » INC » HepJet

class HepJet: public TObject


 Base jet class

 Note for developers: Some often used values like Et, Eta etc. are
 stored as transient data members for fast access. Their computation
 from the persistent data members is either done in the normal ctor
 or in SetPtEtaPhiE(), or triggered by the fCompute flag in case of
 using the default ctor.

 !!! IMPORTANT: Do not access the transient data members directly, !!!
 !!! but use ALWAYS their corresponding access function like Pt(), !!!
 !!! Eta() etc. to ensure that the variables are computed properly.!!!

 !!! IMPORTANT: Do not use Et(), Pt(), Pmag(), Thetha(), Phi(),    !!!
 !!! Eta() in TTree::Draw() or TTree::Scan() since these functions !!!
 !!! make use of a cache which will NOT be updated when jumping    !!!
 !!! to the next event inside TTree::Draw() or TTree::Scan().      !!!


 Author: Oliver Maria Kind <mailto: kind@mail.desy.de>
 Update: $Id: HepJet.cxx,v 1.11 2016/12/22 20:38:21 kind Exp $
 Copyright: 2008 (C) Oliver Maria Kind

Function Members (Methods)

public:
virtual~HepJet()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidClear(Option_t* option = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tCompare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
Float_tCosTheta()
virtual voidTObject::Delete(Option_t* option = "")MENU
Float_tDeltaEta(HepParticle* prt)
Float_tDeltaEta(HepJet* jet)
Float_tDeltaEtFrac(HepParticle* prt)
Float_tDeltaEtFrac(HepJet* jet)
Float_tDeltaPhi(HepParticle* prt) const
Float_tDeltaPhi(HepJet* jet) const
Float_tDeltaPtFrac(HepParticle* prt)
Float_tDeltaPtFrac(HepJet* jet)
Float_tDeltaR(HepParticle* prt)
Float_tDeltaR(HepJet* jet)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
Float_tE() const
virtual voidTObject::Error(const char* method, const char* msgfmt) const
Float_tEt()
Float_tEta()
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual const char*TObject::GetIconName() const
Int_tGetId() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
HepJet()
HepJet(const HepJet&)
HepJet(Int_t Id, Float_t E, Float_t Px, Float_t Py, Float_t Pz)
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
Float_tInvDeltaPtFrac(HepParticle* prt)
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tIsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
Float_tM() const
voidTObject::MayNotUse(const char* method) const
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
HepJet&operator=(const HepJet&)
const TLorentzVector&P() const
TVector3P3() const
virtual voidTObject::Paint(Option_t* option = "")
Float_tPhi()
virtual voidTObject::Pop()
virtual voidPrint(Option_t* option = "")
static voidPrintFooter()
static voidPrintHeader()
Float_tPt()
Double_tPtRel(HepParticle* prt)
Float_tPx() const
Float_tPy() const
Float_tPz() const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
voidSetId(Int_t Id)
static voidTObject::SetObjectStat(Bool_t stat)
voidSetP(const TLorentzVector& p)
voidSetPtEtaPhiE(Float_t Pt, Float_t Eta, Float_t Phi, Float_t E)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
Float_tTheta()
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
private:
voidComputeTransientVars()

Data Members

public:
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TObject::(anonymous)TObject::kSingleKey
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
Int_tfIdId number (for convenience only)
TLorentzVectorfPJet 4-momentum (GeV)
private:
Bool_tfCompute! Compute the transient variables at the next possibility
Float_tfCosTheta! Cosine of the polar angle
Float_tfEt! Transverse energy (GeV)
Float_tfEta! Pseudo-rapidity of the 3-momentum
Float_tfPhi! Azimuth of the 3-momentum (rad)
Float_tfPt! Transverse momentum (GeV)
Float_tfTheta! Polar angle of the 3-momentum (rad)

Class Charts

Inheritance Chart:
TObject
HepJet
AtlFastJet
AtlJet
AtlMCJet

Function documentation

HepJet()
 Default constructor

 The fCompute flag triggers the computation of the transient
 member variables the next time one of them is accessed. This
 mechanism is neccessary since the values of the persistent data
 members needed for the computation are filles AFTER the call to
 this ctor

HepJet(Int_t Id, Float_t E, Float_t Px, Float_t Py, Float_t Pz)
 Normal constructor

~HepJet()
 Default destructor

void Clear(Option_t* option = "")
 Clear object

Int_t Compare(const TObject* obj) const
 Compares transverse energy of this jet with another.
 Necessary for sorting

Float_t DeltaPhi(HepParticle* prt) const
 Compute azimuth difference between this jet and the given
 particle in the range from -pi to +pi

Float_t DeltaPhi(HepJet* jet) const
 Compute azimuth difference between this and the given jet in
 the range from -pi to +pi

Float_t DeltaEta(HepParticle* prt)
 Compute (signed) pseudo-rapidity difference between this jet
 and the given particle

Float_t DeltaEta(HepJet* jet)
 Compute (signed) pseudo-rapidity difference between this and
 the given jet

Float_t DeltaR(HepParticle* prt)
 Compute distance in eta-phi plane between this jet and the
 given particle

Float_t DeltaR(HepJet* jet)
 Compute distance in eta-phi plane between this and the given
 jet

Float_t DeltaPtFrac(HepParticle* prt)
 DeltaPtFrac = (Pt_1 - Pt_2)/Pt_1

 Pt difference, unsigned, for better checking systematic errors,
 normalized to the first entry. The second term is a HepParticle
 object.

Float_t DeltaPtFrac(HepJet* jet)
 DeltaPtFrac = (Pt_1 - Pt_2)/Pt_1

 Pt difference, unsigned, for better checking systematic errors,
 normalized to the first entry. The second term is a HepJet
 object.

Float_t DeltaEtFrac(HepParticle* prt)
 DeltaEtFrac = (Et_1 - Et_2)/Et_1

 Et difference, unsigned, for better checking systematic errors,
 normalized to the first entry. The second term is a HepParticle
 object.

Float_t DeltaEtFrac(HepJet* jet)
 DeltaEtFrac = (Et_1 - Et_2)/Et_1

 Et difference, unsigned, for better checking systematic errors,
 normalized to the first entry. The second term is a HepJet
 object.

Float_t InvDeltaPtFrac(HepParticle* prt)
 An "Inverse" DeltaPtFrac is needed, due to Multiple Scattering in
 the Inner Detector
 InvDeltaPtFrac = ( 1/Pt_1 - 1/Pt_2)*Pt_1

 Unsigned again, for better checking systematic errors
 I dont know yet if I can write the same algorithm for the jets

Double_t PtRel(HepParticle* prt)
 Computes the relative traverse momentum between the given
 particle and this jet

   Pt_rel = |P_prt x P_jet|

void ComputeTransientVars()
 Compute transient variables like Et, Theta, Eta etc. for fast
 access

void Print(Option_t* option = "")
 Print jet information

   "nohead" - No header containing the variable names is
              displayed. Useful when printing a whole table
              for a list of jets

void PrintHeader()
 Print information header

void PrintFooter()
 Print footer

HepJet()
Bool_t IsSortable() const
{ return kTRUE; }
Int_t GetId() const
{ return fId; }
void SetId(Int_t Id)
{ fId = Id; }
const TLorentzVector& P() const
 Return momentum 4 vector (GeV)
TVector3 P3() const
 Return momentum 3 vector (GeV)
Float_t Et()
 Return transvere energy (GeV)

 !!! The return value is cached. Do not use this function !!!
 !!! inside TTree::Draw() or TTree::Scan().               !!!
 !!! Use eg "fCone4H1TowerJets.fP.Et()" instead.          !!!

Float_t Pt()
 Return transvere momentum (GeV)

 !!! The return value is cached. Do not use this function !!!
 !!! inside TTree::Draw() or TTree::Scan().               !!!
 !!! Use eg "fCone4H1TowerJets.fP.Perp()" instead.        !!!

Float_t Eta()
 Return pseudo-rapidity

 !!! The return value is cached. Do not use this function !!!
 !!! inside TTree::Draw() or TTree::Scan().               !!!
 !!! Use eg "fCone4H1TowerJets.fP.Eta()" instead.         !!!

Float_t Phi()
 Return azimuth (rad)

 !!! The return value is cached. Do not use this function !!!
 !!! inside TTree::Draw() or TTree::Scan().               !!!
 !!! Use eg "fCone4H1TowerJets.fP.Phi()" instead.         !!!

Float_t Theta()
 Return polar angle (rad)

 !!! The return value is cached. Do not use this function !!!
 !!! inside TTree::Draw() or TTree::Scan().               !!!
 !!! Use eg "fCone4H1TowerJets.fP.Theta()" instead.       !!!

Float_t CosTheta()
 Return cosine of the polar angle

 !!! The return value is cached. Do not use this function !!!
 !!! inside TTree::Draw() or TTree::Scan().               !!!
 !!! Use eg "fCone4H1TowerJets.fP.CosTheta()" instead.    !!!

Float_t M() const
 Return invariant mass (GeV)
Float_t Px() const
 Return momentum x component
Float_t Py() const
 Return momentum y component
Float_t Pz() const
 Return momentum z component
Float_t E() const
 Return energy component
void SetPtEtaPhiE(Float_t Pt, Float_t Eta, Float_t Phi, Float_t E)
void SetP(const TLorentzVector& p)