Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
RooExtendedTerm.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitCore *
4 * File: $Id$
5 * Authors: *
6 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu *
7 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu *
8 * *
9 * Copyright (c) 2000-2005, Regents of the University of California *
10 * and Stanford University. All rights reserved. *
11 * *
12 * Redistribution and use in source and binary forms, *
13 * with or without modification, are permitted according to the terms *
14 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) *
15 *****************************************************************************/
16#ifndef ROO_EXTENDED_TERM
17#define ROO_EXTENDED_TERM
18
19#include "RooAbsPdf.h"
20#include "RooRealProxy.h"
21
22class RooExtendedTerm : public RooAbsPdf {
23public:
24
25 RooExtendedTerm() = default;
26 RooExtendedTerm(const char *name, const char *title, const RooAbsReal& n) ;
27 RooExtendedTerm(const RooExtendedTerm& other, const char* name=nullptr) ;
28 TObject* clone(const char* newname) const override { return new RooExtendedTerm(*this,newname) ; }
29
30 double evaluate() const override { return 1. ; }
31
32 ExtendMode extendMode() const override { return CanBeExtended ; }
33 /// Return number of expected events, in other words the value of the associated n parameter.
34 double expectedEvents(const RooArgSet* nset) const override ;
35
36 std::unique_ptr<RooAbsReal> createExpectedEventsFunc(const RooArgSet* nset) const override;
37
38protected:
39
40 RooRealProxy _n ; ///< Number of expected events
41
42 ClassDefOverride(RooExtendedTerm,1) // Meta-p.d.f flat in all observables introducing only extended ML term
43};
44
45#endif
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
char name[80]
Definition TGX11.cxx:110
@ CanBeExtended
Definition RooAbsPdf.h:272
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition RooAbsReal.h:62
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition RooArgSet.h:55
RooExtendedTerm is a p.d.f with no observables that only introduces an extended ML term for a given n...
ExtendMode extendMode() const override
Returns ability of PDF to provide extended likelihood terms.
double evaluate() const override
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
RooRealProxy _n
Number of expected events.
double expectedEvents(const RooArgSet *nset) const override
Return number of expected events, in other words the value of the associated n parameter.
RooExtendedTerm()=default
std::unique_ptr< RooAbsReal > createExpectedEventsFunc(const RooArgSet *nset) const override
Returns an object that represents the expected number of events for a given normalization set,...
TObject * clone(const char *newname) const override
Mother of all ROOT objects.
Definition TObject.h:41
const Int_t n
Definition legend1.C:16