Logo ROOT  
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 
27  linBasisPlus=33,
28  quadBasisPlus=43,
31  genericBasis=100 } ;
32 
33  enum BasisType { none=0, expBasis=1, sinBasis=2, cosBasis=3,
34  linBasis=4, quadBasis=5, coshBasis=6, sinhBasis=7 } ;
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,
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::Both
@ Both
Definition: RooTruthModel.h:49
RooTruthModel::quadBasis
@ quadBasis
Definition: RooTruthModel.h:48
RooTruthModel::evaluate
virtual Double_t evaluate() const
Evaluate the truth model: a delta function when used as PDF, the basis function itself,...
Definition: RooTruthModel.cxx:141
kTRUE
const Bool_t kTRUE
Definition: RtypesCore.h:91
RooTruthModel::clone
virtual TObject * clone(const char *newname) const
Definition: RooTruthModel.h:55
RooTruthModel::noBasis
@ noBasis
Definition: RooTruthModel.h:52
RooTruthModel::expBasisSum
@ expBasisSum
Definition: RooTruthModel.h:52
RooTruthModel::coshBasis
@ coshBasis
Definition: RooTruthModel.h:48
RooTruthModel::BasisType
BasisType
Definition: RooTruthModel.h:47
RooTruthModel::generateEvent
void generateEvent(Int_t code)
Implement internal generator for observable x, x=0 for all events following definition of delta funct...
Definition: RooTruthModel.cxx:367
RooResolutionModel.h
RooTruthModel::~RooTruthModel
virtual ~RooTruthModel()
Destructor.
Definition: RooTruthModel.cxx:69
RooTruthModel::sinBasisPlus
@ sinBasisPlus
Definition: RooTruthModel.h:53
RooTruthModel::cosBasisSum
@ cosBasisSum
Definition: RooTruthModel.h:54
RooTruthModel::sinBasis
@ sinBasis
Definition: RooTruthModel.h:47
RooTruthModel::none
@ none
Definition: RooTruthModel.h:47
RooTruthModel::expBasisMinus
@ expBasisMinus
Definition: RooTruthModel.h:52
RooTruthModel::cosBasis
@ cosBasis
Definition: RooTruthModel.h:47
bool
RooTruthModel::sinBasisMinus
@ sinBasisMinus
Definition: RooTruthModel.h:53
RooTruthModel::expBasisPlus
@ expBasisPlus
Definition: RooTruthModel.h:52
RooTruthModel::genericBasis
@ genericBasis
Definition: RooTruthModel.h:59
RooTruthModel::sinhBasisPlus
@ sinhBasisPlus
Definition: RooTruthModel.h:58
RooTruthModel::changeBasis
virtual void changeBasis(RooFormulaVar *basis)
Changes associated bases function to 'inBasis'.
Definition: RooTruthModel.cxx:113
RooFormulaVar
Definition: RooFormulaVar.h:30
RooResolutionModel::x
RooTemplateProxy< RooAbsRealLValue > x
Definition: RooResolutionModel.h:65
RooTruthModel::modelGenContext
virtual RooAbsGenContext * modelGenContext(const RooAbsAnaConvPdf &convPdf, const RooArgSet &vars, const RooDataSet *prototype=0, const RooArgSet *auxProto=0, Bool_t verbose=kFALSE) const
Definition: RooTruthModel.cxx:341
RooResolutionModel
Definition: RooResolutionModel.h:26
RooTruthModel::basisCode
virtual Int_t basisCode(const char *name) const
Return basis code for given basis definition string.
Definition: RooTruthModel.cxx:81
RooTruthModel::cosBasisMinus
@ cosBasisMinus
Definition: RooTruthModel.h:54
RooTruthModel::sinhBasis
@ sinhBasis
Definition: RooTruthModel.h:48
RooTruthModel::sinhBasisSum
@ sinhBasisSum
Definition: RooTruthModel.h:58
RooTruthModel::linBasis
@ linBasis
Definition: RooTruthModel.h:48
kFALSE
const Bool_t kFALSE
Definition: RtypesCore.h:92
RooTruthModel::linBasisPlus
@ linBasisPlus
Definition: RooTruthModel.h:55
RooTruthModel::sinhBasisMinus
@ sinhBasisMinus
Definition: RooTruthModel.h:58
RooAbsGenContext
Definition: RooAbsGenContext.h:26
RooTruthModel::RooTruthBasis
RooTruthBasis
Definition: RooTruthModel.h:38
RooTruthModel::coshBasisSum
@ coshBasisSum
Definition: RooTruthModel.h:57
RooTruthModel::expBasis
@ expBasis
Definition: RooTruthModel.h:47
RooTruthModel::coshBasisMinus
@ coshBasisMinus
Definition: RooTruthModel.h:57
RooTruthModel::RooTruthModel
RooTruthModel()
Definition: RooTruthModel.h:52
RooTruthModel::coshBasisPlus
@ coshBasisPlus
Definition: RooTruthModel.h:57
RooTruthModel::cosBasisPlus
@ cosBasisPlus
Definition: RooTruthModel.h:54
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
RooTruthModel::quadBasisPlus
@ quadBasisPlus
Definition: RooTruthModel.h:56
genreflex::verbose
bool verbose
Definition: rootcling_impl.cxx:133
RooTruthModel::Plus
@ Plus
Definition: RooTruthModel.h:49
RooDataSet
Definition: RooDataSet.h:33
RooTruthModel::Minus
@ Minus
Definition: RooTruthModel.h:49
RooTruthModel::BasisSign
BasisSign
Definition: RooTruthModel.h:49
RooTruthModel::analyticalIntegral
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.
Definition: RooTruthModel.cxx:247
RooAbsRealLValue
Definition: RooAbsRealLValue.h:31
RooTruthModel::sinBasisSum
@ sinBasisSum
Definition: RooTruthModel.h:53
RooAbsAnaConvPdf
Definition: RooAbsAnaConvPdf.h:34
RooArgSet
Definition: RooArgSet.h:28
RooResolutionModel::basis
const RooFormulaVar & basis() const
Definition: RooResolutionModel.h:52
RooTruthModel
Definition: RooTruthModel.h:21
int
RooTruthModel::getAnalyticalIntegral
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...
Definition: RooTruthModel.cxx:207
RooTruthModel::getGenerator
Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const
Advertise internal generator for observable x.
Definition: RooTruthModel.cxx:354