00001 // ================================================ 00002 // TestTrackViewer class descriptionn 00003 // ================================================ 00004 // 00005 // THIS TEXT TO BE REPLACED BY ATLAS STANDARD FORMAT 00006 // 00007 // Namespace Atlfast:: 00008 // 00009 // class: TestTrackViewer 00010 // 00011 // Description: 00012 // 00013 // Test program 00014 // 00015 // ................................................................ 00016 // 00017 00018 00019 #ifndef ATLFAST_TESTTRACKVIEWER_H 00020 #define ATLFAST_TESTTRACKVIEWER_H 00021 00022 // STL 00023 #include <string> 00024 #include <vector> 00025 00026 // Athena/Gaudi 00027 #include "GaudiKernel/ISvcLocator.h" 00028 #include "GaudiKernel/IAlgorithm.h" 00029 #include "GaudiKernel/Algorithm.h" 00030 #include "GaudiKernel/MsgStream.h" 00031 #include "GaudiKernel/DataObject.h" 00032 #include "GaudiKernel/ObjectVector.h" 00033 #include "GaudiKernel/IHistogram1D.h" 00034 #include "GaudiKernel/IHistogram2D.h" 00035 #include "GaudiKernel/IHistogramSvc.h" 00036 00037 // Things needed for using MC truth information 00038 #include "HepMC/GenParticle.h" 00039 00040 // Things needed to use objects through the IKinematic interface 00041 #include "AtlfastEvent/IKinematic.h" 00042 #include "AtlfastUtils/KinematicHelper.h" 00043 00044 // Atlfast output objects (and their collection types) 00045 #include "AtlfastEvent/TrackCollection.h" 00046 #include "AtlfastUtils/TesIO.h" 00047 //*************************************************************** 00048 // TestTrackViewer class declaration 00049 // 00050 // An "Athena algorithm" is something which gets scheduled and controlled 00051 // by the framework. In its simplest definition it is something which 00052 // - gets called for each event 00053 // - can get anything it wants out of the Transient Event Store" 00054 // - can put anything it makes into the store. 00055 // 00056 // It must inherit from the Algorithm base class 00057 //**************************************************************** 00058 00059 namespace Atlfast { 00060 using std::string; 00065 class TestTrackViewer : public Algorithm{ 00066 00067 public: 00068 00069 //------------------------- 00070 // Constructors/Destructors 00071 // 00072 // Athena requires that the constructor takes certain arguments 00073 // (and passes them directly to the constructor of the base class) 00074 //------------------------- 00076 TestTrackViewer( const std::string& name, ISvcLocator* pSvcLocator ) ; 00077 00078 00080 virtual ~TestTrackViewer(); 00081 00082 00083 //------------------------------------------------------ 00084 // Methods used by Athena to run the algorithm 00085 //------------------------------------------------------ 00087 StatusCode initialize() ; 00089 StatusCode execute() ; 00091 StatusCode finalize() ; 00092 00093 00094 00095 private: 00096 00097 //--------------------------------------------------- 00098 // Member variables 00099 //--------------------------------------------------- 00100 //--------------------------------------------------- 00101 // Parameters of this algorithm 00102 //--------------------------------------------------- 00103 00105 std::string m_trackLocation ; 00106 int m_nevents; 00107 int m_ntracks; 00108 TesIO* m_tesIO; 00109 //------------------------------- 00110 // Private methods 00111 //------------------------------- 00112 00113 /* To iterate through a collection of ReconstructedParticles and dump out 00114 * to the MsgStream specified, and also plot pT() */ 00115 void testViewer( MsgStream&, std::vector<Track*>&); 00116 }; 00117 00118 } // end of namespace bracket 00119 00120 00121 #endif 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132