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

ReconstructedParticle.h

Go to the documentation of this file.
00001 // ================================================
00002 // This file contains:
00003 //
00004 //              ReconstructedParticle class
00005 //
00006 //           ReconstructedParticleCollection   
00007 // ================================================
00008 //
00009 // THIS TEXT TO BE REPLACED BY ATLAS STANDARD FORMAT
00010 //
00011 //
00012 // Namespace: ATLFast::
00013 //
00014 // class: ReconstructedParticle
00015 //
00016 // Description:
00017 //
00018 //   ReconstructedParticle is used to represent most simple particles such as 
00019 //   Electron, Muon, Photon, etc. The motivation being that all particles are
00020 //   the same type from the point of view of kinematic state variables, 
00021 //   and are only differentiated by having a different "label".
00022 //
00023 //   It implements an "IKinematic" interface which is
00024 //   designed to standardise kimematic attribute query method names.
00025 //
00026 //   Ongoing points during development:
00027 //
00028 //   1 This is of course not a proven concept at this stage.
00029 //     However we follow the principle of "try the simplest thing first"
00030 //     Thus we propose this as the highest level analysis entity class
00031 //     in order to see if it works.
00032 //
00033 //   2 This is all without prejudice to how we chose to
00034 //     represent jets, tracks, clusters...
00035 //
00036 //   3 It was developed during the first phase of ATLFAST++ re-engineering
00037 //     and inclusion in the ATLAS (Gaudi/Athena) analysis framework. 
00038 //     It is therefore one of the first implementations of such analysis classes,
00039 //     and as such should be seen as a prototype which may be superceeded
00040 //     in concept.
00041 // 
00042 //   4 At the present time we have not solved the association/relationship
00043 //     to other entities. This is a deep problem which is wider than
00044 //     Atlfast.
00045 //  
00046 //
00047 // Authors:
00048 //    P.Clarke, H.Phillips, E.Richter-Was, P.Sherwood, R.Steward
00049 //
00050 // Written:
00051 //    7-June-2000
00052 // Revised:
00053 //
00054 //
00055 // ................................................................
00056 //
00057 #ifndef ATLFAST_RECONSTRUCTEDPARTICLE_H
00058 #define ATLFAST_RECONSTRUCTEDPARTICLE_H
00059 
00060 
00061 
00062 // Gaudi/Athena 
00063 #include "GaudiKernel/ContainedObject.h"
00064 #include "GaudiKernel/ObjectVector.h"
00065 
00066 // Other
00067 #include "CLHEP/Vector/LorentzVector.h"
00068 #include "HepMC/GenParticle.h"
00069 
00070 // Atlfast
00071 #include "AtlfastCode/IKinematic.h"
00072 #include "AtlfastCode/AssociationManager.h"
00073 
00074 //include "Atlfast/Phi.h"
00075 
00076 //Class ID for ReconstructedParticle class
00077 static const CLID CLID_ATLFAST_RECONSTRUCTED_PARTICLE=2305 ;
00078 
00079 
00080 
00081 //******************************************
00082 //      ReconstructedParticle class
00083 //
00084 // See description at head of this file 
00085 //******************************************
00086 
00087 
00088 namespace Atlfast {
00100   class ReconstructedParticle: 
00101     public IKinematic,
00102     public ContainedObject,  
00103     public AssociationManager 
00104     {
00105       
00106     public:
00107       
00108       //.............
00109       // Constructors
00110       
00111       // This is the principle constructor needed by users
00112       ReconstructedParticle(const int pdg_id, 
00113                             const HepLorentzVector& vec,
00114                             const HepMC::GenParticle* progenitor ) : 
00115         IKinematic(),
00116         ContainedObject(),
00117         AssociationManager(),
00118         m_pdg_id(pdg_id), 
00119         m_momentum(vec), 
00120         m_truth(progenitor) {}
00121       
00122       // Copy constructors
00123       ReconstructedParticle( const ReconstructedParticle& src ) :
00124         IKinematic(),
00125         ContainedObject(),
00126         AssociationManager( src ),
00127         m_pdg_id(src.m_pdg_id), 
00128         m_momentum(src.m_momentum), 
00129         m_truth(src.m_truth) 
00130        { }
00131       
00132       ReconstructedParticle( const ReconstructedParticle* src ) :
00133         IKinematic(),
00134         ContainedObject(),
00135         AssociationManager( *src ),
00136         m_pdg_id(src->m_pdg_id), 
00137         m_momentum(src->m_momentum), 
00138         m_truth(src->m_truth) {}
00139 
00140       // default constructor required by Gaudi
00141       ReconstructedParticle() : 
00142         IKinematic(),
00143         ContainedObject(), 
00144         AssociationManager(),
00145         m_pdg_id(0), 
00146         m_momentum(HepLorentzVector(0.0,0.0,0.0,0.0)), 
00147         m_truth(0) {}
00148     
00149 
00150       virtual ~ReconstructedParticle() {}
00151       
00152       
00153       //..............................................
00154       // Methods required by IKinematic interface to kinematic quantitites
00155       // See interface documentation for description.
00156       
00157       virtual HepLorentzVector momentum() const {return m_momentum;} 
00158       virtual double  eta() const { return m_momentum.pseudoRapidity() ;}
00159       virtual double  phi() const { return m_momentum.phi() ;  } 
00160       virtual double  pT()  const { return m_momentum.perp() ;}
00161       virtual double  eT()  const { 
00162         return m_momentum.e()*m_momentum.perp()/m_momentum.rho() ;}
00163       virtual double  mT()  const { return m_momentum.mt() ;}
00164       
00165       
00166       //........................
00167       //Other user methods
00168       
00172      int pdg_id() const { return m_pdg_id ; }
00173      
00177      const HepMC::GenParticle* truth() const { return m_truth ; }
00178      
00179      //.........................
00180      // Athena mandatory methods
00181      static const  CLID& classID()    
00182        { return CLID_ATLFAST_RECONSTRUCTED_PARTICLE; }
00183      virtual const CLID& clID() const 
00184        {  return CLID_ATLFAST_RECONSTRUCTED_PARTICLE; }
00185      
00186       // Input streamer
00187       virtual StreamBuffer& serialize(StreamBuffer& s);
00188 
00189       // Output streamer
00190       virtual StreamBuffer& serialize(StreamBuffer& s) const;
00191 
00192     private:
00193      
00194      // My pdg identity code
00195      int m_pdg_id ;
00196      
00197      // My 4-momentum
00198      HepLorentzVector m_momentum ;
00199      
00200      // Pointer to the MC generated particle from which this was derived
00201      // FIXME: This is unsafe but awaits an agreed fix to be implemented
00202      const HepMC::GenParticle* m_truth ;
00203      
00204     };
00205   
00206   
00207 } // end of namespace bracket
00208 #endif
00209 
00210 
00211 
00212 
00213 
00214 
00215 
00216 
00217 
00218 
00219 

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