ROOT
6.06/08
Reference Guide
roofit
roofit
src
RooUnblindPrecision.cxx
Go to the documentation of this file.
1
/*****************************************************************************
2
* Project: RooFit *
3
* Package: RooFitModels *
4
* @(#)root/roofit:$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
17
//////////////////////////////////////////////////////////////////////////////
18
//
19
// BEGIN_HTML
20
// Implementation of BlindTools' precision blinding method
21
// A RooUnblindPrecision object is a real valued function
22
// object, constructed from a blind value holder and a
23
// set of unblinding parameters. When supplied to a PDF
24
// in lieu of a regular parameter, the blind value holder
25
// supplied to the unblinder objects will in a fit be minimized
26
// to blind value corresponding to the actual minimum of the
27
// parameter. The transformation is chosen such that the
28
// the error on the blind parameters is indentical to that
29
// of the unblind parameter
30
// END_HTML
31
//
32
33
#include "
RooFit.h
"
34
35
#include "
RooArgSet.h
"
36
#include "
RooArgSet.h
"
37
#include "
RooUnblindPrecision.h
"
38
39
40
using namespace
std
;
41
42
ClassImp
(
RooUnblindPrecision
)
43
;
44
45
46
47
////////////////////////////////////////////////////////////////////////////////
48
/// Default constructor
49
50
RooUnblindPrecision::RooUnblindPrecision
()
51
{
52
}
53
54
55
56
////////////////////////////////////////////////////////////////////////////////
57
/// Constructor from a given RooAbsReal (to hold the blind value) and a set of blinding parameters
58
59
RooUnblindPrecision::RooUnblindPrecision
(
const
char
*
name
,
const
char
*title,
60
const
char
*blindString,
Double_t
centralValue,
61
Double_t
scale,
RooAbsReal
&
value
,
62
Bool_t
sin2betaMode)
63
:
RooAbsHiddenReal
(name,title),
64
_value(
"value"
,
"Precision blinded value"
,this,value),
65
_blindEngine(blindString,
RooBlindTools
::full,centralValue,scale,sin2betaMode)
66
{
67
}
68
69
70
71
////////////////////////////////////////////////////////////////////////////////
72
/// Constructor from a given RooAbsReal (to hold the blind value) and a set of blinding parameters
73
74
RooUnblindPrecision::RooUnblindPrecision
(
const
char
*
name
,
const
char
*title,
75
const
char
*blindString,
Double_t
centralValue,
76
Double_t
scale,
RooAbsReal
&
value
,
RooAbsCategory
& blindState,
77
Bool_t
sin2betaMode)
78
:
RooAbsHiddenReal
(name,title,blindState),
79
_value
(
"value"
,
"Precision blinded value"
,this,value),
80
_blindEngine
(blindString,
RooBlindTools
::full,centralValue,scale,sin2betaMode)
81
{
82
}
83
84
85
86
////////////////////////////////////////////////////////////////////////////////
87
/// Copy constructor
88
89
RooUnblindPrecision::RooUnblindPrecision
(
const
RooUnblindPrecision
& other,
const
char
*
name
) :
90
RooAbsHiddenReal
(other, name),
91
_value
(
"asym"
,this,other.
_value
),
92
_blindEngine
(other.
_blindEngine
)
93
{
94
}
95
96
97
98
////////////////////////////////////////////////////////////////////////////////
99
/// Destructor
100
101
RooUnblindPrecision::~RooUnblindPrecision
()
102
{
103
}
104
105
106
107
////////////////////////////////////////////////////////////////////////////////
108
/// Evaluate RooBlindTools unhide-precision method on blind value
109
110
Double_t
RooUnblindPrecision::evaluate
()
const
111
{
112
if
(
isHidden
()) {
113
// Blinding active for this event
114
return
_blindEngine
.
UnHidePrecision
(
_value
);
115
}
else
{
116
// Blinding not active for this event
117
return
_value
;
118
}
119
}
120
121
122
123
RooArgSet.h
RooUnblindPrecision::evaluate
virtual Double_t evaluate() const
Evaluate RooBlindTools unhide-precision method on blind value.
Definition:
RooUnblindPrecision.cxx:110
Bool_t
bool Bool_t
Definition:
RtypesCore.h:59
std
STL namespace.
RooAbsHiddenReal::isHidden
Bool_t isHidden() const
Definition:
RooAbsHiddenReal.h:43
RooUnblindPrecision::RooUnblindPrecision
RooUnblindPrecision()
Default constructor.
Definition:
RooUnblindPrecision.cxx:50
RooUnblindPrecision::_blindEngine
RooBlindTools _blindEngine
Definition:
RooUnblindPrecision.h:45
RooUnblindPrecision::~RooUnblindPrecision
virtual ~RooUnblindPrecision()
Destructor.
Definition:
RooUnblindPrecision.cxx:101
RooUnblindPrecision
Definition:
RooUnblindPrecision.h:26
RooUnblindPrecision::_value
RooRealProxy _value
Definition:
RooUnblindPrecision.h:44
RooUnblindPrecision.h
RooBlindTools
Definition:
RooBlindTools.h:26
ClassImp
#define ClassImp(name)
Definition:
Rtypes.h:279
Double_t
double Double_t
Definition:
RtypesCore.h:55
RooAbsReal
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition:
RooAbsReal.h:53
name
#define name(a, b)
Definition:
linkTestLib0.cpp:5
RooAbsHiddenReal
Definition:
RooAbsHiddenReal.h:25
RooAbsCategory
Definition:
RooAbsCategory.h:30
RooFit.h
value
float value
Definition:
math.cpp:443
RooBlindTools::UnHidePrecision
Double_t UnHidePrecision(Double_t PrecisionPrime) const
Definition:
RooBlindTools.cxx:237