00001 #ifndef PhysicsTools_Utilities_ZLineShape_h 00002 #define PhysicsTools_Utilities_ZLineShape_h 00003 #include "PhysicsTools/Utilities/interface/BreitWigner.h" 00004 #include "PhysicsTools/Utilities/interface/GammaPropagator.h" 00005 #include "PhysicsTools/Utilities/interface/GammaZInterference.h" 00006 #include "PhysicsTools/Utilities/interface/Parameter.h" 00007 #include <boost/shared_ptr.hpp> 00008 00009 namespace funct { 00010 class ZLineShape { 00011 public: 00012 ZLineShape(const Parameter& m, const Parameter& g, 00013 const Parameter& Ng, const Parameter& Ni): 00014 Ngamma(Ng.ptr()), Nint(Ni.ptr()), 00015 bw_(m, g), gp_(), gzi_(m, g) {} 00016 ZLineShape(boost::shared_ptr<double> m, boost::shared_ptr<double> g, 00017 boost::shared_ptr<double> Ng, boost::shared_ptr<double> Ni): 00018 Ngamma(Ng), Nint(Ni), 00019 bw_(m, g), gp_(), gzi_(m, g) {} 00020 double operator()(double x) const { 00021 return (1.0 - *Nint - *Ngamma) * bw_(x) + *Ngamma * gp_(x) + *Nint * gzi_(x); 00022 } 00023 boost::shared_ptr<double> Ngamma, Nint; 00024 private: 00025 BreitWigner bw_; 00026 GammaPropagator gp_; 00027 GammaZInterference gzi_; 00028 }; 00029 00030 } 00031 00032 #endif 00033