Changeset 3644 for trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.cc
- Timestamp:
- 04/04/04 19:06:45 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationQECam.cc
r3321 r3644 28 28 // MCalibrationQECam 29 29 // 30 // Hold the calibrated QE information of the camera: 31 // 32 // 1) MCalibrationQECam initializes a TClonesArray whose elements are 33 // pointers to MCalibrationQEPix Containers 30 // Storage container for the calibrated Quantum Efficiency of the whole camera. 31 // 32 // Individual pixels have to be cast when retrieved e.g.: 33 // MCalibrationQEPix &avpix = (MCalibrationQEPix&)(*fQECam)[i] 34 // 35 // The following "calibration" constants can be retrieved from each pixel: 36 // - GetQE ( const PulserColor_t color ): The mean quantum 37 // efficiency obtained with the calibration pulser color (e.g. kGREEN, kBLUE, kUV) 38 // - GetQEErr( const PulserColor_t color ): The uncertainty 39 // of the mean quantum efficiency. 40 // 41 // Averaged values over one whole area index (e.g. inner or outer pixels for 42 // the MAGIC camera), can be retrieved via: 43 // MCalibrationRelTimePix &avpix = (MCalibrationRelTimePix&)fRelCam->GetAverageArea(i) 44 // 45 // Averaged values over one whole camera sector can be retrieved via: 46 // MCalibrationRelTimePix &avpix = (MCalibrationRelTimePix&)fRelCam->GetAverageSector(i) 47 // 48 // Note the averageing has been done at the end of the calculation and NOT on an 49 // event-by-event basis (like in other classes deriving from MCalibrationCam). 50 // 51 // See also: MHCalibrationChargePix, MHCalibrationChargeCam, MCalibrationChargeCalc 52 // 53 // The calculated values (types of GetPixelContent) are: 54 // 55 // 0: Mean Quantum Efficiency of the color: kCT1 56 // 1: Error of the Mean Quantum Efficiency of the color: kCT1 57 // 2: Mean Quantum Efficiency of the color: kGREEN 58 // 3: Error of the Mean Quantum Efficiency of the color: kGreen 59 // 4: Mean Quantum Efficiency of the color: kBLUE 60 // 5: Error of the Mean Quantum Efficiency of the color: kBlue 61 // 6: Mean Quantum Efficiency of the color: kUV 62 // 7: Error of the Mean Quantum Efficiency of the color: kUV 34 63 // 35 64 ///////////////////////////////////////////////////////////////////////////// … … 51 80 // Default constructor. 52 81 // 53 // Creates a TClonesArray of MCalibrationPix containers, initialized to 1 entry 54 // Later, a call to MCalibrationQECam::InitSize(Int_t size) has to be performed 55 // 56 // Creates an MCalibrationBlindPix container 82 // Creates a TClonesArray of MCalibrationQEPix containers, initialized to 1 entry, destinated 83 // to hold one container per pixel. Later, a call to MCalibrationQECam::InitSize() 84 // has to be performed (in MGeomApply). 57 85 // 58 86 MCalibrationQECam::MCalibrationQECam(const char *name, const char *title) … … 61 89 fTitle = title ? title : "Storage container for the calibrated Quantrum Efficiency of the camera"; 62 90 63 fPixels = new TClonesArray("MCalibrationQEPix",1); 64 65 Clear(); 66 } 67 68 // -------------------------------------------------------------------------- 69 // 70 MCalibrationQECam::~MCalibrationQECam() 71 { 72 73 // 74 // delete fPixels should delete all Objects stored inside 75 // 76 delete fPixels; 77 78 } 79 80 // ------------------------------------------------------------------- 81 // 82 void MCalibrationQECam::InitSize(const UInt_t i) 83 { 84 fPixels->ExpandCreate(i); 85 } 86 87 // -------------------------------------------------------------------------- 88 // 89 // This function returns the current size of the TClonesArray 90 // independently if the MCalibrationPix is filled with values or not. 91 // 92 // It is the size of the array fPixels. 93 // 94 Int_t MCalibrationQECam::GetSize() const 95 { 96 return fPixels->GetEntriesFast(); 97 } 98 99 100 // -------------------------------------------------------------------------- 101 // 102 // Get i-th pixel (pixel number) 103 // 104 MCalibrationQEPix &MCalibrationQECam::operator[](UInt_t i) 105 { 106 return *static_cast<MCalibrationQEPix*>(fPixels->UncheckedAt(i)); 107 } 108 109 // -------------------------------------------------------------------------- 110 // 111 // Get i-th pixel (pixel number) 112 // 113 const MCalibrationQEPix &MCalibrationQECam::operator[](UInt_t i) const 114 { 115 return *static_cast<MCalibrationQEPix*>(fPixels->UncheckedAt(i)); 116 } 117 118 119 // -------------------------------------- 120 // 121 void MCalibrationQECam::Clear(Option_t *o) 122 { 123 124 fPixels->ForEach(TObject, Clear)(); 125 126 return; 91 fPixels = new TClonesArray("MCalibrationQEPix",1); 92 fAverageAreas = new TClonesArray("MCalibrationQEPix",1); 93 fAverageSectors = new TClonesArray("MCalibrationQEPix",1); 94 127 95 } 128 96 … … 144 112 { 145 113 146 if (!pix->IsExcluded() && pix->Is QEValid())114 if (!pix->IsExcluded() && pix->IsValid()) 147 115 { 148 116 *fLog << all << "Pix " << pix->GetPixId() … … 164 132 { 165 133 166 if (!pix->IsExcluded() && !pix->Is QEValid())134 if (!pix->IsExcluded() && !pix->IsValid()) 167 135 { 168 136 *fLog << all << "Pix " << pix->GetPixId() … … 193 161 } 194 162 163 // -------------------------------------------------------------------- 164 // 165 // The calculated values (types) are: 166 // 167 // 0: Mean Quantum Efficiency of the color: kCT1 168 // 1: Error of the Mean Quantum Efficiency of the color: kCT1 169 // 2: Mean Quantum Efficiency of the color: kGREEN 170 // 3: Error of the Mean Quantum Efficiency of the color: kGreen 171 // 4: Mean Quantum Efficiency of the color: kBLUE 172 // 5: Error of the Mean Quantum Efficiency of the color: kBlue 173 // 6: Mean Quantum Efficiency of the color: kUV 174 // 7: Error of the Mean Quantum Efficiency of the color: kUV 195 175 // 196 176 Bool_t MCalibrationQECam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const … … 198 178 199 179 if (idx > GetSize()) 180 return kFALSE; 181 182 MCalibrationQEPix &pix = (MCalibrationQEPix&)(*this)[idx]; 183 184 if (pix.IsExcluded()) 200 185 return kFALSE; 201 186 … … 203 188 { 204 189 case 0: 205 if ((*this)[idx].IsExcluded()) 206 return kFALSE; 207 val = (*this)[idx].GetQE(kCT1); 190 val = pix.GetQE(kCT1); 208 191 break; 209 192 case 1: 210 if ((*this)[idx].IsExcluded()) 211 return kFALSE; 212 val = (*this)[idx].GetQEErr(kCT1); 193 val = pix.GetQEErr(kCT1); 194 break; 195 case 2: 196 val = pix.GetQE(kGREEN); 197 break; 198 case 3: 199 val = pix.GetQEErr(kGREEN); 200 break; 201 case 4: 202 val = pix.GetQE(kBLUE); 203 break; 204 case 5: 205 val = pix.GetQEErr(kBLUE); 206 break; 207 case 6: 208 val = pix.GetQE(kUV); 209 break; 210 case 7: 211 val = pix.GetQEErr(kUV); 213 212 break; 214 213 default: … … 220 219 // -------------------------------------------------------------------------- 221 220 // 222 // What MHCamera needs in order to draw an individual pixel in the camera221 // Not yet implemented 223 222 // 224 223 void MCalibrationQECam::DrawPixelContent(Int_t idx) const 225 224 { 226 227 } 228 229 230 231 232 233 234 235 236 225 return; 226 } 227 228 229 230 231 232 233 234 235
Note:
See TracChangeset
for help on using the changeset viewer.