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

StandardHistogramMaker.h

Go to the documentation of this file.
00001 // ================================================
00002 //StandardHistogramMaker class description
00003 // ================================================
00004 //
00005 // THIS TEXT TO BE REPLACED BY ATLAS STANDARD FORMAT
00006 //
00007 //
00008 // This version....
00009 //
00010 //
00011 // Namespace Atlfast::
00012 //
00013 // class: StandardHistogramMaker
00014 //
00015 // Description: 
00016 //
00017 //  Algorithm which makes some standard Atlfast debug histograms
00018 //
00019 //
00020 // ................................................................
00021 //
00022 
00023 #ifndef ATLFAST_STANDARDHISTOGRAMMAKER_H
00024 #define ATLFAST_STANDARDHISTOGRAMMAKER_H
00025 
00026 // STL
00027 #include <vector>
00028 #include <string>
00029 
00030 // Gaudi 
00031 #include "GaudiKernel/ISvcLocator.h"
00032 #include "GaudiKernel/Algorithm.h"
00033 #include "GaudiKernel/MsgStream.h"
00034 #include "GaudiKernel/DataObject.h"
00035 
00036 class IHistogram1D;  // forward declaration
00037 
00038 // Other
00039 #include "CLHEP/Vector/LorentzVector.h"
00040 #include "HepMC/GenEvent.h"
00041 #include "HepMC/GenParticle.h"
00042 
00043 // Atlfast
00044 #include "AtlfastCode/ReconstructedParticle.h"
00045 #include "AtlfastCode/TesIO.h"
00046 
00047 
00048 //*****************************************
00049 // Default paths in the Transient event store to get/put entities
00050 //
00051 //[Note:  This will change as the current system is not considered acceptable.]
00052 //******************************************
00053 
00054 //plcaes to look in the TES
00055 #define DEFAULT_electronLocation          "/Event/Electrons" 
00056 #define DEFAULT_isolatedElectronLocation  "/Event/IsolatedElectrons"
00057 #define DEFAULT_photonLocation            "/Event/Photons"
00058 #define DEFAULT_isolatedPhotonLocation    "/Event/IsolatedPhotons"
00059 #define DEFAULT_cellLocation              "/Event/AtlfastCells"
00060 #define DEFAULT_clusterLocation           "/Event/Clusters"
00061 #define DEFAULT_mcTruthLocation           "/Event/McEventCollection"
00062 
00063 //which sets of histograms to produce
00064 #define DEFAULT_doElectronHistograms true
00065 #define DEFAULT_doIsolatedElectronHistograms true
00066 #define DEFAULT_doPhotonHistograms   true
00067 #define DEFAULT_doIsolatedPhotonHistograms   true
00068 #define DEFAULT_doCellHistograms     true
00069 #define DEFAULT_doClusterHistograms  true
00070 
00071 //offset of histogram numbers
00072 #define DEFAULT_histStart 0
00073 
00074 
00075 //***************************************************************
00076 //                 StandardHistogramMaker class declaration
00077 //
00078 // A "Gaudi algorithm" is something which gets scheduled and controlled
00079 // by the framework. In its simplest definition it is something which
00080 //  - gets clled for each event 
00081 //  - can get anything it wants out of the Transient Event Store"
00082 //  - can put anything it makes into the store.
00083 //
00084 // It must inherit from the  Algorithm base class
00085 //****************************************************************
00086  
00087 namespace Atlfast {
00091 class StandardHistogramMaker : public Algorithm
00092 {
00093 
00094  public:
00095 
00096   //-------------------------
00097   // Constructors/Destructors
00098   //
00099   // Gaudi requires that the constructor takes certain arguments
00100   // (and passes them directly to the constructor of the base class)
00101   //-------------------------
00102 
00103   StandardHistogramMaker( const std::string& name, ISvcLocator* pSvcLocator ) ; 
00104   ~StandardHistogramMaker();
00105 
00106 
00107   //------------------------------------------------------
00108   // Methods used by Gaudi to run the algorithm
00109   //------------------------------------------------------
00110 
00111   StatusCode initialize() ;
00112   StatusCode execute() ;
00113   StatusCode finalize() ;
00114 
00115 
00116 
00117  private:
00118 
00119 
00120   //-------------------------------
00121   // Private methods
00122   //-------------------------------
00123  
00124   void bookElectronHistograms();
00125   void bookPhotonHistograms();
00126   void bookIsolatedElectronHistograms();
00127   void bookIsolatedPhotonHistograms();
00128   void bookCellHistograms();
00129   void bookClusterHistograms();
00130 
00131   void fillElectronHistograms() ;
00132   void fillPhotonHistograms() ;
00133   void fillIsolatedElectronHistograms();
00134   void fillIsolatedPhotonHistograms();
00135   void fillCellHistograms();
00136   void fillClusterHistograms();
00137 
00138   TesIO* m_tesIO;
00139 
00140 
00141   // the following data members tell the
00142   // algorithm where to retrieve its input particles from
00143   // in the TES. These are written by the job Options service.
00144 
00145   std::string m_electronLocation ;
00146   std::string m_isolatedElectronLocation;
00147   std::string m_photonLocation ;
00148   std::string m_isolatedPhotonLocation;
00149   std::string m_cellLocation;
00150   std::string m_clusterLocation;
00151   std::string m_mcTruthLocation;
00152 
00153 
00154   // the following data members tell the
00155   // algorithm whether or not certain sets of histograms
00156   // are required
00157 
00158   bool m_doElectronHistograms ;
00159   bool m_doIsolatedElectronHistograms ;
00160   bool m_doPhotonHistograms ;
00161   bool m_doIsolatedPhotonHistograms ;
00162   bool m_doCellHistograms ;
00163   bool m_doClusterHistograms ;
00164 
00165   // The following are the actual histograms
00166   // htp has added his own naming convention here
00167   // m_h_ means a histogram!
00168 
00169   // electron histograms
00170   IHistogram1D* m_h_electronMultiplicity;
00171   IHistogram1D* m_h_electronPt;
00172 
00173   // isolated electron histograms
00174   IHistogram1D* m_h_isolatedElectronMultiplicity;
00175   IHistogram1D* m_h_isolatedElectronPt;
00176 
00177   // photon histograms
00178   IHistogram1D* m_h_photonMultiplicity;
00179   IHistogram1D* m_h_photonPt;
00180 
00181   // isolated photon histograms
00182   IHistogram1D* m_h_isolatedPhotonMultiplicity;
00183   IHistogram1D* m_h_isolatedPhotonPt;
00184 
00185   // cell histograms
00186   IHistogram1D* m_h_cellMultiplicity;
00187   IHistogram1D* m_h_cellPt;
00188 
00189   // cluster histograms
00190   IHistogram1D* m_h_clusterMultiplicity;
00191   IHistogram1D* m_h_clusterPt;
00192 
00193 
00194   // histogram numbers, start at...
00195   int m_histStart;
00196   // and current count
00197   int m_nHist;
00198 
00199 
00200 };
00201 
00202 
00203 } // end of namespace bracket
00204 
00205 #endif
00206 
00207 
00208 
00209 
00210 
00211 
00212 
00213 
00214 
00215 
00216 

Generated on Thu Feb 21 14:30:47 2002 for Atlfast by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001