Loading [MathJax]/extensions/tex2jax.js
ROOT  6.06/09
Reference Guide
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 //////////////////////////////////////////////////////////////////////////////
18 //
19 // BEGIN_HTML
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 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 "RooUnblindOffset.h"
38 
39 
40 using namespace std;
41 
43 ;
44 
45 
46 
47 ////////////////////////////////////////////////////////////////////////////////
48 /// Default constructor
49 
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 RooUnblindOffset::RooUnblindOffset(const char *name, const char *title,
60  const char *blindString, Double_t scale, RooAbsReal& cpasym)
61  : RooAbsHiddenReal(name,title),
62  _value("value","Offset blinded value",this,cpasym),
63  _blindEngine(blindString,RooBlindTools::full,0.,scale)
64 {
65 }
66 
67 
68 ////////////////////////////////////////////////////////////////////////////////
69 /// Constructor from a given RooAbsReal (to hold the blind value) and a set of blinding parameters
70 
71 RooUnblindOffset::RooUnblindOffset(const char *name, const char *title,
72  const char *blindString, Double_t scale, RooAbsReal& cpasym,
73  RooAbsCategory& blindState)
74  : RooAbsHiddenReal(name,title,blindState),
75  _value("value","Offset blinded value",this,cpasym),
76  _blindEngine(blindString,RooBlindTools::full,0.,scale)
77 {
78 }
79 
80 
81 
82 ////////////////////////////////////////////////////////////////////////////////
83 /// Copy constructor
84 
86  RooAbsHiddenReal(other, name),
87  _value("asym",this,other._value),
88  _blindEngine(other._blindEngine)
89 {
90 }
91 
92 
93 
94 ////////////////////////////////////////////////////////////////////////////////
95 /// Destructor
96 
98 {
99 }
100 
101 
102 
103 ////////////////////////////////////////////////////////////////////////////////
104 /// Evaluate RooBlindTools unhide-offset method on blind value
105 
107 {
108  if (isHidden()) {
109  // Blinding is active for this event
111  } else {
112  // Blinding is not active for this event
113  return _value ;
114  }
115 }
116 
117 
118 
119 
120 
RooRealProxy _value
Double_t UnHideOffset(Double_t PrecisionBlind) const
Bool_t isHidden() const
virtual ~RooUnblindOffset()
Destructor.
STL namespace.
virtual Double_t evaluate() const
Evaluate RooBlindTools unhide-offset method on blind value.
RooUnblindOffset()
Default constructor.
RooBlindTools _blindEngine
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
ClassImp(RooUnblindOffset)
#define name(a, b)
Definition: linkTestLib0.cpp:5