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

McVertex.h

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/GlastEvent/GlastEvent/MonteCarlo/McVertex.h,v 1.7 2001/05/18 22:48:32 burnett Exp $
00002 #ifndef GlastEvent_McVertex_H
00003 #define GlastEvent_McVertex_H 1
00004 
00005 // If you wish to introduce the namespace `GlastEvent', uncomment
00006 // the lines commented as `NameSpace'.
00007 
00008 
00009 // Include files
00010 #include <iostream>
00011 #include "GaudiKernel/Kernel.h"
00012 #include "GaudiKernel/ContainedObject.h"
00013 #include "GaudiKernel/SmartRef.h"
00014 #include "GaudiKernel/SmartRefVector.h"
00015 #include "GlastEvent/TopLevel/Definitions.h"
00016 #include "CLHEP/Geometry/Point3D.h"
00017 #include "CLHEP/Vector/LorentzVector.h"
00018 #include "GlastEvent/Utilities/CLHEPStreams.h"
00019 // Include all Glast container types here
00020 //   to simplify inlude statements in algorithms
00021 #include "GaudiKernel/ObjectVector.h"
00022 #include "GaudiKernel/ObjectList.h"
00023 
00024 
00025 
00048 //namespace GlastEvent { // NameSpace
00049 
00050 // Forward declarations
00051 class McParticle;
00052 
00053 extern const CLID& CLID_McVertex;
00054 
00055 class McVertex : virtual public ContainedObject {
00056   public:
00057 
00058     virtual const CLID& clID() const   { return McVertex::classID(); }
00059     static const CLID& classID()       { return CLID_McVertex; }
00060     // vertex type definition
00061     enum originType {primaryOrigin = 1, daughterOrigin = 2, decayProduct = 3, showerContents = 4, showerBacksplash = 5};
00062 
00064     McVertex() :
00065      m_subEvtID(0),
00066      m_timeOfFlight(0.),
00067      m_vertexType(primaryOrigin)
00068     { }
00069 
00071     virtual ~McVertex() { }
00072 
00073 
00075     const HepPoint3D& initialPosition () const;
00077           HepPoint3D& initialPosition ();
00079     void setInitialPosition (const HepPoint3D& value);
00080 
00082     const HepPoint3D& finalPosition () const;
00084           HepPoint3D& finalPosition ();
00086     void setFinalPosition (const HepPoint3D& value);
00087 
00089     double timeOfFlight () const;
00091     void setTimeOfFlight (double value);
00093     originType vertexType () const;
00095     void setVertexType (originType value);
00096 
00098     const HepLorentzVector& initialFourMomentum() const;
00100           HepLorentzVector& initialFourMomentum();
00102     void setInitialFourMomentum( const HepLorentzVector& value );
00103 
00105     const HepLorentzVector& finalFourMomentum() const;
00107           HepLorentzVector& finalFourMomentum();
00109     void setFinalFourMomentum( const HepLorentzVector& value );
00110 
00112     const McParticle* mcParticle() const;
00113           McParticle* mcParticle();
00115     void setMcParticle( McParticle* value );
00116     void setMcParticle( SmartRef<McParticle> value );
00117 
00119     const McParticle* motherMcParticle() const;
00120           McParticle* motherMcParticle();
00122     void setMotherMcParticle( McParticle* value );
00123     void setMotherMcParticle( SmartRef<McParticle> value );
00124 
00126     const SmartRefVector<McParticle>& daughterMcParticles() const;
00127           SmartRefVector<McParticle>& daughterMcParticles();
00129     void setDaughterMcParticles( const SmartRefVector<McParticle>& value );
00131     void removeDaughterMcParticles();
00134     void addDaughterMcParticle( McParticle* value );
00135     void addDaughterMcParticle( SmartRef<McParticle> value );
00136 
00138     short subEvtID() const;
00140     void setSubEvtID( short value );
00141 
00143     virtual StreamBuffer& serialize( StreamBuffer& s ) const;
00145     virtual StreamBuffer& serialize( StreamBuffer& s );
00147     virtual std::ostream& fillStream( std::ostream& s ) const;
00148 
00149   private:
00151     short                      m_subEvtID;
00155     HepPoint3D                 m_initialPosition;
00157     HepPoint3D                 m_finalPosition;
00159     double                     m_timeOfFlight;
00161     originType                 m_vertexType;
00165     HepLorentzVector           m_initialFourMomentum;
00167     HepLorentzVector           m_finalFourMomentum;
00169     SmartRef<McParticle>       m_mcParticle;
00171     SmartRef<McParticle>       m_motherMcParticle;
00173     SmartRefVector<McParticle> m_daughterMcParticles;
00174 };
00175 
00176 
00177 // Definition of all container types of McVertex
00178 template <class TYPE> class ObjectVector;
00179 typedef ObjectVector<McVertex>     McVertexVector;
00180 template <class TYPE> class ObjectList;
00181 typedef ObjectList<McVertex>       McVertexList;
00182 typedef ObjectList<McVertex>       McVertexCol;
00183 
00184 //} // NameSpace GlastEvent
00185 
00186 
00187 // Inline codes
00188 #include "GlastEvent/MonteCarlo/McParticle.h"
00189 
00190 //namespace GlastEvent { // NameSpace
00191 
00192 
00193 //} // NameSpace GlastEvent
00194 
00195 #endif    // GlastEvent_McVertex_H

Generated at Wed Nov 21 12:22:49 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000