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

Atlfast::Cell Class Reference

Represent 2D surface elements in eta-phi space of the Calorimeter. More...

#include <Cell.h>

Inheritance diagram for Atlfast::Cell:

Inheritance graph
[legend]
Collaboration diagram for Atlfast::Cell:

Collaboration graph
[legend]
List of all members.

Public Methods

 Cell ()
 Default Constructor.

 Cell (const CellDescriptor &cellID)
 Copy Constructor from CellDescriptor.

 Cell (const Cell &)
 Copy Constructor from Cell.

Cell & operator= (const Cell &)
 Assignment Operator.

virtual ~Cell ()
 Default Destructor.

virtual const CLID & clID () const
 Athena contained object method.

void newHit (const GenParticle *part)
 Deposits HepMC::GenParticle within itself.

void newHit (const EPileupDeposit *)
 Energy Pileup deposited into cell.

void setPt (HepLorentzVector &)
 Set pT to a new value.

void reset ()
 Resets itself to an 'empty' state.

virtual HepLorentzVector momentum () const
 IKinematic interface method.

virtual double eta () const
 IKinematic interface method.

virtual double phi () const
 IKinematic interface method.

virtual double pT () const
 IKinematic interface method.

virtual double eT () const
 IKinematic interface method.

virtual double mT () const
 IKinematic interface method.

int numberOfHits () const
 Returns number of hits.

std::vector< const GenParticle * > particles () const
 Returns a vector of HepMC::GenParticles which have been deposited in the cell.


Static Public Methods

const CLID & classID ()
 Athena contained object method.


Private Attributes

CellDescriptor m_id
 Cell identifier.

double m_ptSum
 Pt sum in cell.

HepLorentzVector m_momentum
std::vector< const GenParticle * > m_particles
 Vector of HepMC::GenParticles which have deposited energy.


Detailed Description

Represent 2D surface elements in eta-phi space of the Calorimeter.

Cells honour the IKinematic interface and thus contain the documented kinematic methods.

Definition at line 53 of file Cell.h.


Constructor & Destructor Documentation

Atlfast::Cell::Cell  
 

Default Constructor.

Definition at line 13 of file Cell.cxx.

00013             : 
00014     ContainedObject(), 
00015     AssociationManager(),
00016     m_id(),
00017     m_ptSum(0.),
00018     m_momentum(0.),
00019     m_particles(){
00020   }

Atlfast::Cell::Cell const CellDescriptor   cellID
 

Copy Constructor from CellDescriptor.

Definition at line 21 of file Cell.cxx.

00021                                          :
00022     ContainedObject(),
00023     AssociationManager(),
00024     m_id(cellID),
00025     m_ptSum(0.),
00026     m_momentum(0.),
00027     m_particles(){
00028   }
  

Atlfast::Cell::Cell const Cell &   
 

Copy Constructor from Cell.

Definition at line 42 of file Cell.cxx.

00042                                   : 
00043     ContainedObject(), 
00044     IKinematic(),
00045     AssociationManager(){
00046     *this=otherCell; //no deep copy of vector of pointers as is a 
00047     //ContainedObject
00048   }

virtual Atlfast::Cell::~Cell   [inline, virtual]
 

Default Destructor.

Definition at line 67 of file Cell.h.

00067 { } 


Member Function Documentation

const CLID& Atlfast::Cell::classID   [inline, static]
 

Athena contained object method.

Definition at line 69 of file Cell.h.

00069 { return CLID_ATLFAST_CELL; }

virtual const CLID& Atlfast::Cell::clID   const [inline, virtual]
 

Athena contained object method.

Definition at line 71 of file Cell.h.

00071 { return CLID_ATLFAST_CELL; }

virtual double Atlfast::Cell::eT   const [inline, virtual]
 

IKinematic interface method.

Implements Atlfast::IKinematic.

Definition at line 108 of file Cell.h.

References m_ptSum.

00108 {return m_ptSum;} 

virtual double Atlfast::Cell::eta   const [inline, virtual]
 

IKinematic interface method.

Implements Atlfast::IKinematic.

Definition at line 96 of file Cell.h.

References Atlfast::CellDescriptor::eta(), and m_id.

00096 {return m_id.eta();}

HepLorentzVector Atlfast::Cell::momentum   const [virtual]
 

IKinematic interface method.

Implements Atlfast::IKinematic.

Definition at line 50 of file Cell.cxx.

References Atlfast::CellDescriptor::eta(), m_id, Atlfast::CellDescriptor::phi(), and pT().

