CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_0/src/PhysicsTools/Utilities/interface/GammaZInterference.h

Go to the documentation of this file.
00001 #ifndef PhysicsTools_Utilities_GammaZInterference_h
00002 #define PhysicsTools_Utilities_GammaZInterference_h
00003 #include "PhysicsTools/Utilities/interface/Parameter.h"
00004 #include <boost/shared_ptr.hpp>
00005 
00006 namespace funct {
00007 
00008   struct GammaZInterference {
00009     GammaZInterference(const Parameter& m, const Parameter& g): 
00010       mass(m.ptr()), width(g.ptr()) { }
00011     GammaZInterference(boost::shared_ptr<double> m, boost::shared_ptr<double> g): 
00012       mass(m), width(g) {}
00013     double operator()(double x) const { 
00014       double m2 = *mass * (*mass); 
00015       double g2 = *width * (*width);
00016       double g2OverM2 = g2/m2; 
00017       double s = x*x;
00018       double deltaS = s - m2;
00019       double interference = 0;
00020       if (fabs(deltaS/m2)<16) {
00021         double prop = deltaS*deltaS + s*s*g2OverM2;
00022         interference =  5*(*mass)*deltaS/prop;
00023       }
00024       return interference;
00025     }
00026     boost::shared_ptr<double> mass, width;
00027   };
00028 
00029 }
00030 
00031 #endif