Logo ROOT  
Reference Guide
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 
22 class RooExtendedTerm : public RooAbsPdf {
23 public:
24 
25  RooExtendedTerm() ;
26  RooExtendedTerm(const char *name, const char *title, const RooAbsReal& n) ;
27  RooExtendedTerm(const RooExtendedTerm& other, const char* name=0) ;
28  virtual TObject* clone(const char* newname) const { return new RooExtendedTerm(*this,newname) ; }
29  virtual ~RooExtendedTerm() ;
30 
31  Double_t evaluate() const { return 1. ; }
32 
33  virtual ExtendMode extendMode() const { return CanBeExtended ; }
34  virtual Double_t expectedEvents(const RooArgSet* nset) const ;
35  virtual Double_t expectedEvents(const RooArgSet& nset) const {
36  // Return number of expected events, i.e. the value of the associated n parameter
37  return expectedEvents(&nset) ;
38  }
39 
40 protected:
41 
42  RooRealProxy _n ; // Number of expected events
43 
44  ClassDef(RooExtendedTerm,1) // Meta-p.d.f flat in all observables introducing only extended ML term
45 };
46 
47 #endif
n
const Int_t n
Definition: legend1.C:16
RooAbsPdf::CanBeExtended
@ CanBeExtended
Definition: RooAbsPdf.h:229
RooExtendedTerm::evaluate
Double_t evaluate() const
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
Definition: RooExtendedTerm.h:45
RooExtendedTerm::extendMode
virtual ExtendMode extendMode() const
Definition: RooExtendedTerm.h:47
RooExtendedTerm::expectedEvents
virtual Double_t expectedEvents(const RooArgSet *nset) const
Return number of expected events from associated event count variable.
Definition: RooExtendedTerm.cxx:80
RooExtendedTerm::_n
RooRealProxy _n
Definition: RooExtendedTerm.h:56
RooAbsReal
Definition: RooAbsReal.h:61
RooExtendedTerm::RooExtendedTerm
RooExtendedTerm()
Constructor.
Definition: RooExtendedTerm.cxx:39
RooAbsPdf::ExtendMode
ExtendMode
Definition: RooAbsPdf.h:229
RooExtendedTerm::~RooExtendedTerm
virtual ~RooExtendedTerm()
Destructor.
Definition: RooExtendedTerm.cxx:72
RooAbsPdf.h
RooRealProxy.h
RooTemplateProxy< RooAbsReal >
Double_t
double Double_t
Definition: RtypesCore.h:59
TObject
Definition: TObject.h:37
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
name
char name[80]
Definition: TGX11.cxx:110
RooExtendedTerm::clone
virtual TObject * clone(const char *newname) const
Definition: RooExtendedTerm.h:42
RooExtendedTerm
Definition: RooExtendedTerm.h:22
RooAbsPdf
Definition: RooAbsPdf.h:40
RooArgSet
Definition: RooArgSet.h:28