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

ReconstructedParticleHistogramMaker.h

Go to the documentation of this file.
00001 // ================================================
00002 //ReconstructedParticleHistogramMaker class description
00003 // ================================================
00004 //
00005 // THIS TEXT TO BE REPLACED BY ATLAS ReconstructedParticle FORMAT
00006 //
00007 //
00008 // This version....
00009 //
00010 //
00011 // Namespace Atlfast::
00012 //
00013 // class: ReconstructedParticleHistogramMaker
00014 //
00015 // Description: 
00016 //
00017 //  Algorithm which makes debug histograms for ReconstructedParticles
00018 //
00019 //
00020 // ................................................................
00021 //
00022 
00023 #ifndef __ATLFAST_ReconstructedParticleHistogramMaker__
00024 #define __ATLFAST_ReconstructedParticleHistogramMaker__
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 //places to look in the TES
00055 #define DEFAULT_inputLocation          "/Event/Electrons" 
00056 #define DEFAULT_mcTruthLocation        "/Event/McEventCollection"
00057 
00058 //which flavour of reconstructed particles are we looking at?
00059 #define DEFAULT_particleType            11
00060 
00061 //offset of histogram numbers
00062 #define DEFAULT_histStart 0
00063 
00064 //prefix to histogram titles
00065 #define DEFAULT_histTitle "Electron "
00066 
00067 
00068 
00069  
00070 namespace Atlfast {
00074 class ReconstructedParticleHistogramMaker : public Algorithm
00075 {
00076 
00077  public:
00078 
00079   //-------------------------
00080   // Constructors/Destructors
00081   //
00082   // Gaudi requires that the constructor takes certain arguments
00083   // (and passes them directly to the constructor of the base class)
00084   //-------------------------
00085 
00086   ReconstructedParticleHistogramMaker( const std::string& name, ISvcLocator* pSvcLocator ) ; 
00087   ~ReconstructedParticleHistogramMaker();
00088 
00089 
00090   //------------------------------------------------------
00091   // Methods used by Gaudi to run the algorithm
00092   //------------------------------------------------------
00093 
00094   StatusCode initialize() ;
00095   StatusCode execute() ;
00096   StatusCode finalize() ;
00097 
00098 
00099 
00100  private:
00101   TesIO* m_tesIO;
00102 
00103   //-------------------------------
00104   // Private methods
00105   //-------------------------------
00106    void book(
00107              std::vector<IHistogram1D*> & start, 
00108              const std::string title, 
00109              const int nbins, 
00110              const double xmin, 
00111              const double xmax,
00112              const double xminDiff,
00113              const double xmaxDiff
00114              );
00115 
00116    void fill(
00117              std::vector<IHistogram1D*> & start, 
00118              const double rec, 
00119              const double tru
00120              );
00121 
00122   // the following data members tell the
00123   // algorithm where to retrieve its input particles from
00124   // in the TES. These are written by the job Options service.
00125 
00126   std::string m_inputLocation ;
00127   std::string m_mcTruthLocation;
00128 
00129 
00130   
00131   // The following are the actual histograms
00132   // htp has added his own naming convention here
00133   // m_h_ means a histogram!
00134 
00135   // Each quantity to be histogrammed has a vector[4] of histograms
00136   // these correspond to
00137   // [0] = Rec = reconstructed
00138   // [1] = Tru = true
00139   // [2] = Dif = difference, true-rec
00140   // [3] = Res = residual, (true-rec)/true
00141   
00142   // Multiplicity
00143   std::vector<IHistogram1D*> m_h_multiplicity ;
00144   // Energy
00145   std::vector<IHistogram1D*> m_h_energy ;
00146   // Pt
00147   std::vector<IHistogram1D*> m_h_pt ; 
00148   // eta
00149   std::vector<IHistogram1D*> m_h_eta ;
00150   // phi
00151   std::vector<IHistogram1D*> m_h_phi ;
00152   // theta
00153   std::vector<IHistogram1D*> m_h_theta ;
00154 
00155    
00156  
00157   // histogram numbers, start at...
00158   int m_histStart;
00159   // and current count
00160   int m_nHist;
00161 
00162   // particle type to look at
00163   int m_particleType ;
00164 
00165   // prefix for histogram titles
00166   std::string m_histTitle ;
00167 
00168 };
00169 
00170 
00171 } // end of namespace bracket
00172 
00173 #endif
00174 
00175 
00176 
00177 
00178 
00179 
00180 
00181 
00182 
00183 
00184 

Generated on Wed Jan 23 12:58:32 2002 for Atlfast by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001