ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RooBlindTools.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Project: RooFit *
3  * Package: RooFitModels *
4  * File: $Id: RooBlindTools.h,v 1.10 2007/05/11 10:15:52 verkerke Exp $
5  * Authors: *
6  * AR, Aaron Roodman, Stanford University, roodman@slac.stanford.edu *
7  * WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.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 #ifndef ROO_BLIND_TOOLS
17 #define ROO_BLIND_TOOLS
18 
19 // ---------------------
20 // -- Class Interface --
21 // ---------------------
22 
23 #include "Rtypes.h"
24 #include "TString.h"
25 
27 
28 //--------------------
29 // Instance Members --
30 //--------------------
31 
32 public:
33 
34  enum blindMode {
35  full=0, // blind both parameters and data
36  dataonly // blind data only
37 
38  };
39 
40 public:
41 
42  // Constructors
44 
46  (const char *stSeed, // blinding seed string
47  blindMode Mode=full, // blinding mode
48  Double_t centralValue=0.0, // Central value for Precision measurements
49  Double_t sigmaOffset=1.0, // range for Offset
50  Bool_t s2bMode=kFALSE // Use sin2beta modifications?
51  );
52 
53  // Copy
55 
56  // Destructor
57  virtual ~RooBlindTools( );
58 
59  // Operators
60 
61  Double_t Randomizer(const char *StringAlphabet) const;
62 
63  Double_t PseudoRandom(Int_t Seed) const;
64 
65  Double_t MakeOffset(const char *StringAlphabet) const;
66 
67  Double_t MakeGaussianOffset(const char *StringAlphabet) const;
68 
69  Double_t MakeSignFlip(const char *StringAlphabet) const;
70 
71  Int_t SignOfTag(Double_t STag) const;
72 
73  Double_t HideDeltaZ(Double_t DeltaZ, Double_t STag) const;
74 
75  Double_t HiDelZPdG(Double_t DeltaZ, Double_t STag, Double_t PdG) const;
76 
77  Double_t UnHideDeltaZ(Double_t DeltaZPrime, Double_t STag) const;
78 
79  Double_t UnHiDelZPdG(Double_t DeltaZPrime, Double_t STag, Double_t PdG) const;
80 
81  Double_t HideAsym(Double_t Asym) const;
82 
83  Double_t HiAsPdG(Double_t Asym, Double_t PdG) const;
84 
85  Double_t UnHideAsym(Double_t AsymPrime) const;
86 
87  Double_t UnHiAsPdG(Double_t AsymPrime, Double_t PdG) const;
88 
89  Double_t HideDeltaM(Double_t DeltaM) const;
90 
91  Double_t UnHideDeltaM(Double_t DeltaMPrime) const;
92 
93  Double_t MysteryPhase() const;
94 
95  Double_t RandomizeTag(Double_t STag, Int_t EventNumber) const;
96 
98 
99  Double_t UnHidePrecision(Double_t PrecisionPrime) const;
100 
102 
103  Double_t UnHideOffset( Double_t PrecisionBlind ) const;
104 
106 
107  Double_t UnHideUniform( Double_t PrecisionBlind ) const;
108 
109 
110  const char *stSeed()const {return _stSeed;}
111 
112  const blindMode& mode()const {return _mode;}
113 
114  void setMode(blindMode bmode) {_mode=bmode;}
115 
117 
119 
120 private:
121 
122  // Friends
123  // Data members
124 
142 
143  // setup data members from string seed
144  void setup(const char *stSeed);
145 
146 protected:
147 
148  // Helper functions
149  ClassDef(RooBlindTools,1) // Root implementation of BlindTools
150 };
151 
152 #endif
153 
154 
void setMode(blindMode bmode)
Double_t HideAsym(Double_t Asym) const
Int_t SignOfTag(Double_t STag) const
Double_t MysteryPhase() const
Double_t MakeOffset(const char *StringAlphabet) const
Double_t UnHideOffset(Double_t PrecisionBlind) const
Double_t HideDeltaZ(Double_t DeltaZ, Double_t STag) const
Double_t MakeGaussianOffset(const char *StringAlphabet) const
Double_t _DeltaZScale
Basic string class.
Definition: TString.h:137
Double_t HideUniform(Double_t Precision) const
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
const char * stSeed() const
Double_t RandomizeTag(Double_t STag, Int_t EventNumber) const
Double_t _STagConstant
Double_t UnHideUniform(Double_t PrecisionBlind) const
const blindMode & mode() const
Double_t UnHideDeltaZ(Double_t DeltaZPrime, Double_t STag) const
void setup(const char *stSeed)
#define ClassDef(name, id)
Definition: Rtypes.h:254
Double_t PseudoRandom(Int_t Seed) const
Double_t getPrecisionCentralValue() const
Double_t getPrecisionOffsetScale() const
Double_t _DeltaZSignFlip
Double_t MakeSignFlip(const char *StringAlphabet) const
Double_t UnHidePrecision(Double_t PrecisionPrime) const
Double_t UnHiDelZPdG(Double_t DeltaZPrime, Double_t STag, Double_t PdG) const
Double_t HiDelZPdG(Double_t DeltaZ, Double_t STag, Double_t PdG) const
Double_t _PrecisionSignFlip
Double_t UnHiAsPdG(Double_t AsymPrime, Double_t PdG) const
blindMode _mode
Double_t _DeltaZOffset
Double_t _PrecisionCentralValue
Double_t _AsymSignFlip
Double_t Randomizer(const char *StringAlphabet) const
Double_t HideDeltaM(Double_t DeltaM) const
Double_t _DeltaMScale
Double_t _AsymOffset
RooCmdArg Precision(Double_t prec)
Double_t _PrecisionOffsetScale
double Double_t
Definition: RtypesCore.h:55
virtual ~RooBlindTools()
Double_t HidePrecision(Double_t Precision) const
Double_t _PrecisionUniform
Double_t UnHideDeltaM(Double_t DeltaMPrime) const
Double_t _MysteryPhase
Double_t _DeltaMOffset
Double_t HiAsPdG(Double_t Asym, Double_t PdG) const
Double_t _PrecisionOffset
Double_t UnHideAsym(Double_t AsymPrime) const
Double_t HideOffset(Double_t Precision) const