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

Public Member Functions | |
| PulserPinScale () | |
| virtual | ~PulserPinScale () |
| PulserPinScale (PulserGainPin &high, PulserGainPin &low, int aggNo) | |
| PulserPinScale (float high, float low, int aggNo) | |
| UInt_t | GetIndex (UInt_t) const |
| Int_t | GetAggregateNo () const |
| Float_t | GetHighGainScale () const |
| Float_t | GetLowGainScale () const |
| Float_t | ScalePins (Float_t high, Float_t low) const |
| virtual DbiTableRow * | CreateTableRow () const |
| virtual void | Fill (DbiResultSet &rs, const DbiValidityRec *vrec) |
| virtual void | Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const |
Private Attributes | |
| Int_t | fAggregateNo |
| Float_t | fHighGainScale |
| Float_t | fLowGainScale |
|
|
Definition at line 46 of file PulserPinScale.cxx. 00046 {}
|
|
|
Definition at line 47 of file PulserPinScale.cxx. 00047 {}
|
|
||||||||||||||||
|
Definition at line 49 of file PulserPinScale.cxx. References fAggregateNo, fHighGainScale, fLowGainScale, Munits::g, PulserGainPin::GetError(), PulserGainPin::GetMean(), PulserGainPin::GetNumPoints(), and MSG. 00051 {
00052 fAggregateNo = aggNo;
00053 // Do fit here
00054 assert(high.GetNumPoints()==low.GetNumPoints());
00055 const Float_t *x_high=high.GetMean();
00056 const Float_t *ex_high=high.GetError();
00057 const Float_t *y_low = low.GetMean();
00058 const Float_t *ey_low = low.GetError();
00059
00060 TGraphErrors g(high.GetNumPoints(),x_high,y_low,ex_high,ey_low);
00061 float xmin=300;
00062 float xmax = 8000;
00063
00064 for (int i=0;i<high.GetNumPoints();i++) {
00065 if (y_low[i] < 300 && x_high[i]>300) xmin =x_high[i]+1;
00066 if (y_low[i] > 8000 && x_high[i] < 8000) {
00067 xmax = x_high[i]-1;
00068 break;
00069 }
00070 }
00071
00072 TF1 f("line","[0]*x",xmin,xmax);
00073 g.Fit("line","QR");
00074 MSG("Pulser",Msg::kDebug)<<"Aggregate "<<aggNo<<" fit slope "<<f.GetParameter(0)<<endl;
00075
00076 fHighGainScale = 1;
00077 fLowGainScale = 1.0/f.GetParameter(0);
00078
00079 }
|
|
||||||||||||||||
|
Definition at line 82 of file PulserPinScale.cxx. References fAggregateNo, fHighGainScale, and fLowGainScale. 00083 {
00084 fHighGainScale = high;
00085 fLowGainScale = low;
00086 fAggregateNo = aggNo;
00087 }
|
|
|
Implements DbiTableRow. Definition at line 45 of file PulserPinScale.h. 00045 { return new PulserPinScale;}
|
|
||||||||||||
|
Implements DbiTableRow. Definition at line 89 of file PulserPinScale.cxx. References fAggregateNo, and fHighGainScale. 00091 {
00092 rs >> fAggregateNo >> fHighGainScale >> fLowGainScale;
00093
00094 }
|
|
|
Reimplemented from DbiTableRow. Definition at line 40 of file PulserPinScale.h. Referenced by PulserDriftCalScheme::GetDriftFar(), and PulserDriftCalScheme::GetDriftPoint(). 00040 { return fAggregateNo; }
|
|
|
Definition at line 41 of file PulserPinScale.h. 00041 {return fHighGainScale;}
|
|
|
Reimplemented from DbiTableRow. Definition at line 39 of file PulserPinScale.h. 00039 {return fAggregateNo;}
|
|
|
Definition at line 42 of file PulserPinScale.h. 00042 {return fLowGainScale;}
|
|
||||||||||||
|
Definition at line 105 of file PulserPinScale.cxx. References fHighGainScale, and fLowGainScale. Referenced by PulserDriftCalScheme::GetDriftFar(), and PulserDriftCalScheme::GetDriftPoint(). 00106 {
00107 if (fHighGainScale<=0||high<0) {
00108 return fLowGainScale*low;
00109 }
00110 if (fLowGainScale<=0||low<0) {
00111 return fHighGainScale*high;
00112 }
00113 if (high>8000) {
00114 return fLowGainScale*low;
00115 }
00116 if (low<500 || low > 8000) {
00117 return fHighGainScale*high;
00118 }
00119 if (high< 500) {
00120 return fLowGainScale*low;
00121 }
00122 return 0.5*(fLowGainScale*low + fHighGainScale*high);
00123
00124 }
|
|
||||||||||||
|
Reimplemented from DbiTableRow. Definition at line 96 of file PulserPinScale.cxx. References fAggregateNo, and fHighGainScale. 00098 {
00099 ors << fAggregateNo
00100 << fHighGainScale
00101 << fLowGainScale;
00102 }
|
|
|
Definition at line 54 of file PulserPinScale.h. Referenced by Fill(), PulserPinScale(), and Store(). |
|
|
Definition at line 55 of file PulserPinScale.h. Referenced by Fill(), PulserPinScale(), ScalePins(), and Store(). |
|
|
Definition at line 56 of file PulserPinScale.h. Referenced by PulserPinScale(), and ScalePins(). |
1.3.9.1