CalPulserFits Class Reference

#include <CalPulserFits.h>

Inheritance diagram for CalPulserFits:
DbiTableRow

List of all members.

Public Member Functions

 CalPulserFits ()
virtual ~CalPulserFits ()
 CalPulserFits (Int_t aggNo, Int_t seid, Int_t npfit, Double_t slope, Double_t slopeerr, Double_t xoffset, Double_t chisq)
 CalPulserFits (Int_t aggNo, Int_t seid, Int_t ftype, TF1 *fit, Double_t meanres, Double_t maxres, Double_t adcmax)
void SetAggregateNo (Int_t aggno)
void SetStripEnd (Int_t seid)
void SetFitType (Int_t ftype)
void SetNPFit (Int_t numpoints)
void SetSlope (Double_t slope)
void SetSlopeErr (Double_t err)
void SetXOffset (Double_t off)
void SetPar1 (Double_t par)
void SetPar2 (Double_t par)
void SetPar3 (Double_t par)
void SetPar4 (Double_t par)
void SetChisq (Double_t chisq)
void SetMeanRes (Double_t res)
void SetMaxRes (Double_t res)
void SetAdcMax (Double_t adcmax)
void SetXtra1 (Double_t xtra)
void SetXtra2 (Double_t xtra)
UInt_t GetIndex (UInt_t) const
Int_t GetAggregateNo () const
Int_t GetStripEnd () const
Int_t GetFitType () const
Int_t GetNPFit () const
Double_t GetSlope () const
Double_t GetSlopeErr () const
Double_t GetXOffset () const
Double_t GetPar1 () const
Double_t GetPar2 () const
Double_t GetPar3 () const
Double_t GetPar4 () const
Double_t GetChisq () const
Double_t GetMeanRes () const
Double_t GetMaxRes () const
Double_t GetAdcMax () const
Double_t GetXtra1 () const
Double_t GetXtra2 () const
virtual DbiTableRowCreateTableRow () const
virtual void Fill (DbiResultSet &rs, const DbiValidityRec *vrec)
virtual void Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const

Private Attributes

Int_t fAggregateNo
Int_t fStripEnd
Int_t fFitType
Int_t fNPFit
Double_t fSlope
Double_t fSlopeErr
Double_t fXOffset
Double_t fPar1
Double_t fPar2
Double_t fPar3
Double_t fPar4
Double_t fChisq
Double_t fMeanRes
Double_t fMaxRes
Double_t fAdcMax
Double_t fXtra1
Double_t fXtra2

Detailed Description

Definition at line 24 of file CalPulserFits.h.


Constructor & Destructor Documentation

CalPulserFits::CalPulserFits (  ) 

Definition at line 40 of file CalPulserFits.cxx.

00040 {}

CalPulserFits::~CalPulserFits (  )  [virtual]

Definition at line 41 of file CalPulserFits.cxx.

00041 {}

CalPulserFits::CalPulserFits ( Int_t  aggNo,
Int_t  seid,
Int_t  npfit,
Double_t  slope,
Double_t  slopeerr,
Double_t  xoffset,
Double_t  chisq 
)

Definition at line 44 of file CalPulserFits.cxx.

References fAdcMax, fFitType, fMaxRes, fMeanRes, fPar1, fPar2, fPar3, fPar4, fXtra1, and fXtra2.

00044                                                                                                                                       : 
00045   fAggregateNo(aggNo),
00046   fStripEnd(seid),
00047   fNPFit(npfit),
00048   fSlope(slope),
00049   fSlopeErr(slopeerr), 
00050   fXOffset(xoffset),
00051   fChisq(chisq) 
00052 
00053 {
00054   // Zero variables not used with this constructor
00055   fFitType = 0;
00056   fPar1 = 0;
00057   fPar2 = 0;
00058   fPar3 = 0;
00059   fPar4 = 0;
00060   fMeanRes = 0;
00061   fMaxRes = 0;
00062   fAdcMax = 0;
00063   fXtra1 = 0;
00064   fXtra2 = 0;
00065 }

CalPulserFits::CalPulserFits ( Int_t  aggNo,
Int_t  seid,
Int_t  ftype,
TF1 *  fit,
Double_t  meanres,
Double_t  maxres,
Double_t  adcmax 
)

Definition at line 68 of file CalPulserFits.cxx.

References fChisq, fNPFit, fPar1, fPar2, fPar3, fPar4, fSlope, fSlopeErr, fXOffset, fXtra1, and fXtra2.

