- 2
- 0
- 约1.08万字
- 约 22页
- 2016-11-02 发布于北京
- 举报
A Toolkit for the modeling ofMulti-parametric fit problems
A Toolkit for the modeling ofMulti-parametric fit problems Luca Lista INFN Napoli Motivation Initially developed while rewriting a fortran fitter for BaBar analysis Simultaneous estimate of: B(B? ?J/???) / B(B? ?J/?K?) direct CP asymmetry More control on the code was needed to justify a bias appeared in the original fitter As much as possible of the code has to be under control and testable separately Requirements Provide Tools for modeling parametric fit problems Unbinned Maximum Likelihood (UML[*]) fit of: PDF parameters Yields of different sub-samples Both, mixed ?2 fits Toy Monte Carlo to study the fit properties Fitted parameter distributions Pulls, Bias, Confidence level of fit results [*] not Unified Modeling Language … ? … Design issues Trying to optimize as much as possible the PDF code Gets called a large number of times Yes, it can be done in C++: Addressed with Template Metaprogramming No need to use virtual functions The underlying minimization engine is Minuit, as always Wrapped in different flavours (ROOT, …) PDF interface class PdfFlat { public: typedef double type; enum { variables = 1 }; PdfFlat( double a, double b ) : min( a ), max( b ) { } double operator()( type * v ) const { type x = *v; return ( x min || x max ? 0 : 1 / ( max - min ) ); } double min, max; }; class PdfPoissonian { public: typedef int type; enum { variables = 1 }; PdfPoissonian( double m ) : mean( m ) { } double operator()( type * v ) const { type n = *v; return ( exp( - mean ) * pow( mean, n ) / TMath::Factorial( n ) ); } double mean; }; Random number generators template class Pdf, class Generator = RootRandom class RandomGenerator { public: typedef typename Pdf::type type; RandomGenerator( const Pdf pdf ); void generate( type * v ) const; }; template class Generator class RandomGenerator PdfFlat, Generator { public: typede
原创力文档

文档评论(0)