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

Track.h

Go to the documentation of this file.
00001 // ================================================
00002 // Track class description
00003 // ================================================
00004 //
00005 // THIS TEXT TO BE REPLACED BY ATLAS STANDARD FORMAT
00006 //
00007 // Namespace Atlfast::
00008 //
00009 // class: Track
00010 //
00011 // Authors: P.Clarke, H.Phillips, E.Richter-Was, P.Sherwood, R.Steward
00012 //
00013 // Description: 
00014 //
00015 //  Class to represent Tracks 
00016 //
00017 //  NOT included yet are:
00018 //
00019 //    1. Up to 6 mothers ? as I didnt understand how there could be more
00020 //       than 1 ?
00021 //    
00022 //    2. Correlation coefficients. The thought is that if these go in they
00023 //       go into ITrackTrajectory. Need to understand their use more.
00024 //
00025 //..................................................
00026 
00027 
00028 #ifndef ATLFAST_TRACK_H
00029 #define ATLFAST_TRACK_H
00030 
00031 
00032 // CLHEP, HepMC
00033 #include "CLHEP/Vector/ThreeVector.h"
00034 #include "HepMC/GenParticle.h"
00035 #include "CLHEP/Matrix/Matrix.h"
00036 
00037 // Atlfast classes.
00038 #include "AtlfastEvent/TrackTrajectory.h"
00039 #include "AtlfastEvent/AssociationManager.h"
00040 
00041 // Gaudi
00042 #include "GaudiKernel/ContainedObject.h"
00043 #include "GaudiKernel/MsgStream.h"
00044 
00045 
00046 //Class ID for Track class
00047 static const CLID CLID_ATLFAST_Track=2306 ;
00048 
00049 using ::HepMatrix;
00050 
00051 namespace Atlfast {
00052 
00053 
00060   class Track : 
00061     virtual public ContainedObject, 
00062     public AssociationManager
00063     {
00064       
00065     private:
00066 
00068       TrackTrajectory m_trajectory;
00070       TrackTrajectory m_truthTrajectory;
00073       const HepMC::GenParticle* m_truth ;
00075       HepMatrix m_smearMatrix;
00077       int m_pdg_id;
00078 
00079     public:
00080       
00081       // -----------------------------------
00082       // Constructors
00083 
00084       Track( const TrackTrajectory& trajectory, 
00085              const HepMC::GenParticle* progenitor  ) 
00086         : ContainedObject(),
00087         AssociationManager(),
00088         m_trajectory(trajectory),
00089         m_truthTrajectory(trajectory),
00090         m_truth( progenitor ),
00091         m_smearMatrix(HepMatrix(5,5,0.)),
00092         m_pdg_id(progenitor->pdg_id())
00093         { }
00094       
00095       Track( const TrackTrajectory& truthTrajectory, 
00096              const TrackTrajectory& smearTrajectory,
00097              const HepMC::GenParticle* progenitor,
00098              const HepMatrix& matrix  ) 
00099         : ContainedObject(),
00100         AssociationManager(),
00101         m_trajectory(smearTrajectory),
00102         m_truthTrajectory(truthTrajectory),
00103         m_truth( progenitor ),
00104         m_smearMatrix(matrix),
00105         m_pdg_id(progenitor->pdg_id())
00106         { }
00107 
00108       Track( const TrackTrajectory& truthTrajectory, 
00109              const TrackTrajectory& smearTrajectory,
00110              const HepMatrix& matrix, int pdg  ) 
00111         : ContainedObject(),
00112         AssociationManager(),
00113         m_trajectory(smearTrajectory),
00114         m_truthTrajectory(truthTrajectory),
00115         m_truth( NULL ),
00116         m_smearMatrix(matrix),
00117         m_pdg_id(pdg)
00118         { }
00119       
00120       // Copy
00121       Track( const Track& other  ) : ContainedObject( ),
00122         AssociationManager(other),
00123         m_trajectory(other.m_trajectory),
00124         m_truthTrajectory(other.m_truthTrajectory),
00125         m_truth( other.m_truth ),
00126         m_smearMatrix(other.m_smearMatrix),
00127         m_pdg_id(other.m_pdg_id)
00128         { }
00129       
00130       // Default which seems to be required by Athena, although doesnt have any 
00131       // meaning for the Track class. Hence a bogus trajectory has to be invented.
00132       Track() 
00133         : ContainedObject(), 
00134         AssociationManager(),
00135         m_truth(NULL)
00136         { }
00137       
00138       ~Track() {}
00139       
00141       virtual TrackTrajectory trajectory() const {return m_trajectory;}
00143       virtual int pdg_id() const {return m_pdg_id;}
00145       const HepMC::GenParticle* truth() const { return m_truth ; }
00147       const HepMatrix smearMatrix() const {return m_smearMatrix;}
00149       void setMatrix(const HepMatrix& matrix) {m_smearMatrix = matrix;}
00151       const TrackTrajectory truthTrajectory() const {return m_truthTrajectory;}
00152       // --------------------------------
00153       // Athena mandatory methods
00154       static const CLID& classID() { return CLID_ATLFAST_Track; }
00155       virtual const CLID& clID() const {  return CLID_ATLFAST_Track; }
00156       
00157     };
00158   
00159   
00160   // ................................................
00161   // Message stream operator for simple debug output
00162   
00163   MsgStream& operator << ( MsgStream& s, const Track& t ) ;
00164   MsgStream& operator << ( MsgStream& s, const Track* t ) ;
00165   
00166   
00167 } // end of namespace 
00168 
00169 
00170 #endif

Generated on Fri Nov 29 12:55:12 2002 by doxygen1.3-rc1