Changeset 3639 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 04/04/04 14:28:25 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.cc
r3637 r3639 27 27 // MHCalibrationChargeBlindPix 28 28 // 29 // Histogram container for the calibration Blind Pixel information 30 // Extracts the signal stored in MExtractedSignalBlindPixel , histograms and fits it. 31 // Performs the Single Photo-electron fit to extract the Poisson mean and its errors 32 // 33 // Different fits can be chosen with the function ChangeFitFunc() 34 // 35 // The fit result is accepted under condition that: 29 // Histogram class for the charge calibration of the Blind Pixel. 30 // Stores and fits the charges and stores the averaged assumed pedestal and 31 // single-phe FADC slice entries. Charges are taken from MExtractedSignalBlindPix. 32 // Performs the Single Photo-electron fit to extract the Poisson mean and its errors. 33 // 34 // Different fits can be chosen with the function ChangeFitFunc(). 35 // 36 // The fit result is accepted under the condition that: 36 37 // 1) the Probability is greater than fProbLimit (default 0.001 == 99.7%) 37 38 // 2) at least fNumSinglePheLimit events are found in the single Photo-electron peak … … 105 106 // 106 107 // Sets: 107 // - the default number for MHGausEvents::fNbins(fgChargeNbins)108 // - the default number for MHGausEvents::fFirst(fgChargeFirst)109 // - the default number for MHGausEvents::fLast(fgChargeLast)108 // - the default number for fNbins (fgChargeNbins) 109 // - the default number for fFirst (fgChargeFirst) 110 // - the default number for fLast (fgChargeLast) 110 111 // - the default number for fSinglePheCut (fgSingePheCut) 111 112 // - the default number for fNumSinglePheLimit (fgNumSinglePheLimit) 113 // - the default number of bins after stripping (30) 112 114 // 113 115 // - the default name of the fHGausHist ("HCalibrationChargeBlindPix") … … 118 120 // Initializes: 119 121 // - all pointers to NULL 120 // - all variables to 0., except the fit result variables to -999.121 // - all flags to kFALSE122 // - the default Fit function to kEPoisson5122 // 123 // Calls: 124 // - Clear() 123 125 // 124 126 MHCalibrationChargeBlindPix::MHCalibrationChargeBlindPix(const char *name, const char *title) … … 130 132 131 133 fName = name ? name : "MHCalibrationChargeBlindPix"; 132 fTitle = title ? title : " Fill the accumulated charges and times of all Blind Pixel events and perform fits";134 fTitle = title ? title : "Statistics of the FADC sums of Blind Pixel calibration events"; 133 135 134 136 SetNbins( fgChargeNbins ); … … 183 185 // - all flags to kFALSE 184 186 // - all pointers to NULL 187 // - the default fit function (kEPoisson5) 185 188 // 186 189 // Deletes: 187 190 // - all pointers unequal NULL 188 191 // 189 // Executes MHCalibrationChargePix::Clear() 192 // Calls: 193 // - MHCalibrationChargePix::Clear() 190 194 // 191 195 void MHCalibrationChargeBlindPix::Clear(Option_t *o) … … 248 252 } 249 253 254 // -------------------------------------------------------------------------- 255 // 256 // Set bit kSinglePheFitOK from outside 257 // 250 258 void MHCalibrationChargeBlindPix::SetSinglePheFitOK (const Bool_t b) 251 259 { … … 253 261 } 254 262 263 // -------------------------------------------------------------------------- 264 // 265 // Set bit kPedestalFitOK from outside 266 // 255 267 void MHCalibrationChargeBlindPix::SetPedestalFitOK(const Bool_t b) 256 268 { … … 258 270 } 259 271 272 // -------------------------------------------------------------------------- 273 // 274 // Ask for status of bit kSinglePheFitOK 275 // 260 276 const Bool_t MHCalibrationChargeBlindPix::IsSinglePheFitOK() const 261 277 { … … 263 279 } 264 280 281 // -------------------------------------------------------------------------- 282 // 283 // Ask for status of bit kPedestalFitOK 284 // 265 285 const Bool_t MHCalibrationChargeBlindPix::IsPedestalFitOK() const 266 286 { … … 278 298 // - fAPedestalFADCSlices(0); 279 299 // 280 // Sets Binning of the fHGausHist 300 // Calls: 301 // - MHGausHist::InitBins() 281 302 // 282 303 Bool_t MHCalibrationChargeBlindPix::SetupFill(const MParList *pList) … … 384 405 // Returns kFALSE, if empty 385 406 // 386 // - Creates the fourier spectrum and sets bit IsFourierSpectrumOK()407 // - Creates the fourier spectrum and sets bit MHGausEvents::IsFourierSpectrumOK() 387 408 // - Retrieves the pedestals from MExtractedSignalBlindPixel 388 409 // - Normalizes fASinglePheFADCSlices and fAPedestalFADCSlices -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeBlindPix.h
r3637 r3639 27 27 private: 28 28 29 static const Int_t fgChargeNbins; //! Default for MHGausEvents::fNBins(now set to: 5300 )30 static const Axis_t fgChargeFirst; //! Default for MHGausEvents::fFirst(now set to: -100.5 )31 static const Axis_t fgChargeLast; //! Default for MHGausEvents::fLast(now set to: 5199.5 )29 static const Int_t fgChargeNbins; //! Default for fNBins (now set to: 5300 ) 30 static const Axis_t fgChargeFirst; //! Default for fFirst (now set to: -100.5 ) 31 static const Axis_t fgChargeLast; //! Default for fLast (now set to: 5199.5 ) 32 32 static const Float_t fgSinglePheCut; //! Default for fSinglePheCut (now set to: 200 ) 33 33 static const Float_t fgNumSinglePheLimit; //! Default for fNumSinglePheLimit (now set to: 50 ) … … 502 502 503 503 504 ClassDef(MHCalibrationChargeBlindPix, 1) // Histogram class for the Calibration Blind Pixel504 ClassDef(MHCalibrationChargeBlindPix, 1) // Histogram class for Charge Blind Pixel Calibration 505 505 }; 506 506 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc
r3636 r3639 29 29 // MHCalibrationChargeHiGainPix and MHCalibrationChargeLoGainPix for every: 30 30 // 31 // - pixel, stored in the TObjArray's MHCalibrationCam::fHiGainArray and31 // - Pixel, stored in the TObjArray's MHCalibrationCam::fHiGainArray and 32 32 // MHCalibrationCam::fLoGainArray 33 33 // 34 // - average pixel per areaindex (e.g. inner and outer for the MAGIC camera),34 // - Average pixel per AREA index (e.g. inner and outer for the MAGIC camera), 35 35 // stored in the TObjArray's MHCalibrationCam::fAverageHiGainAreas and 36 36 // MHCalibrationCam::fAverageLoGainAreas 37 37 // 38 // - average pixel per camera sector(e.g. sectors 1-6 for the MAGIC camera),38 // - Average pixel per camera SECTOR (e.g. sectors 1-6 for the MAGIC camera), 39 39 // stored in the TObjArray's MHCalibrationCam::fAverageHiGainSectors and 40 40 // MHCalibrationCam::fAverageLoGainSectors 41 41 // 42 // Every signal is filled into a Charge histogram and an array, in order to perform 43 // a Fourier analysis (see MHGausEvents). The signals are moreover averaged on an 44 // event-by-event basis and written into the corresponding average pixels 42 // Every signal is taken from MExtractedSignalCam and filled into a histogram and 43 // an array, in order to perform a Fourier analysis (see MHGausEvents). 44 // The signals are moreover averaged on an event-by-event basis and written into 45 // the corresponding average pixels. 45 46 // 46 47 // Additionally, the (FADC slice) position of the maximum is stored in an Absolute … … 50 51 // The Charge histograms are fitted to a Gaussian, mean and sigma with its errors 51 52 // and the fit probability are extracted. If none of these values are NaN's and 52 // if the probability is bigger than fProbLimit (default: 0.5%), the fit is valid. 53 // Otherwise, the fit is repeated within ranges of the previous mean +- 5 sigma. 53 // if the probability is bigger than MHGausEvents::fProbLimit (default: 0.5%), 54 // the fit is declared valid. 55 // Otherwise, the fit is repeated within ranges of the previous mean 56 // +- MHGausEvents::fPickupLimit (default: 5) sigma (see MHGausEvents::RepeatFit()) 54 57 // In case this does not make the fit valid, the histogram means and RMS's are 55 // taken directly and the following flags are set:58 // taken directly (see MHGausEvents::BypassFit()) and the following flags are set: 56 59 // - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kHiGainNotFitted ) or 57 60 // - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kLoGainNotFitted ) and 58 61 // - MBadPixelsPix::SetUnsuitable( MBadPixelsPix::kUnreliableRun ) 59 62 // 60 // Outliers of more than MH CalibrationChargePix::fPickupLimit (default: 5) sigmas61 // from the mean are counted as Pick Up events (stored in MHCalibrationChargePix::fPickup)63 // Outliers of more than MHGausEvents::fPickupLimit (default: 5) sigmas 64 // from the mean are counted as Pickup events (stored in MHGausEvents::fPickup) 62 65 // 63 66 // Unless more than fNumHiGainSaturationLimit (default: 1%) of the overall FADC … … 74 77 // spectrum and investigates if the projected fourier components follow an exponential 75 78 // distribution. In case that the probability of the exponential fit is less than 76 // fProbLimit (default: 0.5%), the following flags are set:79 // MHGausEvents::fProbLimit (default: 0.5%), the following flags are set: 77 80 // - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kHiGainOscillating ) or 78 81 // - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kLoGainOscillating ) and … … 83 86 // The following results are written into MCalibrationChargeCam: 84 87 // 85 // - MCalibration ChargePix::SetHiGainSaturation(Bool_t b)86 // - MCalibration ChargePix::SetHiGainMeanCharge()87 // - MCalibration ChargePix::SetHiGainMeanChargeErr()88 // - MCalibration ChargePix::SetHiGainSigmaCharge()89 // - MCalibration ChargePix::SetHiGainSigmaChargeErr()90 // - MCalibration ChargePix::SetHiGainChargeProb()91 // - MCalibration ChargePix::SetHiGainNumPickup()92 // 93 // - MCalibration ChargePix::SetLoGainMeanCharge()94 // - MCalibration ChargePix::SetLoGainMeanChargeErr()95 // - MCalibration ChargePix::SetLoGainSigmaCharge()96 // - MCalibration ChargePix::SetLoGainSigmaChargeErr()97 // - MCalibration ChargePix::SetLoGainChargeProb()98 // - MCalibration ChargePix::SetLoGainNumPickup()88 // - MCalibrationPix::SetHiGainSaturation() 89 // - MCalibrationPix::SetHiGainMean() 90 // - MCalibrationPix::SetHiGainMeanErr() 91 // - MCalibrationPix::SetHiGainSigma() 92 // - MCalibrationPix::SetHiGainSigmaErr() 93 // - MCalibrationPix::SetHiGainProb() 94 // - MCalibrationPix::SetHiGainNumPickup() 95 // 96 // - MCalibrationPix::SetLoGainMean() 97 // - MCalibrationPix::SetLoGainMeanErr() 98 // - MCalibrationPix::SetLoGainSigma() 99 // - MCalibrationPix::SetLoGainSigmaErr() 100 // - MCalibrationPix::SetLoGainProb() 101 // - MCalibrationPix::SetLoGainNumPickup() 99 102 // 100 103 // - MCalibrationChargePix::SetAbsTimeMean() 101 104 // - MCalibrationChargePix::SetAbsTimeRms() 102 //103 // The last two items are filled with the Hi-Gain or Lo-Gain result, depending on104 // the saturation status.105 105 // 106 106 // For all averaged areas, the fitted sigma is multiplied with the square root of … … 191 191 // - MExtractedSignalCam 192 192 // 193 // Calls InitializeHists() for every entry in: 193 // Initializes, if empty to MGeomCam::GetNumPixels(): 194 // - MHCalibrationCam::fHiGainArray, MHCalibrationCam::fLoGainArray 195 // 196 // Initializes, if empty to MGeomCam::GetNumAreas() for: 197 // - MHCalibrationCam::fAverageHiGainAreas, MHCalibrationCam::fAverageLoGainAreas 198 // 199 // Initializes, if empty to MGeomCam::GetNumSectors() for: 200 // - MHCalibrationCam::fAverageHiGainSectors, MHCalibrationCam::fAverageLoGainSectors 201 // 202 // Calls MHCalibrationCam::InitHists() for every entry in: 194 203 // - MHCalibrationCam::fHiGainArray, MHCalibrationCam::fLoGainArray 195 204 // - MHCalibrationCam::fAverageHiGainAreas, MHCalibrationCam::fAverageLoGainAreas 196 205 // - MHCalibrationCam::fAverageHiGainSectors, MHCalibrationCam::fAverageLoGainSectors 197 206 // 198 // Sets Titles and Names for the Charge Histograms and 207 // Sets Titles and Names for the Charge Histograms: 208 // - MHCalibrationCam::fAverageHiGainAreas 209 // - MHCalibrationCam::fAverageHiGainSectors 210 // 199 211 // Sets number of bins to MHCalibrationCam::fAverageNbins for: 200 212 // - MHCalibrationCam::fAverageHiGainAreas, MHCalibrationCam::fAverageLoGainAreas … … 502 514 // otherwise the Hi-Gain ones. 503 515 // 4) Calls to MHCalibrationCam::FitHiGainArrays() and MCalibrationCam::FitLoGainArrays() 504 // and sets the flags (if occurring):516 // with the flags: 505 517 // - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kHiGainNotFitted ) 506 518 // - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kLoGainNotFitted ) 507 519 // - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kHiGainOscillating ) 508 520 // - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kLoGainOscillating ) 509 // 5) Retrieves the results and store them in MCalibrationChargePix510 521 // 511 522 Bool_t MHCalibrationChargeCam::FinalizeHists() … … 652 663 // -------------------------------------------------------------------------- 653 664 // 654 // Takes the decisions under which conditions a pixel is declared: 655 // MBadPixelsPix::kUnsuitableRun or MBadPixelsPix::kUnreliableRun, namely: 656 // * if MBadPixelsPix::kHiGainNotFitted and !MCalibrationPix::IsHiGainSaturation() 657 // sets MBadPixelsPix::kUnreliableRun 658 // * if MBadPixelsPix::kHiGainOscillating and !MCalibrationPix::IsHiGainSaturation() 659 // sets MBadPixelsPix::kUnreliableRun 660 // * if MBadPixelsPix::kLoGainNotFitted and MCalibrationPix::IsLoGainSaturation() 661 // sets MBadPixelsPix::kUnreliableRun 662 // * if MBadPixelsPix::kLoGainOscillating and MCalibrationPix::IsLoGainSaturation() 663 // sets MBadPixelsPix::kUnreliableRun 664 // * if MBadPixelsPix::kLoGainSaturation 665 // sets MBadPixelsPix::kUnsuitableRun 665 // Sets all pixels to MBadPixelsPix::kUnsuitableRun, if following flags are set: 666 // - MBadPixelsPix::kLoGainSaturation 667 // 668 // Sets all pixels to MBadPixelsPix::kUnreliableRun, if following flags are set: 669 // - if MBadPixelsPix::kHiGainNotFitted and !MCalibrationPix::IsHiGainSaturation() 670 // - if MBadPixelsPix::kHiGainOscillating and !MCalibrationPix::IsHiGainSaturation() 671 // - if MBadPixelsPix::kLoGainNotFitted and MCalibrationPix::IsLoGainSaturation() 672 // - if MBadPixelsPix::kLoGainOscillating and MCalibrationPix::IsLoGainSaturation() 666 673 // 667 674 void MHCalibrationChargeCam::FinalizeBadPixels() … … 705 712 // -------------------------------------------------------------------------- 706 713 // 707 // What MHCamera needs in order to draw an individual pixel in the camera714 // Calls MHGausEvents::DrawClone() for pixel idx 708 715 // 709 716 void MHCalibrationChargeCam::DrawPixelContent(Int_t idx) const -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.h
r3636 r3639 46 46 void DrawPixelContent( Int_t num ) const; 47 47 48 ClassDef(MHCalibrationChargeCam, 1) // Histogram class for camera charge calibration48 ClassDef(MHCalibrationChargeCam, 1) // Histogram class for Charge Camera Calibration 49 49 }; 50 50 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeHiGainPix.cc
r3636 r3639 27 27 // MHCalibrationChargeHiGainPix 28 28 // 29 // Store the histogrammed Hi Gain summed FADC slices and the arrival times 29 // Histogram class for the charge High Gain FADC calibration. 30 // Stores and fits the charges and stores the location of the maximum FADC 31 // slice. Charges are taken from MExtractedSignalPix. 30 32 // 31 33 ////////////////////////////////////////////////////////////////////////////// … … 33 35 34 36 #include <TH1.h> 35 #include <TPad.h>36 #include <TVirtualPad.h>37 #include <TCanvas.h>38 39 #include "MLog.h"40 #include "MLogManip.h"41 42 #include "MParList.h"43 44 #include "MExtractedSignalCam.h"45 46 37 47 38 ClassImp(MHCalibrationChargeHiGainPix); -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeHiGainPix.h
r3636 r3639 12 12 private: 13 13 14 static const Int_t fgChargeNbins; // Default for MHGausEvents::fNbins(now set to: 2000 )15 static const Axis_t fgChargeFirst; // Default for MHGausEvents::fFirst(now set to: -0.5 )16 static const Axis_t fgChargeLast; // Default for MHGausEvents::fLast(now set to: 1999.5)17 static const Int_t fgAbsTimeNbins; // Default for fAbsTimeNbins 18 static const Axis_t fgAbsTimeFirst; // Default for fAbsTimeFirst 19 static const Axis_t fgAbsTimeLast; // Default for fAbsTimeLast 14 static const Int_t fgChargeNbins; // Default for fNbins (now set to: 2000 ) 15 static const Axis_t fgChargeFirst; // Default for fFirst (now set to: -0.5 ) 16 static const Axis_t fgChargeLast; // Default for fLast (now set to: 1999.5) 17 static const Int_t fgAbsTimeNbins; // Default for fAbsTimeNbins (now set to: 20 ) 18 static const Axis_t fgAbsTimeFirst; // Default for fAbsTimeFirst (now set to: -0.5 ) 19 static const Axis_t fgAbsTimeLast; // Default for fAbsTimeLast (now set to: 19.5 ) 20 20 21 21 public: … … 29 29 void SetAbsTimeLast (const Axis_t last =fgAbsTimeLast) { fAbsTimeLast = last; } 30 30 31 ClassDef(MHCalibrationChargeHiGainPix, 1) // Histogram class for High Gain part of Calibration Pixel31 ClassDef(MHCalibrationChargeHiGainPix, 1) // Histogram class for Charge High Gain Pixel Calibration 32 32 }; 33 33 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeLoGainPix.cc
r3636 r3639 27 27 // MHCalibrationChargeLoGainPix 28 28 // 29 // Store the histogrammed Hi Gain summed FADC slices and the arrival times 29 // Histogram class for the charge Low Gain FADC calibration. 30 // Stores and fits the charges and stores the location of the maximum FADC 31 // slice. Charges are taken from MExtractedSignalPix. 30 32 // 31 33 ////////////////////////////////////////////////////////////////////////////// … … 33 35 34 36 #include <TH1.h> 35 #include <TPad.h>36 #include <TVirtualPad.h>37 #include <TCanvas.h>38 39 #include "MLog.h"40 #include "MLogManip.h"41 42 #include "MParList.h"43 44 #include "MExtractedSignalCam.h"45 46 37 47 38 ClassImp(MHCalibrationChargeLoGainPix); … … 99 90 100 91 101 102 103 104 105 106 107 108 109 110 111 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeLoGainPix.h
r3636 r3639 11 11 private: 12 12 13 static const Int_t fgChargeNbins; // Default for MHGausEvents::fNbins(now set to: 200 )14 static const Axis_t fgChargeFirst; // Default for MHGausEvents::fFirst(now set to: -0.5 )15 static const Axis_t fgChargeLast; // Default for MHGausEvents::fLast(now set to: 199.5 )16 static const Int_t fgAbsTimeNbins; // Default for fAbsTimeNbins 17 static const Axis_t fgAbsTimeFirst; // Default for fAbsTimeFirst 18 static const Axis_t fgAbsTimeLast; // Default for fAbsTimeLast 13 static const Int_t fgChargeNbins; // Default for fNbins (now set to: 200 ) 14 static const Axis_t fgChargeFirst; // Default for fFirst (now set to: -0.5 ) 15 static const Axis_t fgChargeLast; // Default for fLast (now set to: 199.5 ) 16 static const Int_t fgAbsTimeNbins; // Default for fAbsTimeNbins (now set to: 15 ) 17 static const Axis_t fgAbsTimeFirst; // Default for fAbsTimeFirst (now set to: -0.5 ) 18 static const Axis_t fgAbsTimeLast; // Default for fAbsTimeLast (now set to: 14.5 ) 19 19 20 20 public: … … 28 28 void SetAbsTimeLast (const Axis_t last =fgAbsTimeLast) { fAbsTimeLast = last; } 29 29 30 ClassDef(MHCalibrationChargeLoGainPix, 1) // Histogram class for Low Gain Part of Calibration Pixel30 ClassDef(MHCalibrationChargeLoGainPix, 1) // Histogram class for Charge Low Gain Pixel Calibration 31 31 }; 32 32 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePINDiode.cc
r3637 r3639 27 27 // MHCalibrationChargePINDiode 28 28 // 29 // Histogram container for the calibration PIN Diode information 30 // Extracts the signal stored in MExtractedSignalPINDiode, histograms and fits it. 29 // Histogram class for the charge calibration of the PIN Diode. 30 // Stores and fits the charges, the RMS of the charges and stores the 31 // location of the maximum FADC slice. Charges are taken from MExtractedSignalPINDiode. 31 32 // 32 33 ////////////////////////////////////////////////////////////////////////////// … … 88 89 // - the default y-axis title for fHRmsCharge ("Nr. of events") 89 90 // - the default directory of the fHRmsCharge (NULL) 91 // - the current style for fHRmsCharge (NULL) 90 92 // 91 93 // Initializes: 92 94 // - fHRmsCharge() 93 95 // - all pointers to NULL 94 // - all variables to 0. 95 // - all flags to kFALSE 96 // 97 // Calls: 98 // - Clear() 96 99 // 97 100 MHCalibrationChargePINDiode::MHCalibrationChargePINDiode(const char *name, const char *title) … … 174 177 // 175 178 // Retrieves from MExtractedSignalPINDiode: 176 // - Number of used FADC samples 177 // - Extracted signal 178 // - Signal Rms 179 // - Arrival Time 179 // - Number of used FADC samples via MExtractedSignalPINDiode::GetNumFADCSamples() 180 // - Extracted signal via MExtractedSignalPINDiode::GetExtractedSignal() 181 // - Signal Rms MExtractedSignalPINDiode::GetExtractedRms() 182 // - Arrival Time MExtractedSignalPINDiode::GetExtractedTime() 180 183 // 181 184 // Fills the following histograms: … … 217 220 // -------------------------------------------------------------------------- 218 221 // 219 // Returns k FALSE, if empty222 // Returns kTRUE, if empty 220 223 // 221 224 // Performs the following fits: … … 223 226 // - FitRmsCharge() 224 227 // 225 // Creates the fourier spectrum and sets bit IsFourierSpectrumOK() 228 // Creates the fourier spectrum (MHGausEvents::CreateFourierSpectrum() 229 // and sets bit MCalibrationChargePINDiode::SetOscillating( MHGausEvents::IsFourierSpectrumOK() ) 226 230 // Retrieves the results of the following fits and stores them in MCalibrationChargePINDiode: 227 231 // - Mean Charge and Error 228 232 // - Sigma Charge and Error 233 // - Fit Probability 229 234 // - Abs Time Mean 230 235 // - Abs Time Rms … … 244 249 fPINDiode->SetOscillating ( !IsFourierSpectrumOK() ); 245 250 246 fPINDiode->SetMeanCharge( GetMean() ); 247 fPINDiode->SetMeanChargeErr( GetMeanErr() ); 248 fPINDiode->SetSigmaCharge( GetSigma() ); 249 fPINDiode->SetSigmaChargeErr( GetSigmaErr() ); 251 fPINDiode->SetMean ( GetMean() ); 252 fPINDiode->SetMeanErr ( GetMeanErr() ); 253 fPINDiode->SetSigma ( GetSigma() ); 254 fPINDiode->SetSigmaErr ( GetSigmaErr() ); 255 fPINDiode->SetProb ( GetProb() ); 250 256 251 257 fPINDiode->SetAbsTimeMean( GetAbsTimeMean() ); -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePINDiode.h
r3637 r3639 13 13 private: 14 14 15 static const Int_t fgChargeNbins; //! Default for MHGausEvents::fNBins(now set to: 200 )16 static const Axis_t fgChargeFirst; //! Default for MHGausEvents::fFirst(now set to: -0.5 )17 static const Axis_t fgChargeLast; //! Default for MHGausEvents::fLast(now set to: 199.5 )18 static const Int_t fgRmsChargeNbins; //! Default for fRmsChargeNBins 19 static const Axis_t fgRmsChargeFirst; //! Default for fRmsChargeFirst 20 static const Axis_t fgRmsChargeLast; //! Default for fRmsChargeLast 21 static const Int_t fgAbsTimeNbins; //! Default for fAbsTimeNBins 22 static const Axis_t fgAbsTimeFirst; //! Default for fAbsTimeFirst 23 static const Axis_t fgAbsTimeLast; //! Default for fAbsTimeLast 15 static const Int_t fgChargeNbins; //! Default for fNBins (now set to: 200 ) 16 static const Axis_t fgChargeFirst; //! Default for fFirst (now set to: -0.5 ) 17 static const Axis_t fgChargeLast; //! Default for fLast (now set to: 199.5 ) 18 static const Int_t fgRmsChargeNbins; //! Default for fRmsChargeNBins (now set to: 100 ) 19 static const Axis_t fgRmsChargeFirst; //! Default for fRmsChargeFirst (now set to: 0. ) 20 static const Axis_t fgRmsChargeLast; //! Default for fRmsChargeLast (now set to: 100. ) 21 static const Int_t fgAbsTimeNbins; //! Default for fAbsTimeNBins (now set to: 30 ) 22 static const Axis_t fgAbsTimeFirst; //! Default for fAbsTimeFirst (now set to: -0.5 ) 23 static const Axis_t fgAbsTimeLast; //! Default for fAbsTimeLast (now set to: 29.5 ) 24 24 25 25 MCalibrationChargePINDiode *fPINDiode; //! Storage container of the results … … 73 73 void Draw(Option_t *opt=""); 74 74 75 ClassDef(MHCalibrationChargePINDiode, 1) // Histogram class for the Calibration PIN Diode75 ClassDef(MHCalibrationChargePINDiode, 1) // Histogram class for Charge PIN Diode Calibration 76 76 }; 77 77 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePix.cc
r3636 r3639 26 26 // MHCalibrationChargePix 27 27 // 28 // Histogram class for charge calibration analysis. Holds the histogrammed29 // summed FADC slices and some rough absolute timing. Calculates the mean30 // s um of FADC slices and its sigma and perform a Fourier analysis.28 // Histogram class for the charge calibration. 29 // Stores and fits the charges and stores the location of the maximum FADC 30 // slice. Charges are taken from MExtractedSignalPix. 31 31 // 32 32 ////////////////////////////////////////////////////////////////////////////// … … 64 64 // - the default number for fFirst (fgChargeFirst) 65 65 // - the default number for fLast (fgChargeLast) 66 // - the default number for fAbsTimeNbins (fgAbs tTimeNbins)66 // - the default number for fAbsTimeNbins (fgAbsTimeNbins) 67 67 // - the default number for fAbsTimeFirst (fgAbsTimeFirst) 68 68 // - the default number for fAbsTimeLast (fgAbsTimeLast) … … 78 78 // - the default y-axis title for fHAbsTime ("Nr. of events"); 79 79 // - the default directory of the fHAbsTime (NULL) 80 // - the current style for fHAbsTime 80 81 // 81 82 // Initializes: 82 83 // - fHAbsTime() 83 // - fPixId to -184 // - all variables to 0.85 // - all flags to kFALSE84 // 85 // Calls: 86 // - Clear(); 86 87 // 87 88 MHCalibrationChargePix::MHCalibrationChargePix(const char *name, const char *title) … … 132 133 // 133 134 // Sets: 134 // - all variablesto 0.135 // - fSaturated to 0. 135 136 // 136 137 // Executes: -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargePix.h
r3636 r3639 12 12 private: 13 13 14 static const Int_t fgChargeNbins; // Default for MHGausEvents::fNBins(now set to: 2000 )15 static const Axis_t fgChargeFirst; // Default for MHGausEvents::fFirst(now set to: -0.5 )16 static const Axis_t fgChargeLast; // Default for MHGausEvents::fLast(now set to: 1999.5)17 static const Int_t fgAbsTimeNbins; // Default for fAbsTimeNbins 18 static const Axis_t fgAbsTimeFirst; // Default for fAbsTimeFirst 19 static const Axis_t fgAbsTimeLast; // Default for fAbsTimeLast 14 static const Int_t fgChargeNbins; // Default for fNBins (now set to: 2000 ) 15 static const Axis_t fgChargeFirst; // Default for fFirst (now set to: -0.5 ) 16 static const Axis_t fgChargeLast; // Default for fLast (now set to: 1999.5) 17 static const Int_t fgAbsTimeNbins; // Default for fAbsTimeNbins (now set to: 15 ) 18 static const Axis_t fgAbsTimeFirst; // Default for fAbsTimeFirst (now set to: -0.5 ) 19 static const Axis_t fgAbsTimeLast; // Default for fAbsTimeLast (now set to: 14.5 ) 20 20 21 21 protected: … … 63 63 void ChangeHistId(Int_t id); 64 64 65 ClassDef(MHCalibrationChargePix, 1) // Base Histogram class for a Charge Calibration Pixel65 ClassDef(MHCalibrationChargePix, 1) // Base Histogram class for Charge Pixel Calibration 66 66 }; 67 67 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimeCam.cc
r3636 r3639 23 23 \* ======================================================================== */ 24 24 ///////////////////////////////////////////////////////////////////////////// 25 // //26 // MHCalibrationRelTimeCam //27 // //25 // 26 // MHCalibrationRelTimeCam 27 // 28 28 // Fills the extracted relative arrival times of MArrivalTimeCam into 29 29 // the MHGausEvents-classes MHCalibrationRelTimePix for every: 30 30 // 31 // - pixel, stored in the TObjArray's MHCalibrationCam::fHiGainArray 32 // 33 // - average pixel per area index (e.g. inner and outer for the MAGIC camera), 34 // stored in the TObjArray's MHCalibrationCam::fAverageHiGainAreas 35 // 36 // - average pixel per camera sector (e.g. sectors 1-6 for the MAGIC camera), 31 // - Pixel, stored in the TObjArray's MHCalibrationCam::fHiGainArray 32 // or MHCalibrationCam::fHiGainArray, respectively, depending if 33 // MArrivalTimePix::IsLoGainUsed() is set. 34 // 35 // - Average pixel per AREA index (e.g. inner and outer for the MAGIC camera), 36 // stored in the TObjArray's MHCalibrationCam::fAverageHiGainAreas and 37 // MHCalibrationCam::fAverageHiGainAreas 38 // 39 // - Average pixel per camera SECTOR (e.g. sectors 1-6 for the MAGIC camera), 37 40 // stored in the TObjArray's MHCalibrationCam::fAverageHiGainSectors 38 // 39 // Every time is filled into a histogram and an array, in order to perform 41 // and MHCalibrationCam::fAverageHiGainSectors 42 // 43 // Every relative time is calculated as the difference between the individual 44 // pixel arrival time and the one of pixel 1 (hardware number: 2). 45 // The relative times are filled into a histogram and an array, in order to perform 40 46 // a Fourier analysis (see MHGausEvents). The signals are moreover averaged on an 41 47 // event-by-event basis and written into the corresponding average pixels. … … 43 49 // The histograms are fitted to a Gaussian, mean and sigma with its errors 44 50 // and the fit probability are extracted. If none of these values are NaN's and 45 // if the probability is bigger than fProbLimit (default: 0.5%), the fit is valid. 46 // Otherwise, the fit is repeated within ranges of the previous mean +- 5 sigma. 51 // if the probability is bigger than MHGausEvents::fProbLimit (default: 0.5%), 52 // the fit is declared valid. 53 // Otherwise, the fit is repeated within ranges of the previous mean 54 // +- MHGausEvents::fPickupLimit (default: 5) sigma (see MHGausEvents::RepeatFit()) 47 55 // In case this does not make the fit valid, the histogram means and RMS's are 48 // taken directly and the following flags are set:56 // taken directly (see MHGausEvents::BypassFit()) and the following flags are set: 49 57 // - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kRelTimeNotFitted ) and 50 58 // - MBadPixelsPix::SetUnsuitable( MBadPixelsPix::kUnreliableRun ) 51 59 // 52 // Outliers of more than MH CalibrationChargePix::fPickupLimit (default: 5) sigmas53 // from the mean are counted as Pick Up events (stored in MHCalibrationRelTimePix::fPickup)60 // Outliers of more than MHGausEvents::fPickupLimit (default: 5) sigmas 61 // from the mean are counted as Pickup events (stored in MHGausEvents::fPickup) 54 62 // 55 63 // The class also fills arrays with the signal vs. event number, creates a fourier 56 // spectrum and investigates if the projected fourier components follow an exponential 57 // distribution. In case that the probability of the exponential fit is less than 58 // fProbLimit (default: 0.5%), the following flags are set: 64 // spectrum (see MHGausEvents::CreateFourierSpectrum()) and investigates if the 65 // projected fourier components follow an exponential distribution. 66 // In case that the probability of the exponential fit is less than 67 // MHGausEvents::fProbLimit (default: 0.5%), the following flags are set: 59 68 // - MBadPixelsPix::SetUncalibrated( MBadPixelsPix::kRelTimeOscillating ) and 60 69 // - MBadPixelsPix::SetUnsuitable( MBadPixelsPix::kUnreliableRun ) … … 119 128 // - MArrivalTimeCam 120 129 // 121 // Initializes, if empty to M ArrivalTimeCam::GetSize() for:130 // Initializes, if empty to MGeomCam::GetNumPixels(): 122 131 // - MHCalibrationCam::fHiGainArray, MHCalibrationCam::fLoGainArray 123 132 // … … 128 137 // - MHCalibrationCam::fAverageHiGainSectors, MHCalibrationCam::fAverageLoGainSectors 129 138 // 130 // Calls InitializeHists() for every entry in:131 // - MHCalibrationCam::fHiGainArray 132 // - MHCalibrationCam::fAverageHiGainAreas 133 // - MHCalibrationCam::fAverageHiGainSectors 139 // Calls MHCalibrationCam::InitHists() for every entry in: 140 // - MHCalibrationCam::fHiGainArray, MHCalibrationCam::fLoGainArray 141 // - MHCalibrationCam::fAverageHiGainAreas, MHCalibrationCam::fAverageLoGainAreas 142 // - MHCalibrationCam::fAverageHiGainSectors, MHCalibrationCam::fAverageLoGainSectors 134 143 // 135 144 // Sets Titles and Names for the Histograms … … 249 258 250 259 251 // --------------------------------------------------------------------------------260 // ------------------------------------------------------------------------------- 252 261 // 253 262 // Retrieves pointer to MArrivalTimeCam: … … 258 267 // - number of sectors 259 268 // 260 // Fill RelTimes histograms (MHGausEvents::FillHistAndArray()) with: 269 // Fills HiGain or LoGain histograms (MHGausEvents::FillHistAndArray()), respectively 270 // depending on MArrivalTimePix::IsLoGainUsed(), with: 261 271 // - MArrivalTimePix::GetArrivalTime(pixid) - MArrivalTimePix::GetArrivalTime(1); 262 // (i.e. the time difference between pixel i and pixel 1 (hardware number: 2) 272 // (i.e. the time difference between pixel i and pixel 1 (hardware number: 2) ) 263 273 // 264 274 Bool_t MHCalibrationRelTimeCam::FillHists(const MParContainer *par, const Stat_t w) … … 405 415 // ============== 406 416 // 407 // 0: Fitted Mean Relative Arrival Time 408 // 1: Error of fitted Mean Relative Arrival Time 409 // 2: Sigma of fitted Relative Arrival Time 410 // 3: Error of Sigma of fitted Relative Arrival Time 417 // 0: Fitted Mean Relative Arrival Time (calls: MHGausEvents::GetMean()) 418 // 1: Error of fitted Mean Relative Arrival Time (calls: MHGausEvents::GetMeanErr()) 419 // 2: Sigma of fitted Relative Arrival Time (calls: MHGausEvents::GetSigma()) 420 // 3: Error of Sigma of fitted Relative Arrival Time (calls: MHGausEvents::GetSigmaErr()) 411 421 // 412 422 // … … 414 424 // ============================================= 415 425 // 416 // 4: Returned probability of Gauss fit to RelTime distribution426 // 4: Returned probability of Gauss fit (calls: MHGausEvents::GetProb()) 417 427 // 418 428 // Localized defects: 419 429 // ================== 420 430 // 421 // 5: Gaus fit not OK 422 // 6: Fourier spectrum not OK 431 // 5: Gaus fit not OK (calls: MHGausEvents::IsGausFitOK()) 432 // 6: Fourier spectrum not OK (calls: MHGausEvents::IsFourierSpectrumOK()) 423 433 // 424 434 Bool_t MHCalibrationRelTimeCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const … … 428 438 return kFALSE; 429 439 430 MHCalibrationRelTimePix &hist = (MHCalibrationRelTimePix&)(*this)[idx];431 432 440 switch (type) 433 441 { 434 442 case 0: 435 val = hist.GetMean();443 val = (*this)[idx].GetMean(); 436 444 break; 437 445 case 1: 438 val = hist.GetMeanErr();446 val = (*this)[idx].GetMeanErr(); 439 447 break; 440 448 case 2: 441 val = hist.GetSigma();449 val = (*this)[idx].GetSigma(); 442 450 break; 443 451 case 3: 444 val = hist.GetSigmaErr();452 val = (*this)[idx].GetSigmaErr(); 445 453 break; 446 454 case 4: 447 val = hist.GetProb();455 val = (*this)[idx].GetProb(); 448 456 break; 449 457 case 5: 450 if (! hist.IsGausFitOK())458 if (!(*this)[idx].IsGausFitOK()) 451 459 val = 1.; 452 460 break; 453 461 case 6: 454 if (! hist.IsFourierSpectrumOK())462 if (!(*this)[idx].IsFourierSpectrumOK()) 455 463 val = 1.; 456 464 break; … … 461 469 } 462 470 471 // -------------------------------------------------------------------------- 472 // 473 // Calls MHGausEvents::DrawClone() for pixel idx 474 // 463 475 void MHCalibrationRelTimeCam::DrawPixelContent(Int_t idx) const 464 476 { 465 const MHCalibrationRelTimePix &hist = (MHCalibrationRelTimePix&)(*this)[idx]; 466 hist.DrawClone(); 467 } 477 (*this)[idx].DrawClone(); 478 } -
trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimeCam.h
r3636 r3639 15 15 Bool_t FillHists(const MParContainer *par, const Stat_t w=1); 16 16 Bool_t FinalizeHists(); 17 void FinalizeBadPixels();17 void FinalizeBadPixels(); 18 18 19 19 public: … … 25 25 void DrawPixelContent(Int_t idx) const; 26 26 27 ClassDef(MHCalibrationRelTimeCam, 1) // Histogram class for camera relative time calibration27 ClassDef(MHCalibrationRelTimeCam, 1) // Histogram class for Relative Time Camera Calibration 28 28 }; 29 29 -
trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimePix.cc
r3636 r3639 27 27 // MHCalibrationRelTimePix 28 28 // 29 // Histogram class for the relative arrival time calibration. 30 // Holds the histogrammed arrival times,31 // derives from MHGausEvents, perform Fourier analysis29 // Histogram class for the relative arrival time calibration. 30 // Stores and fits the relative arrival times between pixel fPixId and 31 // pixel number 1 (hardware index: 2). Times are taken from MArrivalTimePix 32 32 // 33 33 ////////////////////////////////////////////////////////////////////////////// … … 57 57 // - the default y-axis title for fHGausHist ("Nr. of events") 58 58 // 59 // Initializes:60 // - fPixId to -161 //62 59 // Executes: 63 60 // - MHGausEvents::Clear() … … 83 80 } 84 81 85 // --------------------------------------------------------------------------86 //87 // Sets:88 // - fPixId to -189 //90 // Executes:91 // - MHGausEvents::Clear()92 //93 void MHCalibrationRelTimePix::Clear(Option_t *o)94 {95 96 fPixId = -1;97 98 MHGausEvents::Clear();99 return;100 }101 102 82 103 83 // -------------------------------------------------------------------------- -
trunk/MagicSoft/Mars/mcalib/MHCalibrationRelTimePix.h
r3636 r3639 11 11 private: 12 12 13 static const Int_t fgRelTimeNbins; //! Default for MHGausEvents::fNBins (now set to: 900 )14 static const Axis_t fgRelTimeFirst; //! Default for MHGausEvents::fFirst (now set to: -13.5 )15 static const Axis_t fgRelTimeLast; //! Default for MHGausEvents::fLast (now set to: 13.5 )13 static const Int_t fgRelTimeNbins; //! Default for fNbins (now set to: 900 ) 14 static const Axis_t fgRelTimeFirst; //! Default for fFirst (now set to: -13.5 ) 15 static const Axis_t fgRelTimeLast; //! Default for fLast (now set to: 13.5 ) 16 16 17 17 public: … … 19 19 MHCalibrationRelTimePix(const char *name=NULL, const char *title=NULL); 20 20 ~MHCalibrationRelTimePix() {} 21 22 void Clear(Option_t *o=""); 21 23 22 void Reset(); 24 23 25 ClassDef(MHCalibrationRelTimePix, 1) // Histogram class for Relative Time Calibration pixel24 ClassDef(MHCalibrationRelTimePix, 1) // Histogram class for Relative Time Pixel Calibration 26 25 }; 27 26 -
trunk/MagicSoft/Mars/mcalib/MHGausEvents.h
r3636 r3639 51 51 protected: 52 52 53 Int_t fNbins; // Number histogram bins for fHGausHist (used by Init ())54 Axis_t fFirst; // Lower histogram edge for fHGausHist (used by Init ())55 Axis_t fLast; // Upper histogram edge for fHGausHist (used by Init ())56 Int_t fPixId; // 53 Int_t fNbins; // Number histogram bins for fHGausHist (used by InitBins()) 54 Axis_t fFirst; // Lower histogram edge for fHGausHist (used by InitBins()) 55 Axis_t fLast; // Upper histogram edge for fHGausHist (used by InitBins()) 56 Int_t fPixId; // Pixel ID 57 57 58 58 TH1F fHGausHist; // Histogram which should hold the Gaussian distribution
Note:
See TracChangeset
for help on using the changeset viewer.