Logo ROOT  
Reference Guide
RooGExpModel.h
Go to the documentation of this file.
1/*****************************************************************************
2 * Project: RooFit *
3 * Package: RooFitModels *
4 * File: $Id: RooGExpModel.h,v 1.16 2007/05/11 09:13:07 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_GEXP_MODEL
17#define ROO_GEXP_MODEL
18
19#include "Rtypes.h"
20#include "RooResolutionModel.h"
21#include "RooRealProxy.h"
22
23#include <complex>
24
26public:
27
33
34
35
37 enum BasisSign { Both=0, Plus=+1, Minus=-1 } ;
38 enum Type { Normal, Flipped };
39
40 // Constructors, assignment etc
41 inline RooGExpModel() {
42 // coverity[UNINIT_CTOR]
43 }
44
45 RooGExpModel(const char *name, const char *title, RooAbsRealLValue& x,
47 RooAbsReal& meanSF, RooAbsReal& sigmaSF, RooAbsReal& rlifeSF,
49
50 RooGExpModel(const char *name, const char *title, RooAbsRealLValue& x,
53
54 RooGExpModel(const char *name, const char *title, RooAbsRealLValue& x,
56 RooAbsReal& srSF,
58
59 RooGExpModel(const char *name, const char *title, RooAbsRealLValue& x,
61 RooAbsReal& sigmaSF, RooAbsReal& rlifeSF,
63
64
65
66 RooGExpModel(const RooGExpModel& other, const char* name=0);
67 virtual TObject* clone(const char* newname) const { return new RooGExpModel(*this,newname) ; }
68 virtual ~RooGExpModel();
69
70 virtual Int_t basisCode(const char* name) const ;
71 virtual Int_t getAnalyticalIntegral(RooArgSet& allVars, RooArgSet& analVars, const char* rangeName=0) const ;
72 virtual Double_t analyticalIntegral(Int_t code, const char* rangeName=0) const ;
73
74 Int_t getGenerator(const RooArgSet& directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const;
75 void generateEvent(Int_t code);
76
78
79 void advertiseAsymptoticIntegral(Bool_t flag) { _asympInt = flag ; } // added FMV,07/24/03
80
81protected:
82 virtual Double_t evaluate() const ;
83
84private:
85 //Double_t calcDecayConv(Double_t sign, Double_t tau, Double_t sig, Double_t rtau) const ;
86 Double_t calcDecayConv(Double_t sign, Double_t tau, Double_t sig, Double_t rtau, Double_t fsign) const ;
87 // modified FMV,08/13/03
88 std::complex<Double_t> calcSinConv(Double_t sign, Double_t sig, Double_t tau, Double_t omega, Double_t rtau, Double_t fsign) const ;
89 Double_t calcSinConv(Double_t sign, Double_t sig, Double_t tau, Double_t rtau, Double_t fsign) const ;
90 std::complex<Double_t> calcSinConvNorm(Double_t sign, Double_t tau, Double_t omega,
91 Double_t sig, Double_t rtau, Double_t fsign, const char* rangeName) const ; // modified FMV,07/24/03
93 Double_t sig, Double_t rtau, Double_t fsign, const char* rangeName) const ; // added FMV,08/18/03
94 //Double_t calcSinhConv(Double_t sign, Double_t sign1, Double_t sign2, Double_t tau, Double_t dgamma, Double_t sig, Double_t rtau, Double_t fsign) const ;
95 //Double_t calcCoshConv(Double_t sign, Double_t tau, Double_t dgamma, Double_t sig, Double_t rtau, Double_t fsign) const ;
96
97 static std::complex<Double_t> evalCerfApprox(Double_t swt, Double_t u, Double_t c);
98
99 // Calculate common normalization factors
100 // added FMV,07/24/03
101 std::complex<Double_t> evalCerfInt(Double_t sign, Double_t wt, Double_t tau, Double_t umin, Double_t umax, Double_t c) const ;
102 Double_t evalCerfInt(Double_t sign, Double_t tau, Double_t umin, Double_t umax, Double_t c) const ;
103
110
114 Bool_t _asympInt ; // added FMV,07/24/03
115
116 ClassDef(RooGExpModel,2) // Gauss (x) Exponential resolution model
117};
118
119#endif
#define c(i)
Definition: RSha256.hxx:101
const Bool_t kFALSE
Definition: RtypesCore.h:90
double Double_t
Definition: RtypesCore.h:57
const Bool_t kTRUE
Definition: RtypesCore.h:89
#define ClassDef(name, id)
Definition: Rtypes.h:322
char name[80]
Definition: TGX11.cxx:109
int type
Definition: TGX11.cxx:120
RooAbsRealLValue is the common abstract base class for objects that represent a real value that may a...
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:60
RooAbsMoment * mean(RooRealVar &obs)
Definition: RooAbsReal.h:332
RooArgSet is a container object that can hold multiple RooAbsArg objects.
Definition: RooArgSet.h:28
The RooGExpModel is a RooResolutionModel implementation that models a resolution function that is the...
Definition: RooGExpModel.h:25
RooRealProxy ssf
Definition: RooGExpModel.h:108
virtual Int_t basisCode(const char *name) const
void advertiseFlatScaleFactorIntegral(Bool_t flag)
Definition: RooGExpModel.h:77
virtual TObject * clone(const char *newname) const
Definition: RooGExpModel.h:67
static std::complex< Double_t > evalCerfApprox(Double_t swt, Double_t u, Double_t c)
std::complex< Double_t > calcSinConvNorm(Double_t sign, Double_t tau, Double_t omega, Double_t sig, Double_t rtau, Double_t fsign, const char *rangeName) const
old code (asymptotic normalization only) std::complex<Double_t> z(1/tau,sign*omega); return z*2/(omeg...
Bool_t _flatSFInt
Definition: RooGExpModel.h:113
virtual ~RooGExpModel()
Destructor.
RooRealProxy rlife
Definition: RooGExpModel.h:106
RooRealProxy sigma
Definition: RooGExpModel.h:105
void advertiseAsymptoticIntegral(Bool_t flag)
Definition: RooGExpModel.h:79
virtual Int_t getAnalyticalIntegral(RooArgSet &allVars, RooArgSet &analVars, const char *rangeName=0) const
Interface function getAnalyticalIntergral advertises the analytical integrals that are supported.
virtual Double_t analyticalIntegral(Int_t code, const char *rangeName=0) const
Implements the actual analytical integral(s) advertised by getAnalyticalIntegral.
std::complex< Double_t > evalCerfInt(Double_t sign, Double_t wt, Double_t tau, Double_t umin, Double_t umax, Double_t c) const
RooRealProxy rsf
Definition: RooGExpModel.h:109
void generateEvent(Int_t code)
Interface for generation of an event using the algorithm corresponding to the specified code.
RooRealProxy _meanSF
Definition: RooGExpModel.h:107
Int_t getGenerator(const RooArgSet &directVars, RooArgSet &generateVars, Bool_t staticInitOK=kTRUE) const
Load generatedVars with the subset of directVars that we can generate events for, and return a code t...
virtual Double_t evaluate() const
Evaluate this PDF / function / constant. Needs to be overridden by all derived classes.
Bool_t _asympInt
Definition: RooGExpModel.h:114
Double_t calcDecayConv(Double_t sign, Double_t tau, Double_t sig, Double_t rtau, Double_t fsign) const
RooRealProxy _mean
Definition: RooGExpModel.h:104
std::complex< Double_t > calcSinConv(Double_t sign, Double_t sig, Double_t tau, Double_t omega, Double_t rtau, Double_t fsign) const
RooResolutionModel is the base class for PDFs that represent a resolution model that can be convolute...
RooTemplateProxy< RooAbsRealLValue > x
Mother of all ROOT objects.
Definition: TObject.h:37