#include <SexyPedestal.h>
Public Member Functions | |
| SexyPedestal () | |
| ~SexyPedestal () | |
| void | AddressMe (const Int_t crate, const Int_t varc, const Int_t vmm, const Int_t vfb, const Int_t va, const Int_t vach) |
| void | InputSPEntry (Int_t entry) |
| void | SetError (const Int_t error) |
| void | SetPlane (const Int_t plane) |
| Bool_t | AreYouAt (const Int_t crate, const Int_t varc, const Int_t vmm, const Int_t vfb, const Int_t va, const Int_t vach) |
| void | GetSTAT () |
| Int_t | GetIDKey () |
| Bool_t | SparsifiedChannel () |
| Bool_t | IsTPMTchannel () |
| Bool_t | IsCMchannel () |
| Bool_t | IsLGPIN () |
| Bool_t | IsHGPIN () |
| Float_t | GetRawMean () |
| Float_t | GetRawRms () |
| Float_t | GetMeanT1 () |
| Float_t | GetRmsT1 () |
| Float_t | GetMeanT2 () |
| Float_t | GetRmsT2 () |
| Int_t | GetEntries () |
| Int_t | GetEntriesT1 () |
| Int_t | GetEntriesT2 () |
| Int_t | GetCrate () |
| Int_t | GetVarc () |
| Int_t | GetVmm () |
| Int_t | GetVfb () |
| Int_t | GetVA () |
| Int_t | GetVAch () |
| Int_t | GetPlane () |
| Int_t | GetError () |
| Float_t | GetTrThresholdT1 () |
| Float_t | GetTrThresholdT2 () |
| Float_t | GetRawSparsLevel () |
| Float_t | GetSparsLevelT1 () |
| Float_t | GetSparsLevelT2 () |
| void | FlushSexyPedestals () |
Static Public Member Functions | |
| void | SetTruncFlag (const Int_t truncFlag) |
| void | SetTruncFactor (const Int_t truncFac) |
| void | SetSparsFactor (const Int_t sparsFac) |
| Int_t | GetTruncFactor () |
| Int_t | GetSparsFactor () |
| Int_t | EncriptMeAKey (const Int_t crate, const Int_t varc, const Int_t vmm, const Int_t vfb, const Int_t va, const Int_t vach) |
Static Public Attributes | |
| const Int_t | CRATEMAX = 16 |
| const Int_t | VARCMAX = 3 |
| const Int_t | VMMMAX = 6 |
| const Int_t | VFBMAX = 2 |
| const Int_t | VAMAX = 3 |
| const Int_t | VACHMAX = 22 |
Private Member Functions | |
| Int_t | GetInfoRaw () |
| Int_t | GetInfoTrunc1 () |
| Int_t | GetInfoTrunc2 () |
Private Attributes | |
| std::vector< Short_t > | fSPentries_v |
| Int_t | fcrate |
| Int_t | fvarc |
| Int_t | fvmm |
| Int_t | fvfb |
| Int_t | fva |
| Int_t | fvach |
| Int_t | fplane |
| Short_t | ferror |
| Float_t | frawMean |
| Float_t | frawRms |
| Int_t | fnumPointsRaw |
| Int_t | fnumPointsT1 |
| Float_t | fmeanTruc1 |
| Float_t | frmsTrunc1 |
| Float_t | ftruncthrT1 |
| Int_t | fnumPointsT2 |
| Float_t | fmeanTruc2 |
| Float_t | frmsTrunc2 |
Static Private Attributes | |
| const Int_t | TRTHRPMT = 15 |
| const Int_t | TRTHRLGPIN = 18 |
| const Int_t | TRTHRHGPIN = 30 |
| Int_t | fSparsFactor = 5 |
| Int_t | fTruncFactor = 5 |
| Int_t | fTruncFlag = 2 |
|
|
Definition at line 32 of file SexyPedestal.cxx. References fcrate, ferror, fmeanTruc1, fmeanTruc2, fnumPointsRaw, fnumPointsT1, fnumPointsT2, fplane, frawMean, frawRms, frmsTrunc1, frmsTrunc2, ftruncthrT1, fva, fvach, fvarc, fvfb, fvmm, and MSG. 00032 {
00033 MSG("SexyPedestal",Msg::kDebug) << "Sexy Pedestal constructing..." << endl;
00034
00035 fcrate = -1;
00036 fvarc = -1;
00037 fvmm = -1;
00038 fvfb = -1;
00039 fva = -1;
00040 fvach = -1;
00041
00042 fplane = -1;
00043
00044 fnumPointsT1 = -1;
00045 fnumPointsT2 = -1;
00046 fnumPointsRaw = -1;
00047
00048 //ftime = -1;
00049
00050 frawMean = -1;
00051 frawRms = -1;
00052
00053 fmeanTruc1 = -1;
00054 frmsTrunc1 = -1;
00055 ftruncthrT1 = -1;
00056
00057 fmeanTruc2 = -1;
00058 frmsTrunc2 = -1;
00059
00060 ferror = -1;
00061
00062 //fpedDaq = -1;
00063 //fsparThDaq = -1;
00064
00065 //fdeltaSpars = -1;
00066 //fdeltaPed = -1;
00067
00068 MSG("SexyPedestal",Msg::kDebug) << "Sexy Pedestal constructed!" << endl;
00069 }
|
|
|
Definition at line 73 of file SexyPedestal.cxx. References MSG. 00073 {
00074 MSG("SexyPedestal",Msg::kDebug) << "Destructing Sexy Pedestal" << endl;
00075 }
|
|
||||||||||||||||||||||||||||
|
Definition at line 125 of file SexyPedestal.cxx. References fcrate, fva, fvach, fvarc, fvfb, and fvmm. 00130 {
00131 fcrate = crate;
00132 fvarc = varc;
00133 fvmm = vmm;
00134 fvfb = vfb;
00135 fva = va;
00136 fvach = vach;
00137 }
|
|
||||||||||||||||||||||||||||
|
Definition at line 141 of file SexyPedestal.cxx. References fcrate, fva, fvarc, fvfb, and fvmm. 00146 {
00147
00148 if(crate==fcrate && varc==fvarc && vmm==fvmm && vfb==fvfb && va==fva && vach==vach)
00149 return true;
00150 else return false;
00151 }
|
|
||||||||||||||||||||||||||||
|
Definition at line 306 of file SexyPedestal.cxx. References VACHMAX, VAMAX, VARCMAX, VFBMAX, and VMMMAX. Referenced by SexyPedAna::CompareDAQTables(), SexyPedReco::GetSexyPedestals(), SexyPedAna::GetSPData(), and SexyPedAna::OutputTables(). 00311 {
00312 Int_t key = VACHMAX*va+vach;
00313 key += VACHMAX*VAMAX*vfb;
00314 key += VACHMAX*VAMAX*VFBMAX*vmm;
00315 key += VACHMAX*VAMAX*VFBMAX*VMMMAX*varc;
00316 key += VACHMAX*VAMAX*VFBMAX*VMMMAX*VARCMAX*crate;
00317
00318 return key;
00319 }
|
|
|
Definition at line 211 of file SexyPedestal.h. 00211 {fSPentries_v.clear();}
|
|
|
Definition at line 181 of file SexyPedestal.h. 00181 {return fcrate;}
|
|
|
Definition at line 176 of file SexyPedestal.h. 00176 {return fnumPointsRaw;}
|
|
|
Definition at line 177 of file SexyPedestal.h. 00177 {return fnumPointsT1;}
|
|
|
Definition at line 178 of file SexyPedestal.h. 00178 {return fnumPointsT2;}
|
|
|
Definition at line 189 of file SexyPedestal.h. 00189 {return ferror;}
|
|
|
Definition at line 292 of file SexyPedestal.cxx. References fva, VACHMAX, VAMAX, VARCMAX, VFBMAX, and VMMMAX. 00292 {
00293
00294 Int_t key = VACHMAX*fva+fvach;
00295 key += VACHMAX*VAMAX*fvfb;
00296 key += VACHMAX*VAMAX*VFBMAX*fvmm;
00297 key += VACHMAX*VAMAX*VFBMAX*VMMMAX*fvarc;
00298 key += VACHMAX*VAMAX*VFBMAX*VMMMAX*VARCMAX*fcrate;
00299
00300 return key;
00301 }
|
|
|
Definition at line 184 of file SexyPedestal.cxx. References frawMean, frawRms, fSPentries_v, and MSG. Referenced by GetSTAT(). 00184 {
00185
00186 Int_t rawSum = 0;
00187 Int_t rawSumSq = 0;
00188
00189 Int_t counterRaw = 0;
00190
00191 //Iterate over the entries in the map:
00192 vector<Short_t>::iterator iterPedestal = fSPentries_v.begin();
00193
00194 while(iterPedestal != fSPentries_v.end()) {
00195
00196 rawSum += (*iterPedestal);
00197 rawSumSq += (*iterPedestal)*(*iterPedestal);
00198 counterRaw++;
00199
00200 iterPedestal++;
00201 } //End of the LOOP
00202
00203 if(counterRaw != 0) {
00204 frawMean = (Float_t) rawSum / (Float_t) counterRaw;
00205
00206 frawRms = (Float_t) rawSumSq/ (Float_t) counterRaw;
00207 frawRms -= pow(frawMean,2);
00208 frawRms = sqrt(TMath::Abs(frawRms));
00209 }
00210
00211 MSG("SexyPedestal",Msg::kDebug) << "Raw: " << frawMean << "-"
00212 << frawRms << "-" << counterRaw << endl;
00213 return counterRaw;
00214 }
|
|
|
Definition at line 219 of file SexyPedestal.cxx. References fmeanTruc1, frawMean, frawRms, frmsTrunc1, fSPentries_v, ftruncthrT1, and MSG. Referenced by GetSTAT(). 00219 {
00220
00221 Int_t sumT1 = 0;
00222 Int_t sumSqT1 = 0;
00223 Int_t counterT1 = 0;
00224
00225 ftruncthrT1 = frawRms * fTruncFactor;
00226
00227 //Iterate over the entries in the map:
00228 vector<Short_t>::iterator iterPedestal = fSPentries_v.begin();
00229
00230 while(iterPedestal!=fSPentries_v.end()) {
00231
00232 if(TMath::Abs((*iterPedestal)-frawMean)<ftruncthrT1) { //Truncation here.
00233
00234 sumT1 += (*iterPedestal);
00235 sumSqT1 += (*iterPedestal)*(*iterPedestal);
00236 counterT1++;
00237 }
00238 iterPedestal++;
00239 } //End of the LOOP
00240
00241 if(counterT1 != 0) {
00242 fmeanTruc1 = (Float_t) sumT1 / (Float_t) counterT1;
00243
00244 frmsTrunc1 = (Float_t) sumSqT1/ (Float_t) counterT1;
00245 frmsTrunc1 -= pow(fmeanTruc1,2);
00246 frmsTrunc1 = sqrt(TMath::Abs(frmsTrunc1));
00247 }
00248
00249 MSG("SexyPedestal",Msg::kDebug) << "T1: " << fmeanTruc1
00250 << "-" << frmsTrunc1 << "-" << counterT1 << endl;
00251
00252 return counterT1;
00253 }
|
|
|
Definition at line 257 of file SexyPedestal.cxx. References fmeanTruc2, frawMean, frmsTrunc2, fSPentries_v, GetTrThresholdT2(), and MSG. Referenced by GetSTAT(). 00257 {
00258
00259 Int_t sumT2 = 0;
00260 Int_t sumSqT2 = 0;
00261 Int_t counterT2 = 0;
00262
00263 //Iterate over the entries in the map:
00264 vector<Short_t>::iterator iterPedestal = fSPentries_v.begin();
00265
00266 while(iterPedestal!=fSPentries_v.end()) {
00267
00268 if(TMath::Abs((*iterPedestal) - frawMean) < this->GetTrThresholdT2() ) {
00269 sumT2 += (*iterPedestal);
00270 sumSqT2 += (*iterPedestal)*(*iterPedestal);
00271 counterT2++;
00272 }
00273 iterPedestal++;
00274 } //End of the LOOP
00275
00276 if(counterT2 != 0) {
00277 fmeanTruc2 = (Float_t) sumT2 / (Float_t) counterT2;
00278
00279 frmsTrunc2 = (Float_t) sumSqT2/ (Float_t) counterT2;
00280 frmsTrunc2 -= pow(fmeanTruc2,2);
00281 frmsTrunc2 = sqrt(TMath::Abs(frmsTrunc2));
00282 }
00283
00284 MSG("SexyPedestal",Msg::kDebug) << "T2: " << fmeanTruc2 << "-"
00285 << frmsTrunc2 << "-" << counterT2 << endl;
00286
00287 return counterT2;
00288 }
|
|
|
Definition at line 171 of file SexyPedestal.h. 00171 {return fmeanTruc1;}
|
|
|
Definition at line 173 of file SexyPedestal.h. 00173 {return fmeanTruc2;}
|
|
|
Definition at line 188 of file SexyPedestal.h. 00188 {return fplane;}
|
|
|
Definition at line 169 of file SexyPedestal.h. 00169 {return frawMean;}
|
|
|
Definition at line 170 of file SexyPedestal.h. 00170 {return frawRms;}
|
|
|
Definition at line 200 of file SexyPedestal.h. 00200 {return (frawRms*fSparsFactor);}
|
|
|
Definition at line 172 of file SexyPedestal.h. 00172 {return frmsTrunc1;}
|
|
|
Definition at line 174 of file SexyPedestal.h. 00174 {return frmsTrunc2;}
|
|
|
Definition at line 153 of file SexyPedestal.h. 00153 {return SexyPedestal::fSparsFactor;}
|
|
|
Definition at line 201 of file SexyPedestal.h. 00201 {return (frmsTrunc1*fSparsFactor);}
|
|
|
Definition at line 202 of file SexyPedestal.h. 00202 {return (frmsTrunc2*fSparsFactor);}
|
|
|
Definition at line 155 of file SexyPedestal.cxx. References fnumPointsRaw, fnumPointsT1, fnumPointsT2, fSPentries_v, GetInfoRaw(), GetInfoTrunc1(), GetInfoTrunc2(), and MSG. 00155 {
00156
00157 if(fSPentries_v.size()<=0) {
00158 MSG("SexyPedestal",Msg::kError) << "ERROR: No pedestal data has been input for this channel" << endl;
00159 return;
00160 }
00161
00162 MSG("SexyPedestal",Msg::kDebug) << "Entries: " << fSPentries_v.size() << endl;
00163
00164 //Raw pedestal Info:
00165 fnumPointsRaw = this->GetInfoRaw();
00166
00167 switch(fTruncFlag) {
00168 case 0:
00169 break;
00170 case 1:
00171 //Get Pedestal info with truncation 1:
00172 fnumPointsT1 = this->GetInfoTrunc1();
00173 break;
00174 case 2:
00175 //Get Pedestal info with truncation 2:
00176 fnumPointsT2 = this->GetInfoTrunc2();
00177 break;
00178 }
00179 return;
00180 }
|
|
|
Definition at line 192 of file SexyPedestal.h. 00192 {return ftruncthrT1;}
|
|
|
Definition at line 193 of file SexyPedestal.h. Referenced by GetInfoTrunc2(). 00193 {
00194 if(fvach == 18 && fva == 0) return TRTHRLGPIN; //LG PIN
00195 else if(fvach == 18 && fva == 1) return TRTHRHGPIN; //HG PIN
00196 else return TRTHRPMT;
00197 }
|
|
|
Definition at line 152 of file SexyPedestal.h. 00152 {return SexyPedestal::fTruncFactor;}
|
|
|
Definition at line 185 of file SexyPedestal.h. 00185 {return fva;}
|
|
|
Definition at line 186 of file SexyPedestal.h. 00186 {return fvach;}
|
|
|
Definition at line 182 of file SexyPedestal.h. 00182 {return fvarc;}
|
|
|
Definition at line 184 of file SexyPedestal.h. 00184 {return fvfb;}
|
|
|
Definition at line 183 of file SexyPedestal.h. 00183 {return fvmm;}
|
|
|
Definition at line 111 of file SexyPedestal.h. 00111 {fSPentries_v.push_back(entry);}
|
|
|
Definition at line 117 of file SexyPedestal.cxx. References fvach. 00117 {
00118
00119 if(fvach==1 || fvach==19 || fvach==20 || fvach==21 ) return true;
00120 return false;
00121 }
|
|
|
Definition at line 100 of file SexyPedestal.cxx.
|
|
|
Definition at line 92 of file SexyPedestal.cxx.
|
|
|
Definition at line 108 of file SexyPedestal.cxx. References fcrate, fva, fvarc, and fvmm. 00108 {
00109
00110 if(fcrate==1 && fvarc==2 && fvmm==5 && fva==1) return true;
00111 return false;
00112
00113 }
|
|
|
Definition at line 114 of file SexyPedestal.h. 00114 {ferror = error;}
|
|
|
Definition at line 115 of file SexyPedestal.h. 00115 {fplane = plane;}
|
|
|
Definition at line 146 of file SexyPedestal.h. References fSparsFactor. Referenced by SexyPedAna::DoOfflineAnalysis(). 00146 {SexyPedestal::fSparsFactor = sparsFac;}
|
|
|
Definition at line 145 of file SexyPedestal.h. References fTruncFactor. Referenced by SexyPedAna::DoOfflineAnalysis(). 00145 {SexyPedestal::fTruncFactor = truncFac;}
|
|
|
Definition at line 144 of file SexyPedestal.h. References fTruncFlag. Referenced by SexyPedAna::DoOfflineAnalysis(). 00144 {SexyPedestal::fTruncFlag = truncFlag;}
|
|
|
Definition at line 79 of file SexyPedestal.cxx. 00079 {
00080
00081 //Fully sparsifying the following channels -
00082
00083 //Unused channel:
00084 if(fvach==0) return true;
00085 if(fvach==18 && fva==2) return true;
00086
00087 return false;
00088 }
|
|
|
Definition at line 19 of file SexyPedestal.cxx. |
|
|
Definition at line 31 of file SexyPedestal.h. Referenced by AddressMe(), AreYouAt(), IsTPMTchannel(), and SexyPedestal(). |
|
|
Definition at line 40 of file SexyPedestal.h. Referenced by SexyPedestal(). |
|
|
Definition at line 69 of file SexyPedestal.h. Referenced by GetInfoTrunc1(), and SexyPedestal(). |
|
|
Definition at line 85 of file SexyPedestal.h. Referenced by GetInfoTrunc2(), and SexyPedestal(). |
|
|
Definition at line 45 of file SexyPedestal.h. Referenced by GetSTAT(), and SexyPedestal(). |
|
|
Definition at line 67 of file SexyPedestal.h. Referenced by GetSTAT(), and SexyPedestal(). |
|
|
Definition at line 83 of file SexyPedestal.h. Referenced by GetSTAT(), and SexyPedestal(). |
|
|
Definition at line 38 of file SexyPedestal.h. Referenced by SexyPedestal(). |
|
|
Definition at line 43 of file SexyPedestal.h. Referenced by GetInfoRaw(), GetInfoTrunc1(), GetInfoTrunc2(), and SexyPedestal(). |
|
|
Definition at line 44 of file SexyPedestal.h. Referenced by GetInfoRaw(), GetInfoTrunc1(), and SexyPedestal(). |
|
|
Definition at line 70 of file SexyPedestal.h. Referenced by GetInfoTrunc1(), and SexyPedestal(). |
|
|
Definition at line 86 of file SexyPedestal.h. Referenced by GetInfoTrunc2(), and SexyPedestal(). |
|
|
Definition at line 15 of file SexyPedestal.cxx. Referenced by SetSparsFactor(). |
|
|
Definition at line 27 of file SexyPedestal.h. Referenced by GetInfoRaw(), GetInfoTrunc1(), GetInfoTrunc2(), and GetSTAT(). |
|
|
Definition at line 16 of file SexyPedestal.cxx. Referenced by SetTruncFactor(). |
|
|
Definition at line 17 of file SexyPedestal.cxx. Referenced by SetTruncFlag(). |
|
|
Definition at line 73 of file SexyPedestal.h. Referenced by GetInfoTrunc1(), and SexyPedestal(). |
|
|
Definition at line 35 of file SexyPedestal.h. Referenced by AddressMe(), AreYouAt(), GetIDKey(), IsHGPIN(), IsLGPIN(), IsTPMTchannel(), SexyPedestal(), and SparsifiedChannel(). |
|
|
Definition at line 36 of file SexyPedestal.h. Referenced by AddressMe(), IsCMchannel(), IsHGPIN(), IsLGPIN(), SexyPedestal(), and SparsifiedChannel(). |
|
|
Definition at line 32 of file SexyPedestal.h. Referenced by AddressMe(), AreYouAt(), IsTPMTchannel(), and SexyPedestal(). |
|
|
Definition at line 34 of file SexyPedestal.h. Referenced by AddressMe(), AreYouAt(), and SexyPedestal(). |
|
|
Definition at line 33 of file SexyPedestal.h. Referenced by AddressMe(), AreYouAt(), IsTPMTchannel(), and SexyPedestal(). |
|
|
Definition at line 28 of file SexyPedestal.cxx. |
|
|
Definition at line 27 of file SexyPedestal.cxx. |
|
|
Definition at line 26 of file SexyPedestal.cxx. |
|
|
Definition at line 24 of file SexyPedestal.cxx. Referenced by EncriptMeAKey(), and GetIDKey(). |
|
|
Definition at line 23 of file SexyPedestal.cxx. Referenced by EncriptMeAKey(), and GetIDKey(). |
|
|
Definition at line 20 of file SexyPedestal.cxx. Referenced by EncriptMeAKey(), and GetIDKey(). |
|
|
Definition at line 22 of file SexyPedestal.cxx. Referenced by EncriptMeAKey(), and GetIDKey(). |
|
|
Definition at line 21 of file SexyPedestal.cxx. Referenced by EncriptMeAKey(), and GetIDKey(). |
1.3.9.1