Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-15 09:12:18

0001 /*****************************************************************************
0002  * Project: RooFit                                                           *
0003  * Package: RooFitCore                                                       *
0004  *    File: $Id: RooEfficiency.h,v 1.6 2007/05/11 10:14:56 verkerke Exp $
0005  * Authors:                                                                  *
0006  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
0007  *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
0008  *                                                                           *
0009  * Copyright (c) 2000-2005, Regents of the University of California          *
0010  *                          and Stanford University. All rights reserved.    *
0011  *                                                                           *
0012  * Redistribution and use in source and binary forms,                        *
0013  * with or without modification, are permitted according to the terms        *
0014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
0015  *****************************************************************************/
0016 #ifndef ROO_EFFICIENCY
0017 #define ROO_EFFICIENCY
0018 
0019 #include "RooAbsPdf.h"
0020 #include "RooCategoryProxy.h"
0021 #include "RooRealProxy.h"
0022 #include "TString.h"
0023 
0024 class RooEfficiency : public RooAbsPdf {
0025 public:
0026   // Constructors, assignment etc
0027   /// Default constructor
0028   inline RooEfficiency() {
0029   }
0030   RooEfficiency(const char *name, const char *title, const RooAbsReal& effFunc, const RooAbsCategory& cat, const char* sigCatName);
0031   RooEfficiency(const RooEfficiency& other, const char* name=nullptr);
0032   TObject* clone(const char* newname=nullptr) const override { return new RooEfficiency(*this,newname); }
0033 
0034   Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=nullptr) const override ;
0035   double analyticalIntegral(Int_t code, const char* rangeName=nullptr) const override ;
0036 
0037   RooAbsCategory const& cat() const { return *_cat; }
0038   RooAbsReal const& effFunc() const { return *_effFunc; }
0039   std::string sigCatName() const { return _sigCatName.Data(); }
0040 
0041 protected:
0042 
0043   // Function evaluation
0044   double evaluate() const override ;
0045 
0046   RooCategoryProxy _cat ; ///< Accept/reject categort
0047   RooRealProxy _effFunc ; ///< Efficiency modeling function
0048   TString _sigCatName ;   ///< Name of accept state of accept/reject category
0049 
0050   ClassDefOverride(RooEfficiency,1) // Generic PDF defined by string expression and list of variables
0051 };
0052 
0053 #endif