00068                                                                                                                                : 
00069   fAggregateNo(aggNo),
00070   fStripEnd(seid),
00071   fFitType(ftype), 
00072   fMeanRes(meanres), 
00073   fMaxRes(maxres),
00074   fAdcMax(adcmax)
00075 
00076 {
00077   // No fit
00078   if(ftype < -25 || fit == 0) {
00079     fNPFit = 0;
00080     fSlope = 0;
00081     fSlopeErr = 0;
00082     fXOffset = 0;
00083     fPar1 = 0;
00084     fPar2 = 0;
00085     fPar3 = 0;
00086     fPar4 = 0;
00087     fChisq = 0;
00088   }
00089 
00090   // Line fit only
00091   if(abs(ftype) == 1) {
00092     fNPFit = fit->GetNumberFitPoints();
00093     fSlope = fit->GetParameter(0);
00094     fSlopeErr = fit->GetParError(0);
00095     fXOffset = fit->GetParameter(1);
00096     fPar1 = 0;
00097     fPar2 = 0;
00098     fPar3 = 0;
00099     fPar4 = 0;
00100     fChisq = fit->GetChisquare();
00101   }
00102 
00103   if(abs(ftype) == 5 || abs(ftype) == 25) {
00104     fNPFit = fit->GetNumberFitPoints();
00105     fSlope = fit->GetParameter(7);
00106     fSlopeErr = fit->GetParError(7);
00107     if(fSlope != 0) {
00108       fSlope = 1/fSlope;
00109       fSlopeErr = fSlope*fSlope*fSlopeErr;
00110     }
00111     fXOffset = fit->GetParameter(6);
00112     fPar1 = fit->GetParameter(1);
00113     fPar2 = fit->GetParameter(2);
00114     if(abs(ftype) == 25) {
00115       fPar3 = fit->GetParameter(3);
00116       fPar4 = fit->GetParameter(4);
00117     }
00118     else {
00119       fPar3 = 0;
00120       fPar4 = 0;
00121     }
00122     fChisq = fit->GetChisquare();
00123   }
00124 
00125   fXtra1 = 0;
00126   fXtra2 = 0;
00127 }


Member Function Documentation

virtual DbiTableRow* CalPulserFits::CreateTableRow (  )  const [inline, virtual]

Implements DbiTableRow.

Definition at line 73 of file CalPulserFits.h.

00073 { return new CalPulserFits;}

void CalPulserFits::Fill ( DbiResultSet rs,
const DbiValidityRec vrec 
) [virtual]

Implements DbiTableRow.

Definition at line 129 of file CalPulserFits.cxx.

References fAdcMax, fAggregateNo, fChisq, fFitType, fMaxRes, fMeanRes, fNPFit, fPar1, fPar2, fPar3, fPar4, fSlope, fSlopeErr, fStripEnd, fXOffset, fXtra1, and fXtra2.

00131 {
00132   rs >> fAggregateNo 
00133      >> fStripEnd 
00134      >> fFitType
00135      >> fNPFit
00136      >> fSlope 
00137      >> fSlopeErr 
00138      >> fXOffset 
00139      >> fPar1
00140      >> fPar2
00141      >> fPar3
00142      >> fPar4
00143      >> fChisq
00144      >> fMeanRes
00145      >> fMaxRes
00146      >> fAdcMax
00147      >> fXtra1 
00148      >> fXtra2;
00149 
00150 } 

Double_t CalPulserFits::GetAdcMax (  )  const [inline]
Int_t CalPulserFits::GetAggregateNo (  )  const [inline, virtual]

Reimplemented from DbiTableRow.

Definition at line 55 of file CalPulserFits.h.

References fAggregateNo.

Referenced by PulserDriftCalScheme::GetDriftFar(), and PulserDriftCalScheme::GetDriftPoint().

00055 { return fAggregateNo; }

Double_t CalPulserFits::GetChisq (  )  const [inline]
Int_t CalPulserFits::GetFitType (  )  const [inline]
UInt_t CalPulserFits::GetIndex ( UInt_t   )  const [inline, virtual]

Reimplemented from DbiTableRow.

Definition at line 54 of file CalPulserFits.h.

References fStripEnd.

00054 {return fStripEnd;}

Double_t CalPulserFits::GetMaxRes (  )  const [inline]

Definition at line 68 of file CalPulserFits.h.

References fMaxRes.

00068 {return fMaxRes;}

Double_t CalPulserFits::GetMeanRes (  )  const [inline]
Int_t CalPulserFits::GetNPFit (  )  const [inline]

Definition at line 58 of file CalPulserFits.h.

References fNPFit.

Referenced by PulserLinearityCalScheme::FitIsOK(), and PulserDriftCalScheme::FitIsOK().

00058 {return fNPFit;}

Double_t CalPulserFits::GetPar1 (  )  const [inline]
Double_t CalPulserFits::GetPar2 (  )  const [inline]
Double_t CalPulserFits::GetPar3 (  )  const [inline]

