00001
00002
00003 #ifndef SCSIGNIFICANCE
00004 #define SCSIGNIFICANCE
00005
00006 #include "probfunctions.hh"
00007
00008
00009 namespace scala
00010 {
00011
00012 class SCsignificance
00013
00014
00015 {
00016 public:
00017 SCsignificance(): truncated(false), SDUnrelSC(-1.0),
00018 SDrelSC(-1.0), dummy(true) {}
00019 SCsignificance(const float& SCin, const int& Nsample_in);
00020
00021
00022 void SetUnrSC(const float& SD_SC_unrel);
00023
00024 void SetRelSC(const float& SD_SC_rel);
00025
00026
00027
00028
00029 void SetTrueScore(const double& TrueSc) {truescore = TrueSc;}
00030
00031 void SetScoreRange(const double& SCmin, const double& SCmax)
00032 {scmin = SCmin; scmax = SCmax; truncated = true;}
00033
00034
00035 float SC() const {return SC_;}
00036 int Nsample() const {return NsampleSC;}
00037 float UnrelSd() const {return SDUnrelSC;}
00038 float RelSd() const {return SDrelSC;}
00039 bool Valid() const {return (SDUnrelSC>0.0);}
00040 double TrueScore() const {return truescore;}
00041
00042
00043
00044
00045
00046
00047 float Likelihood() const;
00048
00049 float Z() const;
00050
00051
00052 void SetScoresTrue();
00053
00054 bool Dummy() const {return dummy;}
00055
00056
00057 private:
00058 float SC_;
00059 int NsampleSC;
00060 float SDUnrelSC;
00061 float SDrelSC;
00062 float truescore;
00063 float scmin, scmax;
00064 bool truncated;
00065 bool dummy;
00066 static float SDmin;
00067
00068 };
00069 }
00070 #endif