00001 #ifndef FASTSHOWER_HALODEPOSITOR_H 00002 #define FASTSHOWER_HALODEPOSITOR_H 00003 00004 #ifndef FASTSHOWER_SP_H 00005 #include "FastShowerUtils/SP.h" 00006 #endif 00007 00008 #ifndef FASTSHOWER_IDEPOSITOR_H 00009 #include "FastShowerUtils/IDepositor.h" 00010 #endif 00011 00012 #ifndef FASTSHOWER_DEBUGBASE_H 00013 #include "FastShowerUtils/DebugBase.h" 00014 #endif 00015 00016 #ifndef FASTSHOWER_SPLITDECISION_H 00017 #include "FastShowerUtils/SplitDecision.h" 00018 #endif 00019 00020 #ifndef BOOST_ARRAY_HPP 00021 #include <boost/array.hpp> 00022 #define BOOST_ARRAY_HPP 00023 #endif 00024 00025 #ifndef STD_STRING_H 00026 #define STD_STRING_H 00027 #include <string> 00028 #endif 00029 00030 namespace FastShower{ 00039 class ParticleParameters; 00040 class IDeposits; 00041 class Normalisations; 00042 class IConfigurer; 00043 class IFnOfParticleParameters; 00044 00045 using boost::array; 00046 00047 class HaloDepositor: virtual public IDepositor, private DebugBase{ 00048 public: 00049 static const std::size_t s_nHaloCells=14; 00050 typedef std::vector<double> HaloDeposits; 00051 typedef HaloDeposits::iterator HaloDepIter; 00052 typedef HaloDeposits::const_iterator HaloDepCIter; 00053 typedef std::vector<int> HaloArray; 00054 typedef HaloArray::const_iterator HaloArrCIter; 00055 typedef std::vector<IFnOfParticleParameters*> HaloFns; 00056 typedef HaloFns::iterator HaloFnsIter; 00057 typedef HaloFns::const_iterator HaloFnsCIter; 00058 00059 //HaloDepositor(HaloArray*, HaloFns*); 00060 HaloDepositor(const IConfigurer*, const std::string&); 00061 ~HaloDepositor(); 00065 virtual void deposit(const ParticleParameters&, 00066 const Normalisations&, IDeposits&); 00067 virtual IDepositor* clone() const; 00072 virtual void components(IDebug::Cpts&) const; 00073 // 00074 private: 00081 void shuffle(const HaloDeposits& src, HaloDeposits& dest) const; 00084 void invShuffle(const HaloDeposits& src, HaloDeposits& dest) const; 00088 HaloArray m_order; 00091 HaloFns m_fns; 00094 boost::array< array<pair<int, int>, s_nHaloCells>, 4> m_mappers; 00096 SplitDecision m_decider; 00097 }; 00098 }//namespace 00099 #endif 00100 00101 00102 00103 00104 00105 00106