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__
00070 #define __Atlfast_clustermaker__
00071 
00072 // STL
00073 #include <string>
00074 #include <vector>
00075 
00076 // Gaudi 
00077 #include "GaudiKernel/ISvcLocator.h"
00078 #include "GaudiKernel/IAlgorithm.h"
00079 #include "GaudiKernel/Algorithm.h"
00080 #include "GaudiKernel/MsgStream.h"
00081 #include "GaudiKernel/DataObject.h"
00082 #include "GaudiKernel/ObjectVector.h"
00083 // Other
00084 #include "CLHEP/Vector/LorentzVector.h"
00085 #include "HepMC/GenParticle.h"
00086 
00087 // Atlfast
00088 #include "AtlfastCode/ReconstructedParticle.h"
00089 #include "AtlfastCode/ReconstructedParticleCollection.h"
00090 #include "AtlfastCode/Cell.h"
00091 #include "AtlfastCode/CellCollection.h"
00092 #include "AtlfastCode/Cluster.h"
00093 #include "AtlfastCode/ClusterCollection.h"
00094 #include "AtlfastCode/IClusterStrategy.h"
00095 
00096 #include "AtlfastCode/IKinematic.h"
00097 #include "AtlfastCode/KinematicHelper.h"
00098 #include "AtlfastCode/TesIO.h"
00099 
00100 
00101 //*************************************
00102 //Default parameters for this algorithm
00103 // (descriptions in class declaration)
00104 //*************************************
00105 #define DEFAULT_minInitiatorET  1.5   
00106 //Cones set to 0.401 to avoid calorimeter grid problems
00107 #define DEFAULT_rConeBarrel     0.401   
00108 #define DEFAULT_rConeForward    0.401  
00109 #define DEFAULT_minClusterET    5. 
00110 #define DEFAULT_inputLocation        "/Event/AtlfastCells" 
00111 #define DEFAULT_outputLocation       "/Event/AtlfastClusters" 
00112 #define DEFAULT_unusedCellLocation   "/Event/AtlfastUnusedCells" 
00113 #define DEFAULT_Strategy             "Cone" 
00114 
00115 
00116 
00117 
00118 
00119 //***************************************************************
00120 //                 ClusterMaker class declaration
00121 //
00122 //****************************************************************
00123 
00124 namespace Atlfast {
00136 class ClusterMaker : public Algorithm
00137 {
00138 
00139  public:
00140 
00141   //-------------------------
00142   // Constructors/Destructors
00143   //-------------------------
00145   ClusterMaker( const std::string& name, ISvcLocator* pSvcLocator ) ; 
00147   virtual ~ClusterMaker();
00148 
00149 
00150   //------------------------------------------------------
00151   // Methods used by Athena to run the algorithm
00152   //------------------------------------------------------
00154   StatusCode initialize() ;
00156   StatusCode execute() ;
00158   StatusCode finalize() ;
00159 
00160 
00161 
00162  private:
00163 
00164 
00165   //------------------------------------
00166   // Types used internally by this class
00167   //------------------------------------
00168 
00169   // For local mutable copies of collections needed for algorithm operation
00170   typedef std::vector<Cell*>                   localCellCollection ;
00171   typedef localCellCollection::iterator        localCellIterator ;
00172 
00173 
00174 
00175   //---------------------------------------------------
00176   // Parameters of this algorithm 
00177   //---------------------------------------------------
00178 
00180   double        m_rConeBarrel;   
00182   double        m_rConeForward;   
00183 
00185   double        m_minInitiatorET ;
00186 
00188   double        m_minClusterET;     
00189 
00191   std::string   m_strategy;
00192   IClusterStrategy* m_clusterStrategy;
00194   std::string   m_inputLocation ;
00196   std::string   m_outputLocation ;
00198   std::string   m_unusedCellLocation ;
00199 
00200 
00201 
00202   //-------------------------------
00203   // Objects used by this class to do its job
00204   //-------------------------------
00205 
00207   KinematicHelper m_kinehelp ; 
00208 
00210   /*#  Cell lnkCell; */
00211   //-------------------------------
00212   // Private methods
00213   //-------------------------------
00214 
00216   void makeClusters( MsgStream& log, localCellCollection, ClusterCollection* ) ;
00217 
00218   // looks up R-cone size according to position of initiator
00219   //  double rCone( Cell* ) ;
00220   //Cell* version commented out for now: arg is not used+ gives
00221   //a compiler warning
00223   double rCone() ;
00224 
00227   TesIO* m_tesIO;
00228   //-------------------------------
00229   // Private helper class
00230   // For accumulating weighted kinematic quantities
00231   //-------------------------------
00232 
00235   class PreCluster {
00236 
00237     private:
00238 
00239      double m_eT_total ;
00240      double m_eta_weighted ;
00241      HepLorentzVector m_momentum_sum ;
00242       
00243     public:
00244 
00245      // Construct
00246      PreCluster( localCellIterator start, localCellIterator end )  ;
00247 
00249      double eT()  ;
00251      double eta() ;
00253      double phi() ;
00254      
00256      operator HepLorentzVector () ;
00257   };
00258 
00259 
00264     Cluster * lnkCluster;
00265 };
00266 
00267 } // end of namespace bracket
00268 
00269 
00270 #endif
00271 
00272 
00273 
00274 
00275 
00276 

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