Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

AtlfastExample1.h

Go to the documentation of this file.
00001 // ================================================
00002 // AtlfastExample1 class descriptionn
00003 // ================================================
00004 //
00005 // THIS TEXT TO BE REPLACED BY ATLAS STANDARD FORMAT
00006 //
00007 // Namespace Atlfast::
00008 //
00009 // class: AtlfastExample1
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_ATLFASTEXAMPLE1_H
00023 #define ATLFAST_ATLFASTEXAMPLE1_H
00024 
00025 // STL
00026 #include <string>
00027 #include <vector>
00028 
00029 // Athena/Gaudi 
00030 #include "GaudiKernel/Algorithm.h"
00031 
00032 // Things needed for using MC truth information
00033 #include "HepMC/GenParticle.h"
00034 
00035 // Things needed to use objects through the IKinematic interface
00036 #include "AtlfastUtils/KinematicHelper.h"
00037 
00038 // Atlfast output objects (and their collection types)
00039 
00040 class ISvcLocator;
00041 class IHistogram1D;
00042 class IHistogram2D;
00043 class MsgStream;
00044 
00045 //********************************************
00046 //Default for parameters of this algorithm
00047 //These can be overridden by job options.
00048 //Descriptions are given in the class declaration
00049 //********************************************
00050 
00051 #define DEFAULT_rCellIsolation       0.2  
00052 
00053 #define DEFAULT_particleLocation     "/Event/AtlfastIsolatedElectrons" 
00054 #define DEFAULT_cellLocation         "/Event/AtlfastCells" 
00055 #define DEFAULT_clusterLocation      "/Event/AtlfastClusters" 
00056 
00057 #define DEFAULT_histStart            1000
00058 
00059 
00060 
00061 //***************************************************************
00062 //                 AtlfastExample1 class declaration
00063 //
00064 // An "Athena algorithm" is something which gets scheduled and controlled
00065 // by the framework. In its simplest definition it is something which
00066 //  - gets called for each event 
00067 //  - can get anything it wants out of the Transient Event Store"
00068 //  - can put anything it makes into the store.
00069 //
00070 // It must inherit from the  Algorithm base class
00071 //****************************************************************
00072 
00073 namespace Atlfast {
00074   class ReconstructedParticle;
00075   class Cell;
00076   class Cluster;
00077   class TesIO;
00082 class AtlfastExample1 : public Algorithm
00083 {
00084 
00085  public:
00086 
00087   //-------------------------
00088   // Constructors/Destructors
00089   //
00090   // Athena requires that the constructor takes certain arguments
00091   // (and passes them directly to the constructor of the base class)
00092   //-------------------------
00094   AtlfastExample1( const std::string& name, ISvcLocator* pSvcLocator ) ; 
00096   virtual ~AtlfastExample1();
00097 
00098 
00099   //------------------------------------------------------
00100   // Methods used by Athena to run the algorithm
00101   //------------------------------------------------------
00103   StatusCode initialize() ;
00105   StatusCode execute() ;
00107   StatusCode finalize() ;
00108 
00109 
00110 
00111  private:
00112 
00113   //---------------------------------------------------
00114   // Member variables
00115   //---------------------------------------------------
00116 
00118   IHistogram1D* m_hist_pT;
00119 
00121   IHistogram1D* m_hist_isolation;
00122 
00124   IHistogram2D* m_hist_cellFlow;
00125   IHistogram2D* m_hist_clusterFlow;
00126 
00127   TesIO* m_tesIO;
00128 
00129   //---------------------------------------------------
00130   // Parameters of this algorithm
00131   //---------------------------------------------------
00132 
00133   // Example of a parameter to be set via jobOptions.
00136   double        m_rCellIsolation;     
00137 
00139   std::string   m_particleLocation ;
00141   std::string   m_cellLocation ;
00143   std::string   m_clusterLocation ;
00144 
00146   int m_histStart ;
00147 
00148 
00149   //-------------------------------
00150   // Objects used by this class to do its job
00151   //-------------------------------
00152 
00153   // This contains some trivial but oft used procedures
00154   // See the WWW documentation for details.
00156   KinematicHelper m_kinehelp ; 
00157 
00158 
00159 
00160   //-------------------------------
00161   // Private methods
00162   //-------------------------------
00163 
00164   /* To iterate through a collection of ReconstructedParticles and dump out
00165    * to the MsgStream specified, and also plot pT() */
00166   void dumpParticles( MsgStream&,                       
00167                       std::vector<ReconstructedParticle*>&);
00168 
00169 
00171   void plotIsolation( MsgStream&, 
00172                       std::vector<ReconstructedParticle*>&,
00173                       std::vector<Cell*>& );
00174 
00175 
00177   void plotEnergyFlow(  MsgStream&, 
00178                         std::vector<Cluster*>&,
00179                         std::vector<Cell*>& );
00180 
00181 };
00182 
00183 } // end of namespace bracket
00184 
00185 
00186 #endif
00187 
00188 
00189 
00190 
00191 
00192 
00193 
00194 
00195 
00196 
00197 

Generated on Thu Apr 18 12:03:28 2002 for AtlfastExamples by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001