| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

SimPmtHit.h

Go to the documentation of this file.
00001 
00002 //   **************************************************************************
00003 //   *                                                                        *
00004 //   *                      ! ! ! A T T E N T I O N ! ! !                     *
00005 //   *                                                                        *
00006 //   *  This file was created automatically by GaudiObjDesc, please do not    *
00007 //   *  delete it or edit it by hand.                                         *
00008 //   *                                                                        *
00009 //   *  If you want to change this file, first change the corresponding       *
00010 //   *  xml-file and rerun the tools from GaudiObjDesc (or run make if you    *
00011 //   *  are using it from inside a Gaudi-package).                            *
00012 //   *                                                                        *
00013 //   **************************************************************************
00014 
00015 #ifndef SimEvent_SimPmtHit_H
00016 #define SimEvent_SimPmtHit_H 1
00017 
00018 // Include files
00019 #include "SimTrackReference.h"
00020 #include "CLHEP/Vector/ThreeVector.h"
00021 #include "Event/SimHit.h"
00022 #include "Event/SimTrack.h"
00023 #include "GaudiKernel/boost_allocator.h"
00024 #include <ostream>
00025 
00026 // Forward declarations
00027 
00028 namespace DayaBay 
00029 {
00030 
00031   // Forward declarations
00032   class SimHitCollection;
00033   
00034 
00044   class SimPmtHit: public SimHit
00045   {
00046   public:
00047 
00049     SimPmtHit() : m_dir(),
00050                   m_pol(),
00051                   m_wavelength(0.0),
00052                   m_type(0) {}
00053   
00055     virtual ~SimPmtHit() {}
00056   
00058    virtual std::ostream& fillStream(std::ostream& s) const;
00059   
00062   const CLHEP::Hep3Vector& dir() const;
00063   
00066   void setDir(const CLHEP::Hep3Vector& value);
00067   
00070   const CLHEP::Hep3Vector& pol() const;
00071   
00074   void setPol(const CLHEP::Hep3Vector& value);
00075   
00078   double wavelength() const;
00079   
00082   void setWavelength(double value);
00083   
00086   int type() const;
00087   
00090   void setType(int value);
00091   
00092   
00093   #ifndef GOD_NOALLOC
00095     static void* operator new ( size_t size )
00096     {
00097       return ( sizeof(SimPmtHit) == size ? 
00098                boost::singleton_pool<SimPmtHit, sizeof(SimPmtHit)>::malloc() :
00099                ::operator new(size) );
00100     }
00101   
00105     static void* operator new ( size_t size, void* pObj )
00106     {
00107       return ::operator new (size,pObj);
00108     }
00109   
00111     static void operator delete ( void* p )
00112     {
00113       boost::singleton_pool<SimPmtHit, sizeof(SimPmtHit)>::is_from(p) ?
00114       boost::singleton_pool<SimPmtHit, sizeof(SimPmtHit)>::free(p) :
00115       ::operator delete(p);
00116     }
00117   
00120     static void operator delete ( void* p, void* pObj )
00121     {
00122       ::operator delete (p, pObj);
00123     }
00124   #endif
00125   protected:
00126 
00127   private:
00128 
00129     CLHEP::Hep3Vector m_dir;        
00130     CLHEP::Hep3Vector m_pol;        
00131     double            m_wavelength; 
00132     int               m_type;       
00133   
00134   }; // class SimPmtHit
00135 
00136   inline std::ostream& operator<< (std::ostream& str, const SimPmtHit& obj)
00137   {
00138     return obj.fillStream(str);
00139   }
00140   
00141 } // namespace DayaBay;
00142 
00143 // -----------------------------------------------------------------------------
00144 // end of class
00145 // -----------------------------------------------------------------------------
00146 
00147 // Including forward declarations
00148 #include "SimHitCollection.h"
00149 
00150 
00151 inline std::ostream& DayaBay::SimPmtHit::fillStream(std::ostream& s) const
00152 {
00153   SimHit::fillStream(s);
00154   s << "{ " << "dir :   " << m_dir << std::endl
00155             << "pol :   " << m_pol << std::endl
00156             << "wavelength :    " << (float)m_wavelength << std::endl
00157             << "type :  " << m_type << std::endl << " }";
00158   return s;
00159 }
00160 
00161 
00162 inline const CLHEP::Hep3Vector& DayaBay::SimPmtHit::dir() const 
00163 {
00164   return m_dir;
00165 }
00166 
00167 inline void DayaBay::SimPmtHit::setDir(const CLHEP::Hep3Vector& value) 
00168 {
00169   m_dir = value;
00170 }
00171 
00172 inline const CLHEP::Hep3Vector& DayaBay::SimPmtHit::pol() const 
00173 {
00174   return m_pol;
00175 }
00176 
00177 inline void DayaBay::SimPmtHit::setPol(const CLHEP::Hep3Vector& value) 
00178 {
00179   m_pol = value;
00180 }
00181 
00182 inline double DayaBay::SimPmtHit::wavelength() const 
00183 {
00184   return m_wavelength;
00185 }
00186 
00187 inline void DayaBay::SimPmtHit::setWavelength(double value) 
00188 {
00189   m_wavelength = value;
00190 }
00191 
00192 inline int DayaBay::SimPmtHit::type() const 
00193 {
00194   return m_type;
00195 }
00196 
00197 inline void DayaBay::SimPmtHit::setType(int value) 
00198 {
00199   m_type = value;
00200 }
00201 
00202 
00203 #endif 
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:31:28 2011 for SimEvent by doxygen 1.4.7