CalMapperFits Class Reference

#include <CalMapperFits.h>

Inheritance diagram for CalMapperFits:
DbiTableRow

List of all members.

Public Member Functions

 CalMapperFits ()
 CalMapperFits (Int_t sk, Int_t s, Int_t t, Int_t strip, Int_t end, Float_t chi, Int_t n, Float_t c1, Float_t c1e, Float_t l1, Float_t l1e, Float_t c2, Float_t c2e, Float_t l2, Float_t l2e)
virtual ~CalMapperFits ()
Bool_t CanL2Cache () const
UInt_t GetIndex (UInt_t) const
UInt_t GetSEIDkey () const
UInt_t GetStripEndId () const
Int_t GetTestID () const
Int_t GetStripNum () const
Int_t GetStripEnd () const
Float_t GetNorm () const
Int_t GetNPoints () const
Float_t GetC1 () const
Float_t GetC1Err () const
Float_t GetC2 () const
Float_t GetC2Err () const
Float_t GetLambda1 () const
Float_t GetLambda1Err () const
Float_t GetLambda2 () const
Float_t GetLambda2Err () const
virtual DbiTableRowCreateTableRow () const
virtual void Fill (DbiResultSet &rs, const DbiValidityRec *vrec)
virtual void Store (DbiOutRowStream &ors, const DbiValidityRec *vrec) const
Float_t AttenCorrected (const Float_t rawcharge, const Float_t Y) const

Private Member Functions

 CalMapperFits (const CalMapperFits &from)

Private Attributes

Int_t fSEIDkey
Int_t fStripEndId
Int_t fTestID
Int_t fStripNum
Int_t fStripEnd
Float_t fNorm
Int_t fNPoints
Float_t fC1
Float_t fC1Err
Float_t fLambda1
Float_t fLambda1Err
Float_t fC2
Float_t fC2Err
Float_t fLambda2
Float_t fLambda2Err

Detailed Description

Definition at line 14 of file CalMapperFits.h.


Constructor & Destructor Documentation

CalMapperFits::CalMapperFits (  )  [inline]

Definition at line 20 of file CalMapperFits.h.

References LEA_CTOR.

00020 { LEA_CTOR; }

CalMapperFits::CalMapperFits ( Int_t  sk,
Int_t  s,
Int_t  t,
Int_t  strip,
Int_t  end,
Float_t  chi,
Int_t  n,
Float_t  c1,
Float_t  c1e,
Float_t  l1,
Float_t  l1e,
Float_t  c2,
Float_t  c2e,
Float_t  l2,
Float_t  l2e 
) [inline]

Definition at line 22 of file CalMapperFits.h.

References LEA_CTOR.

00025                              : 
00026     fSEIDkey(sk),fStripEndId(s) ,fTestID(t), fStripNum(strip), fStripEnd(end), fNorm(chi), 
00027     fNPoints(n), fC1(c1), fC1Err(c1e), fLambda1(l1), fLambda1Err(l1e),
00028     fC2(c2), fC2Err(c2e), fLambda2(l2), fLambda2Err(l2e) { LEA_CTOR; }

virtual CalMapperFits::~CalMapperFits (  )  [inline, virtual]

Definition at line 30 of file CalMapperFits.h.

References LEA_DTOR.

00030 { LEA_DTOR; };

CalMapperFits::CalMapperFits ( const CalMapperFits from  )  [inline, private]

Definition at line 63 of file CalMapperFits.h.

References LEA_CTOR.

00064     : DbiTableRow(from) { LEA_CTOR; *this = from; }


Member Function Documentation

Float_t CalMapperFits::AttenCorrected ( const Float_t  rawcharge,
const Float_t  Y 
) const

Definition at line 144 of file CalMapperFits.cxx.

References fC1, fC2, fLambda1, fLambda2, fStripEndId, Msg::kVerbose, and MSG.

