/***************************************************************************** * Project: RooFit * * * * This code was autogenerated by RooClassFactory * *****************************************************************************/ // Your description goes here... #include "Riostream.h" #include "RooPadResponse.h" #include "RooAbsReal.h" #include "RooAbsCategory.h" #include #include "TMath.h" ClassImp(RooPadResponse) RooPadResponse::RooPadResponse(const char *name, const char *title, RooAbsReal& _x, RooAbsReal& _y, RooAbsReal& _muX, RooAbsReal& _muY, RooAbsReal& _ampfrac, TpcPadPlane* p ) : RooAbsPdf(name,title), x("x","x",this,_x), y("y","y",this,_y), muX("muX","muX",this,_muX), muY("muY","muY",this,_muY), ampfrac("ampfrac","amplitude fraction",this,_ampfrac), fpadplane(p) { } RooPadResponse::RooPadResponse(const RooPadResponse& other, const char* name) : RooAbsPdf(other,name), x("x",this,other.x), y("y",this,other.y), muX("muX",this,other.muX), muY("muY",this,other.muY), ampfrac("ampfrac",this,other.ampfrac), fpadplane(other.fpadplane) { } //Int_t RooG2DimGauss::getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* /*rangeName*/) const /* { if (matchArgs(allVars,analVars,x)) return 1 ; return 0 ; } Double_t RooPadResponse::analyticalIntegral(Int_t code, const char* rangeName) const { assert(code==1) ; } */ Double_t RooPadResponse::evaluate() const { double retval=0; double dirX=x-muX; double dirY=y-muY; double weight=fpadplane->GetPad(0)->GetWeight(ampfrac.arg().getVal(),dirX,dirY); if (weight>1) retval=1./weight; else retval=weight; return retval; }