00001 // ================================================ 00002 // ExampleAnalysis class descriptionn 00003 // ================================================ 00004 // 00005 // THIS TEXT TO BE REPLACED BY ATLAS STANDARD FORMAT 00006 // 00007 // Namespace Atlfast:: 00008 // 00009 // class: ExampleAnalysis 00010 // 00011 // Description: 00012 // 00013 // This is an example Algorithm designed to show new users 00014 // of Athena/Atlfast how to access and use Atlfast objects from 00015 // the TES. 00016 // 00017 // 00018 // ................................................................ 00019 // 00020 00021 00022 #ifndef ATLFAST_ANALYSISSKELETON_H 00023 #define ATLFAST_ANALYSISSKELETON_H 00024 00025 // STL 00026 #include <string> 00027 00028 // Athena/Gaudi 00029 #include "GaudiKernel/Algorithm.h" 00030 #include "AtlfastEvent/ReconstructedParticleCollection.h" 00031 #include "AtlfastEvent/CellCollection.h" 00032 #include "AtlfastEvent/ClusterCollection.h" 00033 00034 // Things needed for using MC truth information 00035 #include "HepMC/GenParticle.h" 00036 00037 // Things needed to use objects through the IKinematic interface 00038 #include "AtlfastUtils/KinematicHelper.h" 00039 00040 // Forward declarations 00041 class ISvcLocator; 00042 class IHistogram1D; 00043 class IHistogram2D; 00044 class StoreGateSvc; 00045 00046 00047 //*************************************************************** 00048 // AnalysisSkeleton 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 class ReconstructedParticle; 00061 class Cell; 00062 class Cluster; 00063 00068 class AnalysisSkeleton : public Algorithm 00069 { 00070 00071 public: 00072 00073 //------------------------- 00074 // Constructors/Destructors 00075 // 00076 // Athena requires that the constructor takes certain arguments 00077 // (and passes them directly to the constructor of the base class) 00078 //------------------------- 00080 AnalysisSkeleton( const std::string& name, ISvcLocator* pSvcLocator ) ; 00082 virtual ~AnalysisSkeleton(); 00083 00084 //------------------------------------------------------ 00085 // Methods used by Athena to run the algorithm 00086 //------------------------------------------------------ 00088 StatusCode initialize() ; 00090 StatusCode execute() ; 00092 StatusCode finalize() ; 00093 00094 private: 00095 00096 //--------------------------------------------------- 00097 // Member variables 00098 //--------------------------------------------------- 00100 StoreGateSvc* m_sgSvc; 00101 00103 IHistogram1D* m_hist_pT; 00104 00106 IHistogram1D* m_hist_isolation; 00107 00109 IHistogram2D* m_hist_cellFlow; 00110 IHistogram2D* m_hist_clusterFlow; 00111 00112 //--------------------------------------------------- 00113 // Parameters of this algorithm 00114 //--------------------------------------------------- 00115 00116 // Example of a parameter to be set via jobOptions. 00119 double m_rCellIsolation; 00120 00122 std::string m_particleLocation ; 00124 std::string m_cellLocation ; 00126 std::string m_clusterLocation ; 00127 00129 int m_histStart ; 00130 00131 00132 //------------------------------- 00133 // Objects used by this class to do its job 00134 //------------------------------- 00135 // This contains some trivial but oft used procedures 00136 // See the WWW documentation for details. 00138 KinematicHelper m_kinehelp ; 00139 00140 //------------------------------- 00141 // Private methods 00142 //------------------------------- 00143 /* To iterate through a collection of ReconstructedParticles and dump out 00144 * to the MsgStream specified, and also plot pT() */ 00145 void dumpParticles( MsgStream&, 00146 ReconstructedParticleCollection*); 00147 00149 void plotIsolation( MsgStream&, 00150 ReconstructedParticleCollection*, 00151 CellCollection*); 00152 00154 void plotEnergyFlow( MsgStream&, 00155 ClusterCollection*, 00156 CellCollection*); 00157 }; 00158 00159 } // end of namespace bracket 00160 00161 #endif 00162 00163 00164 00165 00166 00167 00168 00169 00170 00171 00172