Logo ROOT   6.12/07
Reference Guide
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 
20 Implementation of BlindTools' offset blinding method
21 A RooUnblindOffset 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 unblinded 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 identical to that
29 of the unblind parameter
30 **/
31 
32 #include "RooFit.h"
33 
34 #include "RooArgSet.h"
35 #include "RooArgSet.h"
36 #include "RooUnblindOffset.h"
37 
38 using namespace std;
39 
41 
42 ////////////////////////////////////////////////////////////////////////////////
43 /// Default constructor
44 
46 {
47 }
48 
49 ////////////////////////////////////////////////////////////////////////////////
50 /// Constructor from a given RooAbsReal (to hold the blind value) and a set of blinding parameters
51 
52 RooUnblindOffset::RooUnblindOffset(const char *name, const char *title,
53  const char *blindString, Double_t scale, RooAbsReal& cpasym)
54  : RooAbsHiddenReal(name,title),
55  _value("value","Offset blinded value",this,cpasym),
56  _blindEngine(blindString,RooBlindTools::full,0.,scale)
57 {
58 }
59 
60 ////////////////////////////////////////////////////////////////////////////////
61 /// Constructor from a given RooAbsReal (to hold the blind value) and a set of blinding parameters
62 
63 RooUnblindOffset::RooUnblindOffset(const char *name, const char *title,
64  const char *blindString, Double_t scale, RooAbsReal& cpasym,
65  RooAbsCategory& blindState)
66  : RooAbsHiddenReal(name,title,blindState),
67  _value("value","Offset blinded value",this,cpasym),
68  _blindEngine(blindString,RooBlindTools::full,0.,scale)
69 {
70 }
71 
72 ////////////////////////////////////////////////////////////////////////////////
73 /// Copy constructor
74 
76  RooAbsHiddenReal(other, name),
77  _value("asym",this,other._value),
79 {
80 }
81 
82 ////////////////////////////////////////////////////////////////////////////////
83 /// Destructor
84 
86 {
87 }
88 
89 ////////////////////////////////////////////////////////////////////////////////
90 /// Evaluate RooBlindTools unhide-offset method on blind value
91 
93 {
94  if (isHidden()) {
95  // Blinding is active for this event
97  } else {
98  // Blinding is not active for this event
99  return _value ;
100  }
101 }
RooRealProxy _value
virtual ~RooUnblindOffset()
Destructor.
STL namespace.
Bool_t isHidden() const
RooUnblindOffset()
Default constructor.
Double_t UnHideOffset(Double_t PrecisionBlind) const
RooBlindTools _blindEngine
virtual Double_t evaluate() const
Evaluate RooBlindTools unhide-offset method on blind value.
#define ClassImp(name)
Definition: Rtypes.h:359
double Double_t
Definition: RtypesCore.h:55
RooAbsReal is the common abstract base class for objects that represent a real value and implements f...
Definition: RooAbsReal.h:53
RooAbsHiddenReal is a base class for objects that want to hide their return value from interactive us...
Implementation of BlindTools' offset blinding method A RooUnblindOffset object is a real valued funct...
RooAbsCategory is the common abstract base class for objects that represent a discrete value with a f...
char name[80]
Definition: TGX11.cxx:109