00050                                        {
00051     //sum momentum calculated as if all particles hit cell center 
00052     double px,py,pz,e;
00053     px=pT()*cos(m_id.phi());
00054     py=pT()*sin(m_id.phi());
00055     pz=pT()*sinh(m_id.eta());
00056     e=pT()*cosh(m_id.eta());
00057     HepLorentzVector vec(px,py,pz,e);
00058     return vec;
00059   }

virtual double Atlfast::Cell::mT   const [inline, virtual]
 

IKinematic interface method.

Implements Atlfast::IKinematic.

Definition at line 112 of file Cell.h.

00112 {return 0;} // HTP FIXME!!!!

void Atlfast::Cell::newHit const EPileupDeposit   part
 

Energy Pileup deposited into cell.

Definition at line 67 of file Cell.cxx.

References Atlfast::EPileupDeposit::energyDeposit(), and m_ptSum.

00067                                              {
00068     m_ptSum += part->energyDeposit();
00069   }

void Atlfast::Cell::newHit const GenParticle *    part
 

Deposits HepMC::GenParticle within itself.

Definition at line 62 of file Cell.cxx.

References m_particles, and m_ptSum.

00062                                                {
00063     m_ptSum += part->momentum().perp();
00064     m_particles.push_back(part);
00065   }

int Atlfast::Cell::numberOfHits   const [inline]
 

Returns number of hits.

Definition at line 117 of file Cell.h.

References m_particles.

00117 {return m_particles.size();}

Cell & Atlfast::Cell::operator= const Cell &   
 

Assignment Operator.

Definition at line 30 of file Cell.cxx.

References m_id, m_particles, and m_ptSum.

00030                                             {
00031 
00032     if (this!=&otherCell){
00033       this->m_id=otherCell.m_id;
00034       this->m_ptSum=otherCell.m_ptSum;
00035       this->m_particles=otherCell.m_particles;//m_particles is a 
00036       //ContainedObject therefore do not deep copy
00037     }
00038     
00039     return *this;
00040   }

std::vector< const GenParticle * > Atlfast::Cell::particles   const
 

Returns a vector of HepMC::GenParticles which have been deposited in the cell.

Definition at line 79 of file Cell.cxx.

References m_particles, and particles().

Referenced by particles().

00079                                                       {
00080     std::vector<const GenParticle*> particles;
00081     //std::copy(m_particles.begin(),m_particles.end(),particles.begin());
00082     //for(DataVector<const GenParticle>::const_iterator itr = m_particles.begin();
00083     //  itr != m_particles.end();++itr) particles.push_back(*itr);
00084     return m_particles;
00085     }

virtual double Atlfast::Cell::phi   const [inline, virtual]
 

IKinematic interface method.

Implements Atlfast::IKinematic.

Definition at line 100 of file Cell.h.

References m_id, and Atlfast::CellDescriptor::phi().

00100 {return m_id.phi();} 

virtual double Atlfast::Cell::pT   const [inline, virtual]
 

IKinematic interface method.

Implements Atlfast::IKinematic.

Definition at line 104 of file Cell.h.

References m_ptSum.

Referenced by momentum().

00104 {return m_ptSum;}

void Atlfast::Cell::reset  
 

Resets itself to an 'empty' state.

Reimplemented from Atlfast::AssociationManager.

Definition at line 71 of file Cell.cxx.

References m_particles, and m_ptSum.

00071                   {
00072     m_ptSum=0.0;
00073     m_particles.erase(m_particles.begin(), m_particles.end());
00074   }

void Atlfast::Cell::setPt HepLorentzVector &   
 

Set pT to a new value.

Definition at line 75 of file Cell.cxx.

References m_ptSum.

00075                                        {
00076     m_ptSum=vec.perp(); 
00077   } 


Member Data Documentation

CellDescriptor Atlfast::Cell::m_id [private]
 

Cell identifier.

Definition at line 130 of file Cell.h.

Referenced by eta(), momentum(), operator=(), and phi().

HepLorentzVector Atlfast::Cell::m_momentum [private]
 

Definition at line 135 of file Cell.h.

std::vector<const GenParticle*> Atlfast::Cell::m_particles [private]
 

Vector of HepMC::GenParticles which have deposited energy.

Todo:
Need to implement as GenParticleLinks rather than GenParticle pointers

Definition at line 140 of file Cell.h.

Referenced by newHit(), numberOfHits(), operator=(), particles(), and reset().

double Atlfast::Cell::m_ptSum [private]
 

Pt sum in cell.

Definition at line 134 of file Cell.h.

Referenced by eT(), newHit(), operator=(), pT(), reset(), and setPt().


The documentation for this class was generated from the following files:
Generated on Fri Nov 29 12:55:18 2002 by doxygen1.3-rc1