#include <MinosExtraCompactResult.h>
Public Member Functions | |
| MinosExtraCompactResult (const MinosAnalysisResult *result, int n=50, float ycut=1., float fnue=1.0, float fnc=1.0) | |
| ~MinosExtraCompactResult () | |
| void | Calculate (const MinosAnalysisResult *result) |
| void | SetNu (const MinosCompactEvent *pCompactEvent) |
Public Attributes | |
| int | Run |
| int | Event |
| int | idact |
| int | idres |
| int | idnu |
| float | eNu |
| float | y |
| float | Qtot |
| float | meanU |
| float | meanV |
| int | meanPlane |
| int | nPlanes |
| float | f100 |
| float | f50 |
| float | wf50 |
| float | f20 |
| float | wf20 |
| float | f10 |
| float | e50all |
| float | y50all |
| float | f50all |
| float | fi [5] |
| float | yi [5] |
| float | qi [5] |
| float | fn |
| float | fn_2n |
| float | yn |
| float | qn |
| float | en |
| float | en_wgt |
| float | e20all |
| float | y20all |
| float | f20all |
| float | e20 |
| float | y100 |
| float | y50 |
| float | y20 |
| float | y10 |
| float | q100 |
| float | q50 |
| float | q20 |
| float | q10 |
| float | n80pc |
| float | q80pc |
| float | y80pc |
| float | f80pc |
Private Attributes | |
| float | _fnue |
| float | _fnc |
| float | _ycut |
| int | _n |
|
||||||||||||||||||||||||
|
Definition at line 11 of file MinosExtraCompactResult.cxx. References _fnc, _fnue, _n, and _ycut. 00012 {
00013
00014 _fnue =fnue;
00015 _fnc =fnc;
00016 _n = n;
00017 _ycut = ycut;
00018
00019 return;
00020
00021 }
|
|
|
Definition at line 262 of file MinosExtraCompactResult.cxx. 00262 {
00263
00264
00265 }
|
|
|
Definition at line 38 of file MinosExtraCompactResult.cxx. References count, e20, e20all, e50all, en, en_wgt, eNu, ComparisonResult::eNu, f10, f100, f20, f20all, f50, f50all, f80pc, fi, fn, fn_2n, ComparisonResult::fractionQMatched, fsumw, ComparisonResult::idact, n80pc, q10, q100, q20, q50, q80pc, qi, qn, MinosAnalysisResult::ResultList, wf20, wf50, ComparisonResult::y, y10, y100, y20, y20all, y50, y50all, y80pc, yi, and yn. 00038 {
00039
00040 const int nresults = (int)(result->ResultList->GetEntries());
00041 if(nresults<=0)return;
00042
00043 TRandom random;
00044 n80pc = 0;
00045 float n80count = 0;
00046 float y80pc=0.;
00047 float q80pc=0.;
00048 for(int ires = 0; ires<nresults; ires++){
00049 const ComparisonResult* cResult = dynamic_cast<ComparisonResult*>(result->ResultList->At(ires));
00050 if(cResult->fractionQMatched>0.8){
00051 n80count+=1.;
00052 if(cResult->idact==1){
00053 n80pc++;
00054 y80pc+=cResult->y;
00055 q80pc+=cResult->fractionQMatched;
00056 }
00057 }
00058 }
00059 if(n80count>0){
00060 y80pc = y80pc/n80count;
00061 q80pc = q80pc/n80count;
00062 f80pc = n80pc/n80count;
00063 }
00064
00065
00066
00067 for(int i=0; i<4;i++){
00068 int count=0;
00069 float wcount=0.;
00070 float wcountcc=0.;
00071 int countall=0;
00072 float yall = 0.;
00073 float eall = 0.;
00074 float ymean =0.;
00075 float qmean =0.;
00076 float emean =0.;
00077 int nbest =10;
00078 if(i==1)nbest=20;
00079 if(i==2)nbest=50;
00080 if(i==3)nbest=100;
00081 if(i==4)nbest=_n;
00082 if(nbest>nresults)nbest=nresults;
00083 int iresultsUsed=0;
00084 int ires = 0;
00085
00086
00087 while(iresultsUsed<nbest){
00088 if(ires>=nresults)ires=0;
00089 const ComparisonResult* cResult = dynamic_cast<ComparisonResult*>(result->ResultList->At(ires));
00090 ires++;
00091 float frac = _fnue;
00092 if(cResult->idact==0)frac = _fnc;
00093 float x = random.Uniform(1.0);
00094
00095 if(x<frac){
00096 iresultsUsed++;
00097 if(cResult->idact==0)wcount=wcount+1.0;
00098 float wgt = 0;
00099 if(cResult->idact==1){
00100 countall++;
00101 yall +=cResult->y;
00102 eall +=cResult->eNu;
00103 float sinLE = 0.;
00104 if(cResult->eNu>0)sinLE = sin(1.27*0.0025*735.0/cResult->eNu);
00105 wgt = 0.5*sinLE*sinLE;
00106 wcount += wgt;
00107 }
00108 if(cResult->idact==1&&cResult->y<0.5){
00109 count++;
00110 ymean+=cResult->y;
00111 emean+=cResult->eNu;
00112 qmean+=cResult->fractionQMatched;
00113 wcountcc += wgt;
00114 }
00115 }
00116 }
00117 if(count>0){
00118 ymean = ymean/count;
00119 qmean = qmean/count;
00120 emean = emean/count;
00121 if(qmean>0.999)qmean=0.999;
00122 eall = eall/countall;
00123 yall = yall/countall;
00124 }
00125 if(i==0){
00126 f10 = count/(float)nbest;
00127 y10 = ymean;
00128 q10 = qmean;
00129 }
00130 if(i==1){
00131 f20 = count/(float)nbest;
00132 y20 = ymean;
00133 q20 = qmean;
00134 e20 = emean;
00135 f20all = countall/(float)nbest;
00136 e20all = eall;
00137 y20all = yall;
00138 wf20 = 0;
00139 if(wcount>0)wf20 = wcountcc/wcount;
00140 }
00141 if(i==2){
00142 f50all = countall/(float)nbest;
00143 e50all = eall;
00144 y50all = yall;
00145 f50 = count/(float)nbest;
00146 y50 = ymean;
00147 q50 = qmean;
00148
00149 wf50 = 0.;
00150 if(wcount>0)wf50=wcountcc/wcount;
00151 }
00152 if(i==3){
00153 f100 = count/(float)nbest;
00154 y100 = ymean;
00155 q100 = qmean;
00156 }
00157 }
00158
00159
00160 for(int i=0; i<5;i++){
00161 int count=0;
00162 float ymean =0.;
00163 float qmean =0.;
00164 float emean =0.;
00165 int nstart =i*10;
00166 for(int ires = nstart; ires<nstart+10; ires++){
00167 const ComparisonResult* cResult = dynamic_cast<ComparisonResult*>(result->ResultList->At(ires));
00168 if(cResult->idact==1){
00169 count++;
00170 ymean+=cResult->y;
00171 emean+=cResult->eNu;
00172 qmean+=cResult->fractionQMatched;
00173 }
00174 }
00175 fi[i] =count/10.;
00176 yi[i] = 0.;
00177 qi[i] = 0.;
00178 if(count>0){
00179 yi[i] = ymean/count;
00180 qi[i] = qmean/count;
00181 }
00182 }
00183
00184
00185
00186
00187 int count=0;
00188 float count_wgt = 0.;
00189 float ymean =0.;
00190 float qmean =0.;
00191 float emean =0.;
00192 float emean_wgt =0.;
00193 int nmax = nresults;
00194 int iresultsUsed = 0;
00195 int ires = 0;
00196 if(nresults>=_n)nmax = _n;
00197 if(nmax>10){
00198 while(iresultsUsed<nmax){
00199 if(ires>=nresults)ires=0;
00200 const ComparisonResult* cResult = dynamic_cast<ComparisonResult*>(result->ResultList->At(ires));
00201 ires++;
00202 float frac = _fnue;
00203 if(cResult->idact==0)frac = _fnc;
00204 float x = random.Uniform(1.0);
00205 if(x<frac){
00206 iresultsUsed++;
00207 if(cResult->idact==1 && cResult->y < _ycut){
00208 float ewgt = 1.0/fsumw[40];
00209 int ibin = static_cast<int>(this->eNu*4.) + 1;
00210 if(ibin>40)ibin=40;
00211 ewgt = 1.0/fsumw[ibin];
00212 count++;
00213 count_wgt += ewgt;
00214 ymean+=cResult->y;
00215 emean+=cResult->eNu;
00216 emean_wgt+=cResult->eNu*ewgt;
00217 qmean+=cResult->fractionQMatched;
00218 }
00219 }
00220 }
00221 }
00222 fn =count/(float)nmax;
00223 yn = 0.;
00224 qn = 0.;
00225 en = 0.;
00226 en_wgt = 0.;
00227 if(count>0){
00228 yn = ymean/count;
00229 qn = qmean/count;
00230 en = emean/count;
00231 if(count_wgt>0)en_wgt = emean_wgt/count_wgt;
00232 }
00233
00234 fn_2n = 0.;
00235 count=0;
00236
00237 int nmin = _n;
00238 nmax = 2*_n;
00239 if(nresults>nmax){
00240 for(int ires = nmin; ires<nmax;ires++){
00241 const ComparisonResult* cResult = dynamic_cast<ComparisonResult*>(result->ResultList->At(ires));
00242 if(cResult->idact==1 && cResult->y < _ycut){
00243 count++;
00244 ymean+=cResult->y;
00245 emean+=cResult->eNu;
00246 qmean+=cResult->fractionQMatched;
00247 }
00248 }
00249 fn_2n =count/(float)(nmax-nmin);
00250 }
00251
00252
00253
00254
00255 return;
00256 }
|
|
|
Definition at line 23 of file MinosExtraCompactResult.cxx. References MinosCompactEvent::eNu, eNu, MinosCompactEvent::idact, idact, MinosCompactEvent::idnu, idnu, MinosCompactEvent::idres, idres, MinosCompactEvent::meanPlane, meanPlane, MinosCompactEvent::meanU, meanU, MinosCompactEvent::meanV, meanV, MinosCompactEvent::nPlanes, nPlanes, MinosCompactEvent::Qtot, Qtot, MinosCompactEvent::Run, Run, MinosCompactEvent::y, and y. 00023 {
00024 Qtot = pCompactEvent->Qtot;
00025 Run = pCompactEvent->Run;
00026 eNu = pCompactEvent->eNu;
00027 idnu = pCompactEvent->idnu;
00028 idact = pCompactEvent->idact;
00029 idres = pCompactEvent->idres;
00030 y = pCompactEvent->y;
00031 meanU = pCompactEvent->meanU;
00032 meanV = pCompactEvent->meanV;
00033 meanPlane = pCompactEvent->meanPlane;
00034 nPlanes = pCompactEvent->nPlanes;
00035
00036 }
|
|
|
Definition at line 15 of file MinosExtraCompactResult.h. Referenced by MinosExtraCompactResult(). |
|
|
Definition at line 14 of file MinosExtraCompactResult.h. Referenced by MinosExtraCompactResult(). |
|
|
Definition at line 17 of file MinosExtraCompactResult.h. Referenced by MinosExtraCompactResult(). |
|
|
Definition at line 16 of file MinosExtraCompactResult.h. Referenced by MinosExtraCompactResult(). |
|
|
Definition at line 63 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 60 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 45 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 57 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 58 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 30 of file MinosExtraCompactResult.h. Referenced by Calculate(), and SetNu(). |
|
|
Definition at line 26 of file MinosExtraCompactResult.h. |
|
|
Definition at line 43 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 38 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 41 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 62 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 39 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 47 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 77 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 49 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 53 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 54 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 27 of file MinosExtraCompactResult.h. Referenced by SetNu(). |
|
|
Definition at line 29 of file MinosExtraCompactResult.h. Referenced by SetNu(). |
|
|
Definition at line 28 of file MinosExtraCompactResult.h. Referenced by SetNu(). |
|
|
Definition at line 35 of file MinosExtraCompactResult.h. Referenced by SetNu(). |
|
|
Definition at line 33 of file MinosExtraCompactResult.h. Referenced by SetNu(). |
|
|
Definition at line 34 of file MinosExtraCompactResult.h. Referenced by SetNu(). |
|
|
Definition at line 74 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 36 of file MinosExtraCompactResult.h. Referenced by SetNu(). |
|
|
Definition at line 72 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 69 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 71 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 70 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 75 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 51 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 56 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 32 of file MinosExtraCompactResult.h. Referenced by SetNu(). |
|
|
Definition at line 25 of file MinosExtraCompactResult.h. Referenced by SetNu(). |
|
|
Definition at line 42 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 40 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 31 of file MinosExtraCompactResult.h. Referenced by SetNu(). |
|
|
Definition at line 67 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 64 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 66 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 61 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 65 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 46 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 76 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 50 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
|
|
Definition at line 55 of file MinosExtraCompactResult.h. Referenced by Calculate(). |
1.3.9.1