Definition at line 64 of file CalPulserFits.h.

References fPar3.

Referenced by PulserLinearityCalScheme::GetCorrected().

00064 {return fPar3;}

Double_t CalPulserFits::GetPar4 (  )  const [inline]

Definition at line 65 of file CalPulserFits.h.

References fPar4.

Referenced by PulserLinearityCalScheme::GetCorrected().

00065 {return fPar4;}

Double_t CalPulserFits::GetSlope (  )  const [inline]
Double_t CalPulserFits::GetSlopeErr (  )  const [inline]
Int_t CalPulserFits::GetStripEnd (  )  const [inline]

Definition at line 56 of file CalPulserFits.h.

References fStripEnd.

00056 { return fStripEnd; }

Double_t CalPulserFits::GetXOffset (  )  const [inline]
Double_t CalPulserFits::GetXtra1 (  )  const [inline]

Definition at line 70 of file CalPulserFits.h.

References fXtra1.

00070 {return fXtra1;}

Double_t CalPulserFits::GetXtra2 (  )  const [inline]

Definition at line 71 of file CalPulserFits.h.

References fXtra2.

00071 {return fXtra2;}

void CalPulserFits::SetAdcMax ( Double_t  adcmax  )  [inline]

Definition at line 50 of file CalPulserFits.h.

References fAdcMax.

Referenced by FitNdNonlinQuad().

00050 {fAdcMax = adcmax;}

void CalPulserFits::SetAggregateNo ( Int_t  aggno  )  [inline]

Definition at line 36 of file CalPulserFits.h.

References fAggregateNo.

00036 {fAggregateNo = aggno;}

void CalPulserFits::SetChisq ( Double_t  chisq  )  [inline]

Definition at line 47 of file CalPulserFits.h.

References fChisq.

Referenced by FitNdNonlinQuad().

00047 {fChisq = chisq;}

void CalPulserFits::SetFitType ( Int_t  ftype  )  [inline]

Definition at line 38 of file CalPulserFits.h.

References fFitType.

Referenced by FitNdNonlinQuad().

00038 {fFitType = ftype;}

void CalPulserFits::SetMaxRes ( Double_t  res  )  [inline]

Definition at line 49 of file CalPulserFits.h.

References fMaxRes.

Referenced by FitNdNonlinQuad().

00049 {fMaxRes = res;}

void CalPulserFits::SetMeanRes ( Double_t  res  )  [inline]

Definition at line 48 of file CalPulserFits.h.

References fMeanRes.

Referenced by FitNdNonlinQuad().

00048 {fMeanRes = res;}

void CalPulserFits::SetNPFit ( Int_t  numpoints  )  [inline]

Definition at line 39 of file CalPulserFits.h.

References fNPFit.

Referenced by FitNdNonlinQuad().

00039 {fNPFit = numpoints;}

void CalPulserFits::SetPar1 ( Double_t  par  )  [inline]

Definition at line 43 of file CalPulserFits.h.

References fPar1.

Referenced by FitNdNonlinQuad().

00043 {fPar1 = par;}

void CalPulserFits::SetPar2 ( Double_t  par  )  [inline]

Definition at line 44 of file CalPulserFits.h.

References fPar2.

Referenced by FitNdNonlinQuad().

00044 {fPar2 = par;}

void CalPulserFits::SetPar3 ( Double_t  par  )  [inline]

Definition at line 45 of file CalPulserFits.h.

References fPar3.

00045 {fPar3 = par;}

void CalPulserFits::SetPar4 ( Double_t  par  )  [inline]

Definition at line 46 of file CalPulserFits.h.

References fPar4.

00046 {fPar4 = par;}

void CalPulserFits::SetSlope ( Double_t  slope  )  [inline]

Definition at line 40 of file CalPulserFits.h.

References fSlope.

Referenced by FitNdNonlinQuad().

00040 {fSlope = slope;}

void CalPulserFits::SetSlopeErr ( Double_t  err  )  [inline]

Definition at line 41 of file CalPulserFits.h.

References fSlopeErr.

Referenced by FitNdNonlinQuad().

00041 {fSlopeErr = err;}

void CalPulserFits::SetStripEnd ( Int_t  seid  )  [inline]

Definition at line 37 of file CalPulserFits.h.

References fStripEnd.

00037 {fStripEnd = seid;}

void CalPulserFits::SetXOffset ( Double_t  off  )  [inline]

Definition at line 42 of file CalPulserFits.h.

References fXOffset.

Referenced by FitNdNonlinQuad().

00042 {fXOffset = off;}

void CalPulserFits::SetXtra1 ( Double_t  xtra  )  [inline]

Definition at line 51 of file CalPulserFits.h.

References fXtra1.

