Atlfast::Cell Class Reference

#include <Cell.h>

Inheritance diagram for Atlfast::Cell:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Cell ()
 Cell (const CellDescriptor &cellID)
 Cell (const Cell &)
Celloperator= (const Cell &)
virtual ~Cell ()
virtual void newHit (const GenParticle *part)
virtual void newHit (const HepLorentzVector)
 GenParticle.
virtual void newHit (double pT)
 Pileup.
virtual void newHit (const EPileupDeposit *)
virtual void setPt (HepLorentzVector &)
 set pT by value
virtual void resetCell ()
 set pT via HLV
virtual int numberOfHits () const
 Reset.
virtual std::vector< const
GenParticle * > 
particles () const
virtual void addParticle (const GenParticle *)
 add particle adds the particle if not already present
virtual HepLorentzVector momentum () const
 IKinematic interface methods.
virtual double eta () const
virtual double phi () const
virtual double pT () const
virtual double eT () const
virtual double mT () const
virtual IKinematicclone () const
virtual void accept (IAOOvisitor *) const
 IAOO interface method.
virtual void print (const std::string &coor, std::string t="") const
 IKinematic debug.
virtual void fillNavTokenFromAssocs (INavigationToken &) const=0
virtual double e () const
virtual double m () const
virtual void associate (const IAOO *otherEntity)=0
 store any object with IAOO above it the inheritance heirarchy
virtual std::vector< const
IAOO * >::const_iterator 
begin () const=0
 iterators for the store.
virtual std::vector< const
IAOO * >::const_iterator 
end () const=0
virtual bool unAssociated () const=0
 A quick way to find out whether there are any associations at a ll.
virtual void reset ()=0
 zero the container
virtual void dump (const std::string &s) const =0
 dump out debug info

Protected Member Functions

virtual void fillToken (INavigationToken &) const
virtual void fillToken (INavigationToken &, const boost::any &) const
virtual void fillNavTokenFromAssocs (INavigationToken &) const
virtual void associate (const IAOO *otherEntity)
 store any object with IAOO above it the inheritance heirarchy
virtual std::vector< const
IAOO * >::const_iterator 
begin () const
 iterators for the store.
virtual std::vector< const
IAOO * >::const_iterator 
end () const
virtual bool unAssociated () const
 A quick way to find out whether there are any associations at a ll.
virtual void reset ()
 zero the container
virtual void dump (const std::string &) const
 dump out debug info

Private Attributes

CellDescriptor m_id
 Information about the Cell position.
double m_ptSum
 total pt deoposited in cell
HepLorentzVector m_momentum
 momentum vector asscociated with the cell
std::vector< const GenParticle * > m_particles
 all the particles that have hit this cell

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 65 of file Cell.h.


Constructor & Destructor Documentation

Atlfast::Cell::Cell (  ) 

Definition at line 10 of file Cell.cxx.

00010             : 
00011     AODNavigationImp(),
00012     m_id(),
00013     m_ptSum(0.),
00014     m_momentum(0.),
00015     m_particles(){
00016   }

Atlfast::Cell::Cell ( const CellDescriptor cellID  )  [explicit]

Definition at line 18 of file Cell.cxx.

00018                                          :
00019     AODNavigationImp(),
00020     m_id(cellID),
00021     m_ptSum(0.),
00022     m_momentum(0.),
00023     m_particles(){
00024 
00025   }
  

Atlfast::Cell::Cell ( const Cell  ) 

Definition at line 41 of file Cell.cxx.

00041                                  : 
00042     Atlfast::IAOO(otherCell),
00043     INavigable(otherCell),
00044     I4Momentum(otherCell),
00045     INavigable4Momentum(otherCell),
00046     Atlfast::IKinematic(otherCell),
00047     Atlfast::IAODNavigation(otherCell),
00048     Atlfast::ICell(otherCell),
00049     AODNavigationImp(otherCell){
00050     *this=otherCell; //shallow copy
00051   }

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

Definition at line 71 of file Cell.h.

00071 { } 


Member Function Documentation

Cell & Atlfast::Cell::operator= ( const Cell  ) 

Definition at line 28 of file Cell.cxx.

00028                                             {
00029 
00030     if (this!=&otherCell){
00031       AODNavigationImp::operator=(otherCell);
00032       this->m_id=otherCell.m_id;
00033       this->m_ptSum=otherCell.m_ptSum;
00034       this->m_particles=otherCell.m_particles;//shallow copy
00035     }
00036     
00037     return *this;
00038   }

virtual void Atlfast::Cell::newHit ( const GenParticle *  part  )  [virtual]

Implements Atlfast::ICell.

void Atlfast::Cell::newHit ( const   HepLorentzVector  )  [virtual]

GenParticle.

Implements Atlfast::ICell.

Definition at line 75 of file Cell.cxx.

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

