text: /***************************************************************************** 
   * Project: RooFit                                                           * 
   *                                                                           * 
   * This code was autogenerated by RooClassFactory                            * 
   *****************************************************************************/ 
  
  // Your description goes here... 
  
  #include "Riostream.h" 
  
  #include "AliLnGaussianExpTail.h" 
  #include "RooAbsReal.h" 
  #include "RooAbsCategory.h" 
  #include <math.h> 
  #include "TMath.h" 
  
  ClassImp(AliLnGaussianExpTail) 
  
   AliLnGaussianExpTail::AliLnGaussianExpTail(const char *name, const char *title, 
                          RooAbsReal& _x,
                          RooAbsReal& _mu,
                          RooAbsReal& _sigma,
                          RooAbsReal& _tau) :
     RooAbsPdf(name,title), 
     x("x","x",this,_x),
     mu("mu","mu",this,_mu),
     sigma("sigma","sigma",this,_sigma),
     tau("tau","tau",this,_tau)
   { 
   } 
  
  
   AliLnGaussianExpTail::AliLnGaussianExpTail(const AliLnGaussianExpTail& other, const char* name) :  
     RooAbsPdf(other,name), 
     x("x",this,other.x),
     mu("mu",this,other.mu),
     sigma("sigma",this,other.sigma),
     tau("tau",this,other.tau)
   { 
   } 
  
  
  
   Double_t AliLnGaussianExpTail::evaluate() const 
   { 
  // from pi/K/p note
  
  	if(x <= mu + tau)
  	{
  		return exp(-0.5*(x-mu)*(x-mu)/sigma/sigma);
  	}
  	
  	return exp(-0.5*tau*tau/sigma/sigma)*exp(-tau*(x-mu-tau)/sigma/sigma);
   } 
  
  
  
  