#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 const 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 33 of file CalDrift.cxx. 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 }
|
|
|
Definition at line 58 of file CalDrift.cxx. 00059 {
00060 LEA_DTOR; // Leak detection macro.
00061 }
|
|
|
Definition at line 95 of file CalDrift.h. 00095 : DbiTableRow(from) { LEA_CTOR; *this = from; };
|
|
||||||||||||||||
|
Definition at line 66 of file CalDrift.cxx. References VldContext::GetDetector(), GetMedianAsR1_18_2(), DbiResultPtr< T >::GetNumRows(), and DbiResultPtr< T >::GetRow(). 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 }
|
|
|
Reimplemented from DbiTableRow. Definition at line 30 of file CalDrift.h. 00030 { return kTRUE; }
|
|
|
Implements DbiTableRow. Definition at line 108 of file CalDrift.cxx. 00109 {
00110 return new CalDrift;
00111 }
|
|
||||||||||||
|
Implements DbiTableRow. Definition at line 114 of file CalDrift.cxx. References fbackMedian, fbackMedianErr, fdriftQuantity1, 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 }
|
|
|
Definition at line 58 of file CalDrift.h. 00058 { return fbackMedian; }
|
|
|
Definition at line 59 of file CalDrift.h. 00059 { return fbackMedianErr; }
|
|
|
Definition at line 56 of file CalDrift.h. 00056 { return ffrontMedian; }
|
|
|
Definition at line 57 of file CalDrift.h. 00057 { return ffrontMedianErr; }
|
|
|
Reimplemented from DbiTableRow. Definition at line 31 of file CalDrift.h. 00031 { return 0; } // Not indexed.
|
|
|
Definition at line 52 of file CalDrift.h. 00052 { return fmean; }
|
|
|
Definition at line 142 of file CalDrift.cxx. References fmean. 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){
00160 recoFactor = 0.972141; //R1_18_2 = dogwoodFactor*Dogwood;
00161 }
00162
00163 }
00164 if (Detector::kFar == det){
00165 if ("R1_18"==frecoVersion){
00166 recoFactor = 1.0;
00167 }
00168 if ("R1_18_2"==frecoVersion){
00169 recoFactor = 1.0;
00170 }
00171 if ("R1_18_4"==frecoVersion){
00172 recoFactor = 1.0;
00173 }
00174 if ("Cedar"==frecoVersion){
00175 recoFactor = 0.92322; //R1_18_2 = cedarFactor*cedar;
00176 }
00177 if ("Dogwood"==frecoVersion){
00178 recoFactor = 1.01134; //R1_18_2 = dogwoodFactor*Dogwood;
00179 }
00180 }
00181 return fmean*recoFactor;
00182 }
|
|
|
Definition at line 54 of file CalDrift.h. 00054 {return fmeanErr;}
|
|
|
Definition at line 55 of file CalDrift.h. 00055 { return fmedian; }
|
|
|
Definition at line 228 of file CalDrift.cxx. References det, frecoVersion, and GetMedianRecoFactor(). Referenced by CalibratedPH(), and MuonDriftCalScheme::DoReset(). 00230 {
00231 Float_t recoFactor=GetMedianRecoFactor(det);
00232 Float_t calc=fmedian;
00233 if("Dogwood"==frecoVersion && det==Detector::kNear)
00234 calc=ffrontMedian;
00235 return calc*recoFactor;
00236
00237 }
|
|
|
Definition at line 63 of file CalDrift.h. 00063 { return fmedianErr; }
|
|
|
Definition at line 239 of file CalDrift.cxx. References det, frecoVersion, and GetMedianRecoFactor(). Referenced by MuonDriftCalScheme::DoReset(). 00241 {
00242 Float_t recoFactor=GetMedianRecoFactor(det);
00243 Float_t calc=fmedianErr;
00244 if("Dogwood"==frecoVersion && det==Detector::kNear)
00245 calc=ffrontMedianErr;
00246 return calc*recoFactor;
00247 }
|
|
|
Definition at line 185 of file CalDrift.cxx. Referenced by GetMedianAsR1_18_2(), and GetMedianErrAsR1_18_2(). 00187 {
00188 //factors to scale to R1_18_2
00189
00190 Double_t recoFactor = 1.0;
00191 if (Detector::kNear == det){
00192 if ("R1_18"==frecoVersion){
00193 recoFactor = 1.00129; //R1_18_2 = r1_18Factor*R1_18;
00194 }
00195 if ("R1_18_2"==frecoVersion){
00196 recoFactor = 1.0;
00197 }
00198 if ("R1_18_4"==frecoVersion){
00199 recoFactor = 1.0;
00200 }
00201 if ("Cedar"==frecoVersion){
00202 recoFactor = 1.0007; //R1_18_2 = cedarFactor*cedar;
00203 }
00204 if ("Dogwood"==frecoVersion){
00205 recoFactor = 0.950574; //R1_18_2 = dogwoodFactor*Dogwood;
00206 }
00207 }
00208 if (Detector::kFar == det){
00209 if ("R1_18"==frecoVersion){
00210 recoFactor = 1.0;
00211 }
00212 if ("R1_18_2"==frecoVersion){
00213 recoFactor = 1.0;
00214 }
00215 if ("R1_18_4"==frecoVersion){
00216 recoFactor = 1.0;
00217 }
00218 if ("Cedar"==frecoVersion){
00219 recoFactor = 0.96688; //R1_18_2 = cedarFactor*cedar;
00220 }
00221 if ("Dogwood"==frecoVersion){
00222 recoFactor = 0.964280; //R1_18_2 = dogwoodFactor*Dogwood;
00223 }
00224 }
00225 return recoFactor;
00226 }
|
|
|
Definition at line 64 of file CalDrift.h. 00064 { return fnumMuons;}
|
|
|
Definition at line 65 of file CalDrift.h. 00065 { return fnumPlanes;}
|
|
|
Definition at line 66 of file CalDrift.h. Referenced by MuonDriftCalScheme::DoReset(). 00066 {return frecoVersion;}
|
|
|
Definition at line 34 of file CalDrift.h. References fbackMedian. 00034 { fbackMedian = median; }
|
|
|
Definition at line 35 of file CalDrift.h. References fbackMedianErr. 00035 { fbackMedianErr = medianErr; }
|
|
|
Definition at line 36 of file CalDrift.h. References ffrontMedian. 00036 { ffrontMedian=median; }
|
|
|
Definition at line 37 of file CalDrift.h. References ffrontMedianErr. 00037 { ffrontMedianErr = medianErr; }
|
|
|
Definition at line 42 of file CalDrift.h. References fmean. 00042 { fmean = mean; }
|
|
|
Definition at line 43 of file CalDrift.h. References fmeanErr. 00043 { fmeanErr = meanErr; }
|
|
|
Definition at line 44 of file CalDrift.h. References fmedian. 00044 { fmedian = median; }
|
|
|
Definition at line 45 of file CalDrift.h. References fmedianErr. 00045 { fmedianErr = medianErr; }
|
|
|
Definition at line 38 of file CalDrift.h. References fnonFidMedian. 00038 { fnonFidMedian = median; }
|
|
|
Definition at line 39 of file CalDrift.h. References fnonFidMedianErr. 00039 { fnonFidMedianErr = medianErr; }
|
|
|
Definition at line 40 of file CalDrift.h. References fnumMuons. 00040 { fnumMuons = numMuons; }
|
|
|
Definition at line 41 of file CalDrift.h. References fnumPlanes. 00041 { fnumPlanes = numPlanes; }
|
|
|
Definition at line 46 of file CalDrift.h. References fpeak. 00046 { fpeak = peak; }
|
|
|
Definition at line 47 of file CalDrift.h. References fpeakErr. 00047 { fpeakErr = peakErr; }
|
|
|
Definition at line 48 of file CalDrift.h. References fquantile50. 00048 { fquantile50 = quantile50; }
|
|
|
Definition at line 49 of file CalDrift.h. References frecoVersion. 00049 { frecoVersion = recoVersion; }
|
|
||||||||||||
|
Reimplemented from DbiTableRow. Definition at line 249 of file CalDrift.cxx. References fbackMedian, fbackMedianErr, fdriftQuantity1, ffrontMedian, ffrontMedianErr, fmean, fmeanErr, fmedian, fmedianErr, fnonFidMedian, fnonFidMedianErr, fnumMuons, fnumPlanes, fquantile50, and frecoVersion. 00251 {
00252 //
00253 // Purpose: Stream object to output row stream
00254 //
00255 // Arguments:
00256 // ors in Output row stream.
00257 // vrec in Associated validity record (or 0 if filling
00258
00259 ors << fbackMedian << fbackMedianErr << ffrontMedian
00260 << ffrontMedianErr << fnonFidMedian << fnonFidMedianErr
00261 << fnumMuons << fnumPlanes << fmean << fmeanErr << fmedian
00262 << fmedianErr << fquantile50 << frecoVersion
00263 << fdriftQuantity1 << fdriftQuantity2;
00264 }
|
|
|
Definition at line 74 of file CalDrift.h. Referenced by Fill(), SetBackMedian(), and Store(). |
|
|
Definition at line 75 of file CalDrift.h. Referenced by Fill(), SetBackMedianErr(), and Store(). |
|
|
Definition at line 90 of file CalDrift.h. |
|
|
Definition at line 91 of file CalDrift.h. |
|
|
Definition at line 76 of file CalDrift.h. Referenced by Fill(), SetFrontMedian(), and Store(). |
|
|
Definition at line 77 of file CalDrift.h. Referenced by Fill(), SetFrontMedianErr(), and Store(). |
|
|
Definition at line 82 of file CalDrift.h. Referenced by Fill(), GetMeanAsR1_18_2(), SetMean(), and Store(). |
|
|
Definition at line 83 of file CalDrift.h. Referenced by Fill(), SetMeanErr(), and Store(). |
|
|
Definition at line 84 of file CalDrift.h. Referenced by Fill(), SetMedian(), and Store(). |
|
|
Definition at line 85 of file CalDrift.h. Referenced by Fill(), SetMedianErr(), and Store(). |
|
|
Definition at line 78 of file CalDrift.h. Referenced by Fill(), SetNonFidMedian(), and Store(). |
|
|
Definition at line 79 of file CalDrift.h. Referenced by Fill(), SetNonFidMedianErr(), and Store(). |
|
|
Definition at line 80 of file CalDrift.h. Referenced by Fill(), SetNumMuons(), and Store(). |
|
|
Definition at line 81 of file CalDrift.h. Referenced by Fill(), SetNumPlanes(), and Store(). |
|
|
Definition at line 86 of file CalDrift.h. Referenced by SetPeak(). |
|
|
Definition at line 87 of file CalDrift.h. Referenced by SetPeakErr(). |
|
|
Definition at line 88 of file CalDrift.h. Referenced by Fill(), SetQuantile50(), and Store(). |
|
|
Definition at line 89 of file CalDrift.h. Referenced by Fill(), GetMedianAsR1_18_2(), GetMedianErrAsR1_18_2(), SetRecoVersion(), and Store(). |
1.3.9.1