Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/RooFirstMoment.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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