Logo ROOT  
Reference Guide
Loading...
Searching...
No Matches
RooUnblindOffset.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/** \class RooUnblindOffset
18 \ingroup Roofit
19
20Implementation of BlindTools' offset blinding method
21A RooUnblindOffset object is a real valued function
22object, constructed from a blind value holder and a
23set of unblinding parameters. When supplied to a PDF
24in lieu of a regular parameter, the blind value holder
25supplied to the unblinded objects will in a fit be minimized
26to blind value corresponding to the actual minimum of the
27parameter. The transformation is chosen such that the
28the error on the blind parameters is identical to that
29of the unblind parameter
30**/
31
32#include "RooArgSet.h"
33#include "RooUnblindOffset.h"
34
35
36////////////////////////////////////////////////////////////////////////////////
37/// Constructor from a given RooAbsReal (to hold the blind value) and a set of blinding parameters
38
39RooUnblindOffset::RooUnblindOffset(const char *name, const char *title,
40 const char *blindString, double scale, RooAbsReal& cpasym)
41 : RooAbsHiddenReal(name,title),
42 _value("value","Offset blinded value",this,cpasym),
43 _blindEngine(blindString,RooBlindTools::full,0.,scale)
44{
45}
46
47////////////////////////////////////////////////////////////////////////////////
48/// Constructor from a given RooAbsReal (to hold the blind value) and a set of blinding parameters
49
50RooUnblindOffset::RooUnblindOffset(const char *name, const char *title,
51 const char *blindString, double scale, RooAbsReal& cpasym,
52 RooAbsCategory& blindState)
53 : RooAbsHiddenReal(name,title,blindState),
54 _value("value","Offset blinded value",this,cpasym),
55 _blindEngine(blindString,RooBlindTools::full,0.,scale)
56{
57}
58
59////////////////////////////////////////////////////////////////////////////////
60/// Copy constructor
61
63 RooAbsHiddenReal(other, name),
64 _value("asym",this,other._value),
66{
67}
68
69////////////////////////////////////////////////////////////////////////////////
70/// Evaluate RooBlindTools unhide-offset method on blind value
71
73{
74 if (isHidden()) {
75 // Blinding is active for this event
76 return _blindEngine.UnHideOffset(_value);
77 } else {
78 // Blinding is not active for this event
79 return _value ;
80 }
81}
char name[80]
Definition TGX11.cxx:148
A space to attach TBranches.
bool isHidden() const
RooAbsReal()
coverity[UNINIT_CTOR] Default constructor
RooBlindTools _blindEngine
RooUnblindOffset()=default
RooRealProxy _value
double evaluate() const override
Evaluate RooBlindTools unhide-offset method on blind value.