#include <CalDrift.h>
Inheritance diagram for CalDrift:

Public Member Functions | |
| CalDrift () | |
| virtual | ~CalDrift () |
| virtual DbiTableRow * | CreateTableRow () const |
| virtual void | Fill (DbiResultSet &rs, const DbiValidityRec *) |
| virtual void | Store (DbiOutRowStream &ors, const DbiValidityRec *) const |
| Bool_t | CanL2Cache () const |
| UInt_t | GetIndex (UInt_t) const |
| virtual void | SetBackMedian (const Double_t median) |
| virtual void | SetBackMedianErr (const Double_t medianErr) |
| virtual void | SetFrontMedian (const Double_t median) |
| virtual void | SetFrontMedianErr (const Double_t medianErr) |
| virtual void | SetNonFidMedian (const Double_t median) |
| virtual void | SetNonFidMedianErr (const Double_t medianErr) |
| virtual void | SetNumMuons (const Int_t numMuons) |
| virtual void | SetNumPlanes (const Int_t numPlanes) |
| virtual void | SetMean (const Double_t mean) |
| virtual void | SetMeanErr (const Double_t meanErr) |
| virtual void | SetMedian (const Double_t median) |
| virtual void | SetMedianErr (const Double_t medianErr) |
| virtual void | SetPeak (const Double_t peak) |
| virtual void | SetPeakErr (const Double_t peakErr) |
| virtual void | SetQuantile50 (const Double_t quantile50) |
| virtual void | SetRecoVersion (const std::string recoVersion) |
| virtual Float_t | GetMean () const |
| virtual Float_t | GetMeanAsR1_18_2 (const Detector::Detector_t det) const |
| virtual Float_t | GetMeanErr () const |
| virtual Float_t | GetMedian () const |
| virtual Float_t | GetFrontMedian () const |
| virtual Float_t | GetFrontMedianErr () const |
| virtual Float_t | GetBackMedian () const |
| virtual Float_t | GetBackMedianErr () const |
| virtual Float_t | GetMedianRecoFactor (const Detector::Detector_t det) const |
| virtual Float_t | GetMedianAsR1_18_2 (const Detector::Detector_t det) const |
| virtual Float_t | GetMedianErrAsR1_18_2 (const Detector::Detector_t det) const |
| virtual Float_t | GetMedianErr () const |
| virtual Int_t | GetNumMuons () const |
| virtual Int_t | GetNumPlanes () const |
| virtual std::string | GetRecoVersion () const |
| virtual Float_t | CalibratedPH (const Float_t ph, const VldContext &cxNow, const VldContext &cxRef) const |
| CalDrift (const CalDrift &from) | |
Private Attributes | |
| Double_t | fbackMedian |
| Double_t | fbackMedianErr |
| Double_t | ffrontMedian |
| Double_t | ffrontMedianErr |
| Double_t | fnonFidMedian |
| Double_t | fnonFidMedianErr |
| Int_t | fnumMuons |
| Int_t | fnumPlanes |
| Double_t | fmean |
| Double_t | fmeanErr |
| Double_t | fmedian |
| Double_t | fmedianErr |
| Double_t | fpeak |
| Double_t | fpeakErr |
| Double_t | fquantile50 |
| std::string | frecoVersion |
| Double_t | fdriftQuantity1 |
| Double_t | fdriftQuantity2 |
Definition at line 18 of file CalDrift.h.
| CalDrift::CalDrift | ( | ) |
Definition at line 33 of file CalDrift.cxx.
References fbackMedian, fbackMedianErr, fdriftQuantity1, fdriftQuantity2, ffrontMedian, ffrontMedianErr, fmean, fmeanErr, fmedian, fmedianErr, fnonFidMedian, fnonFidMedianErr, fnumMuons, fnumPlanes, fpeak, fpeakErr, fquantile50, frecoVersion, and LEA_CTOR.
00033 : DbiTableRow() 00034 { 00035 LEA_CTOR; // Leak detection macro. 00036 fbackMedian = 0.0; 00037 fbackMedianErr = 0.0; 00038 ffrontMedian = 0.0; 00039 ffrontMedianErr = 0.0; 00040 fnonFidMedian = 0.0; 00041 fnonFidMedianErr = 0.0; 00042 fnumMuons = 0; 00043 fnumPlanes = 0; 00044 fmean = 0.0; 00045 fmeanErr = 0.0; 00046 fmedian = 0.0; 00047 fmedianErr = 0.0; 00048 fpeak = 0.0; 00049 fpeakErr = 0.0; 00050 fquantile50 = 0.0; 00051 frecoVersion = "Dogwood"; //default to Dogwood 00052 //frecoVersion = "R1_18_2"; 00053 fdriftQuantity1 = 1.0; 00054 fdriftQuantity2 = 1.0; 00055 }
| CalDrift::~CalDrift | ( | ) | [virtual] |
Definition at line 58 of file CalDrift.cxx.
References LEA_DTOR.
00059 { 00060 LEA_DTOR; // Leak detection macro. 00061 }
| CalDrift::CalDrift | ( | const CalDrift & | from | ) | [inline] |
Definition at line 95 of file CalDrift.h.
References LEA_CTOR.
00095 : DbiTableRow(from) { LEA_CTOR; *this = from; };
| Float_t CalDrift::CalibratedPH | ( | const Float_t | ph, | |
| const VldContext & | cxNow, | |||
| const VldContext & | cxRef | |||
| ) | const [virtual] |
Definition at line 66 of file CalDrift.cxx.
References VldContext::GetDetector(), GetMedianAsR1_18_2(), DbiResultPtr< T >::GetNumRows(), DbiResultPtr< T >::GetRow(), and Dbi::kTableMissing.
00069 { 00070 // This code shouldn't be used except for test puposes. 00071 // The MuonDriftCalScheme does a much better job. 00072 // Nathaniel, Feb/06 00073 00074 //set the task to 1=Dogwood 00075 //all previous constants where in the default task=0 00076 Dbi::Task task = 1; 00077 00078 DbiResultPtr<CalDrift> nowTable("CALDRIFT", 00079 cxNow, 00080 task, 00081 Dbi::kTableMissing, 00082 false); 00083 DbiResultPtr<CalDrift> t0Table("CALDRIFT", 00084 cxRef, 00085 task, 00086 Dbi::kTableMissing, 00087 false); 00088 00089 Double_t multipFactor = 1.0; 00090 if (nowTable.GetNumRows() && t0Table.GetNumRows()){ 00091 const CalDrift* nowRow = nowTable.GetRow(0); 00092 const CalDrift* t0Row = t0Table.GetRow(0); 00093 multipFactor = 00094 t0Row->GetMedianAsR1_18_2(cxRef.GetDetector()) 00095 /nowRow->GetMedianAsR1_18_2(cxRef.GetDetector()); 00096 // multipFactor = 00097 // t0Row->GetMeanAsR1_18_2(cxRef.GetDetector()) 00098 // /nowRow->GetMeanAsR1_18_2(cxRef.GetDetector()); 00099 // multipFactor = 00100 // t0Row->GetMean() 00101 // /nowRow->GetMean(); 00102 } 00103 00104 return (Float_t) ((Double_t) ph)*multipFactor; 00105 }
| Bool_t CalDrift::CanL2Cache | ( | ) | const [inline, virtual] |
| DbiTableRow * CalDrift::CreateTableRow | ( | ) | const [virtual] |
Implements DbiTableRow.
Definition at line 108 of file CalDrift.cxx.
00109 { 00110 return new CalDrift; 00111 }
| void CalDrift::Fill | ( | DbiResultSet & | rs, | |
| const DbiValidityRec * | ||||
| ) | [virtual] |
Implements DbiTableRow.
Definition at line 114 of file CalDrift.cxx.
References fbackMedian, fbackMedianErr, fdriftQuantity1, fdriftQuantity2, ffrontMedian, ffrontMedianErr, fmean, fmeanErr, fmedian, fmedianErr, fnonFidMedian, fnonFidMedianErr, fnumMuons, fnumPlanes, fquantile50, and frecoVersion.
00116 { 00117 // Purpose: Fill object from Result Set 00118 // 00119 // Arguments: 00120 // rs in Result Set used to fill object 00121 // vrec in Associated validity record (or 0 if filling 00122 // DbiValidityRec) 00123 // o Fill object from current row of Result Set. 00124 00125 //Only using the dumb method for now. 00126 00127 //WARNING******************************************* 00128 //There's a nasty, nasty hack to force a RecoVersion flag in. 00129 //Make sure the version number in the CalDrift constructor is set to 00130 //the one you want before filling the database. 00131 //I'll fix this at the next reprocessing. 00132 //But I should be the only person who has to use this method for now. 00133 00134 rs >> fbackMedian >> fbackMedianErr >> ffrontMedian 00135 >> ffrontMedianErr >> fnonFidMedian >> fnonFidMedianErr 00136 >> fnumMuons >> fnumPlanes >> fmean >> fmeanErr >> fmedian 00137 >> fmedianErr >> fquantile50 >> frecoVersion 00138 >> fdriftQuantity1 >> fdriftQuantity2; 00139 }
| virtual Float_t CalDrift::GetBackMedian | ( | ) | const [inline, virtual] |
| virtual Float_t CalDrift::GetBackMedianErr | ( | ) | const [inline, virtual] |
Definition at line 59 of file CalDrift.h.
References fbackMedianErr.
00059 { return fbackMedianErr; }
| virtual Float_t CalDrift::GetFrontMedian | ( | ) | const [inline, virtual] |
| virtual Float_t CalDrift::GetFrontMedianErr | ( | ) | const [inline, virtual] |
Definition at line 57 of file CalDrift.h.
References ffrontMedianErr.
00057 { return ffrontMedianErr; }
| UInt_t CalDrift::GetIndex | ( | UInt_t | ) | const [inline, virtual] |
| virtual Float_t CalDrift::GetMean | ( | ) | const [inline, virtual] |
| Float_t CalDrift::GetMeanAsR1_18_2 | ( | const Detector::Detector_t | det | ) | const [virtual] |
Definition at line 142 of file CalDrift.cxx.
References fmean, frecoVersion, Detector::kFar, and Detector::kNear.
00144 { 00145 Double_t recoFactor = 1.0; 00146 if (Detector::kNear == det){ 00147 if ("R1_18"==frecoVersion){ 00148 recoFactor = 1.00129; //R1_18_2 = r1_18Factor*R1_18; 00149 } 00150 if ("R1_18_2"==frecoVersion){ 00151 recoFactor = 1.0; 00152 } 00153 if ("R1_18_4"==frecoVersion){ 00154 recoFactor = 1.0; 00155 } 00156 if ("Cedar"==frecoVersion){ 00157 recoFactor = 0.9719; //R1_18_2 = cedarFactor*cedar; 00158 } 00159 if ("Dogwood"==frecoVersion || "Elm"==frecoVersion || 00160 "Fir"==frecoVersion || "Ginkgo"==frecoVersion ){ 00161 recoFactor = 0.972141; //R1_18_2 = dogwoodFactor*Dogwood; 00162 } 00163 00164 } 00165 if (Detector::kFar == det){ 00166 if ("R1_18"==frecoVersion){ 00167 recoFactor = 1.0; 00168 } 00169 if ("R1_18_2"==frecoVersion){ 00170 recoFactor = 1.0; 00171 } 00172 if ("R1_18_4"==frecoVersion){ 00173 recoFactor = 1.0; 00174 } 00175 if ("Cedar"==frecoVersion){ 00176 recoFactor = 0.92322; //R1_18_2 = cedarFactor*cedar; 00177 } 00178 if ("Dogwood"==frecoVersion || "Elm"==frecoVersion || 00179 "Fir"==frecoVersion || "Ginkgo"==frecoVersion ){ 00180 recoFactor = 1.01134; //R1_18_2 = dogwoodFactor*Dogwood; 00181 } 00182 } 00183 return fmean*recoFactor; 00184 }
| virtual Float_t CalDrift::GetMeanErr | ( | ) | const [inline, virtual] |
| virtual Float_t CalDrift::GetMedian | ( | ) | const [inline, virtual] |
| Float_t CalDrift::GetMedianAsR1_18_2 | ( | const Detector::Detector_t | det | ) | const [virtual] |
Definition at line 232 of file CalDrift.cxx.
References ffrontMedian, fmedian, frecoVersion, GetMedianRecoFactor(), and Detector::kNear.
Referenced by CalibratedPH(), and MuonDriftCalScheme::DoReset().
00234 { 00235 Float_t recoFactor=GetMedianRecoFactor(det); 00236 Float_t calc=fmedian; 00237 if(det==Detector::kNear) { 00238 if ("Dogwood"==frecoVersion || "Elm"==frecoVersion || 00239 "Fir"==frecoVersion || "Ginkgo"==frecoVersion ){ 00240 calc=ffrontMedian; 00241 } 00242 } 00243 return calc*recoFactor; 00244 00245 }
| virtual Float_t CalDrift::GetMedianErr | ( | ) | const [inline, virtual] |
| Float_t CalDrift::GetMedianErrAsR1_18_2 | ( | const Detector::Detector_t | det | ) | const [virtual] |
Definition at line 247 of file CalDrift.cxx.
References ffrontMedianErr, fmedianErr, frecoVersion, GetMedianRecoFactor(), and Detector::kNear.
Referenced by MuonDriftCalScheme::DoReset().
00249 { 00250 Float_t recoFactor=GetMedianRecoFactor(det); 00251 Float_t calc=fmedianErr; 00252 if(det==Detector::kNear) { 00253 if ("Dogwood"==frecoVersion || "Elm"==frecoVersion || 00254 "Fir"==frecoVersion || "Ginkgo"==frecoVersion ){ 00255 calc=ffrontMedianErr; 00256 } 00257 } 00258 return calc*recoFactor; 00259 }
| Float_t CalDrift::GetMedianRecoFactor | ( | const Detector::Detector_t | det | ) | const [virtual] |
Definition at line 187 of file CalDrift.cxx.
References frecoVersion, Detector::kFar, and Detector::kNear.
Referenced by GetMedianAsR1_18_2(), and GetMedianErrAsR1_18_2().
00189 { 00190 //factors to scale to R1_18_2 00191 00192 Double_t recoFactor = 1.0; 00193 if (Detector::kNear == det){ 00194 if ("R1_18"==frecoVersion){ 00195 recoFactor = 1.00129; //R1_18_2 = r1_18Factor*R1_18; 00196 } 00197 if ("R1_18_2"==frecoVersion){ 00198 recoFactor = 1.0; 00199 } 00200 if ("R1_18_4"==frecoVersion){ 00201 recoFactor = 1.0; 00202 } 00203 if ("Cedar"==frecoVersion){ 00204 recoFactor = 1.0007; //R1_18_2 = cedarFactor*cedar; 00205 } 00206 if ("Dogwood"==frecoVersion || "Elm"==frecoVersion || 00207 "Fir"==frecoVersion || "Ginkgo"==frecoVersion ){ 00208 recoFactor = 0.950574; //R1_18_2 = dogwoodFactor*Dogwood; 00209 } 00210 } 00211 if (Detector::kFar == det){ 00212 if ("R1_18"==frecoVersion){ 00213 recoFactor = 1.0; 00214 } 00215 if ("R1_18_2"==frecoVersion){ 00216 recoFactor = 1.0; 00217 } 00218 if ("R1_18_4"==frecoVersion){ 00219 recoFactor = 1.0; 00220 } 00221 if ("Cedar"==frecoVersion){ 00222 recoFactor = 0.96688; //R1_18_2 = cedarFactor*cedar; 00223 } 00224 if ("Dogwood"==frecoVersion || "Elm"==frecoVersion || 00225 "Fir"==frecoVersion || "Ginkgo"==frecoVersion ){ 00226 recoFactor = 0.964280; //R1_18_2 = dogwoodFactor*Dogwood; 00227 } 00228 } 00229 return recoFactor; 00230 }
| virtual Int_t CalDrift::GetNumMuons | ( | ) | const [inline, virtual] |
| virtual Int_t CalDrift::GetNumPlanes | ( | ) | const [inline, virtual] |
| virtual std::string CalDrift::GetRecoVersion | ( | ) | const [inline, virtual] |
Definition at line 66 of file CalDrift.h.
References frecoVersion.
Referenced by MuonDriftCalScheme::DoReset().
00066 {return frecoVersion;}
| virtual void CalDrift::SetBackMedian | ( | const Double_t | median | ) | [inline, virtual] |
| virtual void CalDrift::SetBackMedianErr | ( | const Double_t | medianErr | ) | [inline, virtual] |
Definition at line 35 of file CalDrift.h.
References fbackMedianErr.
00035 { fbackMedianErr = medianErr; }
| virtual void CalDrift::SetFrontMedian | ( | const Double_t | median | ) | [inline, virtual] |
| virtual void CalDrift::SetFrontMedianErr | ( | const Double_t | medianErr | ) | [inline, virtual] |
Definition at line 37 of file CalDrift.h.
References ffrontMedianErr.
00037 { ffrontMedianErr = medianErr; }
| virtual void CalDrift::SetMean | ( | const Double_t | mean | ) | [inline, virtual] |
| virtual void CalDrift::SetMeanErr | ( | const Double_t | meanErr | ) | [inline, virtual] |
| virtual void CalDrift::SetMedian | ( | const Double_t | median | ) | [inline, virtual] |
| virtual void CalDrift::SetMedianErr | ( | const Double_t | medianErr | ) | [inline, virtual] |
| virtual void CalDrift::SetNonFidMedian | ( | const Double_t | median | ) | [inline, virtual] |
Definition at line 38 of file CalDrift.h.
References fnonFidMedian.
00038 { fnonFidMedian = median; }
| virtual void CalDrift::SetNonFidMedianErr | ( | const Double_t | medianErr | ) | [inline, virtual] |
Definition at line 39 of file CalDrift.h.
References fnonFidMedianErr.
00039 { fnonFidMedianErr = medianErr; }
| virtual void CalDrift::SetNumMuons | ( | const Int_t | numMuons | ) | [inline, virtual] |
| virtual void CalDrift::SetNumPlanes | ( | const Int_t | numPlanes | ) | [inline, virtual] |
| virtual void CalDrift::SetPeak | ( | const Double_t | peak | ) | [inline, virtual] |
| virtual void CalDrift::SetPeakErr | ( | const Double_t | peakErr | ) | [inline, virtual] |
| virtual void CalDrift::SetQuantile50 | ( | const Double_t | quantile50 | ) | [inline, virtual] |
Definition at line 48 of file CalDrift.h.
References fquantile50.
00048 { fquantile50 = quantile50; }
| virtual void CalDrift::SetRecoVersion | ( | const std::string | recoVersion | ) | [inline, virtual] |
Definition at line 49 of file CalDrift.h.
References frecoVersion.
00049 { frecoVersion = recoVersion; }
| void CalDrift::Store | ( | DbiOutRowStream & | ors, | |
| const DbiValidityRec * | ||||
| ) | const [virtual] |
Reimplemented from DbiTableRow.
Definition at line 261 of file CalDrift.cxx.
References fbackMedian, fbackMedianErr, fdriftQuantity1, fdriftQuantity2, ffrontMedian, ffrontMedianErr, fmean, fmeanErr, fmedian, fmedianErr, fnonFidMedian, fnonFidMedianErr, fnumMuons, fnumPlanes, fquantile50, and frecoVersion.
00263 { 00264 // 00265 // Purpose: Stream object to output row stream 00266 // 00267 // Arguments: 00268 // ors in Output row stream. 00269 // vrec in Associated validity record (or 0 if filling 00270 00271 ors << fbackMedian << fbackMedianErr << ffrontMedian 00272 << ffrontMedianErr << fnonFidMedian << fnonFidMedianErr 00273 << fnumMuons << fnumPlanes << fmean << fmeanErr << fmedian 00274 << fmedianErr << fquantile50 << frecoVersion 00275 << fdriftQuantity1 << fdriftQuantity2; 00276 }
Double_t CalDrift::fbackMedian [private] |
Definition at line 74 of file CalDrift.h.
Referenced by CalDrift(), Fill(), GetBackMedian(), SetBackMedian(), and Store().
Double_t CalDrift::fbackMedianErr [private] |
Definition at line 75 of file CalDrift.h.
Referenced by CalDrift(), Fill(), GetBackMedianErr(), SetBackMedianErr(), and Store().
Double_t CalDrift::fdriftQuantity1 [private] |
Double_t CalDrift::fdriftQuantity2 [private] |
Double_t CalDrift::ffrontMedian [private] |
Definition at line 76 of file CalDrift.h.
Referenced by CalDrift(), Fill(), GetFrontMedian(), GetMedianAsR1_18_2(), SetFrontMedian(), and Store().
Double_t CalDrift::ffrontMedianErr [private] |
Definition at line 77 of file CalDrift.h.
Referenced by CalDrift(), Fill(), GetFrontMedianErr(), GetMedianErrAsR1_18_2(), SetFrontMedianErr(), and Store().
Double_t CalDrift::fmean [private] |
Definition at line 82 of file CalDrift.h.
Referenced by CalDrift(), Fill(), GetMean(), GetMeanAsR1_18_2(), SetMean(), and Store().
Double_t CalDrift::fmeanErr [private] |
Definition at line 83 of file CalDrift.h.
Referenced by CalDrift(), Fill(), GetMeanErr(), SetMeanErr(), and Store().
Double_t CalDrift::fmedian [private] |
Definition at line 84 of file CalDrift.h.
Referenced by CalDrift(), Fill(), GetMedian(), GetMedianAsR1_18_2(), SetMedian(), and Store().
Double_t CalDrift::fmedianErr [private] |
Definition at line 85 of file CalDrift.h.
Referenced by CalDrift(), Fill(), GetMedianErr(), GetMedianErrAsR1_18_2(), SetMedianErr(), and Store().
Double_t CalDrift::fnonFidMedian [private] |
Definition at line 78 of file CalDrift.h.
Referenced by CalDrift(), Fill(), SetNonFidMedian(), and Store().
Double_t CalDrift::fnonFidMedianErr [private] |
Definition at line 79 of file CalDrift.h.
Referenced by CalDrift(), Fill(), SetNonFidMedianErr(), and Store().
Int_t CalDrift::fnumMuons [private] |
Definition at line 80 of file CalDrift.h.
Referenced by CalDrift(), Fill(), GetNumMuons(), SetNumMuons(), and Store().
Int_t CalDrift::fnumPlanes [private] |
Definition at line 81 of file CalDrift.h.
Referenced by CalDrift(), Fill(), GetNumPlanes(), SetNumPlanes(), and Store().
Double_t CalDrift::fpeak [private] |
Double_t CalDrift::fpeakErr [private] |
Double_t CalDrift::fquantile50 [private] |
Definition at line 88 of file CalDrift.h.
Referenced by CalDrift(), Fill(), SetQuantile50(), and Store().
std::string CalDrift::frecoVersion [private] |
Definition at line 89 of file CalDrift.h.
Referenced by CalDrift(), Fill(), GetMeanAsR1_18_2(), GetMedianAsR1_18_2(), GetMedianErrAsR1_18_2(), GetMedianRecoFactor(), GetRecoVersion(), SetRecoVersion(), and Store().
1.4.7