00144                                                                                     {
00145 //
00146 //
00147 //  Purpose: To apply sume dummy calibration to the linear charge  
00148 //
00149 //  Arguments: 
00150 //    xxxxxxxxx    in    yyyyyy
00151 //
00152 //  Return:    
00153 //
00154 //  Contact:   R.Nichol
00155 //
00156 //  Specification:-
00157 //  =============
00158 //
00159 //  o 
00160 
00161 //  Program Notes:-
00162 //  =============
00163 
00164 //  None.
00165 
00166   Float_t Corr = fC1 * exp(-Y/fLambda1) + fC2 * exp(-Y/fLambda2);
00167 
00168    MSG("Calib",Msg::kVerbose) << "StripEndId " << fStripEndId 
00169                                    << " raw charge " << rawcharge
00170                                    << " C1  " << fC1
00171                                    << " C2  " << fC2
00172                                    << " Lambda1  " << fLambda1
00173                                    << " Lambda2  " << fLambda2
00174                                    << " Y " << Y
00175                                    << " Corr " << Corr 
00176                                    << " Atten Corrected " 
00177                                    << rawcharge/Corr << "\n";
00178    return (rawcharge / Corr);
00179 }

Bool_t CalMapperFits::CanL2Cache (  )  const [inline, virtual]

Reimplemented from DbiTableRow.

Definition at line 33 of file CalMapperFits.h.

00033 { return kTRUE; }

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

Implements DbiTableRow.

Definition at line 51 of file CalMapperFits.h.

00051                                                { 
00052       return new CalMapperFits; }

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

Implements DbiTableRow.

Definition at line 46 of file CalMapperFits.cxx.

References DbiRowStream::CurColName(), fC1, fC1Err, fC2, fC2Err, fLambda1, fLambda1Err, fLambda2, fLambda2Err, fNorm, fNPoints, fSEIDkey, fStripEnd, fStripEndId, fStripNum, fTestID, DbiRowStream::HasRowCounter(), DbiRowStream::IncrementCurCol(), Msg::kDebug, MSG, DbiRowStream::NumCols(), and DbiRowStream::TableName().

00047                                                             {
00048 
00049 //
00050 //
00051 //  Purpose:  Fill object from Result Set
00052 //
00053 //  Arguments: 
00054 //    rs           in    Result Set used to fill object
00055 //    vrec         in    Associated validity record (or 0 if filling
00056 //                                                    DbiValidityRec)
00057 //  Return:    
00058 //
00059 //  Contact:   N. West
00060 //
00061 //  Specification:-
00062 //  =============
00063 //
00064 //  o Fill object from current row of Result Set.
00065 
00066 //  Program Notes:-
00067 //  =============
00068 
00069 //  This method demonstrates both the "dumb" fill method (just
00070 //  load the data as it comes) and the smart method (check column
00071 //  name and load according to column order). 
00072 
00073    if ( rs.TableName() == "CALMAPPERFITS" ) {
00074       // Dumb method.
00075      rs  >> fSEIDkey >> fStripEndId >> fTestID >> fStripNum >> fStripEnd >> fNorm >> fNPoints >> fC1 >> fC1Err >> fLambda1 >> fLambda1Err >> fC2 >> fC2Err >> fLambda2 >> fLambda2Err;
00076    }
00077    else {
00078       
00079       // Smart method
00080       Int_t numCol = rs.NumCols();
00081       //  The first column (SeqNo) has already been processed.
00082       for (Int_t curCol = rs.HasRowCounter() ? 3 : 2; curCol <= numCol; ++curCol) {
00083          string colName = rs.CurColName();
00084          if ( colName == "STRIPENDID" )       rs >> fStripEndId;
00085          else if( colName == "SEIDKEY" )       rs >> fSEIDkey;
00086          else if( colName == "TESTID" )       rs >> fTestID;
00087          else if( colName == "STRIPNUM" )       rs >> fStripNum;
00088          else if( colName == "STRIPEND" )       rs >> fStripEnd;
00089          else if( colName == "NORM" )       rs >> fNorm;
00090          else if( colName == "NPOINTS" )       rs >> fNPoints;
00091          else if( colName == "C1" )       rs >> fC1;
00092          else if( colName == "C1ERR" )       rs >> fC1Err;
00093          else if( colName == "LAMBDA1" )       rs >> fLambda1;
00094          else if( colName == "LAMBDA1ERR" )       rs >> fLambda1Err;
00095          else if( colName ==  "C2" )       rs >> fC2;
00096          else if( colName ==  "C2ERR" )       rs >> fC2Err;
00097          else if( colName ==  "LAMBDA2" )       rs >> fLambda2;
00098          else if( colName ==  "LAMBDA2ERR" )       rs >> fLambda2Err;
00099          else {
00100             MSG("Dbi",Msg::kDebug) << "Ignoring column " << curCol 
00101                                    << "(" << colName << ")"
00102                                    << "; not part of CalMapperFits" 
00103                                    << endl;
00104          rs.IncrementCurCol();
00105          }
00106       }
00107    }
00108 
00109 }

