/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Event/BesDChain/BesDChain-00-00-14/src/CDPhoton.cxx

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:     CleoDChain
00004 // Module:      CDPhoton
00005 // 
00006 // Description: Implementation of candidate for CDPhotons
00007 //
00008 // Implimentation:
00009 //     <Notes on implimentation>
00010 //
00011 // Author:      Simon Patton
00012 // Created:     Tue Mar 18 13:23:11 EST 1997
00013 // $Id: CDPhoton.cxx,v 1.3 2010/01/11 08:05:20 zoujh Exp $
00014 //
00015 // Revision history
00016 //
00017 // $Log: CDPhoton.cxx,v $
00018 // Revision 1.3  2010/01/11 08:05:20  zoujh
00019 // Add setIP for vertex correction
00020 //
00021 // Revision 1.2  2009/06/22 14:55:48  zoujh
00022 // See ChangeLog
00023 //
00024 // Revision 1.1.1.1  2009/03/03 06:05:56  maqm
00025 // first import of BesDChain
00026 //
00027 // Revision 1.4  2004/03/05 22:01:44  chengp
00028 // implemented Monte Carlo matching
00029 //
00030 // Revision 1.3  2002/02/28 02:17:51  cdj
00031 // removed unnecessary include of CDTruth.h
00032 //
00033 // Revision 1.2  2001/04/25 12:52:13  ajm36
00034 // plugged memory leak in ctor for pi0's, k shorts, etas
00035 //
00036 // Revision 1.1  2001/04/11 13:19:02  urner
00037 // transition to files with CD prefix. Addition of new files
00038 //
00039 // Revision 1.1  2001/03/23 23:05:28  urner
00040 // added pi0 eta and CDKs decay lists
00041 //
00042 // Revision 1.1.1.1  2000/12/18 22:17:25  cdj
00043 // imported CleoDChain
00044 //
00045 // Revision 1.15  1998/05/01 20:30:07  sjp
00046 // Modified include path for new placement of CO classes
00047 //
00048 // Revision 1.14  1998/04/21 05:18:26  sjp
00049 // Modified to use CDMud
00050 //
00051 // Revision 1.13  1998/04/17 18:55:50  sjp
00052 // Modified to use latest types
00053 //
00054 // Revision 1.12  1997/12/23 21:54:26  sjp
00055 // Modified package to be completely templated
00056 //
00057 // Revision 1.11  1997/09/03 14:58:36  sjp
00058 // Use new report.h and KTKinematicData
00059 //
00060 // Revision 1.10  1997/08/29 17:00:37  sjp
00061 // Modified to handle new Cairn Templated classes
00062 //
00063 // Revision 1.9  1997/08/19 20:40:18  sjp
00064 // Updated to use <package>/<file>.h include structure.
00065 //   (Note: This version of the code has not been compiled)
00066 //
00067 // Revision 1.8  1997/01/21 20:30:01  sjp
00068 // Changed CPP flags and include because of library reorganization
00069 //
00070 // Revision 1.7  1996/11/04 16:58:09  sjp
00071 // Updated to work with new CDCandidate
00072 //
00073 // Revision 1.6  1996/07/16 19:05:30  sjp
00074 // Restructed Libraries
00075 // Put relative pathnames into all includes
00076 //
00077 // Revision 1.5  1996/06/13 18:20:13  sjp
00078 // Implmented KTKinematicData caching.
00079 // Added capability to be built from a MCParticle
00080 //
00081 // Revision 1.4  1996/06/04 15:00:04  sjp
00082 // Coverted to use kinematicData opertaion of Shower
00083 //
00084 // Revision 1.3  1996/04/06 19:44:07  sjp
00085 // Changed `true' to `!false'
00086 //
00087 // Revision 1.2  1996/04/05 20:07:29  sjp
00088 // Added matching information
00089 //
00090 // Revision 1.1  1995/11/26 23:03:24  sjp
00091 // New Classes to handle Showers and CDPhotons.
00092 
00093 // system include files
00094 //#include <iostream>
00095 
00096 // user include files
00097 #include "BesDChain/util/KinematicData.h"
00098 #include "EvtRecEvent/EvtRecTrack.h"
00099 #include "EmcRecEventModel/RecEmcShower.h"
00100 #include "BesDChain/CDMud.h"
00101 #include "BesDChain/CDPhoton.h"
00102 
00103 using DecayChain::KinematicData;
00104 
00105 Hep3Vector CDPhoton::m_IPV(0.0, 0.0, 0.0);
00106 
00107 //------ Constructor -----
00108 // constructor using VisibleEvidence
00109 //
00110 CDPhoton::CDPhoton( const VisibleEvidence* aVisible ) :
00111    CDCandidate( CDMud< VisibleEvidence >::get( aVisible ) ) ,
00112    m_visibleEvidence( aVisible )
00113 {
00114 }
00115 
00116 //------ Constructor -----
00117 // copy constructor
00118 //
00119 CDPhoton::CDPhoton( const CDPhoton& aOtherCDPhoton ) :
00120    CDCandidate( aOtherCDPhoton ) ,
00121    m_visibleEvidence( aOtherCDPhoton.m_visibleEvidence )
00122 {
00123 }
00124 
00125 
00126 //------ Destructor -----
00127 //
00128 CDPhoton::~CDPhoton()
00129 {
00130 }
00131 
00132 
00133 //------ buildFromCDPhoton -----
00134 // return `true' as CDPhoton is made up from VisibleEvidence
00135 //
00136 bool CDPhoton::builtFromCDPhoton() const
00137 {
00138    return ( 0 != m_visibleEvidence ) ;
00139 }
00140 
00141 
00142 //------ photon -----
00143 // return NavShower for this CDPhoton
00144 //
00145 const EvtRecTrack* CDPhoton::photon() const
00146 {
00147    return m_visibleEvidence ;
00148 }
00149 
00150 //------ defaultKinematicData -----
00151 // create the kinematicData for this CDCandidate
00152 //
00153 KinematicData* CDPhoton::defaultKinematicData() const
00154 {
00155    RecEmcShower* emcShower = (const_cast<VisibleEvidence*>(m_visibleEvidence))->emcShower();
00156 
00157    double eraw = emcShower->energy();
00158 
00159    //double phi  = emcShower->phi();
00160    //double the  = emcShower->theta();
00161 
00162    Hep3Vector EmcV( emcShower->x(), emcShower->y(), emcShower->z() );
00163    Hep3Vector PhotonV = EmcV - m_IPV;
00164 
00165    double phi = PhotonV.phi();
00166    double the = PhotonV.theta();
00167 
00168    double px = eraw*sin(the)*cos(phi);
00169    double py = eraw*sin(the)*sin(phi);
00170    double pz = eraw*cos(the);
00171 
00172    KinematicData* tmp = new KinematicData();
00173 
00174    tmp->setP4( HepLorentzVector(px, py, pz, eraw) );
00175 
00176    return tmp;
00177 }
00178 

Generated on Tue Nov 29 22:58:20 2016 for BOSS_7.0.2 by  doxygen 1.4.7