void Atlfast::Cell::newHit ( double  pT  )  [virtual]

Pileup.

Implements Atlfast::ICell.

Definition at line 79 of file Cell.cxx.

00079                             {
00080     //    cerr<<"Cell::newHit(double pT) "<<pT<<endl;
00081     m_ptSum += pT;
00082   }    

void Atlfast::Cell::newHit ( const EPileupDeposit part  )  [virtual]

Energy Pileup deposited into cell

Implements Atlfast::ICell.

Definition at line 85 of file Cell.cxx.

00085                                              {
00086     m_ptSum += part->energyDeposit();
00087   }

void Atlfast::Cell::setPt ( HepLorentzVector &   )  [virtual]

set pT by value

Implements Atlfast::ICell.

Definition at line 94 of file Cell.cxx.

00094                                        {
00095     m_ptSum=vec.perp(); 
00096   } 

void Atlfast::Cell::resetCell (  )  [virtual]

set pT via HLV

Implements Atlfast::ICell.

Reimplemented in Atlfast::TwoCptCell.

Definition at line 89 of file Cell.cxx.

00089                       {
00090     m_ptSum=0.0;
00091     m_particles.erase(m_particles.begin(), m_particles.end());
00092   }

virtual int Atlfast::Cell::numberOfHits (  )  const [inline, virtual]

Reset.

Implements Atlfast::ICell.

Definition at line 80 of file Cell.h.

00080 {return m_particles.size();}

std::vector< const GenParticle * > Atlfast::Cell::particles (  )  const [virtual]

Implements Atlfast::ICell.

Definition at line 99 of file Cell.cxx.

00099                                                       {
00100     return m_particles;
00101   }

virtual void Atlfast::Cell::addParticle ( const GenParticle *   )  [virtual]

add particle adds the particle if not already present

Implements Atlfast::ICell.

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

IKinematic interface methods.

Implements Atlfast::IKinematic.

Definition at line 54 of file Cell.cxx.

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

double Atlfast::Cell::eta (  )  const [virtual]

Implements Atlfast::IKinematic.

Definition at line 103 of file Cell.cxx.

00103 {return m_id.eta();}

double Atlfast::Cell::phi (  )  const [virtual]

Implements Atlfast::IKinematic.

Definition at line 105 of file Cell.cxx.

00105 {return m_id.phi();} 

double Atlfast::Cell::pT (  )  const [virtual]

Implements Atlfast::IKinematic.

Definition at line 107 of file Cell.cxx.

00107 {return m_ptSum;}

double Atlfast::Cell::eT (  )  const [virtual]

Implements Atlfast::IKinematic.

Definition at line 109 of file Cell.cxx.

00109 {return m_ptSum;} 

double Atlfast::Cell::mT (  )  const [virtual]

Implements Atlfast::IKinematic.

Definition at line 111 of file Cell.cxx.

00111 {return 0;}

IKinematic * Atlfast::Cell::clone (  )  const [virtual]

Implements Atlfast::IKinematic.

Reimplemented in Atlfast::TwoCptCell.

Definition at line 113 of file Cell.cxx.

00113                                {
00114     IKinematic* ik = new Cell(*this);
00115     return ik;
00116   }

void Atlfast::Cell::accept ( IAOOvisitor  )  const [virtual]

IAOO interface method.

Implements Atlfast::IAOO.

Reimplemented in Atlfast::TwoCptCell.

Definition at line 66 of file Cell.cxx.

00066                                            {
00067     iaPtr->process(this);
00068   }

void Atlfast::Cell::print ( const std::string &  coor,
std::string  t = "" 
) const [virtual]

IKinematic debug.

Reimplemented from Atlfast::IKinematicBase.

Reimplemented in Atlfast::TwoCptCell.

Definition at line 124 of file Cell.cxx.

00124                                                           {
00125     AODNavigationImp::print(coor, t);
00126     std::cout<<t<<"Number of particles: "
00127              <<std::setw(6)<<m_particles.size()
00128              <<std::string(45,' ')
00129              <<" Cell"<<std::endl;
00130   }

virtual void Atlfast::IAODNavigation::fillNavTokenFromAssocs ( INavigationToken &   )  const [pure virtual, inherited]

Implemented in Atlfast::AODNavigationImp.

virtual double Atlfast::IKinematic::e (  )  const [inline, virtual, inherited]

Reimplemented in Atlfast::Jet.

Definition at line 75 of file IKinematic.h.

00075 {return this->momentum().e();}

virtual double Atlfast::IKinematic::m (  )  const [inline, virtual, inherited]

Definition at line 76 of file IKinematic.h.

00076 {return this->momentum().m();}

virtual void Atlfast::IAOO::associate ( const IAOO otherEntity  )  [pure virtual, inherited]

store any object with IAOO above it the inheritance heirarchy

Implemented in Atlfast::AOObase.

