00001 /***************************************************************************** 00002 * Project: RooFit * 00003 * Package: RooFitModels * 00004 * @(#)root/roofit:$Id: RooUnblindPrecision.cxx 24286 2008-06-16 15:47:04Z wouter $ 00005 * Authors: * 00006 * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu * 00007 * DK, David Kirkby, UC Irvine, dkirkby@uci.edu * 00008 * * 00009 * Copyright (c) 2000-2005, Regents of the University of California * 00010 * and Stanford University. All rights reserved. * 00011 * * 00012 * Redistribution and use in source and binary forms, * 00013 * with or without modification, are permitted according to the terms * 00014 * listed in LICENSE (http://roofit.sourceforge.net/license.txt) * 00015 *****************************************************************************/ 00016 00017 ////////////////////////////////////////////////////////////////////////////// 00018 // 00019 // BEGIN_HTML 00020 // Implementation of BlindTools' precision blinding method 00021 // A RooUnblindPrecision object is a real valued function 00022 // object, constructed from a blind value holder and a 00023 // set of unblinding parameters. When supplied to a PDF 00024 // in lieu of a regular parameter, the blind value holder 00025 // supplied to the unblinder objects will in a fit be minimized 00026 // to blind value corresponding to the actual minimum of the 00027 // parameter. The transformation is chosen such that the 00028 // the error on the blind parameters is indentical to that 00029 // of the unblind parameter 00030 // END_HTML 00031 // 00032 00033 #include "RooFit.h" 00034 00035 #include "RooArgSet.h" 00036 #include "RooArgSet.h" 00037 #include "RooUnblindPrecision.h" 00038 00039 00040 ClassImp(RooUnblindPrecision) 00041 ; 00042 00043 00044 00045 //_____________________________________________________________________________ 00046 RooUnblindPrecision::RooUnblindPrecision() : _blindEngine("") 00047 { 00048 // Default constructor 00049 } 00050 00051 00052 00053 //_____________________________________________________________________________ 00054 RooUnblindPrecision::RooUnblindPrecision(const char *name, const char *title, 00055 const char *blindString, Double_t centralValue, 00056 Double_t scale, RooAbsReal& value, 00057 Bool_t sin2betaMode) 00058 : RooAbsHiddenReal(name,title), 00059 _value("value","Precision blinded value",this,value), 00060 _blindEngine(blindString,RooBlindTools::full,centralValue,scale,sin2betaMode) 00061 { 00062 // Constructor from a given RooAbsReal (to hold the blind value) and a set of blinding parameters 00063 } 00064 00065 00066 00067 //_____________________________________________________________________________ 00068 RooUnblindPrecision::RooUnblindPrecision(const char *name, const char *title, 00069 const char *blindString, Double_t centralValue, 00070 Double_t scale, RooAbsReal& value, RooAbsCategory& blindState, 00071 Bool_t sin2betaMode) 00072 : RooAbsHiddenReal(name,title,blindState), 00073 _value("value","Precision blinded value",this,value), 00074 _blindEngine(blindString,RooBlindTools::full,centralValue,scale,sin2betaMode) 00075 { 00076 // Constructor from a given RooAbsReal (to hold the blind value) and a set of blinding parameters 00077 } 00078 00079 00080 00081 //_____________________________________________________________________________ 00082 RooUnblindPrecision::RooUnblindPrecision(const RooUnblindPrecision& other, const char* name) : 00083 RooAbsHiddenReal(other, name), 00084 _value("asym",this,other._value), 00085 _blindEngine(other._blindEngine) 00086 { 00087 // Copy constructor 00088 } 00089 00090 00091 00092 //_____________________________________________________________________________ 00093 RooUnblindPrecision::~RooUnblindPrecision() 00094 { 00095 // Destructor 00096 } 00097 00098 00099 00100 //_____________________________________________________________________________ 00101 Double_t RooUnblindPrecision::evaluate() const 00102 { 00103 // Evaluate RooBlindTools unhide-precision method on blind value 00104 00105 if (isHidden()) { 00106 // Blinding active for this event 00107 return _blindEngine.UnHidePrecision(_value); 00108 } else { 00109 // Blinding not active for this event 00110 return _value ; 00111 } 00112 } 00113 00114 00115 00116