00001 #ifndef PATINTERFACES_SYSTEMATIC_VARIATION_H
00002 #define PATINTERFACES_SYSTEMATIC_VARIATION_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include <PATInterfaces/Global.h>
00032
00033 #include <iosfwd>
00034 #include <set>
00035 #include <string>
00036
00038
00039
00040
00041
00042 namespace CP
00043 {
00044
00045
00046 using ::operator<;
00047 using ::operator==;
00048
00049 class SystematicVariation
00050 {
00051
00052
00053
00054
00057 public:
00058 void testInvariant () const;
00059
00060
00063 public:
00064 SystematicVariation ();
00065
00066
00070 public:
00071 SystematicVariation (const std::string& val_name);
00072 SystematicVariation (const std::string& val_basename,
00073 const std::string& val_subvariation);
00074 SystematicVariation (const std::string& val_basename,
00075 float val_parameter);
00076
00077
00081 public:
00082 enum CONTINUOUS_ARG {CONTINUOUS};
00083 #ifndef __MAKECINT__
00084 #ifndef __ROOTCLING__
00085 SystematicVariation (const std::string& val_basename, CONTINUOUS_ARG);
00086 #endif // not __ROOTCLING__
00087 #endif // not __MAKECINT__
00088
00089
00095 public:
00096 static SystematicVariation
00097 makeToyVariation (const std::string& basename,
00098 unsigned toyIndex, float toyScale);
00099
00100
00106 public:
00107 static SystematicVariation
00108 makeToyEnsemble (const std::string& basename);
00109
00110
00116 public:
00117 static SystematicVariation
00118 makeContinuousEnsemble (const std::string& basename);
00119
00120
00125 public:
00126 static SystematicVariation makeContinuous (const std::string& basename);
00127
00128
00129
00140 public:
00141 SystematicVariation (const std::set<CP::SystematicVariation>& systematics,
00142 std::string val_basename);
00143
00144
00151 public:
00152 bool empty () const;
00153
00154
00158 public:
00159 const std::string& name () const;
00160
00161
00166 public:
00167 std::string basename () const;
00168
00169
00177 public:
00178 std::string subvariation () const;
00179
00180
00185 public:
00186 float parameter () const;
00187
00188
00197 public:
00198 std::pair<unsigned,float> getToyVariation () const;
00199
00200
00206 public:
00207 bool isToyEnsemble () const;
00208
00209
00215 public:
00216 bool isContinuousEnsemble () const;
00217
00218
00227 public:
00228 bool isEnsemble () const;
00229
00230
00237 public:
00238 bool ensembleContains (const SystematicVariation& sys) const;
00239
00240
00246 public:
00247 bool isToyVariation () const;
00248
00249
00255 public:
00256 bool isContinuousVariation () const;
00257
00258
00259
00260
00261
00262
00263
00264
00266 private:
00267 std::string m_name;
00268 };
00269
00270 std::ostream& operator << (std::ostream& str, const CP::SystematicVariation& obj);
00271 }
00272
00273 #endif