00051 {fXtra1 = xtra;}

void CalPulserFits::SetXtra2 ( Double_t  xtra  )  [inline]

Definition at line 52 of file CalPulserFits.h.

References fXtra2.

00052 {fXtra2 = xtra;}

void CalPulserFits::Store ( DbiOutRowStream ors,
const DbiValidityRec vrec 
) const [virtual]

Reimplemented from DbiTableRow.

Definition at line 152 of file CalPulserFits.cxx.

References fAdcMax, fAggregateNo, fChisq, fFitType, fMaxRes, fMeanRes, fNPFit, fPar1, fPar2, fPar3, fPar4, fSlope, fSlopeErr, fStripEnd, fXOffset, fXtra1, and fXtra2.

00154 {
00155     ors << fAggregateNo 
00156         << fStripEnd
00157         << fFitType
00158         << fNPFit
00159         << fSlope  
00160         << fSlopeErr 
00161         << fXOffset 
00162         << fPar1
00163         << fPar2
00164         << fPar3
00165         << fPar4
00166         << fChisq
00167         << fMeanRes
00168         << fMaxRes
00169         << fAdcMax
00170         << fXtra1 
00171         << fXtra2;
00172 }


Member Data Documentation

Double_t CalPulserFits::fAdcMax [private]

Definition at line 96 of file CalPulserFits.h.

Referenced by CalPulserFits(), Fill(), GetAdcMax(), SetAdcMax(), and Store().

Int_t CalPulserFits::fAggregateNo [private]

Definition at line 82 of file CalPulserFits.h.

Referenced by Fill(), GetAggregateNo(), SetAggregateNo(), and Store().

Double_t CalPulserFits::fChisq [private]

Definition at line 93 of file CalPulserFits.h.

Referenced by CalPulserFits(), Fill(), GetChisq(), SetChisq(), and Store().

Int_t CalPulserFits::fFitType [private]

Definition at line 84 of file CalPulserFits.h.

Referenced by CalPulserFits(), Fill(), GetFitType(), SetFitType(), and Store().

Double_t CalPulserFits::fMaxRes [private]

Definition at line 95 of file CalPulserFits.h.

Referenced by CalPulserFits(), Fill(), GetMaxRes(), SetMaxRes(), and Store().

Double_t CalPulserFits::fMeanRes [private]

Definition at line 94 of file CalPulserFits.h.

Referenced by CalPulserFits(), Fill(), GetMeanRes(), SetMeanRes(), and Store().

Int_t CalPulserFits::fNPFit [private]

Definition at line 85 of file CalPulserFits.h.

Referenced by CalPulserFits(), Fill(), GetNPFit(), SetNPFit(), and Store().

Double_t CalPulserFits::fPar1 [private]

Definition at line 89 of file CalPulserFits.h.

Referenced by CalPulserFits(), Fill(), GetPar1(), SetPar1(), and Store().

Double_t CalPulserFits::fPar2 [private]

Definition at line 90 of file CalPulserFits.h.

Referenced by CalPulserFits(), Fill(), GetPar2(), SetPar2(), and Store().

Double_t CalPulserFits::fPar3 [private]

Definition at line 91 of file CalPulserFits.h.

Referenced by CalPulserFits(), Fill(), GetPar3(), SetPar3(), and Store().

Double_t CalPulserFits::fPar4 [private]

Definition at line 92 of file CalPulserFits.h.

Referenced by CalPulserFits(), Fill(), GetPar4(), SetPar4(), and Store().

Double_t CalPulserFits::fSlope [private]

Definition at line 86 of file CalPulserFits.h.

Referenced by CalPulserFits(), Fill(), GetSlope(), SetSlope(), and Store().

Double_t CalPulserFits::fSlopeErr [private]

Definition at line 87 of file CalPulserFits.h.

Referenced by CalPulserFits(), Fill(), GetSlopeErr(), SetSlopeErr(), and Store().

Int_t CalPulserFits::fStripEnd [private]

Definition at line 83 of file CalPulserFits.h.

Referenced by Fill(), GetIndex(), GetStripEnd(), SetStripEnd(), and Store().

Double_t CalPulserFits::fXOffset [private]

Definition at line 88 of file CalPulserFits.h.

Referenced by CalPulserFits(), Fill(), GetXOffset(), SetXOffset(), and Store().

Double_t CalPulserFits::fXtra1 [private]

Definition at line 97 of file CalPulserFits.h.

Referenced by CalPulserFits(), Fill(), GetXtra1(), SetXtra1(), and Store().

Double_t CalPulserFits::fXtra2 [private]

Definition at line 98 of file CalPulserFits.h.

Referenced by CalPulserFits(), Fill(), GetXtra2(), SetXtra2(), and Store().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1