RooBlindTools.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Project: RooFit                                                           *
00003  * Package: RooFitModels                                                     *
00004  *    File: $Id: RooBlindTools.h,v 1.10 2007/05/11 10:15:52 verkerke Exp $
00005  * Authors:                                                                  *
00006  *   AR, Aaron Roodman, Stanford University, roodman@slac.stanford.edu       *
00007  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.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 #ifndef ROO_BLIND_TOOLS
00017 #define ROO_BLIND_TOOLS
00018 
00019 //              ---------------------
00020 //              -- Class Interface --
00021 //              ---------------------
00022 
00023 #include "Rtypes.h" 
00024 #include "TString.h"
00025 
00026 class RooBlindTools{
00027 
00028 //--------------------
00029 // Instance Members --
00030 //--------------------
00031 
00032 public:
00033 
00034   enum blindMode {
00035     full=0,     // blind both parameters and data
00036     dataonly    // blind data only
00037     
00038   };
00039 
00040 public:
00041 
00042   // Constructors
00043   RooBlindTools
00044   (const char *stSeed,  // blinding seed string
00045    blindMode Mode=full, // blinding mode
00046    Double_t centralValue=0.0,     // Central value for Precision measurements
00047    Double_t sigmaOffset=1.0,      // range for Offset
00048    Bool_t s2bMode=kFALSE          // Use sin2beta modifications?
00049    );
00050 
00051   // Copy
00052   RooBlindTools(const RooBlindTools& );
00053   
00054   // Destructor
00055   virtual ~RooBlindTools( );
00056 
00057   // Operators
00058 
00059   Double_t Randomizer(const char *StringAlphabet) const;
00060 
00061   Double_t PseudoRandom(Int_t Seed) const;
00062 
00063   Double_t MakeOffset(const char *StringAlphabet) const;
00064 
00065   Double_t MakeGaussianOffset(const char *StringAlphabet) const;
00066 
00067   Double_t MakeSignFlip(const char *StringAlphabet) const;
00068 
00069   Int_t SignOfTag(Double_t STag) const;
00070   
00071   Double_t HideDeltaZ(Double_t DeltaZ, Double_t STag) const;
00072 
00073   Double_t HiDelZPdG(Double_t DeltaZ, Double_t STag, Double_t PdG) const;
00074 
00075   Double_t UnHideDeltaZ(Double_t DeltaZPrime, Double_t STag) const;
00076 
00077   Double_t UnHiDelZPdG(Double_t DeltaZPrime, Double_t STag, Double_t PdG) const;
00078 
00079   Double_t HideAsym(Double_t Asym) const;
00080 
00081   Double_t HiAsPdG(Double_t Asym, Double_t PdG) const;
00082 
00083   Double_t UnHideAsym(Double_t AsymPrime) const;
00084 
00085   Double_t UnHiAsPdG(Double_t AsymPrime, Double_t PdG) const;
00086 
00087   Double_t HideDeltaM(Double_t DeltaM) const;
00088 
00089   Double_t UnHideDeltaM(Double_t DeltaMPrime) const;
00090 
00091   Double_t MysteryPhase() const;
00092 
00093   Double_t RandomizeTag(Double_t STag, Int_t EventNumber) const;
00094 
00095   Double_t HidePrecision(Double_t Precision) const;
00096 
00097   Double_t UnHidePrecision(Double_t PrecisionPrime) const;
00098 
00099   Double_t HideOffset( Double_t Precision ) const;
00100   
00101   Double_t UnHideOffset( Double_t PrecisionBlind ) const;
00102 
00103   Double_t HideUniform( Double_t Precision ) const;
00104   
00105   Double_t UnHideUniform( Double_t PrecisionBlind ) const;
00106 
00107 
00108   const char *stSeed()const {return _stSeed;}
00109 
00110   const blindMode& mode()const {return _mode;}
00111 
00112   void setMode(blindMode bmode) {_mode=bmode;}
00113 
00114   Double_t getPrecisionCentralValue() const {return _PrecisionCentralValue;}
00115 
00116   Double_t getPrecisionOffsetScale() const {return _PrecisionOffsetScale;}
00117 
00118 private:
00119 
00120   // Friends
00121   // Data members
00122 
00123   TString _stSeed ; 
00124   Double_t _DeltaZOffset;
00125   Double_t _DeltaZSignFlip;
00126   Double_t _DeltaZScale;
00127   Double_t _AsymOffset;
00128   Double_t _AsymSignFlip;
00129   Double_t _DeltaMScale;
00130   Double_t _DeltaMOffset;
00131   Double_t _MysteryPhase;
00132   Double_t _STagConstant;
00133   Double_t _PrecisionSignFlip;
00134   Double_t _PrecisionOffsetScale;
00135   Double_t _PrecisionOffset;
00136   Double_t _PrecisionUniform;
00137   Double_t _PrecisionCentralValue;
00138   blindMode _mode;
00139   Bool_t   _s2bMode ;
00140   
00141   // setup data members from string seed  
00142   void setup(const char *stSeed);
00143 
00144 protected:
00145 
00146     // Helper functions
00147   ClassDef(RooBlindTools,1) // Root implementation of BlindTools
00148 };
00149 
00150 #endif 
00151 
00152 

Generated on Tue Jul 5 14:26:05 2011 for ROOT_528-00b_version by  doxygen 1.5.1