Changeset 3698 for trunk/MagicSoft/Mars
- Timestamp:
- 04/09/04 17:34:12 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3697 r3698 31 31 MHCalibrationChargeCalc needs no pointer to the signal extractors 32 32 any more -> removed 33 34 * mcalib/MCalibrationChargePINDiode.[h,cc] 35 * mcalib/MCalibrationChargeBlindPix.[h,cc] 36 * mcalib/MCalibrationCam.[h,cc] 37 - put a default pulser color kNONE 33 38 34 39 -
trunk/MagicSoft/Mars/mcalib/MCalibrationCam.cc
r3697 r3698 75 75 // 76 76 // Initializes: 77 // - fPulserColor to k CT177 // - fPulserColor to kNONE 78 78 // - fNumHiGainFADCSlices to 0. 79 79 // - fNumLoGainFADCSlices to 0. … … 88 88 // 89 89 MCalibrationCam::MCalibrationCam(const char *name, const char *title) 90 : fNumHiGainFADCSlices(0.), fNumLoGainFADCSlices(0.), fPulserColor(k CT1),90 : fNumHiGainFADCSlices(0.), fNumLoGainFADCSlices(0.), fPulserColor(kNONE), 91 91 fPixels(NULL), fAverageAreas(NULL), fAverageSectors(NULL) 92 92 { -
trunk/MagicSoft/Mars/mcalib/MCalibrationCam.h
r3697 r3698 20 20 public: 21 21 22 enum PulserColor_t { kCT1=0, kGREEN=1, kBLUE=2, kUV=3 }; // Possible Pulser colours22 enum PulserColor_t { kCT1=0, kGREEN=1, kBLUE=2, kUV=3, kNONE=4 }; // Possible Pulser colours 23 23 static const Int_t gkNumPulserColors; // Number of Pulser colours (now set to: 4) 24 24 -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeBlindPix.cc
r3678 r3698 98 98 // - all flags to kFALSE 99 99 // - all variables to -1. 100 // - the fColor to MCalibrationCam::kNONE 100 101 // 101 102 // Calls: … … 126 127 SetFluxInsidePlexiglassAvailable ( kFALSE ); 127 128 129 SetColor(MCalibrationCam::kNONE); 130 128 131 MCalibrationChargePix::Clear(); 129 132 } -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r3697 r3698 114 114 // - Tracing the atmospheric conditions -> LIDAR 115 115 // - Tracing the observation zenith angle -> Drive System 116 // 4) Some knowlegde about the impact parameter: 116 // 117 // 4) Some knowlegde about the impact parameter: 117 118 // - This is the only part which cannot be accomplished well with a 118 119 // single telescope. We would thus need to convolute the spectrum … … 281 282 } 282 283 284 // -------------------------------------------------------------------------- 285 // 286 // Sets: 287 // - all variables to 0., 288 // - all flags to kFALSE 289 // 283 290 void MCalibrationChargeCalc::Clear(const Option_t *o) 284 291 { … … 305 312 // cannot be found, the corresponding calibration part is only skipped. 306 313 // 314 // - MTime 315 // 316 Int_t MCalibrationChargeCalc::PreProcess(MParList *pList) 317 { 318 319 // 320 // Containers that have to be there. 321 // 322 fPedestals = (MPedestalCam*)pList->FindObject("MPedestalCam"); 323 if (!fPedestals) 324 { 325 *fLog << err << "MPedestalCam not found... aborting" << endl; 326 return kFALSE; 327 } 328 329 // 330 // Containers that are created in case that they are not there. 331 // 332 fQECam = (MCalibrationQECam*)pList->FindCreateObj("MCalibrationQECam"); 333 if (!fQECam) 334 { 335 *fLog << err << "Cannot find nor create MCalibrationQECam... aborting" << endl; 336 return kFALSE; 337 } 338 339 fBadPixels = (MBadPixelsCam*)pList->FindCreateObj("MBadPixelsCam"); 340 if (!fBadPixels) 341 { 342 *fLog << err << "Could not find or create MBadPixelsCam ... aborting." << endl; 343 return kFALSE; 344 } 345 346 347 fEvtTime = (MTime*)pList->FindObject("MTime"); 348 349 return kTRUE; 350 } 351 352 353 // -------------------------------------------------------------------------- 354 // 355 // Search for the following input containers and abort if not existing: 356 // - MGeomCam 357 // - MCalibrationChargeCam 358 // 359 // Search for the following input containers and give a warning if not existing: 307 360 // - MCalibrationChargeBlindPix 308 361 // - MCalibrationChargePINDiode 309 // - MTime310 362 // 311 363 // Sets the pulser colour in: 312 364 // 313 365 // - MCalibrationChargeCam 314 // - MCalibrationChargeBlindPix 315 // - MCalibrationChargePINDiode 316 // 317 Int_t MCalibrationChargeCalc::PreProcess(MParList *pList) 318 { 319 320 // 321 // Containers that have to be there. 322 // 323 fPedestals = (MPedestalCam*)pList->FindObject("MPedestalCam"); 324 if (!fPedestals) 325 { 326 *fLog << err << "MPedestalCam not found... aborting" << endl; 327 return kFALSE; 328 } 329 330 // 331 // Containers that are created in case that they are not there. 332 // 333 fQECam = (MCalibrationQECam*)pList->FindCreateObj("MCalibrationQECam"); 334 if (!fQECam) 335 { 336 *fLog << err << "Cannot find nor create MCalibrationQECam... aborting" << endl; 337 return kFALSE; 338 } 339 340 fBadPixels = (MBadPixelsCam*)pList->FindCreateObj("MBadPixelsCam"); 341 if (!fBadPixels) 342 { 343 *fLog << err << "Could not find or create MBadPixelsCam ... aborting." << endl; 344 return kFALSE; 345 } 346 347 348 fEvtTime = (MTime*)pList->FindObject("MTime"); 349 350 // 351 // Initialize the pulser colours 352 // 353 fCam->SetPulserColor( fPulserColor ); 354 355 if (fBlindPixel) 356 fBlindPixel->SetColor( fPulserColor ); 357 358 if (fPINDiode) 359 fPINDiode->SetColor( fPulserColor ); 360 361 return kTRUE; 362 } 363 364 365 // -------------------------------------------------------------------------- 366 // 367 // The ReInit searches for the following input containers: 368 // - MGeomCam 369 // - MCalibrationChargeCam 366 // - MCalibrationChargeBlindPix (if existing) 367 // - MCalibrationChargePINDiode (if existing) 370 368 // 371 369 // It retrieves the following variables from MCalibrationChargeCam: … … 409 407 fBlindPixel = (MCalibrationChargeBlindPix*)pList->FindObject("MCalibrationChargeBlindPix"); 410 408 if (!fBlindPixel) 411 { 412 *fLog << warn << GetDescriptor() 413 << ": MCalibrationChargeBlindPix not found... no blind pixel method! " << endl; 414 return kFALSE; 415 } 416 417 fPINDiode = (MCalibrationChargePINDiode*)pList->FindCreateObj("MCalibrationChargePINDiode"); 409 *fLog << warn << GetDescriptor() 410 << ": MCalibrationChargeBlindPix not found... no blind pixel method! " << endl; 411 412 fPINDiode = (MCalibrationChargePINDiode*)pList->FindObject("MCalibrationChargePINDiode"); 418 413 if (!fPINDiode) 419 { 420 *fLog << warn << GetDescriptor() 421 << "MCalibrationChargePINDiode not found... no PIN Diode method! " << endl; 422 return kFALSE; 423 } 414 *fLog << warn << GetDescriptor() 415 << "MCalibrationChargePINDiode not found... no PIN Diode method! " << endl; 416 417 // 418 // Initialize the pulser colours 419 // 420 if (fPulserColor != fCam->GetPulserColor()) 421 { 422 *fLog << err << GetDescriptor() << ": Pulser colour has changed w.r.t. last file." 423 << "This feature is not yet implemented, sorry ... aborting " << endl; 424 return kFALSE; 425 } 426 427 fCam->SetPulserColor( fPulserColor ); 428 429 if (fBlindPixel) 430 fBlindPixel->SetColor( fPulserColor ); 431 432 if (fPINDiode) 433 fPINDiode->SetColor( fPulserColor ); 434 424 435 425 436 fNumHiGainSamples = fCam->GetNumHiGainFADCSlices(); … … 448 459 449 460 } 450 451 if (fPulserColor != fCam->GetPulserColor())452 {453 *fLog << err << GetDescriptor() << ": Pulser colour has changed w.r.t. last file."454 << "This feature is not yet implemented, sorry ... aborting " << endl;455 return kFALSE;456 }457 458 461 459 462 return kTRUE; -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePINDiode.cc
r3678 r3698 114 114 SetChargeFitValid ( kFALSE ); 115 115 SetTimeFitValid ( kFALSE ); 116 SetColor ( MCalibrationCam::kNONE); 116 117 117 118 fAbsTimeMean = -1.; -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargePINDiode.h
r3678 r3698 62 62 ~MCalibrationChargePINDiode() {} 63 63 64 void Clear(Option_t *o=""); 64 void Clear(Option_t *o=""); 65 Bool_t CalcFluxOutsidePlexiglass(); 66 67 // Getters 68 Float_t GetAbsTimeMean () const { return fAbsTimeMean; } 69 Float_t GetAbsTimeRms () const { return fAbsTimeRms; } 70 MCalibrationCam::PulserColor_t GetColor () const { return fColor; } 71 Float_t GetFluxOutsidePlexiglass () const { return fFluxOutsidePlexiglass; } 72 Float_t GetFluxOutsidePlexiglassErr () const; 73 Float_t GetFluxOutsidePlexiglassRelVar () const; 74 Float_t GetNumPhotons () const { return fNumPhotons; } 75 Float_t GetNumPhotonsErr () const; 76 Float_t GetNumPhotonsRelVar () const; 77 Float_t GetPed () const { return fPed; } 78 Float_t GetPedRms () const { return fPedRms; } 79 80 Bool_t IsChargeFitValid () const; 81 Bool_t IsTimeFitValid () const; 82 Bool_t IsOscillating () const; 83 Bool_t IsFluxOutsidePlexiglassAvailable() const; 65 84 66 85 // Setters 67 void SetAbsTimeMean ( const Float_t f ){ fAbsTimeMean = f; }68 void SetAbsTimeRms ( const Float_t f ){ fAbsTimeRms = f; }86 void SetAbsTimeMean ( const Float_t f ) { fAbsTimeMean = f; } 87 void SetAbsTimeRms ( const Float_t f ) { fAbsTimeRms = f; } 69 88 void SetChargeToPhotons ( const Float_t f=fgChargeToPhotons ) { fChargeToPhotons = f; } 70 89 void SetChargeToPhotonsErr ( const Float_t f=fgChargeToPhotonsErr ) { fChargeToPhotonsVar = f*f; } 71 90 void SetColor ( const MCalibrationCam::PulserColor_t color) { fColor = color; } 72 91 void SetPedestal ( Float_t ped, Float_t pedrms ); 73 void SetRmsChargeMean ( const Float_t f ){ fRmsChargeMean = f; }74 void SetRmsChargeMeanErr ( const Float_t f ){ fRmsChargeMeanErr = f; }75 void SetRmsChargeSigma ( const Float_t f ){ fRmsChargeSigma = f; }76 void SetRmsChargeSigmaErr ( const Float_t f ){ fRmsChargeSigmaErr = f; }92 void SetRmsChargeMean ( const Float_t f ) { fRmsChargeMean = f; } 93 void SetRmsChargeMeanErr ( const Float_t f ) { fRmsChargeMeanErr = f; } 94 void SetRmsChargeSigma ( const Float_t f ) { fRmsChargeSigma = f; } 95 void SetRmsChargeSigmaErr ( const Float_t f ) { fRmsChargeSigmaErr = f; } 77 96 void SetOscillating ( const Bool_t b=kTRUE ); 78 97 void SetChargeFitValid ( const Bool_t b=kTRUE ); 79 98 void SetTimeFitValid ( const Bool_t b=kTRUE ); 80 99 void SetFluxOutsidePlexiglassAvailable ( const Bool_t b = kTRUE ); 81 82 // Getters83 Float_t GetFluxOutsidePlexiglass () const { return fFluxOutsidePlexiglass; }84 Float_t GetFluxOutsidePlexiglassErr () const;85 Float_t GetFluxOutsidePlexiglassRelVar() const;86 87 // Pedestals88 Float_t GetAbsTimeMean () const { return fAbsTimeMean; }89 Float_t GetAbsTimeRms () const { return fAbsTimeRms; }90 Float_t GetNumPhotons () const { return fNumPhotons; }91 Float_t GetNumPhotonsErr() const;92 Float_t GetNumPhotonsRelVar() const;93 Float_t GetPed() const { return fPed; }94 Float_t GetPedRms() const { return fPedRms; }95 96 Bool_t IsChargeFitValid() const;97 Bool_t IsTimeFitValid() const;98 Bool_t IsOscillating() const;99 Bool_t IsFluxOutsidePlexiglassAvailable() const;100 101 Bool_t CalcFluxOutsidePlexiglass();102 100 103 101 ClassDef(MCalibrationChargePINDiode, 1) // Container Charge Calibration Results PIN Diode
Note:
See TracChangeset
for help on using the changeset viewer.