virtual std::vector<const IAOO*>::const_iterator Atlfast::IAOO::begin (  )  const [pure virtual, inherited]

iterators for the store.

Implemented in Atlfast::AOObase.

virtual std::vector<const IAOO*>::const_iterator Atlfast::IAOO::end (  )  const [pure virtual, inherited]

Implemented in Atlfast::AOObase.

virtual bool Atlfast::IAOO::unAssociated (  )  const [pure virtual, inherited]

A quick way to find out whether there are any associations at a ll.

Implemented in Atlfast::AOObase.

virtual void Atlfast::IAOO::reset (  )  [pure virtual, inherited]

zero the container

Implemented in Atlfast::AOObase.

virtual void Atlfast::IAOO::dump ( const std::string &  s  )  const [pure virtual, inherited]

dump out debug info

Implemented in Atlfast::AOObase.

virtual void Atlfast::AODNavigationImp::fillToken ( INavigationToken &   )  const [inline, virtual, inherited]

Reimplemented in Atlfast::Cluster, and Atlfast::Jet.

Definition at line 48 of file AODNavigationImp.h.

00048 { };

virtual void Atlfast::AODNavigationImp::fillToken ( INavigationToken &  ,
const boost::any &   
) const [inline, virtual, inherited]

Reimplemented in Atlfast::Cluster, and Atlfast::Jet.

Definition at line 49 of file AODNavigationImp.h.

00049 { };

void Atlfast::AODNavigationImp::fillNavTokenFromAssocs ( INavigationToken &   )  const [virtual, inherited]

Implements Atlfast::IAODNavigation.

Definition at line 14 of file AODNavigationImp.cxx.

00014                                                                             {
00015     NavigationToken<I4Momentum>* i4Token =
00016       dynamic_cast< NavigationToken<I4Momentum>* >(&token);
00017     if ( i4Token == 0 ) return;
00018     
00019     TypeVisitor typeVisitor = SimpleAssocsDispatcher(this, TypeVisitor());
00020 
00021     std::vector<const I4Momentum*> i4s = typeVisitor.i4momenta();    
00022     std::vector<const I4Momentum*>::const_iterator iter = i4s.begin();
00023     for(;iter!= i4s.end(); ++iter){i4Token->setObject(*iter);}
00024   }

void Atlfast::AOObase::associate ( const IAOO otherEntity  )  [virtual, inherited]

store any object with IAOO above it the inheritance heirarchy

Implements Atlfast::IAOO.

Definition at line 18 of file AOObase.cxx.

00018                                            {
00019     m_associations.push_back( other ) ;
00020   }

std::vector< const IAOO * >::const_iterator Atlfast::AOObase::begin (  )  const [virtual, inherited]

iterators for the store.

Implements Atlfast::IAOO.

Definition at line 10 of file AOObase.cxx.

00010                                                            {
00011     return m_associations.begin();
00012   }

std::vector< const IAOO * >::const_iterator Atlfast::AOObase::end (  )  const [virtual, inherited]

Implements Atlfast::IAOO.

Definition at line 14 of file AOObase.cxx.

00014                                                            {
00015     return m_associations.end();
00016   }

virtual bool Atlfast::AOObase::unAssociated (  )  const [inline, virtual, inherited]

A quick way to find out whether there are any associations at a ll.

Implements Atlfast::IAOO.

Definition at line 31 of file AOObase.h.

00031 { return m_associations.empty() ; }

virtual void Atlfast::AOObase::reset (  )  [inline, virtual, inherited]

zero the container

Implements Atlfast::IAOO.

Definition at line 32 of file AOObase.h.

00032 { m_associations.clear();}

void Atlfast::AOObase::dump ( const std::string &   )  const [virtual, inherited]

dump out debug info

Implements Atlfast::IAOO.

Definition at line 22 of file AOObase.cxx.

00022                                             {
00023     std::cout<<'\n'<<s<<"Associations: "
00024              <<std::setw(6)<<m_associations.size()
00025              <<std::string(53,' ')
00026              <<"AOObase"<<std::endl;
00027     //std::for_each(m_associations.begin(), 
00028     //    m_associations.end(), 
00029     //    AtlfastDumperObject("Associations", "   ")
00030     //    );
00031   }


Member Data Documentation

CellDescriptor Atlfast::Cell::m_id [private]

Information about the Cell position.

Definition at line 103 of file Cell.h.

double Atlfast::Cell::m_ptSum [private]

total pt deoposited in cell

Definition at line 105 of file Cell.h.

HepLorentzVector Atlfast::Cell::m_momentum [private]

momentum vector asscociated with the cell

Definition at line 107 of file Cell.h.

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

all the particles that have hit this cell

Definition at line 109 of file Cell.h.


The documentation for this class was generated from the following files:
Generated on Fri Sep 21 13:00:19 2007 for AtlfastEvent by  doxygen 1.5.1