Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:21

0001 /*****************************************************************************
0002  * Project: RooFit                                                           *
0003  * Package: RooFitModels                                                     *
0004  *    File: $Id: RooEffProd.h,v 1.2 2007/05/11 10:14:56 verkerke Exp $
0005  * Authors:                                                                  *
0006  *   GR, Gerhard Raven, NIKHEF/VU                                            *
0007  *                                                                           *
0008  * Redistribution and use in source and binary forms,                        *
0009  * with or without modification, are permitted according to the terms        *
0010  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
0011  *****************************************************************************/
0012 #ifndef ROO_EFF_PROD
0013 #define ROO_EFF_PROD
0014 
0015 #include "RooAbsPdf.h"
0016 #include "RooRealProxy.h"
0017 #include "RooObjCacheManager.h"
0018 
0019 class RooEffProd: public RooAbsPdf {
0020 public:
0021   // Constructors, assignment etc
0022   RooEffProd() {}
0023   RooEffProd(const char *name, const char *title, RooAbsPdf& pdf, RooAbsReal& efficiency);
0024   RooEffProd(const RooEffProd& other, const char* name=nullptr);
0025 
0026   TObject* clone(const char* newname) const override { return new RooEffProd(*this,newname); }
0027 
0028   RooAbsGenContext* genContext(const RooArgSet &vars, const RooDataSet *prototype,
0029                                        const RooArgSet* auxProto, bool verbose) const override;
0030 
0031 protected:
0032 
0033   // Function evaluation
0034   double evaluate() const override ;
0035   void translate(RooFit::Detail::CodeSquashContext &ctx) const override;
0036 
0037 
0038   RooRealProxy _pdf ;               ///< Probability Density function
0039   RooRealProxy _eff;                ///< Efficiency function
0040 
0041   ClassDefOverride(RooEffProd,2) // Product operator p.d.f of (PDF x efficiency) implementing optimized generator context
0042 };
0043 
0044 #endif