Logo ROOT   master
Reference Guide
RooTruthModel.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitCore *
4  * File: $Id: RooTruthModel.h,v 1.18 2007/05/11 10:14:56 verkerke Exp $
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_TRUTH_MODEL
17 #define ROO_TRUTH_MODEL
18 
19 #include "RooResolutionModel.h"
20 
22 public:
23 
31  genericBasis=100 } ;
32 
35  enum BasisSign { Both=0, Plus=+1, Minus=-1 } ;
36 
37  // Constructors, assignment etc
38  inline RooTruthModel() { }
39  RooTruthModel(const char *name, const char *title, RooAbsRealLValue& x) ;
40  RooTruthModel(const RooTruthModel& other, const char* name=0);
41  virtual TObject* clone(const char* newname) const { return new RooTruthModel(*this,newname) ; }
42  virtual ~RooTruthModel();
43 
44  virtual Int_t basisCode(const char* name) const ;
45 
46  virtual RooAbsGenContext* modelGenContext(const RooAbsAnaConvPdf& convPdf, const RooArgSet &vars,
47  const RooDataSet *prototype=0, const RooArgSet* auxProto=0,
48  Bool_t verbose= kFALSE) const;
49 
50  Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const;
51  void generateEvent(Int_t code);
52 
53  Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const ;
54  Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ;
55 
56 protected:
57  virtual Double_t evaluate() const ;
58  virtual void changeBasis(RooFormulaVar* basis) ;
59 
60  ClassDef(RooTruthModel,1) // Truth resolution model (delta function)
61 };
62 
63 #endif
RooTruthModel is an implementation of RooResolution model that provides a delta-function resolution m...
Definition: RooTruthModel.h:21
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Advertise analytical integrals for compiled basis functions and when used as p.d.f without basis func...
Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implement analytical integrals when used as p.d.f and for compiled basis functions.
const RooFormulaVar & basis() const
#define ClassDef(name, id)
Definition: Rtypes.h:322
virtual ~RooTruthModel()
Destructor.
RooTemplateProxy< RooAbsRealLValue > x
virtual RooAbsGenContext * modelGenContext(const RooAbsAnaConvPdf &convPdf, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE) const
RooAbsGenContext is the abstract base class for generator contexts of RooAbsPdf objects.
void generateEvent(Int_t code)
Implement internal generator for observable x, x=0 for all events following definition of delta funct...
virtual void changeBasis(RooFormulaVar *basis)
Changes associated bases function to &#39;inBasis&#39;.
RooDataSet is a container class to hold unbinned data.
Definition: RooDataSet.h:33
const Bool_t kFALSE
Definition: RtypesCore.h:90
A RooFormulaVar is a generic implementation of a real-valued object, which takes a RooArgList of serv...
Definition: RooFormulaVar.h:29
virtual TObject * clone(const char *newname) const
Definition: RooTruthModel.h:41
Mother of all ROOT objects.
Definition: TObject.h:37
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
RooAbsAnaConvPdf is the base class for PDFs that represent a physics model that can be analytically c...
RooResolutionModel is the base class for PDFs that represent a resolution model that can be convolute...
virtual Double_t evaluate() const
Evaluate the truth model: a delta function when used as PDF, the basis function itself, when convoluted with a basis function.
const Bool_t kTRUE
Definition: RtypesCore.h:89
Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const
Advertise internal generator for observable x.
char name[80]
Definition: TGX11.cxx:109
virtual Int_t basisCode(const char *name) const
Return basis code for given basis definition string.