Float_t CalMapperFits::GetC1 (  )  const [inline]

Definition at line 42 of file CalMapperFits.h.

References fC1.

Referenced by FitTrackMSListModule::Ana().

00042 {return fC1;}

Float_t CalMapperFits::GetC1Err (  )  const [inline]

Definition at line 43 of file CalMapperFits.h.

References fC1Err.

00043 {return fC1Err;}

Float_t CalMapperFits::GetC2 (  )  const [inline]

Definition at line 44 of file CalMapperFits.h.

References fC2.

Referenced by FitTrackMSListModule::Ana().

00044 {return fC2;}

Float_t CalMapperFits::GetC2Err (  )  const [inline]

Definition at line 45 of file CalMapperFits.h.

References fC2Err.

00045 {return fC2Err;}

UInt_t CalMapperFits::GetIndex ( UInt_t   )  const [inline, virtual]

Reimplemented from DbiTableRow.

Definition at line 34 of file CalMapperFits.h.

References fSEIDkey.

00034 { return fSEIDkey; }

Float_t CalMapperFits::GetLambda1 (  )  const [inline]

Definition at line 46 of file CalMapperFits.h.

References fLambda1.

Referenced by FitTrackMSListModule::Ana().

00046 {return fLambda1;}

Float_t CalMapperFits::GetLambda1Err (  )  const [inline]

Definition at line 47 of file CalMapperFits.h.

References fLambda1Err.

00047 {return fLambda1Err;}

Float_t CalMapperFits::GetLambda2 (  )  const [inline]

Definition at line 48 of file CalMapperFits.h.

References fLambda2.

Referenced by FitTrackMSListModule::Ana().

00048 {return fLambda2;}

Float_t CalMapperFits::GetLambda2Err (  )  const [inline]

Definition at line 49 of file CalMapperFits.h.

References fLambda2Err.

00049 {return fLambda2Err;}

Float_t CalMapperFits::GetNorm (  )  const [inline]

Definition at line 40 of file CalMapperFits.h.

References fNorm.

Referenced by FitTrackMSListModule::Ana().

00040 {return fNorm;}

Int_t CalMapperFits::GetNPoints (  )  const [inline]

Definition at line 41 of file CalMapperFits.h.

References fNPoints.

00041 {return fNPoints;}

UInt_t CalMapperFits::GetSEIDkey (  )  const [inline]

Definition at line 35 of file CalMapperFits.h.

References fSEIDkey.

00035 { return fSEIDkey; }

Int_t CalMapperFits::GetStripEnd (  )  const [inline]

Definition at line 39 of file CalMapperFits.h.

References fStripEnd.

00039 {return fStripEnd;}

UInt_t CalMapperFits::GetStripEndId (  )  const [inline]

Definition at line 36 of file CalMapperFits.h.

References fStripEndId.

00036 { return fStripEndId; }

Int_t CalMapperFits::GetStripNum (  )  const [inline]

Definition at line 38 of file CalMapperFits.h.

References fStripNum.

