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

FastShower::Gridlet Class Reference

#include <Gridlet.h>

List of all members.


Public Types

typedef Deposits< double, 2 > DepositsType
typedef std::pair< DepositsType::ConstIter,
DepositsType::ConstIter > 
DepIterPair

Public Methods

 Gridlet (double eta, double phi)
 initialise a gridlet with incoming particle eta, phi.

 ~Gridlet ()
void normalise (double) const
 scale all energy deposits

const DepIterPaireIters () const
 access to the deposit data structure via const iterators

const DepIterPairhIters () const
std::size_t dimension () const
 define e/hcal elements

std::vector< GridletElement * > eElements () const
std::vector< GridletElement * > hElements () const
double phi0 () const
 get center phi, eta of the hit cell

double eta0 () const
double phi (int index) const
 find the phi, eta coordinates for an index

double eta (int index) const
double eSumE () const
 calculate gridlet's e/h calo Sum E (not ET)

double hSumE () const
double eSumEt () const
 calculate gridlet's e/h calo Sum ET (not E)

double hSumEt () const

Private Methods

IDepositsemDeposits ()
 access to the deposit data structure

IDepositshadDeposits ()

Private Attributes

const double m_eta0
 phi, eta for hit cell

const double m_phi0
DepositsType m_eDeps
DepositsType m_hDeps
DepIterPair m_eDepIters
DepIterPair m_hDepIters

Static Private Attributes

const double s_phiStep
 Coordinates of cell0 Center and cell size.

const double s_etaStep

Friends

class Showerer

Member Typedef Documentation

typedef Deposits<double, 2> FastShower::Gridlet::DepositsType
 

Definition at line 53 of file Gridlet.h.

typedef std::pair<DepositsType::ConstIter, DepositsType::ConstIter> FastShower::Gridlet::DepIterPair
 

Definition at line 54 of file Gridlet.h.

Referenced by eElements(), and hElements().


Constructor & Destructor Documentation

FastShower::Gridlet::Gridlet double    eta,
double    phi
 

initialise a gridlet with incoming particle eta, phi.

Definition at line 15 of file Gridlet.cxx.

00015                                         :
00016     m_eta0     ( eta ), 
00017     m_phi0     ( phi ), 
00018     m_eDeps    ( DepositsType() ), 
00019     m_hDeps    ( DepositsType() ),
00020     m_eDepIters( m_eDeps.begin(), m_eDeps.end() ),
00021     m_hDepIters( m_hDeps.begin(), m_hDeps.end() )
00022   {
00023   }

FastShower::Gridlet::~Gridlet   [inline]
 

Definition at line 58 of file Gridlet.h.

00058 {};

Member Function Documentation

void FastShower::Gridlet::normalise double    const
 

scale all energy deposits

const Gridlet::DepIterPair & FastShower::Gridlet::eIters   const [inline]
 

access to the deposit data structure via const iterators

Definition at line 117 of file Gridlet.h.

References m_eDepIters.

Referenced by eElements(), and FastShower::operator<<().

00117 {return m_eDepIters;}

const Gridlet::DepIterPair & FastShower::Gridlet::hIters   const [inline]
 

Definition at line 119 of file Gridlet.h.

References m_hDepIters.

Referenced by hElements(), and FastShower::operator<<().

00119 {return m_hDepIters;}

std::size_t FastShower::Gridlet::dimension   const [inline]
 

define e/hcal elements

Definition at line 115 of file Gridlet.h.

References m_eDeps.

Referenced by eta(), FastShower::operator<<(), and phi().

00115 {return m_eDeps.dimension();}

std::vector< GridletElement * > FastShower::Gridlet::eElements   const
 

Definition at line 62 of file Gridlet.cxx.

References DepIterPair, and eIters().

Referenced by eSumE(), and eSumEt().

00062                                                       {
00063     
00064     DepIterPair dip = this->eIters();
00065     
00066     FillGridletElementVector fv( this);
00067 
00068     return ( (std::for_each(dip.first, dip.second, fv)).elements() );
00069   }

std::vector< GridletElement * > FastShower::Gridlet::hElements   const
 

Definition at line 71 of file Gridlet.cxx.

References DepIterPair, and hIters().

Referenced by hSumE(), and hSumEt().

00071                                                        {
00072     
00073     DepIterPair dip = this->hIters();
00074     
00075     FillGridletElementVector fv( this);
00076 
00077     return ( (std::for_each(dip.first, dip.second, fv)).elements() );
00078   }

double FastShower::Gridlet::phi0   const
 

get center phi, eta of the hit cell

Definition at line 25 of file Gridlet.cxx.

References m_phi0.

Referenced by FastShower::operator<<().

00025 { return m_phi0;}

double FastShower::Gridlet::eta0   const
 

Definition at line 27 of file Gridlet.cxx.

References m_eta0.

Referenced by FastShower::operator<<().

