Changeset 3624 for trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
- Timestamp:
- 04/01/04 14:52:32 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
r3622 r3624 151 151 152 152 fPixels = new TClonesArray("MCalibrationChargePix",1); 153 fAveragePixels = new TClonesArray("MCalibrationChargePix",1); 154 fAverageBadPixels = new TClonesArray("MBadPixelsPix",1); 153 fAverageAreas = new TClonesArray("MCalibrationChargePix",1); 154 fAverageBadAreas = new TClonesArray("MBadPixelsPix",1); 155 fAverageSectors = new TClonesArray("MCalibrationChargePix",1); 156 fAverageBadSectors = new TClonesArray("MBadPixelsPix",1); 155 157 156 158 Clear(); … … 175 177 // 176 178 delete fPixels; 177 delete fAveragePixels; 178 delete fAverageBadPixels; 179 delete fAverageAreas; 180 delete fAverageBadAreas; 181 delete fAverageSectors; 182 delete fAverageBadSectors; 183 179 184 180 185 if (fOffsets) … … 200 205 } 201 206 202 void MCalibrationChargeCam::InitAverageSize(const UInt_t i) 203 { 204 fAveragePixels->ExpandCreate(i); 205 fAverageBadPixels->ExpandCreate(i); 207 void MCalibrationChargeCam::InitAverageAreas(const UInt_t i) 208 { 209 fAverageAreas->ExpandCreate(i); 210 fAverageBadAreas->ExpandCreate(i); 211 } 212 213 void MCalibrationChargeCam::InitAverageSectors(const UInt_t i) 214 { 215 fAverageSectors->ExpandCreate(i); 216 fAverageBadSectors->ExpandCreate(i); 206 217 } 207 218 … … 220 231 } 221 232 222 Int_t MCalibrationChargeCam::GetAverageSize() const 223 { 224 return fAveragePixels->GetEntriesFast(); 233 Int_t MCalibrationChargeCam::GetAverageAreas() const 234 { 235 return fAverageAreas->GetEntriesFast(); 236 } 237 238 Int_t MCalibrationChargeCam::GetAverageSectors() const 239 { 240 return fAverageSectors->GetEntriesFast(); 225 241 } 226 242 … … 248 264 // Get i-th average pixel (area number) 249 265 // 250 MCalibrationChargePix &MCalibrationChargeCam::GetAverage Pix(UInt_t i)251 { 252 return *static_cast<MCalibrationChargePix*>(fAverage Pixels->UncheckedAt(i));266 MCalibrationChargePix &MCalibrationChargeCam::GetAverageArea(UInt_t i) 267 { 268 return *static_cast<MCalibrationChargePix*>(fAverageAreas->UncheckedAt(i)); 253 269 } 254 270 … … 257 273 // Get i-th average pixel (area number) 258 274 // 259 const MCalibrationChargePix &MCalibrationChargeCam::GetAveragePix(UInt_t i) const 260 { 261 return *static_cast<MCalibrationChargePix*>(fAveragePixels->UncheckedAt(i)); 275 const MCalibrationChargePix &MCalibrationChargeCam::GetAverageArea(UInt_t i) const 276 { 277 return *static_cast<MCalibrationChargePix*>(fAverageAreas->UncheckedAt(i)); 278 } 279 280 // -------------------------------------------------------------------------- 281 // 282 // Get i-th average pixel (sector number) 283 // 284 MCalibrationChargePix &MCalibrationChargeCam::GetAverageSector(UInt_t i) 285 { 286 return *static_cast<MCalibrationChargePix*>(fAverageSectors->UncheckedAt(i)); 287 } 288 289 // -------------------------------------------------------------------------- 290 // 291 // Get i-th average pixel (sector number) 292 // 293 const MCalibrationChargePix &MCalibrationChargeCam::GetAverageSector(UInt_t i) const 294 { 295 return *static_cast<MCalibrationChargePix*>(fAverageSectors->UncheckedAt(i)); 262 296 } 263 297 … … 266 300 // Get i-th average pixel (area number) 267 301 // 268 MBadPixelsPix &MCalibrationChargeCam::GetAverageBad Pix(UInt_t i)269 { 270 return *static_cast<MBadPixelsPix*>(fAverageBad Pixels->UncheckedAt(i));302 MBadPixelsPix &MCalibrationChargeCam::GetAverageBadArea(UInt_t i) 303 { 304 return *static_cast<MBadPixelsPix*>(fAverageBadAreas->UncheckedAt(i)); 271 305 } 272 306 … … 275 309 // Get i-th average pixel (area number) 276 310 // 277 const MBadPixelsPix &MCalibrationChargeCam::GetAverageBadPix(UInt_t i) const 278 { 279 return *static_cast<MBadPixelsPix*>(fAverageBadPixels->UncheckedAt(i)); 311 const MBadPixelsPix &MCalibrationChargeCam::GetAverageBadArea(UInt_t i) const 312 { 313 return *static_cast<MBadPixelsPix*>(fAverageBadAreas->UncheckedAt(i)); 314 } 315 316 // -------------------------------------------------------------------------- 317 // 318 // Get i-th average pixel (sector number) 319 // 320 MBadPixelsPix &MCalibrationChargeCam::GetAverageBadSector(UInt_t i) 321 { 322 return *static_cast<MBadPixelsPix*>(fAverageBadSectors->UncheckedAt(i)); 323 } 324 325 // -------------------------------------------------------------------------- 326 // 327 // Get i-th average pixel (sector number) 328 // 329 const MBadPixelsPix &MCalibrationChargeCam::GetAverageBadSector(UInt_t i) const 330 { 331 return *static_cast<MBadPixelsPix*>(fAverageBadSectors->UncheckedAt(i)); 280 332 } 281 333 … … 291 343 // another ForEach does not compile, thus have to do the loop ourselves: 292 344 // 293 for (Int_t i=0;i<GetAverageSize();i++) 294 { 295 fAveragePixels[i].Clear(); 296 fAverageBadPixels[i].Clear(); 345 for (Int_t i=0;i<GetAverageAreas();i++) 346 { 347 fAverageAreas[i].Clear(); 348 fAverageBadAreas[i].Clear(); 349 } 350 351 // 352 // another ForEach does not compile, thus have to do the loop ourselves: 353 // 354 for (Int_t i=0;i<GetAverageSectors();i++) 355 { 356 fAverageSectors[i].Clear(); 357 fAverageBadSectors[i].Clear(); 297 358 } 298 359 … … 418 479 *fLog << endl; 419 480 420 TIter Next5(fAverage Pixels);481 TIter Next5(fAverageAreas); 421 482 while ((pix=(MCalibrationChargePix*)Next5())) 422 483 { 423 *fLog << all << "Average Pix:"484 *fLog << all << "Average Area:" 424 485 << " Ped. Rms: " << pix->GetPedRms() << " +- " << pix->GetPedRmsErr() 425 486 << " Mean signal: " << pix->GetMeanCharge() << " +- " << pix->GetMeanChargeErr() … … 429 490 << endl; 430 491 } 492 493 TIter Next6(fAverageSectors); 494 while ((pix=(MCalibrationChargePix*)Next5())) 495 { 496 *fLog << all << "Average Sector:" 497 << " Ped. Rms: " << pix->GetPedRms() << " +- " << pix->GetPedRmsErr() 498 << " Mean signal: " << pix->GetMeanCharge() << " +- " << pix->GetMeanChargeErr() 499 << " Sigma signal: " << pix->GetSigmaCharge() << " +- "<< pix->GetSigmaChargeErr() 500 << " Reduced Sigma: " << pix->GetRSigmaCharge() 501 << " Nr Phe's: " << pix->GetPheFFactorMethod() 502 << endl; 503 } 504 431 505 } 432 506
Note:
See TracChangeset
for help on using the changeset viewer.