Changeset 3862 for trunk/MagicSoft
- Timestamp:
- 04/28/04 11:15:08 (21 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r3861 r3862 28 28 - new base class for signal extractors 29 29 30 * msignal/Makefile 31 * msignal/SignalLinkDef.h 30 32 * msignal/MExtractFixedWindow.[h,cc] 31 33 * msignal/MExtractSlidindWindow.[h,cc] -
trunk/MagicSoft/Mars/macros/bootcampstandardanalysis.C
r3832 r3862 60 60 { 61 61 62 MExtractSlidingWindow extractor; 63 62 64 MRunIter pruns; 63 65 MRunIter cruns; … … 118 120 MJCalibration calloop; 119 121 calloop.SetInput(&cruns); 120 // 121 // Use as signal extractor MExtractSignal: 122 // 123 calloop.SetExtractorLevel(1); 122 calloop.SetExtractor(&extractor); 124 123 // 125 124 // Set the corr. cams: … … 186 185 static_cast<MRead&>(read3).AddFiles(pruns); 187 186 188 MExtractSignal extsig;189 187 MCalibrate photcalc; 190 188 photcalc.SetCalibrationMode(MCalibrate::kFfactor); … … 193 191 tlist3.AddToList(&read3); 194 192 tlist3.AddToList(&geomapl); 195 tlist3.AddToList(&ext sig);193 tlist3.AddToList(&extractor); 196 194 tlist3.AddToList(&photcalc); 197 195 // tlist3.AddToList(&photrmscalc); … … 252 250 tlist4.AddToList(&read4); 253 251 tlist4.AddToList(&geomapl); 254 tlist4.AddToList(&ext sig);252 tlist4.AddToList(&extractor); 255 253 tlist4.AddToList(&timecalc); 256 254 tlist4.AddToList(&photcalc); … … 264 262 265 263 if (!evtloop4.PreProcess()) 266 267 264 return; 268 265 -
trunk/MagicSoft/Mars/macros/calibration.C
r3855 r3862 63 63 { 64 64 65 MExtractFixedWindowPeakSearch extractor; 65 66 66 67 MRunIter pruns; … … 120 121 // 121 122 // calloop.SetRelTimeCalibration(); 123 calloop.SetExtractor(&extractor); 122 124 calloop.SetInput(&cruns); 123 125 calloop.SetDisplay(display); … … 134 136 MJExtractCalibTest testloop; 135 137 138 testloop.SetExtractor(&extractor); 136 139 testloop.SetInput(&cruns); 137 140 testloop.SetDisplay(display); -
trunk/MagicSoft/Mars/macros/pedphotcalc.C
r3832 r3862 65 65 #include "MCalibrationQEPix.h" 66 66 #include "MExtractedSignalCam.h" 67 #include "MExtractSignal.h" 67 #include "MExtractSlidingWindow.h" 68 #include "MExtractFixedWindow.h" 68 69 #include "MCerPhotEvt.h" 69 70 #include "MCalibrate.h" … … 210 211 ) 211 212 { 213 214 MExtractFixedWindow extractor; 212 215 213 216 MRunIter pruns; … … 266 269 // Use as signal extractor MExtractSignal: 267 270 // 268 calloop.SetExtractor Level(1);271 calloop.SetExtractor(&extractor); 269 272 // 270 273 // The next two commands are for the display: … … 313 316 static_cast<MRead&>(read3).AddFiles(pruns); 314 317 315 MExtractSignal sigcalc;316 318 MCalibrate photcalc; 317 319 photcalc.SetCalibrationMode(MCalibrate::kFfactor); … … 320 322 tlist3.AddToList(&read3); 321 323 tlist3.AddToList(&geomapl); 322 tlist3.AddToList(& sigcalc);324 tlist3.AddToList(&extractor); 323 325 tlist3.AddToList(&photcalc); 324 326 tlist3.AddToList(&pedphotcalc); -
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 -
trunk/MagicSoft/Mars/msignal/Makefile
r3816 r3862 37 37 SRCFILES = MExtractedSignalCam.cc \ 38 38 MExtractedSignalPix.cc \ 39 MExtractor.cc \ 40 MExtractFixedWindow.cc \ 41 MExtractSlidingWindow.cc \ 42 MExtractFixedWindowPeakSearch.cc \ 39 43 MExtractSignal.cc \ 40 44 MExtractSignal2.cc \ -
trunk/MagicSoft/Mars/msignal/SignalLinkDef.h
r3633 r3862 10 10 #pragma link C++ class MExtractSignal2+; 11 11 #pragma link C++ class MExtractSignal3+; 12 13 #pragma link C++ class MExtractor+; 14 #pragma link C++ class MExtractFixedWindow+; 15 #pragma link C++ class MExtractSlidingWindow+; 16 #pragma link C++ class MExtractFixedWindowPeakSearch+; 17 12 18 13 19 #pragma link C++ class MExtractPINDiode++;
Note:
See TracChangeset
for help on using the changeset viewer.