Changeset 3862 for trunk/MagicSoft/Mars/mjobs
- Timestamp:
- 04/28/04 11:15:08 (21 years ago)
- Location:
- trunk/MagicSoft/Mars/mjobs
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mjobs/MJCalibration.cc
r3856 r3862 38 38 //End_Html 39 39 // 40 // Different signal extractors can be chosen via the command SetExtractorLevel(UInt_t i) 41 // Up to now, the following extractors are available: 42 // i=1: Use MExtractSignal (fixed window) 43 // i=2: Use MExtractSignal2 (sliding window: default) 44 // i=3: Use MExtractSignal3 (coherent sliding window for all pixels) 40 // Different signal extractors can be set with the command SetExtractor() 41 // Only extractor deriving from MExtractor can be set, default is MExtractSlidingWindow 45 42 // 46 43 // At the end of the eventloop, plots and results are displayed, depending on … … 119 116 #include "MBadPixelsMerge.h" 120 117 #include "MBadPixelsCam.h" 121 #include "MExtract Signal.h"118 #include "MExtractor.h" 122 119 #include "MExtractPINDiode.h" 123 120 #include "MExtractBlindPixel.h" 124 #include "MExtractSignal2.h" 125 #include "MExtractSignal3.h" 121 #include "MExtractSlidingWindow.h" 126 122 #include "MFCosmics.h" 127 123 #include "MContinue.h" … … 143 139 // Default constructor. 144 140 // 145 // Sets fRuns to 0, f Color to kNONE, fDisplay to kNormalDisplay,141 // Sets fRuns to 0, fExtractor to NULL, fColor to kNONE, fDisplay to kNormalDisplay, 146 142 // fRelTime to kFALSE, fExtractorLevel to 2, fArrivalTimeLevel to 2 147 143 // 148 144 MJCalibration::MJCalibration(const char *name, const char *title) 149 : fRuns(0), f Color(MCalibrationCam::kNONE), fDisplayType(kNormalDisplay),150 fRelTimes(kFALSE), fDataCheck(kFALSE), f ExtractorLevel(2), fArrivalTimeLevel(2)145 : fRuns(0), fExtractor(NULL), fColor(MCalibrationCam::kNONE), fDisplayType(kNormalDisplay), 146 fRelTimes(kFALSE), fDataCheck(kFALSE), fArrivalTimeLevel(2) 151 147 { 152 148 fName = name ? name : "MJCalibration"; … … 765 761 // 2) MBadPixelsMerge 766 762 // 3) MGeomApply 767 // 4) MExtract Signal, MExtractSignal2 or MExtractSignal3, depending on fExtractorLevel763 // 4) MExtractor 768 764 // 5) MExtractPINDiode 769 765 // 6) MExtractBlindPixel … … 839 835 MExtractPINDiode pinext; 840 836 MExtractBlindPixel blindext; 841 MExtractSignal extract1; 842 MExtractSignal2 extract2; 843 MExtractSignal3 extract3; 837 MExtractSlidingWindow extract2; 844 838 MArrivalTimeCalc tmecalc1; 845 839 MArrivalTimeCalc2 tmecalc2; … … 872 866 tlist.AddToList(&apply); 873 867 874 if (fExtractorLevel <= 1) 875 tlist.AddToList(&extract1); 876 else if (fExtractorLevel == 2) 877 tlist.AddToList(&extract2); 878 else if (fExtractorLevel == 3) 879 tlist.AddToList(&extract3); 868 if (fExtractor) 869 tlist.AddToList(fExtractor); 880 870 else 881 871 { 882 *fLog << err << GetDescriptor() 883 << ": No valid Signal extractor has been chosen, have only: " << fExtractorLevel 884 << " aborting..." << endl; 885 return kFALSE; 872 *fLog << warn << GetDescriptor() 873 << ": No extractor has been chosen, take default MExtractSlidingWindow " << endl; 874 tlist.AddToList(&extract2); 886 875 } 887 876 -
trunk/MagicSoft/Mars/mjobs/MJCalibration.h
r3853 r3862 21 21 class MParList; 22 22 class MPedestalCam; 23 class MExtractor; 23 24 class MJCalibration : public MParContainer, public MGCamDisplays 24 25 { … … 29 30 TString fOutputPath; // Path to the output files 30 31 31 MRunIter *fRuns; // Calibration files 32 MRunIter *fRuns; // Calibration files 33 MExtractor *fExtractor; // Signal extractor 32 34 33 35 MBadPixelsCam fBadPixels; // Bad Pixels cam, can be set from previous runs … … 44 46 Bool_t fRelTimes; // Flag if relative times have to be calibrated 45 47 Bool_t fDataCheck; // Flag if the data check is run on raw data 46 UInt_t fExtractorLevel; // Level signal extractor (e.g. MExtractSignal2)47 48 UInt_t fArrivalTimeLevel; // Level arr. time extractor (e.g. MArrivalTimeCalc2) 48 49 … … 67 68 const MBadPixelsCam &GetBadPixels() const { return fBadPixels; } 68 69 69 void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); } 70 void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); } 71 void SetExtractor(MExtractor* ext) { fExtractor = ext; } 70 72 void SetQECam (const MCalibrationQECam &qe) { qe.Copy(fQECam); } 71 73 void SetColor (const MCalibrationCam::PulserColor_t color) { fColor = color; } … … 83 85 84 86 // Extractors 85 void SetExtractorLevel (const UInt_t i=1 ) { fExtractorLevel = i; }86 87 void SetArrivalTimeLevel (const UInt_t i=1 ) { fArrivalTimeLevel = i; } 87 88 88 89 89 Bool_t ReadCalibrationCam(); -
trunk/MagicSoft/Mars/mjobs/MJExtractCalibTest.cc
r3854 r3862 54 54 #include "MReadMarsFile.h" 55 55 #include "MGeomApply.h" 56 #include "MExtractSignal.h" 56 #include "MExtractSlidingWindow.h" 57 #include "MExtractor.h" 57 58 #include "MFillH.h" 58 59 #include "MCalibrate.h" … … 65 66 66 67 using namespace std; 67 68 MJExtractCalibTest::MJExtractCalibTest(const char *name, const char *title) : fRuns(0) 68 // -------------------------------------------------------------------------- 69 // 70 // Default constructor. 71 // 72 // Sets fRuns to 0, fExtractor to NULL 73 // 74 MJExtractCalibTest::MJExtractCalibTest(const char *name, const char *title) 75 : fRuns(NULL), fExtractor(NULL) 69 76 { 70 77 fName = name ? name : "MJExtractCalibTest"; … … 93 100 94 101 // Create histograms to display 95 MHCamera disp1 (geomcam, " Cal;Photons", "Mean of calibrated Photons");96 MHCamera disp2 (geomcam, " Cal;SigmaPhotons", "Sigma of calibrated photons");97 MHCamera disp3 (geomcam, " Cal;PhotonsPerArea", "MeanPhotons per Area");98 MHCamera disp4 (geomcam, " Cal;SigmaPhotPerArea", "SigmaPhotons per Area");102 MHCamera disp1 (geomcam, "Test;Photons", "Mean of calibrated Photons"); 103 MHCamera disp2 (geomcam, "Test;SigmaPhotons", "Sigma of calibrated photons"); 104 MHCamera disp3 (geomcam, "Test;PhotonsPerArea", "Equiv. Cherenkov Photons per Area"); 105 MHCamera disp4 (geomcam, "Test;SigmaPhotPerArea", "Sigma equiv. Cher. Photons per Area"); 99 106 100 107 // Fitted charge means and sigmas … … 199 206 static_cast<MRead&>(read).AddFiles(*fRuns); 200 207 201 MGeomApply apply; // Only necessary to craete geometry202 MExtractS ignal extract;203 MCalibrate photcalc;208 MGeomApply apply; // Only necessary to craete geometry 209 MExtractSlidingWindow extract2; 210 MCalibrate photcalc; 204 211 photcalc.SetCalibrationMode(MCalibrate::kFfactor); 205 212 … … 223 230 tlist.AddToList(&read); 224 231 tlist.AddToList(&apply); 225 tlist.AddToList(&extract); 232 233 if (fExtractor) 234 tlist.AddToList(fExtractor); 235 else 236 { 237 *fLog << warn << GetDescriptor() 238 << ": No extractor has been chosen, take default MExtractSlidingWindow " << endl; 239 tlist.AddToList(&extract2); 240 } 241 226 242 if (TestBit(kEnableGraphicalOutput)) 227 243 tlist.AddToList(&fill); … … 328 344 plist.AddToList(&tlist); 329 345 330 MGeomApply apply; // Only necessary to craete geometry331 MExtractS ignal extract;332 MCalibrate calib;333 MPedPhotCalc calc;346 MGeomApply apply; // Only necessary to craete geometry 347 MExtractSlidingWindow extract2; 348 MCalibrate calib; 349 MPedPhotCalc calc; 334 350 335 351 MHCamEvent evt1("ExtOffset"); … … 342 358 tlist.AddToList(&read); 343 359 tlist.AddToList(&apply); 344 tlist.AddToList(&extract); 360 361 if (fExtractor) 362 tlist.AddToList(fExtractor); 363 else 364 { 365 *fLog << warn << GetDescriptor() 366 << ": No extractor has been chosen, take default MExtractSlidingWindow " << endl; 367 tlist.AddToList(&extract2); 368 } 369 345 370 if (TestBit(kEnableGraphicalOutput)) 346 371 tlist.AddToList(&fill1); -
trunk/MagicSoft/Mars/mjobs/MJExtractCalibTest.h
r3854 r3862 20 20 class MCalibrationChargeCam; 21 21 class MCalibrationQECam; 22 class MPedPhotCam; 23 class MHCalibrationTestCam; 22 class MExtractor; 24 23 class MJExtractCalibTest : public MParContainer, public MGCamDisplays 25 24 { … … 28 27 TString fOutputPath; 29 28 30 MRunIter *fRuns; 29 MRunIter *fRuns; // Data files 30 MExtractor *fExtractor; // Signal extractor 31 31 32 32 MBadPixelsCam fBadPixels; … … 54 54 const MBadPixelsCam &GetBadPixels() const { return fBadPixels; } 55 55 56 void SetExtractor(MExtractor* ext) { fExtractor = ext; } 56 57 void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); } 57 58
Note:
See TracChangeset
for help on using the changeset viewer.