Revision a556723ba1ecbe30dcbd1cbbf5169a321ef65899 authored by Rene Brun on 09 March 2004, 15:57:46 UTC, committed by Rene Brun on 09 March 2004, 15:57:46 UTC
The old implementation had a side effect on option "e" that worked only
when the "e" was the first character in the option string.
This had a dramatic effect in tqo queries like
  J->Draw("etajet[1]","W*(Etjet[1]>70)","e1");
  J->Draw("etajet[1]","W*(Etjet[1]>70)","Same,e1");
The second Draw was showing error bars different between tyhe first and second plot!


git-svn-id: http://root.cern.ch/svn/root/trunk@8348 27541ba8-7e3a-0410-8455-c3a389f83636
1 parent 47f28c6
Raw File
RooUnblindCPAsymVar.cxx
/*****************************************************************************
 * Project: RooFit                                                           *
 * Package: RooFitModels                                                     *
 *    File: $Id: RooUnblindCPAsymVar.cc,v 1.8 2002/09/10 02:01:32 verkerke Exp $
 * Authors:                                                                  *
 *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
 *   DK, David Kirkby,    UC Irvine,         dkirkby@uci.edu                 *
 *                                                                           *
 * Copyright (c) 2000-2002, Regents of the University of California          *
 *                          and Stanford University. All rights reserved.    *
 *                                                                           *
 * Redistribution and use in source and binary forms,                        *
 * with or without modification, are permitted according to the terms        *
 * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
 *****************************************************************************/

// -- CLASS DESCRIPTION [REAL] --
//
// Implementation of BlindTools' CP asymmetry blinding method
// A RooUnblindCPAsymVar object is a real valued function
// object, constructed from a blind value holder and a 
// set of unblinding parameters. When supplied to a PDF
// in lieu of a regular parameter, the blind value holder
// supplied to the unblinder objects will in a fit be minimized 
// to blind value corresponding to the actual minimum of the
// parameter. The transformation is chosen such that the
// the error on the blind parameters is indentical to that
// of the unblind parameter

#include "RooFitCore/RooArgSet.hh"
#include "RooFitModels/RooUnblindCPAsymVar.hh"


ClassImp(RooUnblindCPAsymVar)
;



RooUnblindCPAsymVar::RooUnblindCPAsymVar() : _blindEngine("") 
{
  // Default constructor
}


RooUnblindCPAsymVar::RooUnblindCPAsymVar(const char *name, const char *title,
					 const char *blindString, RooAbsReal& cpasym)
  : RooAbsHiddenReal(name,title), 
  _asym("asym","CP Asymmetry",this,cpasym),
  _blindEngine(blindString)
{  
  // Constructor from a given RooAbsReal (to hold the blind value) and a set of blinding parameters
}


RooUnblindCPAsymVar::RooUnblindCPAsymVar(const char *name, const char *title,
					 const char *blindString, RooAbsReal& cpasym, RooAbsCategory& blindState)
  : RooAbsHiddenReal(name,title,blindState), 
  _asym("asym","CP Asymmetry",this,cpasym),
  _blindEngine(blindString)
{  
  // Constructor from a given RooAbsReal (to hold the blind value) and a set of blinding parameters
}


RooUnblindCPAsymVar::RooUnblindCPAsymVar(const RooUnblindCPAsymVar& other, const char* name) : 
  RooAbsHiddenReal(other, name), 
  _asym("asym",this,other._asym),
  _blindEngine(other._blindEngine) 
{
  // Copy constructor
}


RooUnblindCPAsymVar::~RooUnblindCPAsymVar() 
{
  // Copy constructor
}


Double_t RooUnblindCPAsymVar::evaluate() const
{
  if (isHidden()) {
    // Blinding active for this event
    return _blindEngine.UnHideAsym(_asym);
  } else {
    // Blinding not active for this event
    return _asym ;
  }
}
back to top