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 "AIDA/IHistogram1D.h" 00034 #include "AIDA/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 "AtlfastEvent/CollectionDefs.h" 00047 #include "AtlfastUtils/TesIO.h" 00048 //*************************************************************** 00049 // TestTrackViewer class declaration 00050 // 00051 // An "Athena algorithm" is something which gets scheduled and controlled 00052 // by the framework. In its simplest definition it is something which 00053 // - gets called for each event 00054 // - can get anything it wants out of the Transient Event Store" 00055 // - can put anything it makes into the store. 00056 // 00057 // It must inherit from the Algorithm base class 00058 //**************************************************************** 00059 00060 namespace Atlfast { 00061 using std::string; 00066 class TestTrackViewer : public Algorithm{ 00067 00068 public: 00069 00070 //------------------------- 00071 // Constructors/Destructors 00072 // 00073 // Athena requires that the constructor takes certain arguments 00074 // (and passes them directly to the constructor of the base class) 00075 //------------------------- 00077 TestTrackViewer( const std::string& name, ISvcLocator* pSvcLocator ) ; 00078 00079 00081 virtual ~TestTrackViewer(); 00082 00083 00084 //------------------------------------------------------ 00085 // Methods used by Athena to run the algorithm 00086 //------------------------------------------------------ 00088 StatusCode initialize() ; 00090 StatusCode execute() ; 00092 StatusCode finalize() ; 00093 00094 00095 00096 private: 00097 00098 //--------------------------------------------------- 00099 // Member variables 00100 //--------------------------------------------------- 00101 //--------------------------------------------------- 00102 // Parameters of this algorithm 00103 //--------------------------------------------------- 00104 00106 std::string m_trackLocation ; 00107 int m_nevents; 00108 int m_ntracks; 00109 TesIO* m_tesIO; 00110 //------------------------------- 00111 // Private methods 00112 //------------------------------- 00113 00114 /* To iterate through a collection of ReconstructedParticles and dump out 00115 * to the MsgStream specified, and also plot pT() */ 00116 void testViewer( MsgStream&, std::vector<Track*>&); 00117 }; 00118 00119 } // end of namespace bracket 00120 00121 00122 #endif 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133