Changeset 4599 for trunk/MagicSoft
- Timestamp:
- 08/12/04 14:38:02 (20 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/MCalibrateData.cc
r4590 r4599 38 38 // SetPedestalType(). Default is 'kRun', i.e. calibration of pedestals from a 39 39 // dedicated pedestal run. 40 // In case, the chosen pedestal type is kRun or kEv t, in ReInit() the MPedPhotCam40 // In case, the chosen pedestal type is kRun or kEvent, in ReInit() the MPedPhotCam 41 41 // container is filled using the information from MPedestalCam, MExtractedSignalCam, 42 42 // MCalibrationChargeCam and MCalibrationQECam … … 74 74 #include "MCalibrateData.h" 75 75 76 #include <fstream> 77 76 78 #include "MLog.h" 77 79 #include "MLogManip.h" … … 105 107 106 108 using namespace std; 109 110 const TString MCalibrateData::fgNamePedADCRunContainer = "MPedestalCam" ; 111 const TString MCalibrateData::fgNamePedADCEventContainer = "MPedestalCamFromData"; 112 const TString MCalibrateData::fgNamePedPhotRunContainer = "MPedPhotCam" ; 113 const TString MCalibrateData::fgNamePedPhotEventContainer = "MPedPhotCamFromData" ; 107 114 // -------------------------------------------------------------------------- 108 115 // 109 116 // Default constructor. 110 117 // 118 // Sets all pointers to NULL 119 // 120 // Initializes: 121 // - fCalibrationMode to kDefault 122 // - fPedestalFlag to kRun 123 // - fNamePedADCRunContainer to "MPedestalCam" 124 // - fNamePedADCEventContainer to "MPedestalCamFromData" 125 // - fNamePedPhotRunContainer to "MPedPhotCam" 126 // - fNamePedPhotEventContainer to "MPedPhotCamFromData" 127 // 111 128 MCalibrateData::MCalibrateData(CalibrationMode_t calmode,const char *name, const char *title) 112 : fGeomCam(NULL), fPedestal(NULL), fBadPixels(NULL), fCalibrations(NULL), fSignals(NULL), 113 fPedPhot(NULL), fCerPhotEvt(NULL), fCalibrationMode(calmode), fFlags(kRun), fNamePedADCRunContainer("MPedestalCam"), fNamePedADCEventContainer("MPedestalCamFromData"), fNamePedPhotRunContainer("MPedPhotCam"), fNamePedPhotEventContainer("MPedPhotCamFromData") 129 : fGeomCam(NULL), fPedestal(NULL), fPedestalFromData(NULL), 130 fBadPixels(NULL), fCalibrations(NULL), fQEs(NULL), fSignals(NULL), 131 fPedPhot(NULL), fPedPhotFromData(NULL), fCerPhotEvt(NULL) 114 132 { 115 fName = name ? name : "MCalibrateData"; 116 fTitle = title ? title : "Task to calculate the number of photons in one event"; 133 134 fName = name ? name : "MCalibrateData"; 135 fTitle = title ? title : "Task to calculate the number of photons in one event"; 136 137 SetCalibrationMode(); 138 SetPedestalType(); 139 140 SetNamePedADCRunContainer (); 141 SetNamePedADCEventContainer (); 142 SetNamePedPhotRunContainer (); 143 SetNamePedPhotEventContainer(); 144 117 145 } 118 146 … … 120 148 // 121 149 // The PreProcess searches for the following input containers: 150 // 122 151 // - MGeomCam 123 152 // - MPedestalCam … … 125 154 // - MCalibrationQECam 126 155 // - MExtractedSignalCam 156 // - MBadPixelsCam 127 157 // 128 158 // The following output containers are also searched and created if … … 136 166 137 167 // input containers 138 139 168 140 169 if (TestFlag(kRun)) … … 162 191 163 192 164 165 193 fSignals = (MExtractedSignalCam*)pList->FindObject(AddSerialNumber("MExtractedSignalCam")); 194 if (!fSignals) 166 195 { 167 196 *fLog << err << AddSerialNumber("MExtractedSignalCam") << " not found ... aborting" << endl; 168 return kFALSE; 169 } 170 171 fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam")); 172 173 if (!fBadPixels) 197 return kFALSE; 198 } 199 200 fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam")); 201 if (!fBadPixels) 174 202 { 175 203 *fLog << err << AddSerialNumber("MBadPixelsCam") << " not found ... aborting" << endl; 176 177 } 178 179 204 return kFALSE; 205 } 206 207 if (fCalibrationMode>kNone) 180 208 { 181 209 fCalibrations = (MCalibrationChargeCam*)pList->FindObject(AddSerialNumber("MCalibrationChargeCam")); 182 210 if (!fCalibrations) 183 {211 { 184 212 *fLog << err << AddSerialNumber("MCalibrationChargeCam") << " not found ... aborting." << endl; 185 213 return kFALSE; 186 } 214 } 215 187 216 fQEs = (MCalibrationQECam*)pList->FindObject(AddSerialNumber("MCalibrationQECam")); 188 217 if (!fQEs) … … 192 221 } 193 222 } 194 195 196 197 223 224 // output containers 225 226 if (TestFlag(kRun)) 198 227 { 199 228 fPedPhot = (MPedPhotCam*)pList->FindCreateObj(AddSerialNumber("MPedPhotCam"), fNamePedPhotRunContainer); 200 229 if (!fPedPhot) 201 {230 { 202 231 *fLog << err << "container 'MPedPhotCam'" 203 232 << " not found ... aborting" << endl; 204 233 return kFALSE; 234 } 235 } 236 237 238 if (TestFlag(kEvent)) 239 { 240 fPedPhotFromData = (MPedPhotCam*)pList->FindCreateObj(AddSerialNumber("MPedPhotCam"), 241 fNamePedPhotEventContainer); 242 if (!fPedPhotFromData) 243 { 244 *fLog << err << "container 'MPedPhotCamFromData'" 245 << " not found ... aborting" << endl; 246 return kFALSE; 205 247 } 206 248 } 207 208 209 if (TestFlag(kEvent)) 210 { 211 fPedPhotFromData = (MPedPhotCam*)pList->FindCreateObj(AddSerialNumber("MPedPhotCam"), fNamePedPhotEventContainer); 212 if (!fPedPhotFromData) 213 { 214 *fLog << err << "container 'MPedPhotCamFromData'" 215 << " not found ... aborting" << endl; 216 return kFALSE; 217 } 218 } 219 220 fCerPhotEvt = (MCerPhotEvt*)pList->FindCreateObj(AddSerialNumber("MCerPhotEvt")); 221 if (!fCerPhotEvt) 222 return kFALSE; 223 224 return kTRUE; 249 250 fCerPhotEvt = (MCerPhotEvt*)pList->FindCreateObj(AddSerialNumber("MCerPhotEvt")); 251 if (!fCerPhotEvt) 252 return kFALSE; 253 254 return kTRUE; 225 255 } 226 256 227 257 // -------------------------------------------------------------------------- 258 // 259 // The ReInit searches for the following input containers: 260 // 261 // - MGeomCam 228 262 // 229 263 // Check for validity of the selected calibration method, switch to a 230 264 // different one in case of need 231 265 // 232 // fill the MPedPhotCam container using the information from MPedestalCam,266 // Fill the MPedPhotCam container using the information from MPedestalCam, 233 267 // MExtractedSignalCam and MCalibrationCam 234 //235 268 // 236 269 Bool_t MCalibrateData::ReInit(MParList *pList) 237 270 { 238 271 272 fGeomCam = (MGeomCam*)pList->FindObject(AddSerialNumber("MGeomCam")); 273 if (!fGeomCam) 274 { 275 *fLog << err << "No MGeomCam found... aborting." << endl; 276 return kFALSE; 277 } 278 239 279 if(fCalibrationMode == kBlindPixel && !fQEs->IsBlindPixelMethodValid()) 240 280 { 241 *fLog << warn << GetDescriptor() << "Warning: Blind pixel calibration method not valid, switching to F-factor method" << endl; 281 *fLog << warn << GetDescriptor() 282 << ": Blind pixel calibration method not valid, switching to default F-factor method" << endl; 242 283 fCalibrationMode = kFfactor; 243 284 } … … 245 286 if(fCalibrationMode == kPinDiode && !fQEs->IsPINDiodeMethodValid()) 246 287 { 247 *fLog << warn << GetDescriptor() << "Warning: PIN diode calibration method not valid, switching to F-factor method" << endl; 288 *fLog << warn << GetDescriptor() 289 << ": PIN diode calibration method not valid, switching to default F-factor method" << endl; 248 290 fCalibrationMode = kFfactor; 249 291 } 250 292 293 if(fCalibrationMode == kCombined && !fQEs->IsCombinedMethodValid()) 294 { 295 *fLog << warn << GetDescriptor() 296 << ": Combined calibration method not valid, switching to default F-factor method" << endl; 297 fCalibrationMode = kFfactor; 298 } 299 300 // 301 // output information or warnings: 302 // 303 switch(fCalibrationMode) 304 { 305 case kBlindPixel: 306 break; 307 case kFfactor: 308 break; 309 case kPinDiode: 310 *fLog << err << GetDescriptor() 311 << ": PIN Diode Calibration mode not yet available " << endl; 312 return kFALSE; 313 break; 314 case kCombined: 315 *fLog << err << GetDescriptor() 316 << ": Combined Calibration mode not yet available " << endl; 317 return kFALSE; 318 break; 319 case kFlatCharge: 320 *fLog << warn << GetDescriptor() 321 << ": WARNING: Flat-fielding charges - only for muon calibration! " << endl; 322 break; 323 case kDummy: 324 *fLog << warn << GetDescriptor() 325 << ": WARNING: Dummy calibration, no calibration applied!!" << endl; 326 break; 327 case kNone: 328 *fLog << warn << GetDescriptor() 329 << ": WARNING: No calibration applied!!" << endl; 330 break; 331 default: 332 *fLog << warn << GetDescriptor() 333 << ": WARNING: Calibration mode value (" 334 << fCalibrationMode << ") not known" << endl; 335 return kFALSE; 336 } 251 337 252 338 if (TestFlag(kRun)) 253 {254 if (!CalibratePedestal(fPedestal,fPedPhot))return kFALSE;255 } 339 if (!CalibratePedestal(fPedestal,fPedPhot)) 340 return kFALSE; 341 256 342 257 343 return kTRUE; … … 264 350 // Calibrate the Pedestal values 265 351 // 266 //267 352 Bool_t MCalibrateData::CalibratePedestal(MPedestalCam *pedADCCam, MPedPhotCam *pedPhotCam) 268 353 { 269 //--------------------------------------------- 270 // fill MPedPhot container using the informations from 354 355 // 356 // Fill MPedPhot container using the informations from 271 357 // MPedestalCam, MExtractedSignalCam and MCalibrationCam 272 273 fNumUsedHiGainFADCSlices = fSignals->GetNumUsedHiGainFADCSlices();358 // 359 const Float_t slices = fSignals->GetNumUsedHiGainFADCSlices(); 274 360 275 361 // is pixid equal to pixidx ? … … 280 366 } 281 367 282 283 368 284 369 for (Int_t pixid=0; pixid<pedADCCam->GetSize(); pixid++) 285 370 { 371 286 372 const MPedestalPix &ped = (*pedADCCam)[pixid]; 287 373 288 374 // pedestals/(used FADC slices) in [ADC] counts 289 Float_t pedes = ped.GetPedestal() * fNumUsedHiGainFADCSlices;290 Float_t pedrms = ped.GetPedestalRms() * sqrt(fNumUsedHiGainFADCSlices);291 292 // ----------------------------------375 Float_t pedes = ped.GetPedestal() * slices; 376 Float_t pedrms = ped.GetPedestalRms() * TMath::Sqrt(slices); 377 378 // 293 379 // get phe/ADC conversion factor 294 380 // 295 381 Float_t hiloconv; 296 382 Float_t hiloconverr; … … 303 389 continue; 304 390 305 //---------------------------------- 306 391 // 307 392 // pedestals/(used FADC slices) in [number of photons] 393 // 308 394 Float_t pedphot = pedes * calibConv; 309 395 Float_t pedphotrms = pedrms * calibConv; … … 313 399 } 314 400 315 //---------------------------------------------316 317 401 pedPhotCam->SetReadyToSave(); 318 402 … … 320 404 } 321 405 322 323 324 325 326 327 328 406 // -------------------------------------------------------------------------- 329 407 // 330 408 // Get conversion factor and its error from MCalibrationCam 331 //332 409 // 333 410 Bool_t MCalibrateData::GetConversionFactor(UInt_t pixidx, … … 344 421 hiloconverr = 0.; 345 422 calibConv = 1.; 346 calibConvVar 423 calibConvVar = 0.; 347 424 calibFFactor = 0.; 348 425 Float_t calibQE = 1.; 349 426 Float_t calibQEVar = 0.; 350 351 427 Float_t avMean = 1.; 352 428 Float_t avMeanRelVar = 0.; 353 354 355 429 356 430 if (fCalibrationMode == kFlatCharge) … … 363 437 364 438 if(fCalibrationMode!=kNone) 365 { 366 367 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCalibrations)[pixidx]; 368 369 hiloconv = pix.GetConversionHiLo (); 370 hiloconverr= pix.GetConversionHiLoErr(); 371 372 if (fBadPixels) 373 { 374 MBadPixelsPix &bad = (*fBadPixels)[pixidx]; 375 if (bad.IsUnsuitable(MBadPixelsPix::kUnsuitableRun)) 376 return kFALSE; 377 } 378 379 calibConv = pix.GetMeanConvFADC2Phe(); 380 calibConvVar = pix.GetMeanConvFADC2PheVar(); 381 calibFFactor = pix.GetMeanFFactorFADC2Phot(); 382 383 MCalibrationQEPix &qe = (MCalibrationQEPix&) (*fQEs)[pixidx]; 439 { 440 441 MCalibrationChargePix &pix = (MCalibrationChargePix&)(*fCalibrations)[pixidx]; 442 443 hiloconv = pix.GetConversionHiLo (); 444 hiloconverr= pix.GetConversionHiLoErr(); 445 446 if (fBadPixels) 447 { 448 MBadPixelsPix &bad = (*fBadPixels)[pixidx]; 449 if (bad.IsUnsuitable()) 450 return kFALSE; 451 } 452 453 calibConv = pix.GetMeanConvFADC2Phe(); 454 calibConvVar = pix.GetMeanConvFADC2PheVar(); 455 calibFFactor = pix.GetMeanFFactorFADC2Phot(); 456 457 MCalibrationQEPix &qe = (MCalibrationQEPix&) (*fQEs)[pixidx]; 458 459 switch(fCalibrationMode) 460 { 461 case kFlatCharge: 462 calibConv = avMean / pix.GetMean() / fGeomCam->GetPixRatio(pixidx) ; 463 calibConvVar = (avMeanRelVar + pix.GetMeanRelVar()) * calibConv * calibConv; 464 if (pix.IsFFactorMethodValid()) 465 { 466 const Float_t convmin1 = qe.GetQECascadesFFactor(zenith)/pix.GetMeanConvFADC2Phe(); 467 if (convmin1 > 0) 468 calibFFactor *= TMath::Sqrt(convmin1); 469 else 470 calibFFactor = -1.; 471 } 472 break; 473 case kBlindPixel: 474 if (qe.IsBlindPixelMethodValid()) 475 { 476 calibQE = qe.GetQECascadesBlindPixel ( zenith ); 477 calibQEVar = qe.GetQECascadesBlindPixelVar( zenith ); 478 } 479 else 480 return kFALSE; 481 break; 482 case kPinDiode: 483 if (qe.IsPINDiodeMethodValid()) 484 { 485 calibQE = qe.GetQECascadesPINDiode ( zenith ); 486 calibQEVar = qe.GetQECascadesPINDiodeVar( zenith ); 487 } 488 else 489 return kFALSE; 490 break; 491 case kFfactor: 492 if (pix.IsFFactorMethodValid()) 493 { 494 calibQE = qe.GetQECascadesFFactor ( zenith ); 495 calibQEVar = qe.GetQECascadesFFactorVar( zenith ); 496 } 497 else 498 return kFALSE; 499 break; 500 case kCombined: 501 if (qe.IsCombinedMethodValid()) 502 { 503 calibQE = qe.GetQECascadesCombined ( zenith ); 504 calibQEVar = qe.GetQECascadesCombinedVar( zenith ); 505 } 506 else 507 return kFALSE; 508 break; 509 case kDummy: 510 hiloconv = 1.; 511 hiloconverr = 0.; 512 break; 384 513 385 switch(fCalibrationMode) 386 { 387 case kFlatCharge: 388 calibConv = avMean / pix.GetMean() / fGeomCam->GetPixRatio(pixidx) ; 389 calibConvVar = (avMeanRelVar + pix.GetMeanRelVar()) * calibConv * calibConv; 390 if (pix.IsFFactorMethodValid()) 391 { 392 const Float_t convmin1 = qe.GetQECascadesFFactor(zenith)/pix.GetMeanConvFADC2Phe(); 393 if (convmin1 > 0) 394 calibFFactor *= TMath::Sqrt(convmin1); 395 else 396 calibFFactor = -1.; 397 } 398 break; 399 case kBlindPixel: 400 if (qe.IsBlindPixelMethodValid()) 401 { 402 calibQE = qe.GetQECascadesBlindPixel ( zenith ); 403 calibQEVar = qe.GetQECascadesBlindPixelVar( zenith ); 404 } 405 else 406 return kFALSE; 407 break; 408 case kPinDiode: 409 if (qe.IsPINDiodeMethodValid()) 410 { 411 calibQE = qe.GetQECascadesPINDiode ( zenith ); 412 calibQEVar = qe.GetQECascadesPINDiodeVar( zenith ); 413 } 414 else 415 return kFALSE; 416 break; 417 case kFfactor: 418 if (pix.IsFFactorMethodValid()) 419 { 420 calibQE = qe.GetQECascadesFFactor ( zenith ); 421 calibQEVar = qe.GetQECascadesFFactorVar( zenith ); 422 } 423 else 424 return kFALSE; 425 break; 426 case kCombined: 427 if (qe.IsCombinedMethodValid()) 428 { 429 calibQE = qe.GetQECascadesCombined ( zenith ); 430 calibQEVar = qe.GetQECascadesCombinedVar( zenith ); 431 } 432 else 433 return kFALSE; 434 break; 435 case kDummy: 436 hiloconv = 1.; 437 hiloconverr = 0.; 438 calibQE = 1.; 439 calibQEVar = 0.; 440 break; 441 442 } /* switch calibration mode */ 443 } /* if(fCalibrationMode!=kNone) */ 514 } /* switch calibration mode */ 515 } /* if(fCalibrationMode!=kNone) */ 444 516 else 445 { 446 hiloconv = 1.; 447 hiloconverr = 0.; 448 calibConv = 1./fGeomCam->GetPixRatio(pixidx); 449 calibConvVar = 0.; 450 calibFFactor = 0.; 451 calibQE = 1.; 452 calibQEVar = 0.; 453 } 517 { 518 calibConv = 1./fGeomCam->GetPixRatio(pixidx); 519 } 454 520 455 521 calibConv /= calibQE; 456 calibConvVar /= calibQE; 457 458 522 523 if (calibConv != 0. && calibQE != 0.) 524 { 525 calibConvVar = calibConvVar/calibConv/calibConv + calibQEVar/calibQE/calibQE; 526 calibConvVar *= calibConv*calibConv; 527 } 528 459 529 return kTRUE; 460 530 } … … 468 538 Int_t MCalibrateData::Process() 469 539 { 540 541 // 542 // For the moment, we use only a dummy zenith for the calibration: 543 // 544 const Float_t zenith = 0; 545 470 546 /* 471 547 if (fCalibrations->GetNumPixels() != (UInt_t)fSignals->GetSize()) … … 518 594 nphot = signal*calibrationConversionFactor; 519 595 nphotErr = calibFFactor*TMath::Sqrt(TMath::Abs(nphot)); 520 // nphotErr = signal*calibrationConversionFactorErr 521 // *signal*calibrationConversionFactorErr 522 // +signalErr*calibrationConversionFactor 523 // *signalErr*calibrationConversionFactor; 524 // nphotErr = TMath::Sqrt(nphotErr); 525 596 // 597 // The following part is the commented first version of the error calculation 598 // Contact Markus Gaug for questions (or wait for the next documentation update...) 599 // 600 /* 601 nphotErr = signal > 0 ? signalErr*signalErr / (signal * signal) : 0. 602 + calibConv > 0 ? calibConvVar / (calibConv * calibConv ) : 0.; 603 nphotErr = TMath::Sqrt(nphotErr) * nphot; 604 */ 605 526 606 MCerPhotPix *cpix = fCerPhotEvt->AddPixel(pixidx, nphot, nphotErr); 527 607 … … 536 616 fCerPhotEvt->SetReadyToSave(); 537 617 538 539 540 618 if(TestFlag(kEvent)) 541 { 542 if (!CalibratePedestal(fPedestalFromData,fPedPhotFromData)) return kFALSE; 543 } 619 if (!CalibratePedestal(fPedestalFromData,fPedPhotFromData)) 620 return kFALSE; 544 621 545 622 /* 546 // ---------------------------------------------623 // 547 624 // fill MPedPhot(FromData) container using the informations from 548 625 // MPedestalCam, MExtractedSignalCam and MCalibrationCam 549 626 // 550 627 fNumUsedHiGainFADCSlices = fSignals->GetNumUsedHiGainFADCSlices(); 551 628 552 629 // is pixid equal to pixidx ? 553 630 if ( (Int_t)(fPedestal->GetSize()) != fSignals->GetSize()) 554 { 555 *fLog << err << "MCalibrateData::ReInit(); sizes of MPedestalCam and MCalibrationCam are different" 556 << endl; 557 } */ 631 { 632 *fLog << err << "MCalibrateData::ReInit(); sizes of MPedestalCam and MCalibrationCam are different" 633 << endl; 634 } 635 */ 558 636 559 637 /* … … 607 685 return kTRUE; 608 686 } 687 688 // -------------------------------------------------------------------------- 689 // 690 // Implementation of SavePrimitive. Used to write the call to a constructor 691 // to a macro. In the original root implementation it is used to write 692 // gui elements to a macro-file. 693 // 694 void MCalibrateData::StreamPrimitive(ofstream &out) const 695 { 696 697 out << " " << ClassName() << " " << GetUniqueName() << "(\""; 698 out << "\"" << fName << "\", \"" << fTitle << "\");" << endl; 699 700 if (TestFlag(kEvent)) 701 out << " " << GetUniqueName() << ".EnablePedestalType(kEvent)" << endl; 702 if (TestFlag(kRun)) 703 out << " " << GetUniqueName() << ".EnablePedestalType(kRun)" << endl; 704 705 if (fCalibrationMode != kDefault) 706 out << " " << GetUniqueName() << ".SetCalibrationMode(fCalibrationMode)" << endl; 707 708 if (fNamePedADCRunContainer != fgNamePedADCRunContainer) 709 { 710 out << " " << GetUniqueName() << ".SetNamePedADCRunContainer("; 711 out << fNamePedADCRunContainer.Data() << ");" << endl; 712 } 713 714 if (fNamePedADCEventContainer != fgNamePedADCEventContainer) 715 { 716 out << " " << GetUniqueName() << ".SetNamePedADCEventContainer("; 717 out << fNamePedADCEventContainer.Data() << ");" << endl; 718 } 719 720 721 if (fNamePedPhotRunContainer != fgNamePedPhotRunContainer) 722 { 723 out << " " << GetUniqueName() << ".SetNamePedPhotRunContainer("; 724 out << fNamePedPhotRunContainer.Data() << ");" << endl; 725 } 726 727 728 if (fNamePedPhotEventContainer != fNamePedPhotEventContainer) 729 { 730 out << " " << GetUniqueName() << ".SetNamePedPhotEventContainer("; 731 out << fNamePedPhotEventContainer.Data() << ");" << endl; 732 } 733 734 } 735 736 -
trunk/MagicSoft/Mars/mcalib/MCalibrateData.h
r4596 r4599 35 35 private: 36 36 37 static const TString fgNamePedADCRunContainer; //! "MPedestalCam" 38 static const TString fgNamePedADCEventContainer; //! "MPedestalCamFromData" 39 static const TString fgNamePedPhotRunContainer; //! "MPedPhotCam" 40 static const TString fgNamePedPhotEventContainer; //! "MPedPhotCamFromData" 41 37 42 MGeomCam *fGeomCam; //! Camera geometry container 38 43 MPedestalCam *fPedestal; //! Pedestals/slice [ADC counts] … … 48 53 49 54 UShort_t fCalibrationMode; 50 Float_t fConversionHiLo;51 55 Byte_t fPedestalFlag; // Flags defining to calibrate the pedestal each event or each run 52 56 … … 56 60 TString fNamePedPhotEventContainer; // name of fPedPhotFromData 57 61 58 Float_t fNumUsedHiGainFADCSlices;59 60 62 Bool_t CalibratePedestal ( MPedestalCam *, MPedPhotCam * ); 61 63 … … 67 69 Bool_t ReInit ( MParList *pList ); 68 70 Int_t Process ( ); 71 72 void StreamPrimitive( ofstream &out ) const; 69 73 70 74 public: 71 75 72 76 enum CalibrationMode_t { kNone=0,kFlatCharge=1, 73 kBlindPixel ,kFfactor,kPinDiode,kCombined, kDummy};77 kBlindPixel=2,kFfactor=3,kPinDiode=4,kCombined=5, kDummy=6 }; 74 78 75 79 static const CalibrationMode_t kDefault = kFfactor; … … 84 88 const char *name=NULL, const char *title=NULL); 85 89 86 void DisablePedestalType( PedestalType_t i ) { fPedestalFlag &= ~i; }87 90 void EnablePedestalType ( PedestalType_t i ) { fPedestalFlag |= i; } 88 91 void SetPedestalType ( PedestalType_t i=kRun ) { fPedestalFlag = i; } … … 90 93 91 94 void SetCalibrationMode ( CalibrationMode_t calmode=kDefault ) { fCalibrationMode=calmode; } 92 void SetConversionHiLo ( Float_t conv ) { fConversionHiLo = conv; }93 95 94 void SetNamePedADCRunContainer ( const char *name= "MPedestalCam") {96 void SetNamePedADCRunContainer ( const char *name=fgNamePedADCRunContainer ) { 95 97 fNamePedADCRunContainer = name; } 96 void SetNamePedADCEventContainer ( const char *name= "MPedestalCamFromData") {98 void SetNamePedADCEventContainer ( const char *name=fgNamePedADCEventContainer ) { 97 99 fNamePedADCEventContainer = name; } 98 void SetNamePedPhotRunContainer ( const char *name= "MPedPhotCam") {100 void SetNamePedPhotRunContainer ( const char *name=fgNamePedPhotRunContainer ) { 99 101 fNamePedPhotRunContainer = name; } 100 void SetNamePedPhotEventContainer( const char *name= "MPedPhotCamFromData") {102 void SetNamePedPhotEventContainer( const char *name=fgNamePedPhotEventContainer) { 101 103 fNamePedPhotEventContainer = name; } 102 104
Note:
See TracChangeset
for help on using the changeset viewer.