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 "AtlfastCode/IKinematic.h" 00042 #include "AtlfastCode/KinematicHelper.h" 00043 00044 // Atlfast output objects (and their collection types) 00045 #include "AtlfastCode/TrackCollection.h" 00046 #include "AtlfastCode/TesIO.h" 00047 00048 //******************************************** 00049 //Default for parameters of this algorithm 00050 //These can be overridden by job options. 00051 //Descriptions are given in the class declaration 00052 //******************************************** 00053 #define DEFAULT_trackLocation "/Event/AtlfastTracks" 00054 00055 //*************************************************************** 00056 // TestTrackViewer class declaration 00057 // 00058 // An "Athena algorithm" is something which gets scheduled and controlled 00059 // by the framework. In its simplest definition it is something which 00060 // - gets called for each event 00061 // - can get anything it wants out of the Transient Event Store" 00062 // - can put anything it makes into the store. 00063 // 00064 // It must inherit from the Algorithm base class 00065 //**************************************************************** 00066 00067 namespace Atlfast { 00072 class TestTrackViewer : public Algorithm 00073 { 00074 00075 public: 00076 00077 //------------------------- 00078 // Constructors/Destructors 00079 // 00080 // Athena requires that the constructor takes certain arguments 00081 // (and passes them directly to the constructor of the base class) 00082 //------------------------- 00084 TestTrackViewer( const std::string& name, ISvcLocator* pSvcLocator ) ; 00085 00086 00088 virtual ~TestTrackViewer(); 00089 00090 00091 //------------------------------------------------------ 00092 // Methods used by Athena to run the algorithm 00093 //------------------------------------------------------ 00095 StatusCode initialize() ; 00097 StatusCode execute() ; 00099 StatusCode finalize() ; 00100 00101 00102 00103 private: 00104 00105 //--------------------------------------------------- 00106 // Member variables 00107 //--------------------------------------------------- 00108 //--------------------------------------------------- 00109 // Parameters of this algorithm 00110 //--------------------------------------------------- 00111 00113 std::string m_trackLocation ; 00114 int m_nevents; 00115 int m_ntracks; 00116 TesIO* m_tesIO; 00117 //------------------------------- 00118 // Private methods 00119 //------------------------------- 00120 00121 /* To iterate through a collection of ReconstructedParticles and dump out 00122 * to the MsgStream specified, and also plot pT() */ 00123 void testViewer( MsgStream&, std::vector<Track*>&); 00124 }; 00125 00126 } // end of namespace bracket 00127 00128 00129 #endif 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140