00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "PhysicsTools/TagAndProbe/interface/RooCMSShape.h"
00025
00026 ClassImp(RooCMSShape)
00027
00028 RooCMSShape::RooCMSShape(const char *name, const char *title,
00029 RooAbsReal& _x,
00030 RooAbsReal& _alpha,
00031 RooAbsReal& _beta,
00032 RooAbsReal& _gamma,
00033 RooAbsReal& _peak) :
00034 RooAbsPdf(name,title),
00035 x("x","x",this,_x),
00036 alpha("alpha","alpha",this,_alpha),
00037 beta("beta","beta",this,_beta),
00038 gamma("gamma","gamma",this,_gamma),
00039 peak("peak","peak",this,_peak)
00040 { }
00041
00042
00043 RooCMSShape::RooCMSShape(const RooCMSShape& other, const char* name):
00044 RooAbsPdf(other,name),
00045 x("x",this,other.x),
00046 alpha("alpha",this,other.alpha),
00047 beta("beta",this,other.beta),
00048 gamma("gamma",this,other.gamma),
00049 peak("peak",this,other.peak)
00050 { }
00051
00052
00053
00054 Double_t RooCMSShape::evaluate() const
00055 {
00056
00057
00058
00059 Double_t erf = RooMath::erfc((alpha - x) * beta);
00060 Double_t u = (x - peak)*gamma;
00061
00062 if(u < -70) u = 1e20;
00063 else if( u>70 ) u = 0;
00064 else u = exp(-u);
00065 return erf*u;
00066 }