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

Gridlet.h

Go to the documentation of this file.
00001 #ifndef FASTSHOWER_GRIDLET_H
00002 #define FASTSHOWER_GRIDLET_H
00003 
00004 #ifndef FASTSHOWER_IDEPOSITS_H
00005 #include "FastShowerUtils/IDeposits.h"
00006 #endif
00007 
00008 #ifndef FASTSHOWER_DEPOSITS_H
00009 #include "FastShowerUtils/Deposits.h"
00010 #endif
00011 
00012 #ifndef STD_ASSERT_H
00013 #define STD_ASSERT_H
00014 #include <assert.h>
00015 #endif
00016 
00017 #ifndef STD_CMATH_H
00018 #define STD_CMATH_H
00019 #include <cmath>
00020 #endif
00021 
00022 
00023 class ostream;
00024 class fstream;
00025 
00026 namespace FastShower{
00032   class GridletElement{
00033   public:
00034     GridletElement(double phi, double eta, double e):m_phi(phi), m_eta(eta), m_e(e){
00035     m_et = e/cosh(eta);
00036     }
00037     double phi() const {return m_phi;}
00038     double eta() const {return m_eta;}
00039     double  et() const {return m_et;}
00040     double   e() const {return m_e;}
00041   private:
00042     double m_phi;
00043     double m_eta;
00044     double m_et;
00045     double m_e;
00046   };
00047   using std::pair;
00048   class Gridlet{
00049 
00050     friend class Showerer;
00051 
00052   public:
00053     typedef Deposits<double, 2> DepositsType;
00054     typedef std::pair<DepositsType::ConstIter, DepositsType::ConstIter> DepIterPair;
00055 
00057     Gridlet(double eta, double phi);
00058     ~Gridlet(){};
00059 
00061     void normalise(double) const;
00062 
00064     const DepIterPair& eIters() const;
00065     const DepIterPair& hIters() const;
00066 
00068     std::size_t dimension() const;
00069     std::vector<GridletElement*> eElements() const;
00070     std::vector<GridletElement*> hElements() const;
00071 
00073     double phi0() const ;
00074     double eta0() const ;
00075 
00077     double  phi(int index) const;
00078     double  eta(int index) const;
00079 
00081     double eSumE() const;
00082     double hSumE() const;
00083 
00085     double eSumEt() const;
00086     double hSumEt() const;
00087 
00088   private:
00090     IDeposits& emDeposits();
00091     IDeposits& hadDeposits();
00092 
00094     static const double s_phiStep;
00095     static const double s_etaStep;
00096 
00098     const double m_eta0;
00099     //FIXME - should use Phi class - but i cant use AtlfastUtils right now!
00100     const double m_phi0;
00101     
00102     DepositsType m_eDeps;
00103     DepositsType m_hDeps;
00104 
00105     DepIterPair m_eDepIters;
00106     DepIterPair m_hDepIters;
00107   };
00108 
00109   std::ostream& operator<<(std::ostream& out, Gridlet&);
00110   std::ostream& operator<<(std::ostream& out, Gridlet*);
00111 
00112   //
00113   inline IDeposits& Gridlet::emDeposits (){return m_eDeps;}
00114   inline IDeposits& Gridlet::hadDeposits(){return m_hDeps;}
00115   inline std::size_t Gridlet::dimension() const {return m_eDeps.dimension();}
00116   inline 
00117     const Gridlet::DepIterPair& Gridlet::eIters() const {return m_eDepIters;}
00118   inline 
00119     const Gridlet::DepIterPair& Gridlet::hIters() const {return m_hDepIters;}
00120 
00121 
00122 }//namespace
00123 #endif
00124 
00125 
00126 
00127 
00128 
00129 
00130 
00131 

Generated on Tue Mar 18 11:49:57 2003 for FastShowerUtils by doxygen1.3-rc1