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

Cluster.h

Go to the documentation of this file.
00001 // ================================================
00002 // Cluster class description
00003 // ================================================
00004 //
00005 // THIS TEXT TO BE REPLACED BY ATLAS STANDARD FORMAT
00006 //
00007 // Namespace Atlfast::
00008 //
00009 // class: Cluster
00010 //
00011 // Authors: P.Clarke, H.Phillips, E.Richter-Was, P.Sherwood, R.Steward
00012 //
00013 // Description: 
00014 //
00015 //   Class to represent Clusters constructed from calorimeter Cells
00016 //
00017 //   It implements an "IKinematic" interface which is
00018 //   designed to standardise kinematic attribute query method names.
00019 //
00020 //   Ongoing points during development:
00021 //
00022 //   1 It was developed during the first phase of ATLFAST++ re-engineering
00023 //     and inclusion in the ATLAS (Gaudi/Athena) analysis framework. 
00024 //     It is therefore one of the first implementations of such analysis classes,
00025 //     and as such should be seen as a prototype which may be superceeded
00026 //     in concept.
00027 // 
00028 //   3 At the present time we have not solved the association/relationship
00029 //     to other entities. This is a deep problem which is wider than
00030 //     Atlfast which is under study.
00031 //  
00032 //
00033 //..................................................
00034 
00035 
00036 #ifndef ATLFAST_CLUSTER_H
00037 #define ATLFAST_CLUSTER_H
00038 
00039 // Kinematic classes.
00040 #include "CLHEP/Vector/LorentzVector.h"
00041 #include "AtlfastCode/IKinematic.h"
00042 
00043 // Management of Associations
00044 #include "AtlfastCode/AssociationManager.h"
00045 
00046 // Gaudi includes
00047 #include "GaudiKernel/ContainedObject.h"
00048 //#include "GaudiKernel/ObjectVector.h"
00049 
00050 
00051 //Class ID for Cluster class
00052 static const CLID CLID_ATLFAST_CLUSTER=2302 ;
00053 
00054 
00055 //******************************************
00056 //              Cluster class
00057 //
00058 // See description at head of this file 
00059 //******************************************
00060 
00061 
00062 namespace Atlfast {
00070   class Cluster : 
00071     public IKinematic, 
00072     public ContainedObject, 
00073     public AssociationManager
00074     {
00075       
00076     private:
00077       
00078       // Kinematic information assocated with this cluster  
00079       HepLorentzVector m_momentum ;
00080 
00082       /*#  Cell lnkCell; */      
00083       // block assignment  
00084       //Cluster& operator= ( Cluster& ) {}
00085       
00086       
00087     public:
00088       
00089       //.............
00090       // Constructors
00091       
00097       template <class CellIterator>
00098         Cluster( const HepLorentzVector& vec, 
00099                  CellIterator first, 
00100                  CellIterator last  ) : 
00101         IKinematic(),
00102         ContainedObject(),
00103         AssociationManager(), 
00104         m_momentum(vec)
00105         {
00106           // Add associations to Cells from which the cluster was made
00107           // Only needs to be one direction Clusters->Cells
00108           for ( CellIterator i=first; i != last; ++i ) 
00109             {
00110               this->associate(*i);
00111             }
00112         }
00113       
00115       Cluster( const Cluster& src ) : 
00116         IKinematic(),
00117         ContainedObject(), 
00118         AssociationManager( src ),
00119         m_momentum(src.m_momentum)
00120         {}
00121       
00122       
00124       Cluster() : 
00125         IKinematic(),
00126         ContainedObject(), 
00127         AssociationManager(),
00128         m_momentum(HepLorentzVector(0.0,0.0,0.0,0.0))
00129         {}
00130       
00131       virtual ~Cluster() {}
00132       
00133       
00134       //..............................................
00135       // Methods required by IKinematic interface to kinematic quantitites
00136       // See interface documentation for description.
00138       virtual HepLorentzVector momentum() const {return m_momentum; } 
00140       virtual double  eta() const { return m_momentum.pseudoRapidity() ;}
00142       virtual double  phi() const { return m_momentum.phi() ;  } 
00144       virtual double  pT()  const { return m_momentum.perp() ;}
00145       //  FIXME: not sure if this is correct
00147       virtual double  eT()  const { 
00148         return  m_momentum.e()*m_momentum.perp()/m_momentum.rho() ;}  
00150       virtual double  mT()  const { return m_momentum.mt(); }   
00151       
00152       
00153       //......................
00154       // Athena mandatory methods
00155       static  const CLID& classID()       { return CLID_ATLFAST_CLUSTER; }
00156       virtual const CLID& clID()  const   {  return CLID_ATLFAST_CLUSTER; }
00157       
00161       virtual StreamBuffer& serialize(StreamBuffer& s);
00165       virtual StreamBuffer& serialize(StreamBuffer& s) const;
00166   
00167   };
00168   
00169   // ..............................
00170   // This typedef is used by ClusterMaker to store Clusters
00171   //
00172   // It is put here rather than ClusterMaker.h so that any algorithm wishing 
00173   // to use clusters from the TES need only #include Cluster.h
00174   
00175   // WARNING: THIS IS DEPRECATED AND IS SLOWLY BEING WITHDRAWN.
00176   // YOU SHOULD INSTEAD USE THE TYPEDEF GIVEN IN THE INCLUDE FILE
00177   //    ClusterCollection.h
00178   //
00179   
00180   //  typedef ObjectVector<Cluster> t_clusterCollection ;
00181   
00182   
00183 } // end of namespace 
00184 
00185 
00186 #endif
00187 
00188 
00189 
00190 
00191 
00192 
00193 
00194 
00195 
00196 
00197 
00198 

Generated on Mon Feb 4 15:54:23 2002 for Atlfast by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001