00027 { return m_eta0;}

double FastShower::Gridlet::phi int    index const
 

find the phi, eta coordinates for an index

Definition at line 29 of file Gridlet.cxx.

References dimension(), m_phi0, and s_phiStep.

Referenced by FastShower::FillGridletElementVector::operator()().

00029                                       {
00030     int dim = this->dimension();
00031     return Phi( m_phi0 +((index/dim) - (dim/2) )*s_phiStep);
00032   }

double FastShower::Gridlet::eta int    index const
 

Definition at line 34 of file Gridlet.cxx.

References dimension(), m_eta0, and s_etaStep.

Referenced by FastShower::FillGridletElementVector::operator()().

00034                                       {
00035     int dim = this->dimension();
00036     return (m_eta0 +((index%dim) - (dim/2) )*s_etaStep);
00037   }

double FastShower::Gridlet::eSumE   const
 

calculate gridlet's e/h calo Sum E (not ET)

Definition at line 81 of file Gridlet.cxx.

References eElements().

Referenced by FastShower::ShowererPtr::shower().

00081                              {
00082     double sum = 0.0;
00083     std::vector<GridletElement*> elements = eElements();
00084     std::vector<GridletElement*>::const_iterator itr, end;
00085     itr = elements.begin();
00086     end = elements.end();
00087     while (itr != end)
00088       sum += (*itr++)->e();
00089     return sum;
00090   }

double FastShower::Gridlet::hSumE   const
 

Definition at line 91 of file Gridlet.cxx.

References hElements().

Referenced by FastShower::ShowererPtr::shower().

00091                              {
00092     double sum = 0.0;
00093     std::vector<GridletElement*> elements = hElements();
00094     std::vector<GridletElement*>::const_iterator itr, end;
00095     itr = elements.begin();
00096     end = elements.end();
00097     while (itr != end)
00098       sum += (*itr++)->e();
00099     return sum;
00100   }

double FastShower::Gridlet::eSumEt   const
 

calculate gridlet's e/h calo Sum ET (not E)

Definition at line 103 of file Gridlet.cxx.

References eElements().

Referenced by FastShower::operator<<().

00103                               {
00104     double sum = 0.0;
00105     std::vector<GridletElement*> elements = eElements();
00106     std::vector<GridletElement*>::const_iterator itr, end;
00107     itr = elements.begin();
00108     end = elements.end();
00109     while (itr != end)
00110       sum += (*itr++)->et();
00111     return sum;
00112   }

double FastShower::Gridlet::hSumEt   const
 

Definition at line 113 of file Gridlet.cxx.

References hElements().

Referenced by FastShower::operator<<().

00113                               {
00114     double sum = 0.0;
00115     std::vector<GridletElement*> elements = hElements();
00116     std::vector<GridletElement*>::const_iterator itr, end;
00117     itr = elements.begin();
00118     end = elements.end();
00119     while (itr != end)
00120       sum += (*itr++)->et();
00121     return sum;
00122   }

IDeposits & FastShower::Gridlet::emDeposits   [inline, private]
 

access to the deposit data structure

Definition at line 113 of file Gridlet.h.

References m_eDeps.

Referenced by FastShower::Showerer::shower().

00113 {return m_eDeps;}

IDeposits & FastShower::Gridlet::hadDeposits   [inline, private]
 

Definition at line 114 of file Gridlet.h.

References m_hDeps.

Referenced by FastShower::Showerer::shower().

00114 {return m_hDeps;}

Friends And Related Function Documentation

friend class Showerer [friend]
 

Definition at line 50 of file Gridlet.h.


Member Data Documentation

const double FastShower::Gridlet::s_phiStep [static, private]
 

Coordinates of cell0 Center and cell size.

Referenced by phi().

const double FastShower::Gridlet::s_etaStep [static, private]
 

Referenced by eta().

const double FastShower::Gridlet::m_eta0 [private]
 

phi, eta for hit cell

Definition at line 98 of file Gridlet.h.

Referenced by eta(), and eta0().

const double FastShower::Gridlet::m_phi0 [private]
 

Definition at line 100 of file Gridlet.h.

Referenced by phi(), and phi0().

DepositsType FastShower::Gridlet::m_eDeps [private]
 

Definition at line 102 of file Gridlet.h.

Referenced by dimension(), and emDeposits().

DepositsType FastShower::Gridlet::m_hDeps [private]
 

Definition at line 103 of file Gridlet.h.

Referenced by hadDeposits().

DepIterPair FastShower::Gridlet::m_eDepIters [private]
 

Definition at line 105 of file Gridlet.h.

Referenced by eIters().

DepIterPair FastShower::Gridlet::m_hDepIters [private]
 

Definition at line 106 of file Gridlet.h.

Referenced by hIters().


The documentation for this class was generated from the following files:
Generated on Tue Mar 18 11:55:20 2003 for FastShowerUtils by doxygen1.3-rc1