00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
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
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;}
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 }
00138 #endif
00139
00140
00141
00142
00143
00144
00145
00146
00147