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

Jet.cxx

Go to the documentation of this file.
00001 // Jet implementation
00002 //
00003 
00004 #include "AtlfastEvent/Jet.h"
00005 #include "AtlfastEvent/ParticleCodes.h"
00006 //#include "AtlfastUtils/HepMC_helper/IMCselector.h"
00007 
00008 #include "GaudiKernel/ObjectList.h"
00009 #include "GaudiKernel/ObjectVector.h"
00010 #include "GaudiKernel/ObjectFactory.h"
00011 
00012 static ContainedObjectFactory < Atlfast::Jet > s_AtlfastJetFactory;
00013 const IFactory& AtlfastJetFactory = s_AtlfastJetFactory;
00014 
00015 namespace Atlfast {
00016   Jet::Jet( const Cluster& cluster):
00017     ContainedObject(), 
00018     AssociationManager(), 
00019     
00020     m_momentum(cluster.momentum()),
00021     m_flavor(ParticleCodes::UQUARK),
00022     m_tagged(true){
00023     
00024     this->associate(&cluster);
00025   }
00026 
00027   Jet::Jet( const HepLorentzVector& vec, Cluster& cluster ): 
00028     ContainedObject(), 
00029     AssociationManager(), 
00030     
00031     m_momentum(vec),
00032     m_flavor(ParticleCodes::UQUARK),
00033     m_tagged(true){
00034     // Here we fill the related cells vector with pointers to the cells
00035     // from which it was constructed.
00036     this->associate( &cluster );
00037   }
00038 
00039   void Jet::setMomentum(const HepLorentzVector& vec) {m_momentum=vec;}
00040 
00041   HepLorentzVector Jet::momentum() const {return m_momentum; } 
00042   double  Jet::eta() const { return m_momentum.pseudoRapidity() ;}
00043   double  Jet::phi() const { return m_momentum.phi() ;  } 
00044   double  Jet::pT()  const { return m_momentum.perp() ;}
00045   double  Jet::eT()  const { 
00046     return m_momentum.e()*m_momentum.perp()/m_momentum.rho() ;} 
00047   double  Jet::mT()  const { return m_momentum.mt(); } 
00048   double  Jet::px()  const { return m_momentum.px(); } 
00049   double  Jet::py()  const { return m_momentum.py(); } 
00050   double  Jet::pz()  const { return m_momentum.pz(); } 
00051       
00052   double  Jet::e()   const { return m_momentum.e(); } 
00053       
00054   //methods to set and interogate flavor tag  
00055   void Jet::setBTag() {
00056     m_flavor=ParticleCodes::BQUARK;
00057     m_tagged=true;
00058   }
00059   void Jet::setCTag() {
00060     m_flavor=ParticleCodes::CQUARK;
00061     m_tagged=true;
00062   }
00063 
00064  void Jet::setLightTag() {
00065     m_flavor=ParticleCodes::UQUARK;
00066     m_tagged=true;
00067   }
00068 
00069   void Jet::setTauTag(int tauTag){
00070     m_flavor=tauTag;
00071     m_tagged=true;
00072   }
00073   void Jet::setUntagged() {
00074     m_flavor=0;
00075     m_tagged=false;
00076   }
00077 
00078   bool Jet::isBTag()   const {
00079     return m_flavor==ParticleCodes::BQUARK && m_tagged;
00080   }
00081 
00082   bool Jet::isCTag()   const{
00083     return m_flavor==ParticleCodes::CQUARK && m_tagged;
00084   }
00085 
00086   bool Jet::isLightTag()   const{
00087     return m_flavor==ParticleCodes::UQUARK && m_tagged;
00088   }
00089 
00090   bool Jet::isTauTag() const {
00091     return m_flavor==ParticleCodes::TAU    && m_tagged;
00092   }
00093   bool Jet::isTagged() const {
00094     return m_tagged;
00095   }
00096 
00097   int Jet::pdg_id()    const {return m_flavor;}
00098 
00099 } // end of namespace bracket
00100 
00101 
00102 
00103 
00104 
00105 
00106 
00107 

Generated on Fri Nov 29 12:55:12 2002 by doxygen1.3-rc1