Changeset 3636 for trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimePix.cc
- Timestamp:
- 04/03/04 17:27:50 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimePix.cc
r3625 r3636 40 40 using namespace std; 41 41 // 42 const Int_t MHCalibrationRelTimePix::fg ChargeNbins = 900;43 const Axis_t MHCalibrationRelTimePix::fg ChargeFirst = -13.;44 const Axis_t MHCalibrationRelTimePix::fg ChargeLast = 13.;42 const Int_t MHCalibrationRelTimePix::fgRelTimeNbins = 900; 43 const Axis_t MHCalibrationRelTimePix::fgRelTimeFirst = -13.; 44 const Axis_t MHCalibrationRelTimePix::fgRelTimeLast = 13.; 45 45 // -------------------------------------------------------------------------- 46 46 // … … 48 48 // 49 49 // Sets: 50 // - the default number for f ChargeNbins (fgChargeNbins)51 // - the default number for f ChargeFirst (fgChargeFirst)52 // - the default number for f ChargeLast (fgChargeLast)50 // - the default number for fNbins (fgRelTimeNbins) 51 // - the default number for fFirst (fgRelTimeFirst) 52 // - the default number for fLast (fgRelTimeLast) 53 53 // 54 54 // - the default name of the fHGausHist ("HCalibrationRelTime") … … 64 64 // 65 65 MHCalibrationRelTimePix::MHCalibrationRelTimePix(const char *name, const char *title) 66 : fPixId(-1)67 66 { 68 67 … … 70 69 fTitle = title ? title : "Histogrammed Calibration Relative Arrival Time events"; 71 70 72 Set ChargeNbins();73 Set ChargeFirst();74 Set ChargeLast();71 SetNbins ( fgRelTimeNbins ); 72 SetFirst ( fgRelTimeFirst ); 73 SetLast ( fgRelTimeLast ); 75 74 76 75 // Create a large number of bins, later we will rebin … … 96 95 97 96 fPixId = -1; 97 98 98 MHGausEvents::Clear(); 99 99 return; … … 109 109 } 110 110 111 // --------------------------------------------------------------------------112 //113 // Sets:114 // - fHGausHist.SetBins(fChargeNbins,fChargeFirst,fChargeLast);115 //116 void MHCalibrationRelTimePix::Init()117 {118 111 119 fHGausHist.SetBins(fChargeNbins,fChargeFirst,fChargeLast);120 121 }122 123 // --------------------------------------------------------------------------124 //125 // - Set fPixId to id126 //127 // Add id to names and titles of:128 // - fHGausHist129 //130 void MHCalibrationRelTimePix::ChangeHistId(Int_t id)131 {132 133 fPixId = id;134 135 fHGausHist.SetName( Form("%s%d", fHGausHist.GetName(), id));136 fHGausHist.SetTitle( Form("%s%d", fHGausHist.GetTitle(), id));137 138 }139 140 141 // ----------------------------------------------------------------------142 //143 // Renorm the results from FADC slices to times.144 // The parameters slicewidth is the inverse of the FADC frequency and has the unit ns.145 //146 void MHCalibrationRelTimePix::Renorm(const Float_t slicewidth)147 {148 149 SetMean( GetMean() * slicewidth );150 SetMeanErr( GetMeanErr() * slicewidth );151 SetSigma( GetSigma() * slicewidth );152 SetSigmaErr( GetSigmaErr()* slicewidth );153 154 }155
Note:
See TracChangeset
for help on using the changeset viewer.