SFrame 3.6
|
00001 // Dear emacs, this is -*- c++ -*- 00002 // $Id: SParticle.icc 120 2009-08-27 12:02:57Z krasznaa $ 00003 /*************************************************************************** 00004 * @Project: SFrame - ROOT-based analysis framework for ATLAS 00005 * @Package: Plug-ins 00006 * 00007 * @author Stefan Ask <Stefan.Ask@cern.ch> - Manchester 00008 * @author David Berge <David.Berge@cern.ch> - CERN 00009 * @author Johannes Haller <Johannes.Haller@cern.ch> - Hamburg 00010 * @author A. Krasznahorkay <Attila.Krasznahorkay@cern.ch> - CERN/Debrecen 00011 * 00012 ***************************************************************************/ 00013 00014 #ifndef SFRAME_PLUGINS_SParticle_ICC 00015 #define SFRAME_PLUGINS_SParticle_ICC 00016 00028 template< class Geom > 00029 SParticle::SParticle( const ROOT::Math::LorentzVector< Geom >& parent ) 00030 : ROOT::Math::LorentzVector< ROOT::Math::PtEtaPhiE4D< Double32_t > >(), 00031 TObject() { 00032 00033 this->SetPt( parent.Pt() ); 00034 this->SetEta( parent.Eta() ); 00035 this->SetPhi( parent.Phi() ); 00036 this->SetE( parent.E() ); 00037 00038 } 00039 00051 template< class Geom > 00052 SParticle& SParticle::operator= ( const ROOT::Math::LorentzVector< Geom >& rh ) { 00053 00054 this->SetPt( rh.Pt() ); 00055 this->SetEta( rh.Eta() ); 00056 this->SetPhi( rh.Phi() ); 00057 this->SetE( rh.E() ); 00058 00059 return *this; 00060 00061 } 00062 00063 #endif // SFRAME_PLUGINS_SParticle_ICC