Ignore:
Timestamp:
04/28/04 11:15:08 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mjobs
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r3856 r3862  
    3838//End_Html
    3939//
    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
    4542//
    4643// At the end of the eventloop, plots and results are displayed, depending on
     
    119116#include "MBadPixelsMerge.h"
    120117#include "MBadPixelsCam.h"
    121 #include "MExtractSignal.h"
     118#include "MExtractor.h"
    122119#include "MExtractPINDiode.h"
    123120#include "MExtractBlindPixel.h"
    124 #include "MExtractSignal2.h"
    125 #include "MExtractSignal3.h"
     121#include "MExtractSlidingWindow.h"
    126122#include "MFCosmics.h"
    127123#include "MContinue.h"
     
    143139// Default constructor.
    144140//
    145 // Sets fRuns to 0, fColor to kNONE, fDisplay to kNormalDisplay,
     141// Sets fRuns to 0, fExtractor to NULL, fColor to kNONE, fDisplay to kNormalDisplay,
    146142// fRelTime to kFALSE, fExtractorLevel to 2, fArrivalTimeLevel to 2
    147143//
    148144MJCalibration::MJCalibration(const char *name, const char *title)
    149     : fRuns(0), fColor(MCalibrationCam::kNONE), fDisplayType(kNormalDisplay),
    150       fRelTimes(kFALSE), fDataCheck(kFALSE), fExtractorLevel(2), fArrivalTimeLevel(2)
     145    : fRuns(0), fExtractor(NULL), fColor(MCalibrationCam::kNONE), fDisplayType(kNormalDisplay),
     146      fRelTimes(kFALSE), fDataCheck(kFALSE), fArrivalTimeLevel(2)
    151147{
    152148  fName  = name  ? name  : "MJCalibration";
     
    765761//   2)  MBadPixelsMerge
    766762//   3)  MGeomApply
    767 //   4)  MExtractSignal, MExtractSignal2 or MExtractSignal3, depending on fExtractorLevel
     763//   4)  MExtractor
    768764//   5)  MExtractPINDiode
    769765//   6)  MExtractBlindPixel
     
    839835  MExtractPINDiode         pinext;
    840836  MExtractBlindPixel       blindext;
    841   MExtractSignal           extract1;
    842   MExtractSignal2          extract2;
    843   MExtractSignal3          extract3;
     837  MExtractSlidingWindow    extract2;
    844838  MArrivalTimeCalc         tmecalc1;
    845839  MArrivalTimeCalc2        tmecalc2;
     
    872866  tlist.AddToList(&apply);
    873867
    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);
    880870  else
    881871    {
    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);
    886875    }
    887876 
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.h

    r3853 r3862  
    2121class MParList;
    2222class MPedestalCam;
     23class MExtractor;
    2324class MJCalibration : public MParContainer, public MGCamDisplays
    2425{
     
    2930  TString fOutputPath;                                     // Path to the output files
    3031 
    31   MRunIter *fRuns;                                         // Calibration files
     32  MRunIter   *fRuns;                                       // Calibration files
     33  MExtractor *fExtractor;                                  // Signal extractor
    3234 
    3335  MBadPixelsCam          fBadPixels;                       // Bad Pixels cam, can be set from previous runs
     
    4446  Bool_t fRelTimes;                                        // Flag if relative times have to be calibrated
    4547  Bool_t fDataCheck;                                       // Flag if the data check is run on raw data
    46   UInt_t fExtractorLevel;                                  // Level signal extractor (e.g. MExtractSignal2)
    4748  UInt_t fArrivalTimeLevel;                                // Level arr. time extractor (e.g. MArrivalTimeCalc2)
    4849 
     
    6768  const MBadPixelsCam    &GetBadPixels() const    { return fBadPixels;      }
    6869 
    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; }
    7072  void SetQECam    (const MCalibrationQECam &qe) { qe.Copy(fQECam);        }   
    7173  void SetColor    (const MCalibrationCam::PulserColor_t color) { fColor = color; }
     
    8385
    8486  // Extractors
    85   void SetExtractorLevel    (const UInt_t i=1    ) { fExtractorLevel   = i; }
    8687  void SetArrivalTimeLevel  (const UInt_t i=1    ) { fArrivalTimeLevel = i; } 
    87      
    8888 
    8989  Bool_t ReadCalibrationCam();
  • trunk/MagicSoft/Mars/mjobs/MJExtractCalibTest.cc

    r3854 r3862  
    5454#include "MReadMarsFile.h"
    5555#include "MGeomApply.h"
    56 #include "MExtractSignal.h"
     56#include "MExtractSlidingWindow.h"
     57#include "MExtractor.h"
    5758#include "MFillH.h"
    5859#include "MCalibrate.h"
     
    6566
    6667using 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//
     74MJExtractCalibTest::MJExtractCalibTest(const char *name, const char *title)
     75    : fRuns(NULL), fExtractor(NULL)
    6976{
    7077    fName  = name  ? name  : "MJExtractCalibTest";
     
    93100 
    94101  // 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",    "Mean Photons per Area");
    98   MHCamera disp4 (geomcam, "Cal;SigmaPhotPerArea",  "Sigma Photons 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");
    99106
    100107  // Fitted charge means and sigmas
     
    199206  static_cast<MRead&>(read).AddFiles(*fRuns);
    200207 
    201   MGeomApply      apply; // Only necessary to craete geometry
    202   MExtractSignal  extract;
    203   MCalibrate      photcalc;
     208  MGeomApply            apply; // Only necessary to craete geometry
     209  MExtractSlidingWindow extract2;
     210  MCalibrate            photcalc;
    204211  photcalc.SetCalibrationMode(MCalibrate::kFfactor);
    205212
     
    223230  tlist.AddToList(&read);
    224231  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
    226242  if (TestBit(kEnableGraphicalOutput))
    227243    tlist.AddToList(&fill);
     
    328344    plist.AddToList(&tlist);
    329345
    330     MGeomApply      apply; // Only necessary to craete geometry
    331     MExtractSignal  extract;
    332     MCalibrate      calib;
    333     MPedPhotCalc    calc;
     346    MGeomApply            apply; // Only necessary to craete geometry
     347    MExtractSlidingWindow extract2;
     348    MCalibrate            calib;
     349    MPedPhotCalc          calc;
    334350
    335351    MHCamEvent evt1("ExtOffset");
     
    342358    tlist.AddToList(&read);
    343359    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
    345370    if (TestBit(kEnableGraphicalOutput))
    346371        tlist.AddToList(&fill1);
  • trunk/MagicSoft/Mars/mjobs/MJExtractCalibTest.h

    r3854 r3862  
    2020class MCalibrationChargeCam;
    2121class MCalibrationQECam;
    22 class MPedPhotCam;
    23 class MHCalibrationTestCam;
     22class MExtractor;
    2423class MJExtractCalibTest : public MParContainer, public MGCamDisplays
    2524{
     
    2827  TString fOutputPath;
    2928
    30   MRunIter *fRuns;
     29  MRunIter   *fRuns;                                       // Data files
     30  MExtractor *fExtractor;                                  // Signal extractor
    3131 
    3232  MBadPixelsCam        fBadPixels;
     
    5454  const MBadPixelsCam &GetBadPixels()  const { return fBadPixels; }
    5555 
     56  void SetExtractor(MExtractor* ext)              { fExtractor = ext; }
    5657  void SetBadPixels(const MBadPixelsCam &bad) { bad.Copy(fBadPixels); }
    5758 
Note: See TracChangeset for help on using the changeset viewer.