Changeset 8427 for trunk/MagicSoft/Mars/mcalib
- Timestamp:
- 04/20/07 14:21:12 (18 years ago)
- Location:
- trunk/MagicSoft/Mars/mcalib
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mcalib/CalibLinkDef.h
r8425 r8427 19 19 #pragma link C++ class MCalibrationIntensityCam+; 20 20 #pragma link C++ class MCalibrationIntensityChargeCam+; 21 #pragma link C++ class MCalibrationIntensityBlindCam+;22 21 #pragma link C++ class MCalibrationIntensityRelTimeCam+; 23 22 #pragma link C++ class MCalibrationIntensityTestCam+; -
trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.cc
r8425 r8427 58 58 59 59 #include "MCalibrationIntensityChargeCam.h" 60 #include "MCalibrationIntensityBlindCam.h"61 60 //#include "MCalibrationIntensityRelTimeCam.h" 62 61 … … 64 63 65 64 #include "MCalibrationQECam.h" 66 #include "MCalibration QEPix.h"65 #include "MCalibrationBlindCam.h" 67 66 #include "MCalibrationChargePix.h" 68 67 #include "MCalibrationChargeCalc.h" … … 87 86 MCalibCalcFromPast::MCalibCalcFromPast(const char *name, const char *title) 88 87 : fGeom(NULL), fParList(NULL), fRunHeader(NULL), 89 fIntensCharge(NULL), fIntensBlind(NULL),90 88 fIntensCharge(NULL), fBlindCam(NULL), fQECam(NULL), fBadPixels(NULL), 89 fChargeCalc(NULL), fRelTimeCalc(NULL), fCalibrate(NULL), 91 90 fNumCam(0), fNumEvents(0), fUpdateWithFFactorMethod(kTRUE), fUpdateNumPhes(kTRUE), 92 91 fNumFails(0) … … 152 151 if (pList->FindObject(AddSerialNumber("MHCalibrationBlindCam"))) 153 152 { 154 155 *fLog << inf << "Found MHCalibrationBlindCam ... " << flush; 156 157 fIntensBlind = (MCalibrationIntensityBlindCam*)pList->FindCreateObj("MCalibrationIntensityBlindCam"); 158 if (!fIntensBlind) 159 { 160 *fLog << err << "Could not find nor create MCalibrationIntensitBlindCam abort... " << endl; 161 return kFALSE; 162 } 163 } 164 165 // 153 *fLog << inf << "Found MHCalibrationBlindCam ... " << flush; 154 155 fBlindCam = (MCalibrationBlindCam*)pList->FindCreateObj("MCalibrationBlindCam"); 156 if (!fBlindCam) 157 return kFALSE; 158 } 159 160 // 166 161 // Look for the MFillH-class "MHCalibrationChargeCam". In case yes, initialize the 167 162 // corresponding IntensityCam … … 394 389 // IS IT REALLY NECESSARY? 395 390 391 if (fBlindCam) 392 { 393 *fLog << "MCalibrationBlindCam..."; 394 fBlindCam->Clear(); 395 fBlindCam->SetRunNumber(runnumber); 396 } 397 // IS IT REALLY NECESSARY? 398 396 399 // IF SIMPLE ENOUGH, REMOVE THE FUNCTION! 397 400 … … 411 414 fIntensCharge->DeleteOldCam(cold); 412 415 } 413 }414 415 if (fIntensBlind)416 {417 *fLog << "MCalibrationBlindCam...";418 MCalibrationCam *cold = fIntensBlind->GetCam();419 fIntensBlind->AddToList(Form("MCalibrationBlindCam%04d",fNumCam),*fGeom);420 fIntensBlind->GetCam()->SetRunNumber(runnumber);421 if (cold)422 fIntensBlind->DeleteOldCam(cold);423 416 } 424 417 -
trunk/MagicSoft/Mars/mcalib/MCalibCalcFromPast.h
r8425 r8427 18 18 class MCalibrateData; 19 19 class MCalibrationIntensityChargeCam; 20 class MCalibration IntensityBlindCam;20 class MCalibrationBlindCam; 21 21 class MCalibrationQECam; 22 22 … … 33 33 MRawRunHeader *fRunHeader; //! Run header storing the run number 34 34 MCalibrationIntensityChargeCam *fIntensCharge; //! Intensity Charge Cam (to be created) 35 MCalibrationIntensityBlindCam *fIntensBlind; //! Intensity Blind Cam (to be created)36 35 36 MCalibrationBlindCam *fBlindCam; //! Blind Cam 37 37 MCalibrationQECam *fQECam; //! QE Cam 38 38 MBadPixelsCam *fBadPixels; //! Bad Pixels Cam -
trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.cc
r8425 r8427 58 58 59 59 #include "MCalibrationIntensityChargeCam.h" 60 #include "MCalibrationIntensityBlindCam.h"61 60 #include "MCalibrationIntensityRelTimeCam.h" 62 61 63 62 #include "MCalibrationPattern.h" 64 63 #include "MCalibrationQECam.h" 64 #include "MCalibrationBlindCam.h" 65 65 #include "MCalibrationChargeCam.h" 66 66 #include "MCalibrationChargeCalc.h" … … 141 141 142 142 // 143 // Look for the MCalibrationIntensityBlindCam 144 // 145 fIntensBlind = (MCalibrationIntensityBlindCam*)pList->FindCreateObj("MCalibrationIntensityBlindCam"); 146 if (!fIntensBlind) 147 { 148 *fLog << err << "MCalibrationIntensityBlindCam not found... abort." << endl; 149 return kFALSE; 150 } 151 143 // Look for the MCalibrationBlindCam 144 // 145 fBlindCam = (MCalibrationBlindCam*)pList->FindCreateObj("MCalibrationBlindCam"); 146 if (!fBlindCam) 147 return kFALSE; 148 152 149 // 153 150 // Look for the MFillH name "FillChargeCam". In case yes, initialize the … … 320 317 fQECam->Clear(); 321 318 319 fBlindCam->Clear(); 320 fBlindCam->SetPulserColor(fCalibPattern->GetPulserColor()); 321 322 322 if (fIntensCharge) 323 323 { … … 331 331 } 332 332 333 if (fIntensBlind)334 {335 fIntensBlind->AddToList(Form("MCalibrationBlindCam%s",namep.Data()),*fGeom);336 MCalibrationCam *cam = fIntensBlind->GetCam();337 cam->SetPulserColor(fCalibPattern->GetPulserColor());338 *fLog << inf << "New MCalibrationBlindCam with name: " << cam->GetName() << endl;339 }340 341 333 if (fIntensRelTime) 342 334 { … … 392 384 fIntensCharge->AddHist((MHCalibrationCam*)hcam->Clone()); 393 385 } 394 if (n.Contains("Blind"))395 if (fIntensBlind)396 fIntensBlind->AddHist((MHCalibrationCam*)hcam->Clone());386 // if (n.Contains("Blind")) 387 // if (fIntensBlind) 388 // fIntensBlind->AddHist((MHCalibrationCam*)hcam->Clone()); 397 389 398 390 if (n.Contains("RelTime")) -
trunk/MagicSoft/Mars/mcalib/MCalibColorSteer.h
r8425 r8427 18 18 class MCalibrationRelTimeCalc; 19 19 class MCalibrationIntensityChargeCam; 20 class MCalibrationIntensityBlindCam;21 20 class MCalibrationIntensityRelTimeCam; 21 class MCalibrationBlindCam; 22 22 class MCalibrationQECam; 23 23 class MBadPixelsCam; … … 31 31 MParList *fParList; //! 32 32 MCalibrationIntensityChargeCam *fIntensCharge; //! 33 MCalibrationIntensityBlindCam *fIntensBlind; //!34 33 MCalibrationIntensityRelTimeCam *fIntensRelTime; //! 34 MCalibrationBlindCam *fBlindCam; //! 35 35 MCalibrationQECam *fQECam; //! 36 36 MBadPixelsCam *fBad; //! -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r8425 r8427 1 1 /* ======================================================================== *\ 2 ! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.17 5 2007-04-20 11:48:08tbretz Exp $2 ! $Name: not supported by cvs2svn $:$Id: MCalibrationChargeCalc.cc,v 1.176 2007-04-20 13:21:11 tbretz Exp $ 3 3 ! -------------------------------------------------------------------------- 4 4 ! … … 222 222 223 223 #include "MCalibrationIntensityChargeCam.h" 224 #include "MCalibrationIntensityBlindCam.h"225 224 226 225 #include "MHCalibrationChargeCam.h" … … 367 366 fHCam = NULL; 368 367 fQECam = NULL; 369 fIntensBlind = NULL;370 368 fBlindCam = NULL; 371 369 fHBlindCam = NULL; … … 513 511 } 514 512 515 fIntensBlind = (MCalibrationIntensityBlindCam*)pList->FindObject(AddSerialNumber("MCalibrationIntensityBlindCam")); 516 if (fIntensBlind) 517 *fLog << inf << "Found MCalibrationIntensityBlindCam... " << flush; 518 else 519 { 520 fBlindCam = (MCalibrationBlindCam*)pList->FindObject(AddSerialNumber("MCalibrationBlindCam")); 521 if (!fBlindCam) 522 *fLog << inf << "No MCalibrationBlindCam found... no Blind Pixel method!" << endl; 523 } 524 525 // 526 // Required containers 527 // 513 // 514 // Blind pixel calibration 515 // 516 fBlindCam = (MCalibrationBlindCam*)pList->FindObject(AddSerialNumber("MCalibrationBlindCam")); 517 if (!fBlindCam) 518 *fLog << inf << "No MCalibrationBlindCam found... no Blind Pixel method!" << endl; 519 520 // 521 // Required containers 522 // 528 523 fQECam = (MCalibrationQECam*)pList->FindObject(AddSerialNumber("MCalibrationQECam")); 529 524 if (!fQECam) … … 664 659 fHBlindCam->SetColor(col); 665 660 666 MCalibrationBlindCam *blindcam = fIntensBlind667 ? (MCalibrationBlindCam*)fIntensBlind->GetCam() : fBlindCam;668 661 MCalibrationChargeCam *chargecam = fIntensCam 669 662 ? (MCalibrationChargeCam*)fIntensCam->GetCam() : fCam; … … 671 664 chargecam->SetPulserColor(col); 672 665 673 if ( blindcam)674 blindcam->SetPulserColor(col);666 if (fBlindCam) 667 fBlindCam->SetPulserColor(col); 675 668 if (fPINDiode) 676 669 fPINDiode->SetColor(col); … … 756 749 } 757 750 758 MCalibrationBlindCam *blindcam = fIntensBlind ? (MCalibrationBlindCam*) fIntensBlind->GetCam() : fBlindCam;759 751 MCalibrationChargeCam *chargecam = fIntensCam ? (MCalibrationChargeCam*)fIntensCam->GetCam() : fCam; 760 752 … … 928 920 fBadPixels->SetReadyToSave(); 929 921 930 if ( blindcam)931 blindcam->SetReadyToSave();922 if (fBlindCam) 923 fBlindCam->SetReadyToSave(); 932 924 if (fPINDiode) 933 925 fPINDiode->SetReadyToSave(); … … 1580 1572 Bool_t MCalibrationChargeCalc::FinalizeBlindCam() 1581 1573 { 1582 1583 MCalibrationBlindCam *blindcam = fIntensBlind 1584 ? (MCalibrationBlindCam*)fIntensBlind->GetCam() : fBlindCam; 1585 1586 if (!blindcam) 1574 if (!fBlindCam) 1587 1575 return kFALSE; 1588 1576 1589 Int_t 1590 1591 for (Int_t i=0; i< blindcam->GetSize(); i++)1592 { 1593 1594 MCalibrationBlindPix &blindpix = (MCalibrationBlindPix&)(* blindcam)[i];1577 Int_t nvalid = 0; 1578 1579 for (Int_t i=0; i<fBlindCam->GetSize(); i++) 1580 { 1581 1582 MCalibrationBlindPix &blindpix = (MCalibrationBlindPix&)(*fBlindCam)[i]; 1595 1583 1596 1584 if (!blindpix.IsValid()) … … 1966 1954 { 1967 1955 1968 1969 MCalibrationBlindCam *blindcam = fIntensBlind1970 ? (MCalibrationBlindCam*) fIntensBlind->GetCam(): fBlindCam; 1971 MCalibrationChargeCam *chargecam = fIntensCam 1956 if (!fBlindCam) 1957 return; 1958 1959 MCalibrationChargeCam *chargecam = fIntensCam 1972 1960 ? (MCalibrationChargeCam*)fIntensCam->GetCam() : fCam; 1973 1961 1974 if (!blindcam)1975 return;1976 1962 1977 1963 // 1978 1964 // Set the results in the MCalibrationChargeCam 1979 1965 // 1980 if (! blindcam || !(blindcam->IsFluxInsidePlexiglassAvailable()))1981 { 1982 1983 const Float_t photons = blindcam->GetFluxInsidePlexiglass() * (*fGeom)[0].GetA()1966 if (!fBlindCam->IsFluxInsidePlexiglassAvailable()) 1967 { 1968 1969 const Float_t photons = fBlindCam->GetFluxInsidePlexiglass() * (*fGeom)[0].GetA() 1984 1970 / fQECam->GetPlexiglassQE(); 1985 1971 chargecam->SetNumPhotonsBlindPixelMethod(photons); 1986 1972 1987 const Float_t photrelvar = blindcam->GetFluxInsidePlexiglassRelVar()1973 const Float_t photrelvar = fBlindCam->GetFluxInsidePlexiglassRelVar() 1988 1974 + fQECam->GetPlexiglassQERelVar(); 1989 1975 … … 2002 1988 MCalibrationQEPix &qepix = (MCalibrationQEPix&)(*fQECam)[i]; 2003 1989 2004 if (! blindcam || !(blindcam->IsFluxInsidePlexiglassAvailable()))1990 if (!fBlindCam->IsFluxInsidePlexiglassAvailable()) 2005 1991 { 2006 1992 qepix.SetBlindPixelMethodValid(kFALSE, fPulserColor); … … 2020 2006 2021 2007 const Float_t qe = pix.GetPheFFactorMethod() 2022 / blindcam->GetFluxInsidePlexiglass()2008 / fBlindCam->GetFluxInsidePlexiglass() 2023 2009 / geo.GetA() 2024 2010 * fQECam->GetPlexiglassQE(); 2025 2011 2026 const Float_t qerelvar = blindcam->GetFluxInsidePlexiglassRelVar()2012 const Float_t qerelvar = fBlindCam->GetFluxInsidePlexiglassRelVar() 2027 2013 + fQECam->GetPlexiglassQERelVar() 2028 2014 + pix.GetPheFFactorMethodRelVar(); -
trunk/MagicSoft/Mars/mcalib/Makefile
r8425 r8427 41 41 MCalibrationIntensityCam.cc \ 42 42 MCalibrationIntensityChargeCam.cc \ 43 MCalibrationIntensityBlindCam.cc \44 43 MCalibrationIntensityRelTimeCam.cc \ 45 44 MCalibrationIntensityTestCam.cc \
Note:
See TracChangeset
for help on using the changeset viewer.