RooRelBreitWigner.cc

Go to the documentation of this file.
00001 /*****************************************************************************
00002 * Project: BaBar detector at the SLAC PEP-II B-factory
00003 * Package: RooRarFit
00004  *    File: $Id: RooRelBreitWigner.cc,v 1.7 2012/05/25 08:53:43 fwilson Exp $
00005  * Authors:                                                                  
00006  *                                             
00007  *****************************************************************************/
00008 
00009 // -- CLASS DESCRIPTION [PDF] --
00010 // This is an implementation of Relativistic Breit Wigner for Spin 0,1,2 particles
00011 // with Blatt-Weisskopf form factors and barrier functions for RooRarFit. 
00012 // The meson radius is set to 3.1 GeV^-1 which is similar to the EvtGen number 
00013 // but may not be appropriate for every meson. See Phys Rev D 72, 052002 (2005).
00015 //
00016 // BEGIN_HTML
00017 // This is an implementation of Relativistic Breit Wigner for Spin 0,1,2 particles
00018 // with Blatt-Weisskopf form factors and barrier functions for RooRarFit. 
00019 // The meson radius is set to 3.1 GeV^-1 which is similar to the EvtGen number 
00020 // but may not be appropriate for every meson. See Phys Rev D 72, 052002 (2005).
00021 // END_HTML
00022 //
00023 
00024 #include "RooRarFit/rarVersion.hh"
00025 
00026 #include "Riostream.h"
00027 
00028 #include "RooRarFit/RooRelBreitWigner.hh"
00029 #include "RooFitCore/RooAbsReal.hh"
00030 #include "RooFitCore/RooRealVar.hh"
00031 #include "RooFitCore/RooAbsReal.hh"
00032 #include "RooFitCore/RooComplex.hh"
00033 
00034 ClassImp(RooRelBreitWigner)
00035 
00036 //------------------------------------------------------------------
00037 RooRelBreitWigner::RooRelBreitWigner(const char *name, const char *title,
00038                                      RooAbsReal& _x, RooAbsReal& _mean,
00039                                      RooAbsReal& _width, RooAbsReal& _radius, 
00040                                      RooAbsReal& _mass_a, RooAbsReal& _mass_b, 
00041                                      RooAbsReal& _spin) :
00042   RooAbsPdf(name,title),
00043   x("x","Dependent",this,_x),
00044   mean("mean","Mean",this,_mean),
00045   width("width","Width",this,_width),
00046   radius("radius","Radius",this,_radius),  // meson radius e.g. 3.1 GeV^-1
00047   mass_a("mass_a","Mass of first daughter",this,_mass_a), // e.g. pion from K*
00048   mass_b("mass_b","Mass of second daugher",this,_mass_b), // e.g. kaon from K*
00049   spin("spin","Spin",this,_spin)
00050 {
00051 }
00052 
00053 //------------------------------------------------------------------
00054 RooRelBreitWigner::RooRelBreitWigner(const RooRelBreitWigner& other, 
00055                                      const char* name) : 
00056   RooAbsPdf(other,name), 
00057   x("x",this,other.x), 
00058   mean("mean",this,other.mean),
00059   width("width",this,other.width),
00060   radius("radius",this,other.radius),
00061   mass_a("mass_a",this,other.mass_a),
00062   mass_b("mass_b",this,other.mass_b),
00063   spin("spin",this,other.spin)
00064 {
00065 }
00066 
00067 //------------------------------------------------------------------
00068 Double_t RooRelBreitWigner::evaluate() const
00069 {
00070   Double_t temp = mean*getWidth();
00071   RooComplex T(x*x,0.0);
00072   RooComplex denom(mean*mean-x*x,-1*temp);
00073   T = T /denom;     // Transition probability
00074   return(T.abs2()); // Amplitude (arbitrary scale)
00075 }
00076 
00077 //------------------------------------------------------------------
00078 Double_t RooRelBreitWigner::getWidth() const
00079 {
00080   Double_t q  = getQ(x);
00081   Double_t q0 = getQ(mean);
00082   Double_t result(0.0);
00083 
00084   if (q>0 && q0>0 && x>0 && mean>0) {
00085     result = width * getQterm(q,q0) * (mean/x) 
00086       * (getFF(q) / getFF(q0));
00087   }
00088   return (result);
00089 }
00090 
00091 //------------------------------------------------------------------
00092 Double_t RooRelBreitWigner::getQterm(Double_t q, Double_t q0) const
00093 {
00094   Double_t result = pow(q/q0,2*spin+1);
00095   return (result); // result = (q/q0)^(2*spin+1);
00096 }
00097 
00098 //------------------------------------------------------------------
00099 Double_t RooRelBreitWigner::getFF(Double_t q) const
00100 {
00101   
00102   Double_t z = q * radius;
00103   Double_t result(1.0);
00104 
00105   if (spin==1) {
00106     result = 1.0/(1+z*z);
00107   } else if (spin==2) {
00108     result = 1.0/(9 + 3*z*z + z*z*z*z);
00109   }
00110 
00111   return (result); //square of the Blatt-Weisskopf form factor
00112 }
00113 
00114 //-----------------------------------------------------
00115 Double_t RooRelBreitWigner::getQ(Double_t mass) const
00116 {
00117 
00118   if (mass < (mass_b+mass_a)) {return(0);}
00119 
00120   const Double_t mDaugSumSq  = (mass_b+mass_a)*(mass_b+mass_a);
00121   const Double_t mDaugDiffSq = (mass_b-mass_a)*(mass_b-mass_a);
00122 
00123   Double_t q = sqrt((mass*mass-mDaugSumSq)*(mass*mass-mDaugDiffSq))/(2*mass);
00124   return(q);
00125 }

Generated on 30 Oct 2013 for RooRarFit by  doxygen 1.4.7