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__
00037 #define __Atlfast_cluster__
00038 
00039 #include <iostream>
00040 
00041 // Kinematic classes.
00042 #include "CLHEP/Vector/LorentzVector.h"
00043 #include "AtlfastCode/IKinematic.h"
00044 
00045 // Management of Associations
00046 #include "AtlfastCode/AssociationManager.h"
00047 
00048 // Gaudi includes
00049 #include "GaudiKernel/ContainedObject.h"
00050 #include "GaudiKernel/ObjectVector.h"
00051 #include "GaudiKernel/SmartRefVector.h"  
00052 
00053 
00054 //Class ID for Cluster class
00055 static const CLID CLID_ATLFAST_CLUSTER=2302 ;
00056 
00057 
00058 //******************************************
00059 //              Cluster class
00060 //
00061 // See description at head of this file 
00062 //******************************************
00063 
00064 
00065 namespace Atlfast {
00073   class Cluster : 
00074     public IKinematic, 
00075     public ContainedObject, 
00076     public AssociationManager
00077     {
00078       
00079     private:
00080       
00081       // Kinematic information assocated with this cluster  
00082       HepLorentzVector m_momentum ;
00083 
00085       /*#  Cell lnkCell; */      
00086       // block assignment  
00087       //Cluster& operator= ( Cluster& ) {}
00088       
00089       
00090     public:
00091       
00092       //.............
00093       // Constructors
00094       
00100       template <class CellIterator>
00101         Cluster( const HepLorentzVector& vec, 
00102                  CellIterator first, 
00103                  CellIterator last  ) : 
00104         IKinematic(),
00105         ContainedObject(),
00106         AssociationManager(), 
00107         m_momentum(vec)
00108         {
00109           // Add associations to Cells from which the cluster was made
00110           // Only needs to be one direction Clusters->Cells
00111           for ( CellIterator i=first; i != last; ++i ) 
00112             {
00113               this->associate(*i);
00114             }
00115         }
00116       
00118       Cluster( const Cluster& src ) : 
00119         IKinematic(),
00120         ContainedObject(), 
00121         AssociationManager( src ),
00122         m_momentum(src.m_momentum)
00123         {}
00124       
00125       
00127       Cluster() : 
00128         IKinematic(),
00129         ContainedObject(), 
00130         AssociationManager(),
00131         m_momentum(HepLorentzVector(0.0,0.0,0.0,0.0))
00132         {}
00133       
00134       virtual ~Cluster() {}
00135       
00136       
00137       //..............................................
00138       // Methods required by IKinematic interface to kinematic quantitites
00139       // See interface documentation for description.
00141       virtual HepLorentzVector momentum() const {return m_momentum; } 
00143       virtual double  eta() const { return m_momentum.pseudoRapidity() ;}
00145       virtual double  phi() const { return m_momentum.phi() ;  } 
00147       virtual double  pT()  const { return m_momentum.perp() ;}
00148       //  FIXME: not sure if this is correct
00150       virtual double  eT()  const { 
00151         return  m_momentum.e()*m_momentum.perp()/m_momentum.rho() ;}  
00153       virtual double  mT()  const { return m_momentum.mt(); }   
00154       
00155       
00156       //......................
00157       // Athena mandatory methods
00158       static  const CLID& classID()       { return CLID_ATLFAST_CLUSTER; }
00159       virtual const CLID& clID()  const   {  return CLID_ATLFAST_CLUSTER; }
00160       
00164       virtual StreamBuffer& serialize(StreamBuffer& s);
00168       virtual StreamBuffer& serialize(StreamBuffer& s) const;
00169   
00170   };
00171   
00172   // ..............................
00173   // This typedef is used by ClusterMaker to store Clusters
00174   //
00175   // It is put here rather than ClusterMaker.h so that any algorithm wishing 
00176   // to use clusters from the TES need only #include Cluster.h
00177   
00178   // WARNING: THIS IS DEPRECATED AND IS SLOWLY BEING WITHDRAWN.
00179   // YOU SHOULD INSTEAD USE THE TYPEDEF GIVEN IN THE INCLUDE FILE
00180   //    ClusterCollection.h
00181   //
00182   
00183   typedef ObjectVector<Cluster> t_clusterCollection ;
00184   
00185   
00186 } // end of namespace 
00187 
00188 
00189 #endif
00190 
00191 
00192 
00193 
00194 
00195 
00196 
00197 
00198 
00199 
00200 
00201 

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