/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

SimVertex.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_SimVertex_H
00016 #define SimEvent_SimVertex_H 1
00017 
00018 // Include files
00019 #include "Event/SimTrackReference.h"
00020 #include "Event/SimVertexReference.h"
00021 #include "Event/SimProcess.h"
00022 #include "GaudiKernel/Point3DTypes.h"
00023 #include "GaudiKernel/Vector3DTypes.h"
00024 #include "GaudiKernel/boost_allocator.h"
00025 #include <vector>
00026 #include <list>
00027 #include <map>
00028 #include <ostream>
00029 
00030 // Forward declarations
00031 
00032 namespace DayaBay 
00033 {
00034 
00035   // Forward declarations
00036 
00047   class SimVertex
00048   {
00049   public:
00050 
00052   SimVertex() : m_track(),
00053                  m_process(),
00054                  m_time(-1e18),
00055                  m_position(),
00056                  m_totalEnergy(0),
00057                  m_momentum(),
00058                  m_secondaries(0) {}
00059   
00061   SimVertex(const SimTrackReference& track,
00062               const SimProcess& process,
00063               double time,
00064               const Gaudi::XYZPoint& position,
00065               double totEnergy,
00066               const Gaudi::XYZVector& momentum) : m_track(track),
00067                                                  m_process(process),
00068                                                  m_time(time),
00069                                                  m_position(position),
00070                                                  m_totalEnergy(totEnergy),
00071                                                  m_momentum(momentum),
00072                                                  m_secondaries(0) {}
00073   
00075     virtual ~SimVertex() {}
00076   
00078     double mass() const;
00079   
00081     double kineticEnergy() const;
00082   
00084     void addSecondary(const SimTrackReference& ref);
00085   
00087     std::ostream& fillStream(std::ostream& s) const;
00088   
00091   const DayaBay::SimTrackReference& track() const;
00092   
00095   void setTrack(const DayaBay::SimTrackReference& value);
00096   
00099   const DayaBay::SimProcess& process() const;
00100   
00103   void setProcess(const DayaBay::SimProcess& value);
00104   
00107   double time() const;
00108   
00111   void setTime(double value);
00112   
00115   const Gaudi::XYZPoint& position() const;
00116   
00119   void setPosition(const Gaudi::XYZPoint& value);
00120   
00123   double totalEnergy() const;
00124   
00127   void setTotalEnergy(double value);
00128   
00131   const Gaudi::XYZVector& momentum() const;
00132   
00135   void setMomentum(const Gaudi::XYZVector& value);
00136   
00139   const std::vector<DayaBay::SimTrackReference>& secondaries() const;
00140   
00143   void setSecondaries(const std::vector<DayaBay::SimTrackReference>& value);
00144   
00145   
00146   #ifndef GOD_NOALLOC
00147 
00148     static void* operator new ( size_t size )
00149     {
00150       return ( sizeof(SimVertex) == size ? 
00151                boost::singleton_pool<SimVertex, sizeof(SimVertex)>::malloc() :
00152                ::operator new(size) );
00153     }
00154   
00158     static void* operator new ( size_t size, void* pObj )
00159     {
00160       return ::operator new (size,pObj);
00161     }
00162   
00164     static void operator delete ( void* p )
00165     {
00166       boost::singleton_pool<SimVertex, sizeof(SimVertex)>::is_from(p) ?
00167       boost::singleton_pool<SimVertex, sizeof(SimVertex)>::free(p) :
00168       ::operator delete(p);
00169     }
00170   
00173     static void operator delete ( void* p, void* pObj )
00174     {
00175       ::operator delete (p, pObj);
00176     }
00177   #endif
00178   protected:
00179 
00180   private:
00181 
00182     DayaBay::SimTrackReference              m_track;       
00183     DayaBay::SimProcess                     m_process;     
00184     double                                  m_time;        
00185     Gaudi::XYZPoint                         m_position;    
00186     double                                  m_totalEnergy; 
00187     Gaudi::XYZVector                        m_momentum;    
00188     std::vector<DayaBay::SimTrackReference> m_secondaries; 
00189   
00190   }; // class SimVertex
00191 
00192   inline std::ostream& operator<< (std::ostream& str, const SimVertex& obj)
00193   {
00194     return obj.fillStream(str);
00195   }
00196   
00197 } // namespace DayaBay;
00198 
00199 // -----------------------------------------------------------------------------
00200 // end of class
00201 // -----------------------------------------------------------------------------
00202 
00203 // Including forward declarations
00204 
00205 inline const DayaBay::SimTrackReference& DayaBay::SimVertex::track() const 
00206 {
00207   return m_track;
00208 }
00209 
00210 inline void DayaBay::SimVertex::setTrack(const DayaBay::SimTrackReference& value) 
00211 {
00212   m_track = value;
00213 }
00214 
00215 inline const DayaBay::SimProcess& DayaBay::SimVertex::process() const 
00216 {
00217   return m_process;
00218 }
00219 
00220 inline void DayaBay::SimVertex::setProcess(const DayaBay::SimProcess& value) 
00221 {
00222   m_process = value;
00223 }
00224 
00225 inline double DayaBay::SimVertex::time() const 
00226 {
00227   return m_time;
00228 }
00229 
00230 inline void DayaBay::SimVertex::setTime(double value) 
00231 {
00232   m_time = value;
00233 }
00234 
00235 inline const Gaudi::XYZPoint& DayaBay::SimVertex::position() const 
00236 {
00237   return m_position;
00238 }
00239 
00240 inline void DayaBay::SimVertex::setPosition(const Gaudi::XYZPoint& value) 
00241 {
00242   m_position = value;
00243 }
00244 
00245 inline double DayaBay::SimVertex::totalEnergy() const 
00246 {
00247   return m_totalEnergy;
00248 }
00249 
00250 inline void DayaBay::SimVertex::setTotalEnergy(double value) 
00251 {
00252   m_totalEnergy = value;
00253 }
00254 
00255 inline const Gaudi::XYZVector& DayaBay::SimVertex::momentum() const 
00256 {
00257   return m_momentum;
00258 }
00259 
00260 inline void DayaBay::SimVertex::setMomentum(const Gaudi::XYZVector& value) 
00261 {
00262   m_momentum = value;
00263 }
00264 
00265 inline const std::vector<DayaBay::SimTrackReference>& DayaBay::SimVertex::secondaries() const 
00266 {
00267   return m_secondaries;
00268 }
00269 
00270 inline void DayaBay::SimVertex::setSecondaries(const std::vector<DayaBay::SimTrackReference>& value) 
00271 {
00272   m_secondaries = value;
00273 }
00274 
00275 inline void DayaBay::SimVertex::addSecondary(const SimTrackReference& ref) 
00276 {
00277 
00278     m_secondaries.push_back(ref);
00279         
00280 }
00281 
00282 
00283 #endif ///SimEvent_SimVertex_H
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:05:28 for SimEvent by doxygen 1.7.4