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 "AtlfastEvent/IKinematic.h"
00072 #include "AtlfastEvent/AssociationManager.h"
00073 
00074 
00075 //Class ID for ReconstructedParticle class
00076 static const CLID CLID_ATLFAST_RECONSTRUCTED_PARTICLE=2305 ;
00077 
00078 
00079 
00080 //******************************************
00081 //      ReconstructedParticle class
00082 //
00083 // See description at head of this file 
00084 //******************************************
00085 
00086 
00087 namespace Atlfast {
00099   class ReconstructedParticle: 
00100     public IKinematic,
00101     public ContainedObject,  
00102     public AssociationManager 
00103     {
00104       
00105     public:
00106       
00107       //.............
00108       // Constructors
00109       
00110       // This is the principle constructor needed by users
00111       ReconstructedParticle(const int pdg_id, 
00112                             const HepLorentzVector& vec,
00113                             const HepMC::GenParticle* progenitor ) : 
00114         IKinematic(),
00115         ContainedObject(),
00116         AssociationManager(),
00117         m_pdg_id(pdg_id), 
00118         m_momentum(vec), 
00119         m_truth(progenitor) {}
00120       
00121       // Copy constructors
00122       ReconstructedParticle( const ReconstructedParticle& src ) :
00123         IKinematic(),
00124         ContainedObject(),
00125         AssociationManager( src ),
00126         m_pdg_id(src.m_pdg_id), 
00127         m_momentum(src.m_momentum), 
00128         m_truth(src.m_truth) 
00129        { }
00130       
00131       ReconstructedParticle( const ReconstructedParticle* src ) :
00132         IKinematic(),
00133         ContainedObject(),
00134         AssociationManager( *src ),
00135         m_pdg_id(src->m_pdg_id), 
00136         m_momentum(src->m_momentum), 
00137         m_truth(src->m_truth) {}
00138 
00139       // default constructor required by Gaudi
00140       ReconstructedParticle() : 
00141         IKinematic(),
00142         ContainedObject(), 
00143         AssociationManager(),
00144         m_pdg_id(0), 
00145         m_momentum(HepLorentzVector(0.0,0.0,0.0,0.0)), 
00146         m_truth(0) {}
00147     
00148 
00149       virtual ~ReconstructedParticle() {}
00150       
00151       
00152       //..............................................
00153       // Methods required by IKinematic interface to kinematic quantitites
00154       // See interface documentation for description.
00155       
00156       virtual HepLorentzVector momentum() const {return m_momentum;} 
00157       virtual double  eta() const { return m_momentum.pseudoRapidity() ;}
00158       virtual double  phi() const { return m_momentum.phi() ;  } 
00159       virtual double  pT()  const { return m_momentum.perp() ;}
00160       virtual double  eT()  const { 
00161         return m_momentum.e()*m_momentum.perp()/m_momentum.rho() ;}
00162       virtual double  mT()  const { return m_momentum.mt() ;}
00163       
00164       
00165       //........................
00166       //Other user methods
00167       
00171      int pdg_id() const { return m_pdg_id ; }
00172      
00176      const HepMC::GenParticle* truth() const { return m_truth ; }
00177      
00178      //.........................
00179      // Athena mandatory methods
00180      static const  CLID& classID()    
00181        { return CLID_ATLFAST_RECONSTRUCTED_PARTICLE; }
00182      virtual const CLID& clID() const 
00183        {  return CLID_ATLFAST_RECONSTRUCTED_PARTICLE; }
00184 
00185     private:
00186      
00187      // My pdg identity code
00188      int m_pdg_id ;
00189      
00190      // My 4-momentum
00191      HepLorentzVector m_momentum ;
00192      
00193      // Pointer to the MC generated particle from which this was derived
00194      // FIXME: This is unsafe but awaits an agreed fix to be implemented
00195      const HepMC::GenParticle* m_truth ;
00196      
00197     };
00198   
00199   
00200 } // end of namespace bracket
00201 #endif
00202 
00203 
00204 
00205 
00206 
00207 
00208 
00209 
00210 
00211 
00212 

Generated on Wed May 1 14:35:47 2002 for AtlfastEvent by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001