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 "AtlfastEvent/CollectionDefs.h"
00084 
00085 #include "AtlfastUtils/KinematicHelper.h"
00086 
00087 class ISvcLocator;
00088 class MsgStream;
00089 
00090 //***************************************************************
00091 //                 ClusterMaker class declaration
00092 //
00093 //****************************************************************
00094 
00095 namespace Atlfast {
00096   class Cell;
00097   class Cluster;
00098   class IClusterStrategy;
00099   class TesIO;
00100 
00101   using std::string;
00113   class ClusterMaker : public Algorithm{
00114     
00115   public:
00116     
00117     //-------------------------
00118     // Constructors/Destructors
00119     //-------------------------
00121     ClusterMaker( const std::string& name, ISvcLocator* pSvcLocator ) ; 
00123     virtual ~ClusterMaker();
00124     
00125     
00126     //------------------------------------------------------
00127     // Methods used by Athena to run the algorithm
00128     //------------------------------------------------------
00130     StatusCode initialize() ;
00132     StatusCode execute() ;
00134     StatusCode finalize() ;
00135     
00136     
00137   private:
00138     
00139     
00140     //------------------------------------
00141     // Types used internally by this class
00142     //------------------------------------
00143     
00144     // For local mutable copies of collections needed for algorithm operation
00145     //    typedef std::vector<Cell*>                   localCellCollection ;
00146     //    typedef localCellCollection::iterator        localCellIterator ;
00147     
00148     
00149     
00150     //---------------------------------------------------
00151     // Parameters of this algorithm 
00152     //---------------------------------------------------
00153     
00155     double        m_rConeBarrel;   
00157     double        m_rConeForward;   
00158     
00160     double        m_minInitiatorET ;
00161     
00163     double        m_minClusterET;     
00164     
00166     bool m_masslessJets;
00167     
00169     std::string   m_strategy;
00170     IClusterStrategy* m_clusterStrategy;
00172     bool m_processTracks;
00173     bool m_processCells;        
00175     std::string   m_inputCellLocation ;
00176     std::string   m_inputTrackLocation ;
00178     std::string   m_outputLocation ;
00180     std::string   m_unusedCellLocation ;
00181     std::string   m_unusedTrackLocation ;
00182     
00183     
00184     
00185     //-------------------------------
00186     // Objects used by this class to do its job
00187     //-------------------------------
00188     
00190     KinematicHelper m_kinehelp ; 
00191     
00192     //-------------------------------
00193     // Private methods
00194     //-------------------------------
00195     
00197     //    void makeClusters( MsgStream& log, 
00198     //         localCellCollection, ClusterCollection* ) ;
00199     //    void makeClusters( MsgStream& log,
00200     //                 std::vector<Cell*>,  
00201     //                 ClusterCollection* ) ;
00202     
00203     // looks up R-cone size according to position of initiator
00204     //  double rCone( Cell* ) ;
00205     //Cell* version commented out for now: arg is not used+ gives
00206     //a compiler warning
00208     double rCone() ;
00209     
00212     TesIO* m_tesIO;
00213     //-------------------------------
00214     // Private helper class
00215     // For accumulating weighted kinematic quantities
00216     //-------------------------------
00217     
00221     //    class PreCluster {
00222     //      //      using ClusterMaker::localCellIterator;
00223     //      
00224     //    private:
00225     //      
00226     //      double m_eT_total ;
00227     //      double m_eta_weighted ;
00228     //      HepLorentzVector m_momentum_sum ;
00229     //    public:
00230     //      
00231     //      // Construct
00232     //      //      PreCluster( localCellIterator start, localCellIterator end )  ;
00233     //      PreCluster( std::vector<Cell*>::iterator start, 
00234     //            std::vector<Cell*>::iterator end
00235     //            ); 
00236     //      
00237     //      /** kinematic query */
00238     //      double eT()  ;
00239     //      /** kinematic query */
00240     //      double eta() ;
00241     //      /** kinematic query */
00242     //      double phi() ;
00243     //      
00244     //      /** Conversion to HepLorentzVector */
00245     //      operator HepLorentzVector () ;
00246     //    };
00247     
00248     //    Cluster * lnkCluster;
00249   };
00250 } // end of namespace bracket
00251 
00252 #endif
00253 
00254 
00255 
00256 

Generated on Tue Mar 18 11:18:23 2003 for AtlfastAlgs by doxygen1.3-rc1