#include <PEGainSummary.h>
Public Member Functions | |
| PEGainSummary () | |
| virtual | ~PEGainSummary () |
| void | AddNearEnd (const PulserSummary &ps, const PlexStripEndId &seid) |
| void | AddFarEnd (const PulserSummary &ps, const PlexStripEndId &seid) |
| PlexStripEndId | GetStripEndId () const |
| Float_t | GetNearGain () const |
| Float_t | GetFarGain () const |
| Float_t | GetBestGain () const |
| Float_t | GetNearError () const |
| Float_t | GetFarError () const |
| Float_t | GetBestError () const |
| Float_t | GetProperNearGain () const |
| Float_t | GetProperFarGain () const |
| Float_t | GetProperBestGain () const |
| Float_t | GetProperNearError () const |
| Float_t | GetProperFarError () const |
| Float_t | GetProperBestError () const |
Private Member Functions | |
| Int_t | GetBest () const |
Private Attributes | |
| PlexStripEndId | fSeid |
| Int_t | fGotNear |
| Int_t | fGotFar |
| Int_t | fEncodedStrip |
| PulserSummary | fNearEnd |
| PulserSummary | fFarEnd |
|
|
Definition at line 17 of file PEGainSummary.cxx. References MSG. 00018 :fGotNear(0),fGotFar(0),fEncodedStrip(-1)//,fBestSide(-1) 00019 { 00020 00021 MSG("PEGain",Msg::kVerbose) << "PEGainSummary::PEGainSummary()\n"; 00022 00023 }
|
|
|
Definition at line 26 of file PEGainSummary.cxx. References MSG. 00027 {
00028
00029 MSG("PEGain",Msg::kVerbose) << "PEGainSummary::~PEGainSummary()\n";
00030
00031 }
|
|
||||||||||||
|
Definition at line 53 of file PEGainSummary.cxx. References PlexStripEndId::BuildPlnStripEndKey(), fEncodedStrip, fFarEnd, fGotFar, fSeid, and MSG. 00054 {
00055 MSG("PEGain",Msg::kVerbose) << "PEGainSummary::AddFarEnd()\n";
00056
00057 if(fGotFar==1) {
00058 MSG("PEGain",Msg::kWarning) << "I've already got a far end for : "
00059 << seid << endl;
00060 }
00061 else {
00062 if(fEncodedStrip==-1) {
00063 fSeid=seid;
00064 fEncodedStrip=seid.BuildPlnStripEndKey();
00065 }
00066 else assert(seid.BuildPlnStripEndKey()==fEncodedStrip);
00067 fFarEnd=ps;
00068 fGotFar=1;
00069 }
00070 }
|
|
||||||||||||
|
Definition at line 34 of file PEGainSummary.cxx. References PlexStripEndId::BuildPlnStripEndKey(), fEncodedStrip, fGotNear, fNearEnd, fSeid, and MSG. 00035 {
00036 MSG("PEGain",Msg::kVerbose) << "PEGainSummary::AddNearEnd()\n";
00037
00038 if(fGotNear==1) {
00039 MSG("PEGain",Msg::kWarning) << "I've already got a near end for : "
00040 << seid << endl;
00041 }
00042 else {
00043 if(fEncodedStrip==-1) {
00044 fSeid=seid;
00045 fEncodedStrip=seid.BuildPlnStripEndKey();
00046 }
00047 else assert(seid.BuildPlnStripEndKey()==fEncodedStrip);
00048 fNearEnd=ps;
00049 fGotNear=1;
00050 }
00051 }
|
|
|
Definition at line 134 of file PEGainSummary.cxx. References fFarEnd, fNearEnd, PulserSummary::GetEntries(), PulserSummary::GetMean(), and MSG. Referenced by GetBestError(), and GetBestGain(). 00134 {
00135 MSG("PEGain",Msg::kVerbose) << "PEGainSummary::SetBest()\n";
00136 if(fGotNear) {
00137 if(fNearEnd.GetEntries()>200) {
00138 if(fGotFar) {
00139 if(fFarEnd.GetEntries()>200) {
00140 // Got two chances;
00141 Int_t nearNent=fNearEnd.GetEntries();
00142 Int_t farNent=fFarEnd.GetEntries();
00143 Float_t nentRatio=float(nearNent)/float(farNent);
00144 if(nentRatio>1.1) {
00145 //fBestSide=1;
00146 return 1;
00147 }
00148 if(nentRatio<0.9) {
00149 //fBestSide=2;
00150 return 2;
00151 }
00152 Float_t nearMean=fNearEnd.GetMean();
00153 Float_t farMean=fFarEnd.GetMean();
00154 if(nearMean<8000 && nearMean>800) {
00155 return 1;
00156 }
00157 if(farMean<8000 && farMean>800) {
00158 }
00159 if(fabs(nearMean-5000.0)<fabs(farMean-5000.0)) {
00160 //fBestSide=1;
00161 return 1;
00162 }
00163 else {
00164 //fBestSide=2;
00165 return 2;
00166 }
00167 }
00168 }
00169 // Only Near
00170 //fBestSide=1;
00171 return 1;
00172 }
00173
00174 }
00175 else if(fGotFar) {
00176 if(fFarEnd.GetEntries()>200) {
00177 //fBestSide=2;
00178 return 2;
00179 }
00180 // Only Far
00181
00182 }
00183 //fBestSide=0;
00184 return 0;
00185 }
|
|
|
Definition at line 203 of file PEGainSummary.cxx. References GetBest(), GetFarError(), GetNearError(), and MSG. Referenced by GetProperBestError(). 00204 {
00205 MSG("PEGain",Msg::kVerbose) << "PEGainSummary::GetBestError()\n";
00206 Int_t fBestSide=GetBest();
00207 // if(fBestSide==-1) SetBest();
00208 if(fBestSide==1) {
00209 return GetNearError();
00210 }
00211 else if(fBestSide==2) {
00212 return GetFarError();
00213 }
00214 return -1;
00215
00216 }
|
|
|
Definition at line 189 of file PEGainSummary.cxx. References GetBest(), GetFarGain(), GetNearGain(), and MSG. Referenced by GetProperBestGain(). 00189 {
00190 MSG("PEGain",Msg::kVerbose) << "PEGainSummary::GetBestGain()\n";
00191 Int_t fBestSide = GetBest();
00192 // if(fBestSide==-1) SetBest();
00193 if(fBestSide==1) {
00194 return GetNearGain();
00195 }
00196 else if(fBestSide==2) {
00197 return GetFarGain();
00198 }
00199 return -1;
00200 }
|
|
|
Definition at line 115 of file PEGainSummary.cxx. References fFarEnd, PulserSummary::GetEntries(), PulserSummary::GetMean(), PulserSummary::GetRMS(), and MSG. Referenced by GetBestError(), and GetProperFarError(). 00116 {
00117 MSG("PEGain",Msg::kVerbose) << "PEGainSummary::GetFarError()\n";
00118 if(fGotFar) {
00119 Float_t tempRms=fFarEnd.GetRMS();
00120 Float_t tempMean=fFarEnd.GetMean();
00121 Float_t tempNent=(float)fFarEnd.GetEntries();
00122 if(tempNent>1) {
00123 Float_t tempRmsErr=tempRms/sqrt(2.0*tempNent);
00124 Float_t tempMeanErr=tempRms/sqrt(tempNent-1);
00125
00126 return sqrt(pow(2.0*tempRms/tempMean,2)*tempRmsErr*tempRmsErr
00127 +pow(tempRms/tempMean,4)*tempMeanErr*tempMeanErr);
00128 }
00129
00130 }
00131 return -1;
00132 }
|
|
|
Definition at line 84 of file PEGainSummary.cxx. References fFarEnd, PulserSummary::GetMean(), PulserSummary::GetRMS(), and MSG. Referenced by GetBestGain(), and GetProperFarGain(). 00085 {
00086 MSG("PEGain",Msg::kVerbose) << "PEGainSummary::GetFarGain()\n";
00087 if(fGotFar) {
00088 Float_t tempRms=fFarEnd.GetRMS();
00089 Float_t tempMean=fFarEnd.GetMean();
00090
00091 return (tempRms*tempRms/tempMean);
00092 }
00093 return -1;
00094 }
|
|
|
Definition at line 96 of file PEGainSummary.cxx. References fNearEnd, PulserSummary::GetEntries(), PulserSummary::GetMean(), PulserSummary::GetRMS(), and MSG. Referenced by GetBestError(), and GetProperNearError(). 00097 {
00098 MSG("PEGain",Msg::kVerbose) << "PEGainSummary::GetNearError()\n";
00099 if(fGotNear) {
00100 Float_t tempRms=fNearEnd.GetRMS();
00101 Float_t tempMean=fNearEnd.GetMean();
00102 Float_t tempNent=(float)fNearEnd.GetEntries();
00103 if(tempNent>1) {
00104 Float_t tempRmsErr=tempRms/sqrt(2.0*tempNent);
00105 Float_t tempMeanErr=tempRms/sqrt(tempNent-1);
00106
00107 return sqrt(pow(2.0*tempRms/tempMean,2)*tempRmsErr*tempRmsErr
00108 +pow(tempRms/tempMean,4)*tempMeanErr*tempMeanErr);
00109 }
00110
00111 }
00112 return -1;
00113 }
|
|
|
Definition at line 72 of file PEGainSummary.cxx. References fNearEnd, PulserSummary::GetMean(), PulserSummary::GetRMS(), and MSG. Referenced by GetBestGain(), and GetProperNearGain(). 00073 {
00074 MSG("PEGain",Msg::kVerbose) << "PEGainSummary::GetNearGain()\n";
00075 if(fGotNear) {
00076 Float_t tempRms=fNearEnd.GetRMS();
00077 Float_t tempMean=fNearEnd.GetMean();
00078
00079 return (tempRms*tempRms/tempMean);
00080 }
00081 else return -1;
00082 }
|
|
|
Definition at line 238 of file PEGainSummary.cxx. References GetBestError(). 00239 {
00240 return 0.8*GetBestError();
00241 }
|
|
|
Definition at line 226 of file PEGainSummary.cxx. References GetBestGain(). 00227 {
00228 return 0.8*GetBestGain();
00229 }
|
|
|
Definition at line 234 of file PEGainSummary.cxx. References GetFarError(). 00235 {
00236 return 0.8*GetFarError();
00237 }
|
|
|
Definition at line 222 of file PEGainSummary.cxx. References GetFarGain(). 00223 {
00224 return 0.8*GetFarGain();
00225 }
|
|
|
Definition at line 230 of file PEGainSummary.cxx. References GetNearError(). 00231 {
00232 return 0.8*GetNearError();
00233 }
|
|
|
Definition at line 218 of file PEGainSummary.cxx. References GetNearGain(). 00219 {
00220 return 0.8*GetNearGain();
00221 }
|
|
|
Definition at line 24 of file PEGainSummary.h. 00024 {return fSeid;}
|
|
|
Definition at line 47 of file PEGainSummary.h. Referenced by AddFarEnd(), and AddNearEnd(). |
|
|
Definition at line 49 of file PEGainSummary.h. Referenced by AddFarEnd(), GetBest(), GetFarError(), and GetFarGain(). |
|
|
Definition at line 46 of file PEGainSummary.h. Referenced by AddFarEnd(). |
|
|
Definition at line 45 of file PEGainSummary.h. Referenced by AddNearEnd(). |
|
|
Definition at line 48 of file PEGainSummary.h. Referenced by AddNearEnd(), GetBest(), GetNearError(), and GetNearGain(). |
|
|
Definition at line 43 of file PEGainSummary.h. Referenced by AddFarEnd(), and AddNearEnd(). |
1.3.9.1