Changeset 4658 for trunk/MagicSoft/Mars
- Timestamp:
- 08/17/04 16:26:31 (20 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r4657 r4658 22 22 23 23 2004/08/17: Markus Gaug 24 25 * mcalib/MCalibrationChargeCam.[h,cc] 26 - removed Init() function which is already fulfilled by the Init() 27 function of MCalibrationCam 24 28 25 29 * mbadpixels/MBadPixelsCam.cc -
trunk/MagicSoft/Mars/mbadpixels/MBadPixelsCam.cc
r4641 r4658 460 460 // 18: MBadPixelsPix::IsUncalibrated(MBadPixelsPix::kMeanTimeInLast2Bins ) 461 461 // 19: MBadPixelsPix::IsUncalibrated(MBadPixelsPix::kDeviatingNumPhes ) 462 // 20: MBadPixelsPix::IsUncalibrated(MBadPixelsPix::kRelTimeNotFitted )462 // 20: MBadPixelsPix::IsUncalibrated(MBadPixelsPix::kRelTimeNotFitted ) 463 463 // 21: MBadPixelsPix::IsUncalibrated(MBadPixelsPix::kRelTimeOscillating ) 464 // 22: MBadPixelsPix::IsUncalibrated(MBadPixelsPix::kDeviatingNumPhots ) 464 465 // 465 466 Bool_t MBadPixelsCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const … … 580 581 val = 1; 581 582 break; 583 case 22: 584 if (!(*this)[idx].IsUncalibrated(MBadPixelsPix::kDeviatingNumPhots)) 585 return kFALSE; 586 val = 1; 587 break; 582 588 default: 583 589 return kFALSE; -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc
r4609 r4658 1005 1005 const Int_t aidx = (*fGeom)[i].GetAidx(); 1006 1006 1007 camphes.Fill(i,nphe);1008 camphes.SetUsed(i);1009 1007 1010 1008 areaphes [aidx] += nphe; -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc
r4603 r4658 158 158 } 159 159 160 // -------------------------------------------------------------------161 //162 // Calls:163 // - MCalibrationCam::Init()164 //165 void MCalibrationChargeCam::Init(const MGeomCam &geom)166 {167 MCalibrationCam::Init(geom);168 }169 170 160 // ----------------------------------------------- 171 161 // -
trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.h
r4338 r4658 46 46 Bool_t IsFFactorMethodValid () const; 47 47 48 // Inits49 void Init ( const MGeomCam &geom );50 51 48 // Prints 52 49 void Print(Option_t *o="") const; -
trunk/MagicSoft/Mars/mcalib/MCalibrationTestCalc.cc
r4649 r4658 121 121 } 122 122 123 fCam = (MCalibrationTestCam*)pList->FindCreateObj( AddSerialNumber("MCalibrationTestCam"));123 fCam = (MCalibrationTestCam*)pList->FindCreateObj("MCalibrationTestCam"); 124 124 if (!fCam) 125 125 { … … 411 411 bad.SetUncalibrated( MBadPixelsPix::kDeviatingNumPhots ); 412 412 bad.SetUnsuitable ( MBadPixelsPix::kUnsuitableRun ); 413 pix.SetExcluded();414 413 continue; 415 414 } … … 561 560 { 562 561 563 const TArrayI &arr = fTestCam->GetNotInterpolateablePixels(); 564 const Int_t size = arr.GetSize(); 562 TArrayI arr(0); 563 564 for (Int_t i=0; i<fCam->GetSize(); i++) 565 if ((*fCam)[i].IsExcluded()) 566 { 567 const Int_t s = arr.GetSize(); 568 arr.Set(s+1); 569 arr[s] = i; 570 } 571 572 const Int_t size = arr.GetSize(); 565 573 566 574 if (size == 0) -
trunk/MagicSoft/Mars/mcalib/MCalibrationTestCam.h
r4649 r4658 64 64 void SetNumUninterpolated ( const UInt_t i, const Int_t aidx ); 65 65 void SetNumUninterpolatedInMaxCluster( const UInt_t i ) { fNumUninterpolatedInMaxCluster = i; } 66 67 // Draw 68 void DrawPixelContent( Int_t num) const {} 66 69 67 70 ClassDef(MCalibrationTestCam, 1) // Container Test Calibration Results Camera -
trunk/MagicSoft/Mars/mcalib/MHCalibrationChargeCam.cc
r4636 r4658 243 243 { 244 244 245 MExtractedSignalCam *signal = (MExtractedSignalCam*)pList->FindObject( "MExtractedSignalCam");245 MExtractedSignalCam *signal = (MExtractedSignalCam*)pList->FindObject(AddSerialNumber("MExtractedSignalCam")); 246 246 if (!signal) 247 247 { … … 250 250 } 251 251 252 fCam = (MCalibrationCam*)pList->FindObject( "MCalibrationChargeCam");252 fCam = (MCalibrationCam*)pList->FindObject(AddSerialNumber("MCalibrationChargeCam")); 253 253 if (!fCam) 254 254 { -
trunk/MagicSoft/Mars/mcalib/MHCalibrationTestCam.cc
r4572 r4658 90 90 #include "MParList.h" 91 91 92 #include "MCalibrationTestCam.h" 93 92 94 #include "MCalibrationCam.h" 93 95 #include "MCalibrationPix.h" … … 117 119 SetAverageNbins(5000); 118 120 119 fNotInterpolateablePixels.Set(0);120 121 } 121 122 … … 157 158 } 158 159 160 159 161 const Int_t npixels = fGeom->GetNumPixels(); 160 162 const Int_t nsectors = fGeom->GetNumSectors(); … … 378 380 379 381 if (hist.IsEmpty()) 380 { 381 const Int_t size = fNotInterpolateablePixels.GetSize(); 382 fNotInterpolateablePixels.Set(size+1); 383 fNotInterpolateablePixels[size] = i; 384 continue; 385 } 382 continue; 386 383 387 384 if (!hist.FitGaus()) -
trunk/MagicSoft/Mars/mcalib/MHCalibrationTestCam.h
r4542 r4658 12 12 #endif 13 13 14 14 15 class MGeomCam; 15 16 class MHCalibrationTestCam : public MHCalibrationCam … … 23 24 TArrayF fRmsSigmaPhotPerArea ; 24 25 25 TArrayI fNotInterpolateablePixels;26 27 26 Bool_t ReInitHists(MParList *pList); 28 27 Bool_t FillHists(const MParContainer *par, const Stat_t w=1); … … 42 41 const Float_t GetRmsSigmaPhotPerArea ( const Int_t aidx ) const { return fRmsSigmaPhotPerArea [aidx]; } 43 42 44 const TArrayI &GetNotInterpolateablePixels () const { return fNotInterpolateablePixels; }45 46 43 void CalcAverageSigma(); 47 44 -
trunk/MagicSoft/Mars/mjobs/MJExtractCalibTest.cc
r4559 r4658 27 27 // MJExtractCalibTest 28 28 // 29 // If the flag SetDataCheckDisplay() is set, only the most important distributions 30 // are displayed. 31 // Otherwise, (default: SetNormalDisplay()), a good selection of plots is given 32 // 29 33 ///////////////////////////////////////////////////////////////////////////// 30 34 #include "MJExtractCalibTest.h" … … 53 57 #include "MCalibrationRelTimeCam.h" 54 58 #include "MCalibrationQECam.h" 59 #include "MCalibrationTestCam.h" 55 60 #include "MCalibrationTestCalc.h" 56 61 #include "MHCamEvent.h" 62 #include "MHCalibrationTestCam.h" 57 63 58 64 #include "MReadMarsFile.h" … … 79 85 // 80 86 // Sets fUseCosmicsFilter to kTRUE, fRuns to 0, fExtractor to NULL, fTimeExtractor to NULL 87 // fDisplay to kNormalDisplay 81 88 // 82 89 MJExtractCalibTest::MJExtractCalibTest(const char *name, const char *title) 83 : fUseCosmicsFilter(kTRUE), fRuns(NULL), fExtractor(NULL), fTimeExtractor(NULL) 90 : fUseCosmicsFilter(kTRUE), fRuns(NULL), fExtractor(NULL), fTimeExtractor(NULL), 91 fDisplayType(kNormalDisplay) 84 92 { 85 93 fName = name ? name : "MJExtractCalibTest"; … … 105 113 // Get container from list 106 114 // 107 MGeomCam &geomcam = *(MGeomCam*)plist.FindObject("MGeomCam"); 115 MGeomCam &geomcam = *(MGeomCam*) plist.FindObject("MGeomCam"); 116 MHCalibrationTestCam &testcam = *(MHCalibrationTestCam*)plist.FindObject("MHCalibrationTestCam"); 108 117 109 118 // Create histograms to display … … 112 121 MHCamera disp3 (geomcam, "Test;PhotonsPerArea", "Equiv. Cherenkov Photons per Area"); 113 122 MHCamera disp4 (geomcam, "Test;SigmaPhotPerArea", "Sigma equiv. Cher. Photons per Area"); 123 MHCamera disp5 (geomcam, "Test;Phot", "Calibrated Photons"); 124 MHCamera disp6 (geomcam, "Test;PhotPerArea", "Calibrated Photons per Area"); 125 MHCamera disp7 (geomcam, "Test;NotInterpolate", "Not interpolated pixels"); 126 MHCamera disp8 (geomcam, "Test;DeviatingPhots", "Deviating Number Photons"); 114 127 115 128 // Fitted charge means and sigmas 116 disp1.SetCamContent(fTestCam, 0); 117 disp1.SetCamError( fTestCam, 1); 118 disp2.SetCamContent(fTestCam, 2); 119 disp2.SetCamError( fTestCam, 3); 120 disp3.SetCamContent(fTestCam, 7); 121 disp3.SetCamError( fTestCam, 8); 122 disp4.SetCamContent(fTestCam, 9); 123 disp4.SetCamError( fTestCam, 10); 129 disp1.SetCamContent(testcam, 0); 130 disp1.SetCamError( testcam, 1); 131 disp2.SetCamContent(testcam, 2); 132 disp2.SetCamError( testcam, 3); 133 disp3.SetCamContent(testcam, 7); 134 disp3.SetCamError( testcam, 8); 135 disp4.SetCamContent(testcam, 9); 136 disp4.SetCamError( testcam, 10); 137 138 disp5.SetCamContent(fTestCam, 0); 139 disp5.SetCamError( fTestCam, 1); 140 disp6.SetCamContent(fTestCam, 2); 141 disp6.SetCamError( fTestCam, 3); 142 disp7.SetCamError( fTestCam, 4); 143 144 disp8.SetCamError( fBadPixels, 22); 145 124 146 125 147 disp1.SetYTitle("Photons"); … … 127 149 disp3.SetYTitle("Photons per Area [mm^{-2}]"); 128 150 disp4.SetYTitle("\\sigma_{phot} per Area [mm^{-2}]"); 151 152 disp5.SetYTitle("Photons"); 153 disp6.SetYTitle("Photons per Area [mm^{-2}]"); 154 disp7.SetYTitle("[1]"); 155 disp8.SetYTitle("[1]"); 129 156 130 157 gStyle->SetOptStat(1111); 131 158 gStyle->SetOptFit(); 132 159 133 TCanvas &c = fDisplay->AddTab("TestCharges"); 134 c.Divide(4,4); 135 136 disp1.CamDraw(c, 1, 4, 2, 1); 137 disp2.CamDraw(c, 2, 4, 2, 1); 138 disp3.CamDraw(c, 3, 4, 1, 1); 139 disp4.CamDraw(c, 4, 4, 2, 1); 160 if (fDisplayType == kNormalDisplay) 161 { 162 163 TCanvas &c = fDisplay->AddTab("TestCharges"); 164 c.Divide(4,4); 165 166 disp1.CamDraw(c, 1, 4, 2, 1); 167 disp2.CamDraw(c, 2, 4, 2, 1); 168 disp3.CamDraw(c, 3, 4, 1, 1); 169 disp4.CamDraw(c, 4, 4, 2, 1); 170 } 171 172 TCanvas &c2 = fDisplay->AddTab("TestResult"); 173 c2.Divide(2,4); 174 175 disp5.CamDraw(c2, 1, 2, 2, 1); 176 disp6.CamDraw(c2, 2, 2, 2, 1); 177 178 TCanvas &c3 = fDisplay->AddTab("TestDefects"); 179 c3.Divide(2,2); 180 181 disp7.CamDraw(c3, 1, 2, 0); 182 disp8.CamDraw(c3, 2, 2, 0); 140 183 141 184 return; … … 234 277 *fLog << endl; 235 278 236 MCerPhotEvt cerphot; 237 MPedPhotCam pedphot; 279 MCerPhotEvt cerphot; 280 MPedPhotCam pedphot; 281 MHCalibrationTestCam testcam; 238 282 239 283 // Setup Lists … … 244 288 plist.AddToList(&cerphot); 245 289 plist.AddToList(&pedphot); 290 plist.AddToList(&testcam); 246 291 plist.AddToList(&fTestCam); 247 292 plist.AddToList(&fBadPixels); … … 493 538 if (fTestCam.Write()<=0) 494 539 { 495 *fLog << err << "Unable to write M HCalibrationTestCam to " << oname << endl;540 *fLog << err << "Unable to write MCalibrationTestCam to " << oname << endl; 496 541 return kFALSE; 497 542 } -
trunk/MagicSoft/Mars/mjobs/MJExtractCalibTest.h
r4189 r4658 2 2 #define MARS_MJExtractCalibTest 3 3 4 #ifndef MARS_M HCalibrationTestCam5 #include "M HCalibrationTestCam.h"4 #ifndef MARS_MCalibrationTestCam 5 #include "MCalibrationTestCam.h" 6 6 #endif 7 7 #ifndef MARS_MHCalibrationTestTimeCam … … 35 35 36 36 MBadPixelsCam fBadPixels; 37 M HCalibrationTestCamfTestCam;37 MCalibrationTestCam fTestCam; 38 38 MHCalibrationTestTimeCam fTestTimeCam; 39 39 MPedPhotCam fPedPhotCam; 40 40 41 enum Display_t // Possible Display types 42 { 43 kDataCheckDisplay, 44 kNormalDisplay 45 }; 46 47 Display_t fDisplayType; // Chosen Display type 48 41 49 Bool_t ReadPedPhotCam(); 42 50 … … 58 66 const char* GetOutputFile() const; 59 67 60 M HCalibrationTestCam&GetTestCam() { return fTestCam; }68 MCalibrationTestCam &GetTestCam() { return fTestCam; } 61 69 MHCalibrationTestTimeCam &GetTestTimeCam() { return fTestTimeCam; } 62 70 MPedPhotCam &GetPedPhotCam() { return fPedPhotCam; } … … 67 75 void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); } 68 76 void SetUseCosmicsFilter( const Bool_t b ) { fUseCosmicsFilter = b; } 69 77 78 // Displays 79 void SetDataCheckDisplay() { fDisplayType = kDataCheckDisplay; } 80 void SetNormalDisplay() { fDisplayType = kNormalDisplay; } 81 70 82 Bool_t ProcessD(MPedestalCam &pedcam, MCalibrationChargeCam &calcam, MCalibrationQECam &qecam); 71 83 Bool_t ProcessT(MPedestalCam &pedcam, MCalibrationRelTimeCam &relcam);
Note:
See TracChangeset
for help on using the changeset viewer.