00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef ROO_BLIND_TOOLS
00017 #define ROO_BLIND_TOOLS
00018
00019
00020
00021
00022
00023 #include "Rtypes.h"
00024 #include "TString.h"
00025
00026 class RooBlindTools{
00027
00028
00029
00030
00031
00032 public:
00033
00034 enum blindMode {
00035 full=0,
00036 dataonly
00037
00038 };
00039
00040 public:
00041
00042
00043 RooBlindTools
00044 (const char *stSeed,
00045 blindMode Mode=full,
00046 Double_t centralValue=0.0,
00047 Double_t sigmaOffset=1.0,
00048 Bool_t s2bMode=kFALSE
00049 );
00050
00051
00052 RooBlindTools(const RooBlindTools& );
00053
00054
00055 virtual ~RooBlindTools( );
00056
00057
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
00121
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
00142 void setup(const char *stSeed);
00143
00144 protected:
00145
00146
00147 ClassDef(RooBlindTools,1)
00148 };
00149
00150 #endif
00151
00152