Changeset 3644 for trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.cc
- Timestamp:
- 04/04/04 19:06:45 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationRelTimeCam.cc
r3635 r3644 27 27 // MCalibrationRelTimeCam 28 28 // 29 // Hold the whole Calibration results of the camera: 30 // 31 // 1) MCalibrationRelTimeCam initializes a TClonesArray whose elements are 32 // pointers to MCalibrationRelTimePix Containers 33 // 29 // Storage container for relative arrival time calibration results 30 // of the whole camera. 31 // 32 // Individual pixels have to be cast when retrieved e.g.: 33 // MCalibrationRelTimePix &avpix = (MCalibrationRelTimePix&)(*fRelCam)[i] 34 // 35 // The following "calibration" constants can be retrieved from each pixel: 36 // - GetTimeOffset(): The mean offset in relative times, 37 // has to be added to any calculated relative time in the camera. 38 // - GetTimePrecision(): The Gauss sigma of histogrammed relative arrival 39 // times for the calibration run. Gives an estimate about the timing 40 // resolution. 41 // 42 // ALL RELATIVE TIMES HAVE TO BE CALCULATED W.R.T. PIXEL IDX 1 43 // (HARDWARE NUMBER: 2) !! 44 // 45 // Averaged values over one whole area index (e.g. inner or outer pixels for 46 // the MAGIC camera), can be retrieved via: 47 // MCalibrationRelTimePix &avpix = (MCalibrationRelTimePix&)fRelCam->GetAverageArea(i) 48 // 49 // Averaged values over one whole camera sector can be retrieved via: 50 // MCalibrationRelTimePix &avpix = (MCalibrationRelTimePix&)fRelCam->GetAverageSector(i) 51 // 52 // Note the averageing has been done on an event-by-event basis. Resulting 53 // Sigma's of the Gauss fit have been multiplied with the square root of the number 54 // of involved pixels in order to make a direct comparison possible with the mean of 55 // sigmas. 56 // 57 // See also: MHCalibrationRelTimePix, MHCalibrationRelTimeCam 58 // 34 59 // The calculated values (types of GetPixelContent) are: 35 60 // … … 37 62 // ============== 38 63 // 39 // 0: Fitted RelTime40 // 1: Error of fitted RelTime41 // 2: Sigma of fitted RelTime42 // 3: Error of Sigma of fitted RelTime64 // 0: Mean Time Offset 65 // 1: Error of Mean Time Offset 66 // 2: Sigma of Time Offset == Time Resolution 67 // 3: Error of Sigma of Time Offset 43 68 // 44 69 // Useful variables derived from the fit results: 45 70 // ============================================= 46 71 // 47 // 4: Returned probability of Gauss fit to Rel Time distribution72 // 4: Returned probability of Gauss fit to Rel. Arrival Time distribution 48 73 // 49 74 ///////////////////////////////////////////////////////////////////////////// … … 69 94 // Default constructor. 70 95 // 71 // Creates a TClonesArray of MCalibrationPix containers, initialized to 1 entry 72 // Later, a call to MCalibrationRelTimeCam::InitSize(Int_t size) has to be performed 73 // 74 // Creates an MCalibrationBlindPix container 96 // Creates a TClonesArray of MCalibrationPix containers, initialized to 1 entry, destinated 97 // to hold one container per pixel. Later, a call to MCalibrationRelTimeCam::InitSize() 98 // has to be performed (in MGeomApply). 99 // 100 // Creates a TClonesArray of MCalibrationPix containers, initialized to 1 entry, destinated 101 // to hold one container per pixel AREA. Later, a call to MCalibrationRelTimeCam::InitAreas() 102 // has to be performed (in MGeomApply). 103 // 104 // Creates a TClonesArray of MCalibrationPix containers, initialized to 1 entry, destinated 105 // to hold one container per camera SECTOR. Later, a call to MCalibrationRelTimeCam::InitSectors() 106 // has to be performed (in MGeomApply). 75 107 // 76 108 MCalibrationRelTimeCam::MCalibrationRelTimeCam(const char *name, const char *title) … … 83 115 fAverageSectors = new TClonesArray("MCalibrationRelTimePix",1); 84 116 85 Clear();86 87 }88 89 90 91 // --------------------------------------92 //93 void MCalibrationRelTimeCam::Clear(Option_t *o)94 {95 96 MCalibrationCam::Clear();97 98 CLRBIT(fFlags,kValid);99 100 return;101 }102 103 void MCalibrationRelTimeCam::SetValid(const Bool_t b)104 {105 b ? SETBIT(fFlags, kValid) : CLRBIT(fFlags, kValid);106 }107 108 109 Bool_t MCalibrationRelTimeCam::IsValid() const110 {111 return TESTBIT(fFlags,kValid);112 117 } 113 118 … … 115 120 // 116 121 // Print first the well fitted pixels 117 // and then the ones which are not FitValid122 // and then the ones which are not Valid 118 123 // 119 124 void MCalibrationRelTimeCam::Print(Option_t *o) const … … 254 259 // -------------------------------------------------------------------------- 255 260 // 256 // What MHCamera needs in order to draw an individual pixel in the camera261 // Calls MCalibrationPix::DrawClone() 257 262 // 258 263 void MCalibrationRelTimeCam::DrawPixelContent(Int_t idx) const … … 261 266 } 262 267 263 264 265 Bool_t MCalibrationRelTimeCam::GetConversion(Int_t ipx, Float_t &mean, Float_t &err, Float_t &sigma)266 {267 268 MCalibrationRelTimePix &pix = (MCalibrationRelTimePix&)(*this)[ipx];269 270 mean = pix.GetMeanConversion();271 err = pix.GetConversionErr();272 sigma = pix.GetSigmaConversion();273 274 return kTRUE;275 }276 277
Note:
See TracChangeset
for help on using the changeset viewer.