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

ClusterMaker.h

Go to the documentation of this file.
00001 // ================================================
00002 // ClusterMaker class description
00003 // ================================================
00004 //
00005 // THIS TEXT TO BE REPLACED BY ATLAS STANDARD FORMAT
00006 //
00007 //
00008 // Namespace Atlfast::
00009 //
00010 // class: ClusterMaker
00011 //
00012 // Authors: P.Clarke, H.Phillips, E.Richter-Was, P.Sherwood, R.Steward
00013 //          (P.Clarke was principle author of this class)
00014 //
00015 // Description: 
00016 //
00017 //  Algorithm which makes Clusters from Cells
00018 //
00019 //  Note that the definition of cluster inherited from ATLFAST++
00020 //  is really jet finding, in that it summs up enery in Cells
00021 //  in a cone of a given radius.
00022 //
00023 //
00024 // This version of ClusterMaker implements the following strategy:
00025 //
00026 // This is meant to be the NON ENERGY SHARING strategy coded in ATLFAST++
00027 // If this is wrong it is due to mis-interpretaion of ATLFAST++ code by 
00028 // the Author.
00029 //
00030 //  1. Read in all calorimeter Cells (pointers) from the TES
00031 //
00032 //  =============>
00033 //  2. Start iteration over available cells
00034 //
00035 //    2.1 Take the (next) highest eT() Cell as initiator
00036 //
00037 //    2.2 If ( initiator.eT() < threshold ) strategy terminates immediately
00038 //
00039 //    2.3 If ( initiator.eT() > threshold )
00040 //
00041 //        2.3.1 Add up initiator and all cells within a given cone (eg 0.4) 
00042 //              of initiator ( an eT() weighted eta() and phi() are formed )
00043 //
00044 //        2.3.2 If( (sum of cells).eT() > threshold )
00045 //
00046 //            2.3.2.1  Make a new Cluster 
00047 //
00048 //            2.3.2.2  Remove all cells used (including initiator)
00049 //                     from the list of available cells
00050 //
00051 //  <============ continue iteration
00052 //
00053 //        2.3.3 If ( (sum of cells).eT() < threshold )
00054 //
00055 //            2.3.3.1 Mark initiator so that it is not considered again
00056 //                    as an initiator (but it may still be included in a 
00057 //                    cone sum)
00058 //
00059 //                    Return all cells in cone to the available cells.
00060 //
00061 //  <============ continue iteration
00062 //           
00063 //
00064 //
00065 // ................................................................
00066 //
00067 
00068 
00069 #ifndef ATLFAST_CLUSTERMAKER_H
00070 #define ATLFAST_CLUSTERMAKER_H
00071 
00072 // STL
00073 #include <string>
00074 #include <vector>
00075 
00076 // Gaudi 
00077 #include "GaudiKernel/Algorithm.h"
00078 
00079 // Other
00080 #include "CLHEP/Vector/LorentzVector.h"
00081 
00082 // Atlfast
00083 #include "AtlfastCode/CellCollection.h"
00084 #include "AtlfastCode/ClusterCollection.h"
00085 
00086 #include "AtlfastCode/KinematicHelper.h"
00087 
00088 class ISvcLocator;
00089 class MsgStream;
00090 
00091 //*************************************
00092 //Default parameters for this algorithm
00093 // (descriptions in class declaration)
00094 //*************************************
00095 #define DEFAULT_minInitiatorET  1.5   
00096 //Cones set to 0.401 to avoid calorimeter grid problems
00097 #define DEFAULT_rConeBarrel     0.401   
00098 #define DEFAULT_rConeForward    0.401  
00099 #define DEFAULT_minClusterET    5. 
00100 #define DEFAULT_inputLocation        "/Event/AtlfastCells" 
00101 #define DEFAULT_outputLocation       "/Event/AtlfastClusters" 
00102 #define DEFAULT_unusedCellLocation   "/Event/AtlfastUnusedCells" 
00103 #define DEFAULT_Strategy             "Cone" 
00104 #define DEFAULT_masslessJets         true
00105 
00106 
00107 
00108 
00109 
00110 //***************************************************************
00111 //                 ClusterMaker class declaration
00112 //
00113 //****************************************************************
00114 
00115 namespace Atlfast {
00116   class Cell;
00117   class Cluster;
00118   class IClusterStrategy;
00119   class TesIO;
00131 class ClusterMaker : public Algorithm
00132 {
00133 
00134  public:
00135 
00136   //-------------------------
00137   // Constructors/Destructors
00138   //-------------------------
00140   ClusterMaker( const std::string& name, ISvcLocator* pSvcLocator ) ; 
00142   virtual ~ClusterMaker();
00143 
00144 
00145   //------------------------------------------------------
00146   // Methods used by Athena to run the algorithm
00147   //------------------------------------------------------
00149   StatusCode initialize() ;
00151   StatusCode execute() ;
00153   StatusCode finalize() ;
00154 
00155 
00156 
00157  private:
00158 
00159 
00160   //------------------------------------
00161   // Types used internally by this class
00162   //------------------------------------
00163 
00164   // For local mutable copies of collections needed for algorithm operation
00165   typedef std::vector<Cell*>                   localCellCollection ;
00166   typedef localCellCollection::iterator        localCellIterator ;
00167 
00168 
00169 
00170   //---------------------------------------------------
00171   // Parameters of this algorithm 
00172   //---------------------------------------------------
00173 
00175   double        m_rConeBarrel;   
00177   double        m_rConeForward;   
00178 
00180   double        m_minInitiatorET ;
00181 
00183   double        m_minClusterET;     
00184 
00186   bool m_masslessJets;
00187 
00189   std::string   m_strategy;
00190   IClusterStrategy* m_clusterStrategy;
00192   std::string   m_inputLocation ;
00194   std::string   m_outputLocation ;
00196   std::string   m_unusedCellLocation ;
00197 
00198 
00199 
00200   //-------------------------------
00201   // Objects used by this class to do its job
00202   //-------------------------------
00203 
00205   KinematicHelper m_kinehelp ; 
00206 
00208   /*#  Cell lnkCell; */
00209   //-------------------------------
00210   // Private methods
00211   //-------------------------------
00212 
00214   void makeClusters( MsgStream& log, localCellCollection, ClusterCollection* ) ;
00215 
00216   // looks up R-cone size according to position of initiator
00217   //  double rCone( Cell* ) ;
00218   //Cell* version commented out for now: arg is not used+ gives
00219   //a compiler warning
00221   double rCone() ;
00222 
00225   TesIO* m_tesIO;
00226   //-------------------------------
00227   // Private helper class
00228   // For accumulating weighted kinematic quantities
00229   //-------------------------------
00230 
00233   class PreCluster {
00234 
00235     private:
00236 
00237      double m_eT_total ;
00238      double m_eta_weighted ;
00239      HepLorentzVector m_momentum_sum ;
00240     public:
00241 
00242      // Construct
00243      PreCluster( localCellIterator start, localCellIterator end )  ;
00244 
00246      double eT()  ;
00248      double eta() ;
00250      double phi() ;
00251      
00253      operator HepLorentzVector () ;
00254   };
00255 
00256 
00261     Cluster * lnkCluster;
00262 };
00263 
00264 } // end of namespace bracket
00265 
00266 
00267 #endif
00268 
00269 
00270 
00271 
00272 
00273 

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