Changeset 6342


Ignore:
Timestamp:
02/10/05 10:51:54 (20 years ago)
Author:
moralejo
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r6341 r6342  
    2121
    2222                                                 -*-*- END OF LINE -*-*-
     23
     24 2005/02/10 Abelardo Moralejo
     25
     26   * macros/starmc.C
     27     - Cleaned up a little bit, made the option to choose between
     28       calibration in photons or phe- easier to set.
     29
     30   * manalysis/MMcCalibrationUpdate.[h,cc]
     31     - Added getter and setter for fSignalType. Set fSignalType=kPhot as
     32       default for consistency with MCalibrateData.
    2333
    2434 2005/02/10 Markus Gaug
  • trunk/MagicSoft/Mars/macros/starmc.C

    r6318 r6342  
    5353  //
    5454  CalibrationFilename = new TString("/users/emc/moralejo/mcdata/Period021_0.73_mirror/gammas_nonoise/Gamma_zbin0_*.root");
    55 
    5655  // File to be used in the calibration (must be a camera file without added noise)
    5756
     57
    5858  Char_t* AnalysisFilename = "Gamma_*w0.root";  // File to be analyzed
    59   //  Char_t* AnalysisFilename = "Gamma_*1000to1009*w0.root";  // File to be analyzed
     59
    6060
    6161
     
    7474  Float_t accepted_fraction = 1.;
    7575
    76   Float_t CleanLev[2] = {5.75, 3.84}; // Tail cuts for image analysis
     76  Float_t CleanLev[2] = {5.75, 3.84};
     77  // User change: tail cuts for image analysis
     78
    7779  MImgCleanStd  clean(CleanLev[0], CleanLev[1]); // Applies tail cuts to image.
    78   //  clean.SetMethod(MImgCleanStd::kScaled);
    79 
    80   //  Int_t BinsHigh[2] = {5, 10}; // First and last FADC bin of the range to be integrated,
    81   //  Int_t BinsLow[2]  = {5, 10}; // for high and low gain respectively.
    82   //  MExtractSignal    sigextract;
    83   //  sigextract.SetSaturationLimit(240);
    84   // Define ADC slices to be integrated in high and low gain:
    85   //  sigextract.SetRange(BinsHigh[0], BinsHigh[1], BinsLow[0], BinsLow[1]);
    86 
    87 //     MExtractFixedWindowPeakSearch sigextract;
    88 //     sigextract.SetWindows(6, 6, 4);
    89 
    90    MExtractTimeAndChargeDigitalFilter sigextract;
    91    sigextract.SetNameWeightsFile("/users/emc/moralejo/Mars/msignal/MC_weights.dat");
    92    sigextract.SetNameWeightsFile("/users/emc/moralejo/Mars/msignal/cosmics_weights.dat");
    93    sigextract.SetRange(1, 14, 3, 14);
     80
     81
     82  //  User change: signal extraction
     83  //
     84  //  MExtractFixedWindowPeakSearch sigextract;
     85  //  sigextract.SetWindows(6, 6, 4);
     86
     87  MExtractTimeAndChargeDigitalFilter sigextract;
     88  sigextract.SetNameWeightsFile("/users/emc/moralejo/Mars/msignal/MC_weights.dat");
     89  sigextract.SetRange(1, 14, 3, 14);
     90
     91  ////////// Calibration //////////
     92
     93  MMcCalibrationUpdate  mccalibupdate;
     94  ///// User change: calibrate in photons or phe- :
     95  mccalibupdate.SetSignalType(MCalibrateData::kPhe);
     96  //  mccalibupdate.SetSignalType(MCalibrateData::kPhot);
     97
    9498
    9599  MSrcPosCam src;
    96100  //
    97   // WOBBLE MODE!!
     101  // ONLY FOR WOBBLE MODE!!
    98102  //   src.SetX(120.);  // units: mm
    99103
    100104  src.SetReadyToSave();
    101 
    102105
    103106  // -------------------------------------------
     
    141144  // information taken from MMcEvt.
    142145
    143   MMcCalibrationUpdate  mccalibupdate;
    144 
    145   MCalibrateData calib; // Transforms signals from ADC counts into photons.
     146  MCalibrateData calib; // Applies calibration to the data
    146147  calib.SetCalibrationMode(MCalibrateData::kFfactor);
    147   calib.SetSignalType(MCalibrateData::kPhe);
     148  // Do not change the CalibrationMode above for MC...!
     149  calib.SetSignalType(mccalibupdate.GetSignalType());
    148150
    149151  //    MBlindPixelCalc   blind;
  • trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.cc

    r6318 r6342  
    8888    fConversionHiLo = -1.;
    8989
    90     fSignalType = MCalibrateData::kPhe;
     90    fSignalType = MCalibrateData::kPhot;
    9191
    9292    fFillCalibrationCam = kTRUE;
  • trunk/MagicSoft/Mars/manalysis/MMcCalibrationUpdate.h

    r6336 r6342  
    5858      { fOuterPixelsGainScaling = tf; }
    5959
     60    void SetSignalType (MCalibrateData::SignalType_t x) { fSignalType = x; }
     61    MCalibrateData::SignalType_t GetSignalType () const { return fSignalType; }
     62
    6063    ClassDef(MMcCalibrationUpdate, 0)   // Task which obtains, for MC files, the pedestal mean and rms, and the calibration factor from ADC counts to photons.
    6164};
Note: See TracChangeset for help on using the changeset viewer.