GN_Data.h

Go to the documentation of this file.
00001 //! \file
00002 //!
00003 //! Header file for the GN_Data class.
00004 //!
00005 //! Declares the GN_Data class and the member routines which
00006 //! are used in collecting the information for a given event.
00007 //!
00008 //! \author D.K. Hasell
00009 //! \version 1.0
00010 //! \date 2010-10-31
00011 //!
00012 //! \ingroup detector
00013 
00014 // Ensure header file only included once.
00015 
00016 #ifndef GN_DATA_H
00017 #define GN_DATA_H
00018 
00019 // Include the STL header files referenced in this file.
00020 
00021 #include <vector>
00022 
00023 // Include the ROOT header files referened here.
00024 
00025 #include "TObject.h"
00026 
00027 // Use the std namespace.
00028 
00029 using namespace std;
00030 
00031 //! GN_Data class 
00032 
00033 class GN_Data : public TObject {
00034 
00035 public:
00036 
00037      //! Constructor.
00038 
00039      GN_Data();
00040 
00041      //! Destructor.
00042 
00043      ~GN_Data();
00044 
00045      // Member functions.
00046 
00047      //! Clear the event vectors.
00048 
00049      void Reset();
00050 
00051      //! Function to calculate the total momentum for a given vertex.
00052 
00053      double P( int i );
00054 
00055      //! Function to calculate the polar angle for a given vertex.
00056 
00057      double Theta( int i );
00058 
00059      //! Function to calculate the azimuthal angle for a given vertex.
00060 
00061      double Phi( int i );
00062 
00063 private:
00064 
00065      friend class EventAction;
00066 
00067      int nGN;
00068 
00069      vector<int> id;
00070      vector<int> q;
00071      vector<int> tr;
00072 
00073      vector<double> x;
00074      vector<double> y;
00075      vector<double> z;
00076 
00077      vector<double> px;
00078      vector<double> py;
00079      vector<double> pz;
00080 
00081      ClassDef( GN_Data, 1 )     //The OLYMPUS MC data class.
00082           };
00083 
00084 #endif