Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:11:19

0001 /*****************************************************************************
0002  * Project: RooFit                                                           *
0003  * Package: RooFitModels                                                     *
0004  *    File: $Id: RooBlindTools.h,v 1.10 2007/05/11 10:15:52 verkerke Exp $
0005  * Authors:                                                                  *
0006  *   AR, Aaron Roodman, Stanford University, roodman@slac.stanford.edu       *
0007  *   WV, Wouter Verkerke, UC Santa Barbara, verkerke@slac.stanford.edu       *
0008  *                                                                           *
0009  * Copyright (c) 2000-2005, Regents of the University of California          *
0010  *                          and Stanford University. All rights reserved.    *
0011  *                                                                           *
0012  * Redistribution and use in source and binary forms,                        *
0013  * with or without modification, are permitted according to the terms        *
0014  * listed in LICENSE (http://roofit.sourceforge.net/license.txt)             *
0015  *****************************************************************************/
0016 #ifndef ROO_BLIND_TOOLS
0017 #define ROO_BLIND_TOOLS
0018 
0019 //      ---------------------
0020 //       -- Class Interface --
0021 //      ---------------------
0022 
0023 #include "Rtypes.h"
0024 #include "TString.h"
0025 
0026 class RooBlindTools {
0027 
0028 //--------------------
0029 // Instance Members --
0030 //--------------------
0031 
0032 public:
0033 
0034   enum blindMode {
0035     full=0,   // blind both parameters and data
0036     dataonly   // blind data only
0037 
0038   };
0039 
0040 public:
0041 
0042   // Constructors
0043   RooBlindTools() {} ;
0044 
0045   RooBlindTools
0046   (const char *stSeed,   // blinding seed string
0047    blindMode Mode=full,   // blinding mode
0048    double centralValue=0.0,     // Central value for Precision measurements
0049    double sigmaOffset=1.0,      // range for Offset
0050    bool s2bMode=false          // Use sin2beta modifications?
0051    );
0052 
0053   // Copy
0054   RooBlindTools(const RooBlindTools& );
0055 
0056   // Destructor
0057   virtual ~RooBlindTools( ) = default;
0058 
0059   // Operators
0060 
0061   double Randomizer(const char *StringAlphabet) const;
0062 
0063   double PseudoRandom(Int_t Seed) const;
0064 
0065   double MakeOffset(const char *StringAlphabet) const;
0066 
0067   double MakeGaussianOffset(const char *StringAlphabet) const;
0068 
0069   double MakeSignFlip(const char *StringAlphabet) const;
0070 
0071   Int_t SignOfTag(double STag) const;
0072 
0073   double HideDeltaZ(double DeltaZ, double STag) const;
0074 
0075   double HiDelZPdG(double DeltaZ, double STag, double PdG) const;
0076 
0077   double UnHideDeltaZ(double DeltaZPrime, double STag) const;
0078 
0079   double UnHiDelZPdG(double DeltaZPrime, double STag, double PdG) const;
0080 
0081   double HideAsym(double Asym) const;
0082 
0083   double HiAsPdG(double Asym, double PdG) const;
0084 
0085   double UnHideAsym(double AsymPrime) const;
0086 
0087   double UnHiAsPdG(double AsymPrime, double PdG) const;
0088 
0089   double HideDeltaM(double DeltaM) const;
0090 
0091   double UnHideDeltaM(double DeltaMPrime) const;
0092 
0093   double MysteryPhase() const;
0094 
0095   double RandomizeTag(double STag, Int_t EventNumber) const;
0096 
0097   double HidePrecision(double Precision) const;
0098 
0099   double UnHidePrecision(double PrecisionPrime) const;
0100 
0101   double HideOffset( double Precision ) const;
0102 
0103   double UnHideOffset( double PrecisionBlind ) const;
0104 
0105   double HideUniform( double Precision ) const;
0106 
0107   double UnHideUniform( double PrecisionBlind ) const;
0108 
0109 
0110   const char *stSeed()const {return _stSeed;}
0111 
0112   const blindMode& mode()const {return _mode;}
0113 
0114   void setMode(blindMode bmode) {_mode=bmode;}
0115 
0116   double getPrecisionCentralValue() const {return _PrecisionCentralValue;}
0117 
0118   double getPrecisionOffsetScale() const {return _PrecisionOffsetScale;}
0119 
0120 private:
0121 
0122   // Friends
0123   // Data members
0124 
0125   TString _stSeed ;
0126   double _DeltaZOffset;
0127   double _DeltaZSignFlip;
0128   double _DeltaZScale;
0129   double _AsymOffset;
0130   double _AsymSignFlip;
0131   double _DeltaMScale;
0132   double _DeltaMOffset;
0133   double _MysteryPhase;
0134   double _STagConstant;
0135   double _PrecisionSignFlip;
0136   double _PrecisionOffsetScale;
0137   double _PrecisionOffset;
0138   double _PrecisionUniform;
0139   double _PrecisionCentralValue;
0140   blindMode _mode;
0141   bool   _s2bMode ;
0142 
0143   // setup data members from string seed
0144   void setup(const char *stSeed);
0145 
0146 protected:
0147 
0148     // Helper functions
0149   ClassDef(RooBlindTools,1) // Root implementation of BlindTools
0150 };
0151 
0152 #endif