Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Jet.h

Go to the documentation of this file.
00001 // ================================================
00002 // Jet class description
00003 // ================================================
00004 //
00005 // THIS TEXT TO BE REPLACED BY ATLAS STANDARD FORMAT
00006 //
00007 // Namespace Atlfast::
00008 //
00009 // class: Jet
00010 //
00011 // Authors: P.Clarke, H.Phillips, E.Richter-Was, P.Sherwood, R.Steward
00012 //
00013 // Description: 
00014 //
00015 //  Class to represent Jets constructed from Clusters
00016 //
00017 //..................................................
00018 
00019 
00020 #ifndef __Atlfast_Jet__
00021 #define __Atlfast_Jet__
00022 
00023 
00024 // Kinematic classes.
00025 #include "CLHEP/Vector/LorentzVector.h"
00026 #include "AtlfastCode/IKinematic.h"
00027 
00028 // Gaudi includes
00029 #include "GaudiKernel/ContainedObject.h"
00030 #include "GaudiKernel/ObjectVector.h"
00031 #include "GaudiKernel/SmartRefVector.h"  
00032 
00033 // Atlfast includes
00034 #include "AtlfastCode/Cluster.h"
00035 #include "AtlfastCode/HepMC_helper.h"
00036 
00037 //Class ID for Jet class
00038 static const CLID CLID_ATLFAST_Jet=2304 ;
00039 
00040 
00041 namespace Atlfast {
00042 
00050   //........................................
00051   class Jet : 
00052     public IKinematic, 
00053     public ContainedObject, 
00054     public AssociationManager
00055     {
00056 
00057     private:
00058 
00060       HepLorentzVector m_momentum ;
00061       int m_flavor;
00062 
00064       /*#  Cluster lnkCluster; */
00065     public:
00066       
00067       // Constructors
00068       
00069       Jet() : ContainedObject(), AssociationManager() {}
00070 
00071       Jet( const Cluster& cluster):
00072         ContainedObject(), 
00073         AssociationManager(), 
00074 
00075         m_momentum(cluster.momentum()),
00076         m_flavor(HepMC_helper::UQUARK){
00077 
00078             this->associate(&cluster);
00079       }
00080 
00081       Jet( const HepLorentzVector& vec, Cluster& cluster ): 
00082         ContainedObject(), 
00083         AssociationManager(), 
00084 
00085         m_momentum(vec),
00086         m_flavor(HepMC_helper::UQUARK)
00087 
00088         {
00089           // Here we fill the related cells vector with pointers to the cells
00090           // from which it was constructed.
00091           this->associate( &cluster );
00092         }
00093       void setMomentum(const HepLorentzVector& vec) {m_momentum=vec;}
00094       // Other Athena mandatory methods
00095       static const CLID& classID() { return CLID_ATLFAST_Jet; }
00096       virtual const CLID& clID() const  {  return CLID_ATLFAST_Jet; }
00097 
00098       // To implement IKinematic
00099       virtual HepLorentzVector momentum() const {return m_momentum; } 
00100       virtual double  eta() const { return m_momentum.pseudoRapidity() ;}
00101       virtual double  phi() const { return m_momentum.phi() ;  } 
00102       virtual double  pT()  const { return m_momentum.perp() ;}
00103       //  FIXME: not sure if this is correct
00104       virtual double  eT()  const { 
00105         return m_momentum.e()*m_momentum.perp()/m_momentum.rho() ;} 
00106       virtual double  mT()  const { return m_momentum.mt(); } 
00107       virtual double  px()  const { return m_momentum.px(); } 
00108       virtual double  py()  const { return m_momentum.py(); } 
00109       virtual double  pz()  const { return m_momentum.pz(); } 
00110       
00111       double  e()   const { return m_momentum.e(); } 
00112 
00113       //methods to set and interogate flavor tag  
00114       void setBTag()  {m_flavor=HepMC_helper::BQUARK;}
00115       void setCTag()  {m_flavor=HepMC_helper::CQUARK;}
00116       void setTauTag(int tauTag){m_flavor=tauTag;}
00117       bool isBTag()   {return m_flavor==HepMC_helper::BQUARK;}
00118       bool isCTag()   {return m_flavor==HepMC_helper::CQUARK;}
00119       bool isTauTag() {return m_flavor==HepMC_helper::TAU;}
00120       int pdg_id() {return m_flavor;}
00121 
00122       // Input streamer
00123       virtual StreamBuffer& serialize(StreamBuffer& s);
00124 
00125       // Output streamer
00126       virtual StreamBuffer& serialize(StreamBuffer& s) const;
00127     };
00128 
00129   // ..............................
00130   // This typedef is used by JetMaker to store Jets
00131   //
00132   // It is put here rather than JetMaker.h so that any algorithm wishing 
00133   // to use Jets from the TES need only #include Jet.h
00134   
00135   typedef ObjectVector<Jet> t_jetCollection ;
00136   
00137   
00138 } // end of namespace 
00139 
00140 
00141 #endif
00142 
00143 
00144 
00145 
00146 
00147 
00148 
00149 
00150 
00151 
00152 
00153 

Generated on Wed Jan 23 12:58:32 2002 for Atlfast by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001