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

Cell.h

Go to the documentation of this file.
00001 // Cell class
00002 //
00003 // This is Richard's test version - needs unifiying with PELC's test version
00004 //
00005 // FIXME htp test version only
00006 //
00007 // HTP put into namespace Atlfast and a little tidying of names done for 
00008 // consistency
00009 // HTP I have also made trhe CellDescriptor member variable into a proper 
00010 // CellDecsriptor
00011 // not a pointer as that was cuasing a certainamount of unnecessary 
00012 // complication
00013 //
00014 #ifndef _Atlfast_CELL_H
00015 #define _Atlfast_CELL_H
00016 
00017   
00018 #include "GaudiKernel/ContainedObject.h"
00019 #include "GaudiKernel/ObjectVector.h"
00020 #include "CLHEP/Vector/LorentzVector.h"
00021 
00022 
00023 #include "AtlfastCode/IKinematic.h"
00024 #include "AtlfastCode/CellDescriptor.h"
00025 
00026 #include "AtlfastCode/AssociationManager.h"
00027 #include <vector>
00028 #include "HepMC/ParticleData.h"
00029 #include "HepMC/IO_PDG_ParticleDataTable.h"
00030 
00031 // Class ID for Cell class
00032 static const CLID CLID_ATLFAST_CELL=2301 ;
00033 
00034 namespace Atlfast {
00041   class Cell : 
00042     public ContainedObject, 
00043     public IKinematic, 
00044     public AssociationManager 
00045     {
00046     public:
00048       Cell() : ContainedObject(), AssociationManager(){}
00050       Cell(const CellDescriptor& cellID) ;
00052       Cell(const Cell&) ; 
00054       Cell& operator=(const Cell&); 
00056       virtual ~Cell() { } 
00058       static const  CLID& classID()    { return CLID_ATLFAST_CELL; }
00060       virtual const CLID& clID() const { return CLID_ATLFAST_CELL; }
00064       void newHit(const HepMC::GenParticle* part);
00068       void reset();
00072       virtual HepLorentzVector momentum() const;
00076       virtual double eta() const {return m_id.eta();}
00080       virtual double phi() const {return m_id.phi();} 
00084       virtual double pT()  const {return m_ptSum;}
00088       virtual double eT() const {return m_ptSum;} 
00092       virtual double mT() const {return 0;} // HTP FIXME!!!!
00093 
00097       int numberOfHits() const {return m_particles.size();}
00098       
00103       std::vector<const HepMC::GenParticle*> particles() const {return m_particles;}
00104       
00108       virtual StreamBuffer& serialize(StreamBuffer& s);
00109 
00113       virtual StreamBuffer& serialize(StreamBuffer& s) const;
00114 
00115     private:
00116       
00120       CellDescriptor m_id;
00124       double         m_ptSum;
00125       HepLorentzVector m_momentum; 
00129       std::vector<const HepMC::GenParticle*> m_particles;
00130       
00131     };
00132   
00133   typedef ObjectVector<Cell> CellCollection;
00134   typedef ObjectVector<Cell>::iterator CellIterator;
00135   
00136   
00137 }  //end of namespace bracket
00138 #endif
00139 
00140 
00141 
00142 
00143 
00144 
00145 
00146 
00147 

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