Back to home page

EIC code displayed by LXR

 
 

    


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

0001 /*****************************************************************************
0002  * Project: RooFit                                                           *
0003  * Package: RooFitCore                                                       *
0004  *    File: $Id$
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_MOMENT
0017 #define ROO_MOMENT
0018 
0019 #include "RooAbsMoment.h"
0020 #include "RooRealProxy.h"
0021 #include "RooSetProxy.h"
0022 
0023 
0024 class RooRealVar;
0025 
0026 class RooMoment : public RooAbsMoment {
0027 public:
0028 
0029   RooMoment() = default;
0030   RooMoment(const char *name, const char *title, RooAbsReal& func, RooRealVar& x, Int_t order=1, bool central=false, bool takeRoot=false) ;
0031   RooMoment(const char *name, const char *title, RooAbsReal& func, RooRealVar& x, const RooArgSet& nset, Int_t order=1, bool central=false, bool takeRoot=false,
0032        bool intNSet=false) ;
0033 
0034   RooMoment(const RooMoment& other, const char *name = nullptr);
0035   TObject* clone(const char* newname) const override { return new RooMoment(*this, newname); }
0036 
0037   const RooAbsReal& xF() { return _xf.arg() ; }
0038   const RooAbsReal& ixF() { return _ixf.arg() ; }
0039   const RooAbsReal& iF() { return _if.arg() ; }
0040 
0041 protected:
0042 
0043   RooRealProxy _xf ;                     ///< X*F
0044   RooRealProxy _ixf ;                    ///< Int(X*F(X))dx ;
0045   RooRealProxy _if ;                     ///< Int(F(x))dx ;
0046   double evaluate() const override;
0047 
0048   ClassDefOverride(RooMoment,1) // Representation of moment in a RooAbsReal in a given RooRealVar
0049 };
0050 
0051 #endif