Changeset 5511


Ignore:
Timestamp:
11/30/04 11:15:57 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r5510 r5511  
    2828     - High-low-gain inverted weights files for the TDAS-Extractor
    2929       nr. 29, 31, 33.
    30  
     30
     31   * mjobs/MJCalibration.cc
     32     - updated to new version of MPedCalcPedRun (only important for
     33       intensity calibration)
     34     
    3135
    3236 2004/11/30: Wolfgang Wittek
  • trunk/MagicSoft/Mars/macros/getExtractor.C

    r5508 r5511  
    7979//       28:          SetNameWeightsFile('msignal/cosmics_weights.dat')" << endl;
    8080//       29:          SetNameWeightsFile('msignal/cosmics_weights4.dat')" << endl;
    81 //       30:          SetNameWeightsFile('msignal/cosmics_weights_logain6.dat')" << endl;
    82 //       31:          SetNameWeightsFile('msignal/cosmics_weights_logain4.dat')" << endl;
     81//       30:          SetNameWeightsFile('msignal/cosmics_weights_logain.dat')" << endl;
     82//       31:          SetNameWeightsFile('msignal/cosmics_weights4_logain.dat')" << endl;
    8383//       32:          SetNameWeightsFile('msignal/calibration_weights_UV.dat')" << endl;
    84 //       33:          SetNameWeightsFile('msignal/calibration_weights_UV4.dat')" << endl;
    85 //       34:          SetNameWeightsFile('msignal/calibration_weights_UV_logain6.dat')" << endl;
    86 //       35:          SetNameWeightsFile('msignal/calibration_weights_UV_logain4.dat')" << endl;
    87 //       36:  Real Fit: (not yet implemented)" << endl;
     84//       33:          SetNameWeightsFile('msignal/calibration_weights_UV_logain.dat')" << endl;
     85//       34:  Real Fit: (not yet implemented)" << endl;
    8886//
    8987// The extractor will also carry a meaningful name, storing all information about its
     
    189187    case 32:
    190188    case 33:
    191     case 34:
    192     case 35:
    193189      extractor = new MExtractTimeAndChargeDigitalFilter;
    194       extractor->SetRange(0,14,2,14);
     190      extractor->SetRange(0,18,2,14);
    195191      useTimeAndCharge = kTRUE;
    196192      break;
     
    312308      break;
    313309    case 31:
    314       ((MExtractTimeAndChargeDigitalFilter*)extractor)->SetNameWeightsFile("msignal/cosmics_weights_logain4.dat");
     310      ((MExtractTimeAndChargeDigitalFilter*)extractor)->SetNameWeightsFile("msignal/cosmics_weights4_logain.dat");
    315311      break;
    316312    case 32:
     
    318314      break;
    319315    case 33:
    320       ((MExtractTimeAndChargeDigitalFilter*)extractor)->SetNameWeightsFile("msignal/calibration_weights4_UV.dat");
    321       break;
    322     case 34:
    323       ((MExtractTimeAndChargeDigitalFilter*)extractor)->SetNameWeightsFile("msignal/calibration_weights_logain_UV.dat");
    324       break;
    325     case 35:
    326       ((MExtractTimeAndChargeDigitalFilter*)extractor)->SetNameWeightsFile("msignal/calibration_weights_logain4_UV.dat");
     316      ((MExtractTimeAndChargeDigitalFilter*)extractor)->SetNameWeightsFile("msignal/calibration_weights_UV_logain.dat");
    327317      break;
    328318    default:
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r5460 r5511  
    861861      t7->SetTextColor(gStyle->GetColorPalette(Int_t(6./max*numcol + 1.)));
    862862      t7->SetTextAlign(12);
    863       TText *t8 = pave->AddText(Form("Deviating global F-Factor:                           %3i pixels",
     863      TText *t9 = pave->AddText(Form("Deviating Number of Photons:                    %3i pixels",
    864864                                       CountBadPixels(&disp24,7)));
    865       t8->SetTextColor(gStyle->GetColorPalette(Int_t(7./max*numcol + 1.)));
    866       t8->SetTextAlign(12);
    867       TText *t9 = pave->AddText(Form("Deviating Number of Photons:                    %3i pixels",
    868                                        CountBadPixels(&disp24,8)));
    869       t9->SetTextColor(gStyle->GetColorPalette(Int_t(8./max*numcol + 1.)));
     865      t9->SetTextColor(gStyle->GetColorPalette(Int_t(7./max*numcol + 1.)));
    870866      t9->SetTextAlign(12);
    871867      TText *t10= pave->AddText(Form("High-Gain Histogram Overflow:                  %3i pixels",
    872                                        CountBadPixels(&disp24,9 )));
    873       t10->SetTextColor(gStyle->GetColorPalette(Int_t(9./max*numcol + 1.)));
     868                                       CountBadPixels(&disp24,8 )));
     869      t10->SetTextColor(gStyle->GetColorPalette(Int_t(8./max*numcol + 1.)));
    874870      t10->SetTextAlign(12);
    875871      TText *t11= pave->AddText(Form("Low-Gain Histogram Overflow:                   %3i pixels",
    876                                        CountBadPixels(&disp24,10)));
    877       t11->SetTextColor(gStyle->GetColorPalette(Int_t(10./max*numcol + 1.)));
     872                                       CountBadPixels(&disp24,9 )));
     873      t11->SetTextColor(gStyle->GetColorPalette(Int_t(9./max*numcol + 1.)));
    878874      t11->SetTextAlign(12);
    879875      TText *t12= pave->AddText(Form("Previously Excluded:                                    %3i pixels",
    880                                        CountBadPixels(&disp24,11)));
    881       t12->SetTextColor(gStyle->GetColorPalette(Int_t(11./max*numcol + 1.)));
     876                                       CountBadPixels(&disp24,10)));
     877      t12->SetTextColor(gStyle->GetColorPalette(Int_t(10./max*numcol + 1.)));
    882878      t12->SetTextAlign(12);
    883879      pave->Draw();
     
    943939      tt6->SetTextColor(gStyle->GetColorPalette(Int_t(7./max2*numcol + 1.)));
    944940      tt6->SetTextAlign(12);
     941      TText *tt8 = pave2->AddText(Form("Deviating global F-Factor:                        %3i pixels",
     942                                       CountBadPixels(&disp25,8)));
     943      tt8->SetTextColor(gStyle->GetColorPalette(Int_t(8./max2*numcol + 1.)));
     944      tt8->SetTextAlign(12);
    945945      pave2->Draw();
    946946
     
    16771677    filltme.SetDrawOption(drawoption.Data());
    16781678  */
     1679    //
     1680    // Set default extractors in case, none has been set...
     1681    //
     1682    if (!fExtractor)
     1683      fExtractor = &extract2;
     1684    if (!fTimeExtractor)
     1685      fTimeExtractor = &timespline;
     1686
    16791687    MTaskEnv taskenv("ExtractSignal");
    1680     taskenv.SetDefault(fExtractor ? fExtractor : &extract2);
     1688    taskenv.SetDefault(fExtractor);
    16811689
    16821690    tlist.AddToList(&merge);
     
    16841692
    16851693    MPedCalcPedRun           pedcalc;
    1686     pedcalc.SetWindowSize(fExtractor
    1687                           ? (Int_t)TMath::Nint(fExtractor->GetNumHiGainSamples())
    1688                           : (Int_t)TMath::Nint(extract2.GetNumHiGainSamples())
    1689                           );
    1690     pedcalc.SetRange(fExtractor
    1691                      ? fExtractor->GetHiGainFirst()
    1692                      : extract2.GetHiGainFirst(),
    1693                      fExtractor
    1694                      ? fExtractor->GetHiGainLast()
    1695                      : extract2.GetHiGainLast()
    1696                      );
     1694    pedcalc.SetExtractWindow(fExtractor->GetHiGainFirst(),TMath::Nint(fExtractor->GetNumHiGainSamples()));
    16971695
    16981696    if (IsIntensity())
     
    17091707    if (!IsTimeAndCharge())
    17101708      {
    1711         taskenv2.SetDefault(fTimeExtractor ? fTimeExtractor : &timespline);
     1709        taskenv2.SetDefault(fTimeExtractor);
    17121710   
    17131711        if (IsRelTimes())
  • trunk/MagicSoft/Mars/mpedestal/MExtractPedestal.cc

    r5507 r5511  
    151151#include "MExtractPedestal.h"
    152152#include "MExtractTimeAndCharge.h"
    153 #include "MExtractTimeAndChargeDigitalFilter.h"
    154153
    155154#include "MParList.h"
     
    422421  if (fExtractor)
    423422    {
    424       fExtractor->InitArrays();
     423      if (!fExtractor->InitArrays())
     424        return kFALSE;
    425425      SetExtractWindow(fExtractor->GetHiGainFirst(),(Int_t)fExtractor->GetNumHiGainSamples());
    426       if (fExtractor->InheritsFrom("MExtractTimeAndChargeDigitalFilter"))
    427         {
    428           MExtractTimeAndChargeDigitalFilter* df = (MExtractTimeAndChargeDigitalFilter*)fExtractor;
    429           if (!df->IsWeightsSet())
    430             if (!df->ReadWeightsFile(df->GetNameWeightsFile()))
    431               return kFALSE;
    432         }
    433426    }
    434427
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.cc

    r5504 r5511  
    139139                                fLoGainFirst, fLoGainLast, fNumLoGainSamples);
    140140 
    141   InitArrays();
     141
     142  if (!InitArrays())
     143    return kFALSE;
     144 
    142145  Print();
    143146
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndCharge.h

    r5504 r5511  
    4040                                                           fWindowSizeLoGain = windowl;  }
    4141 
    42   virtual void InitArrays() {}
     42  virtual Bool_t InitArrays() { return kTRUE; }
    4343
    4444  virtual void FindTimeAndChargeHiGain(Byte_t *firstused, Byte_t *logain, Float_t &sum, Float_t &dsum,
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.cc

    r5505 r5511  
    180180// --------------------------------------------------------------------------
    181181//
    182 // PreProcess
    183 //
    184 // Calls:
    185 // - ReadWeightsFile(fNameWeightsFile) if the weights have not yet been set.
    186 // - Creates new arrays according to the extraction range
    187 //
    188 Int_t MExtractTimeAndChargeDigitalFilter::PreProcess(MParList *pList)
    189 {
    190   if (!fWeightsSet)
    191     if (!ReadWeightsFile(fNameWeightsFile))
    192       return kFALSE;
    193 
    194   return MExtractTimeAndCharge::PreProcess(pList);
    195 }
    196 
    197 // --------------------------------------------------------------------------
    198 //
    199182// ReInit
    200183//
     
    220203// Gets called in the ReInit() and initialized the arrays
    221204//
    222 void MExtractTimeAndChargeDigitalFilter::InitArrays()
     205Bool_t MExtractTimeAndChargeDigitalFilter::InitArrays()
    223206{
    224207  Int_t range = (Int_t)(fHiGainLast - fHiGainFirst + 1 + fHiLoLast);
     
    226209  range = (Int_t)(fLoGainLast - fLoGainFirst + 1);
    227210  fLoGainSignal.Set(range);
     211
     212  if (!fWeightsSet)
     213    if (!ReadWeightsFile(fNameWeightsFile))
     214      return kFALSE;
     215
    228216}
    229217
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.h

    r5505 r5511  
    5353
    5454  Bool_t ReInit(MParList *pList);
    55   Int_t PreProcess(MParList *pList);
    5655
    57   void InitArrays();
     56  Bool_t InitArrays();
    5857
    5958  Int_t  ReadEnv(const TEnv &env, TString prefix, Bool_t print);
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSlidingWindow.cc

    r5505 r5511  
    185185// Gets called in the ReInit() and initialized the arrays
    186186//
    187 void MExtractTimeAndChargeSlidingWindow::InitArrays()
     187Bool_t MExtractTimeAndChargeSlidingWindow::InitArrays()
    188188{
    189189  Int_t range = (Int_t)(fHiGainLast - fHiGainFirst + 1 + fHiLoLast);
     
    191191  range = (Int_t)(fLoGainLast - fLoGainFirst + 1);
    192192  fLoGainSignal.Set(range);
     193
     194  return kTRUE;
     195 
    193196}
    194197
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSlidingWindow.h

    r5504 r5511  
    2929  MArrayF fLoGainSignal;                 //! Store them in separate arrays
    3030
    31   void InitArrays();
     31  Bool_t InitArrays();
    3232 
    3333  Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.cc

    r5504 r5511  
    293293// Gets called in the ReInit() and initialized the arrays
    294294//
    295 void MExtractTimeAndChargeSpline::InitArrays()
     295Bool_t MExtractTimeAndChargeSpline::InitArrays()
    296296{
    297297
     
    315315  fLoGainFirstDeriv .Reset();
    316316  fLoGainSecondDeriv.Reset();
     317
     318  return kTRUE;
    317319
    318320}
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeSpline.h

    r5504 r5511  
    4343  Bool_t ReInit( MParList *pList );
    4444 
    45   Int_t ReadEnv(const TEnv &env, TString prefix, Bool_t print);
     45  Int_t  ReadEnv(const TEnv &env, TString prefix, Bool_t print);
    4646
    47   void InitArrays();
     47  Bool_t InitArrays();
    4848 
    4949  void CalcIntegralHiGain(Float_t &sum, Int_t startslice, Int_t lastslice);
Note: See TracChangeset for help on using the changeset viewer.