00038 {return fStripNum;}

Int_t CalMapperFits::GetTestID (  )  const [inline]

Definition at line 37 of file CalMapperFits.h.

References fTestID.

00037 {return fTestID;}

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

Reimplemented from DbiTableRow.

Definition at line 113 of file CalMapperFits.cxx.

References fC1, fC1Err, fC2, fC2Err, fLambda1, fLambda1Err, fLambda2, fLambda2Err, fNorm, fNPoints, fSEIDkey, fStripEnd, fStripEndId, fStripNum, and fTestID.

00114                                                                   {
00115    //
00116 //
00117 //  Purpose:  Stream object to output row stream
00118 //
00119 //  Arguments: 
00120 //    ors          in     Output row stream.
00121 //    vrec         in    Associated validity record (or 0 if filling
00122 //                                                    DbiValidityRec)
00123 //
00124 //  Return:    
00125 //
00126 //  Contact:   N. West
00127 //
00128 //  Specification:-
00129 //  =============
00130 //
00131 //  o  Stream object to output row stream.
00132 
00133 //  Program Notes:-
00134 //  =============
00135 
00136 //  None.
00137 
00138   ors << fSEIDkey << fStripEndId << fTestID << fStripNum << fStripEnd << fNorm << fNPoints << fC1 << fC1Err << fLambda1 << fLambda1Err << fC2 << fC2Err << fLambda2 << fLambda2Err;
00139     
00140 }


Member Data Documentation

Float_t CalMapperFits::fC1 [private]

Definition at line 74 of file CalMapperFits.h.

Referenced by AttenCorrected(), Fill(), GetC1(), and Store().

Float_t CalMapperFits::fC1Err [private]

Definition at line 75 of file CalMapperFits.h.

Referenced by Fill(), GetC1Err(), and Store().

Float_t CalMapperFits::fC2 [private]

Definition at line 78 of file CalMapperFits.h.

Referenced by AttenCorrected(), Fill(), GetC2(), and Store().

Float_t CalMapperFits::fC2Err [private]

Definition at line 79 of file CalMapperFits.h.

Referenced by Fill(), GetC2Err(), and Store().

Float_t CalMapperFits::fLambda1 [private]

Definition at line 76 of file CalMapperFits.h.

Referenced by AttenCorrected(), Fill(), GetLambda1(), and Store().

Float_t CalMapperFits::fLambda1Err [private]

Definition at line 77 of file CalMapperFits.h.

Referenced by Fill(), GetLambda1Err(), and Store().

Float_t CalMapperFits::fLambda2 [private]

Definition at line 80 of file CalMapperFits.h.

Referenced by AttenCorrected(), Fill(), GetLambda2(), and Store().

Float_t CalMapperFits::fLambda2Err [private]

Definition at line 81 of file CalMapperFits.h.

Referenced by Fill(), GetLambda2Err(), and Store().

Float_t CalMapperFits::fNorm [private]

Definition at line 72 of file CalMapperFits.h.

Referenced by Fill(), GetNorm(), and Store().

Int_t CalMapperFits::fNPoints [private]

Definition at line 73 of file CalMapperFits.h.

Referenced by Fill(), GetNPoints(), and Store().

Int_t CalMapperFits::fSEIDkey [private]

Definition at line 67 of file CalMapperFits.h.

Referenced by Fill(), GetIndex(), GetSEIDkey(), and Store().

Int_t CalMapperFits::fStripEnd [private]

Definition at line 71 of file CalMapperFits.h.

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

Int_t CalMapperFits::fStripEndId [private]

Definition at line 68 of file CalMapperFits.h.

Referenced by AttenCorrected(), Fill(), GetStripEndId(), and Store().

Int_t CalMapperFits::fStripNum [private]

Definition at line 70 of file CalMapperFits.h.

Referenced by Fill(), GetStripNum(), and Store().

Int_t CalMapperFits::fTestID [private]

Definition at line 69 of file CalMapperFits.h.

Referenced by Fill(), GetTestID(), 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