Changeset 7028


Ignore:
Timestamp:
05/13/05 15:28:58 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsPix.h

    r7012 r7028  
    105105      if (IsUncalibrated( kLoGainOverFlow      )) return 8;
    106106      if (IsUncalibrated( kDeadPedestalRms     )) return 9;
    107       if (IsUncalibrated( kFluctuatingArrivalTimes )) return 10;
    108       if (IsUncalibrated( kPreviouslyExcluded      )) return 11;
    109       return 12;
     107      if (IsUncalibrated( kFluctuatingArrivalTimes)) return 10;
     108      if (IsUncalibrated( kDeviatingNumPhes       )) return 11;
     109      if (IsUncalibrated( kPreviouslyExcluded     )) return 12;
     110      return 13;
    110111    }
    111112   
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.cc

    r7023 r7028  
    179179// 
    180180// 
    181 // 
     181//  ClassVersion 2:
     182//   - Float_t fPheErrLimit;
     183//   + Float_t fPheErrLowerLimit;                   // Lower limit acceptance nr. phe's w.r.t. area idx mean (in sigmas)
     184//   + Float_t fPheErrUpperLimit;                   // Upper limit acceptance nr. phe's w.r.t. area idx mean (in sigmas)
     185//
    182186//////////////////////////////////////////////////////////////////////////////
    183187#include "MCalibrationChargeCalc.h"
     
    236240const Float_t MCalibrationChargeCalc::fgLambdaErrLimit         = 0.2;
    237241const Float_t MCalibrationChargeCalc::fgLambdaCheckLimit       = 0.5;
    238 const Float_t MCalibrationChargeCalc::fgPheErrLimit            = 4.5;
     242const Float_t MCalibrationChargeCalc::fgPheErrLowerLimit       = 9.0;
     243const Float_t MCalibrationChargeCalc::fgPheErrUpperLimit       = 5.5;
    239244const Float_t MCalibrationChargeCalc::fgFFactorErrLimit        = 4.5;
    240245const Float_t MCalibrationChargeCalc::fgArrTimeRmsLimit        = 3.5;
     
    262267// - fLambdaErrLimit    to fgLambdaErrLimit
    263268// - fNamePedestalCam   to fgNamePedestalCam
    264 // - fPheErrLimit       to fgPheErrLimit 
     269// - fPheErrLowerLimit  to fgPheErrLowerLimit
     270// - fPheErrUpperLimit  to fgPheErrUpperLimit
    265271// - fPulserColor       to MCalibrationCam::kCT1
    266272// - fOutputPath        to "."
     
    289295  SetChargeErrLimit    (); 
    290296  SetChargeRelErrLimit ();
     297  SetDebug       ( kFALSE );
    291298  SetFFactorErrLimit   ();
    292299  SetLambdaCheckLimit  ();
    293300  SetLambdaErrLimit    ();
    294301  SetNamePedestalCam   ();
    295   SetPheErrLimit       ();
    296302  SetOutputPath        ();
    297303  SetOutputFile        ();
    298   SetDebug       ( kFALSE );
     304  SetPheErrLowerLimit  ();
     305  SetPheErrUpperLimit  ();
    299306
    300307  SetCheckArrivalTimes     ();
     
    867874  PrintUncalibrated(MBadPixelsPix::kDeadPedestalRms,
    868875                    "Presumably dead from Pedestal Rms:                ");
     876  PrintUncalibrated(MBadPixelsPix::kDeviatingNumPhes,
     877                    "Deviating number of phes:                         ");
    869878  PrintUncalibrated(MBadPixelsPix::kPreviouslyExcluded,
    870879                    "Previously excluded:                              ");
     
    883892  PrintUncalibrated(MBadPixelsPix::kLoGainNotFitted,     
    884893                    "Unsuccesful Gauss fit to the Lo Gain:   ");
    885   PrintUncalibrated(MBadPixelsPix::kDeviatingNumPhes,   
    886                     "Deviating number of phes:               ");
    887894  PrintUncalibrated(MBadPixelsPix::kDeviatingFFactor,   
    888895                    "Deviating F-Factor:                     ");
     
    11001107        {
    11011108          if (bad.IsUncalibrated( MBadPixelsPix::kDeviatingNumPhes ))
    1102             bad.SetUnsuitable(   MBadPixelsPix::kUnreliableRun    );
     1109            bad.SetUnsuitable(   MBadPixelsPix::kUnsuitableRun    );
    11031110        }
    11041111     
     
    12351242        }
    12361243     
    1237       lowlim  [i] = areaphes[i] - fPheErrLimit*TMath::Sqrt(areavars[i]);
    1238       upplim  [i] = areaphes[i] + fPheErrLimit*TMath::Sqrt(areavars[i]);
     1244      lowlim[i] = areaphes[i] - fPheErrLowerLimit*TMath::Sqrt(areavars[i]);
     1245      upplim[i] = areaphes[i] + fPheErrUpperLimit*TMath::Sqrt(areavars[i]);
     1246 
    12391247
    12401248      TH1D *hist = camphes.ProjectionS(TArrayI(),TArrayI(1,&i),"_py",100);
     
    12471255        hist->DrawClone();
    12481256
    1249       if (ndf < 2)
     1257      if (ndf < 5)
    12501258        {
    12511259          *fLog << warn << GetDescriptor() << ": Cannot use a Gauss fit to the number of photo-electrons "
    12521260                << "in the camera with area index: " << i << endl;
    1253           *fLog << warn << GetDescriptor() << ": Number of dof.: " << ndf << " is smaller than 2 " << endl;
     1261          *fLog << warn << GetDescriptor() << ": Number of dof.: " << ndf << " is smaller than 5 " << endl;
    12541262          *fLog << warn << GetDescriptor() << ": Will use the simple mean and rms " << endl;
    12551263          delete hist;
     
    12821290            << Form("%7.2f+-%6.2f",mean,sigma) << endl;
    12831291
    1284       lowlim  [i] = mean  - fPheErrLimit*sigma;
    1285       upplim  [i] = mean  + fPheErrLimit*sigma;
     1292      lowlim[i] = mean - fPheErrLowerLimit*sigma;
     1293      upplim[i] = mean + fPheErrUpperLimit*sigma;
    12861294
    12871295      delete hist;
     
    13261334        {
    13271335          *fLog << warn << "Number of phes: "
    1328                 << Form("%7.2f out of %3.1f sigma limit: ",nphe,fPheErrLimit)
     1336                << Form("%7.2f out of +%3.1f-%3.1f sigma limit: ",nphe,fPheErrUpperLimit,fPheErrLowerLimit)
    13291337                << Form("[%7.2f,%7.2f] pixel%4i",lowlim[aidx],upplim[aidx],i) << endl;
    13301338          bad.SetUncalibrated( MBadPixelsPix::kDeviatingNumPhes );
     1339
    13311340          if (IsCheckDeviatingBehavior())
    1332             {
    1333               bad.SetUnsuitable  ( MBadPixelsPix::kUnreliableRun    );
    1334               //              pix.SetFFactorMethodValid(kFALSE);
    1335             }
     1341                bad.SetUnsuitable(MBadPixelsPix::kUnsuitableRun);
    13361342          continue;
    13371343        }
     
    15111517      if (2.*(lambdacheck-lambda)/(lambdacheck+lambda) > fLambdaCheckLimit)
    15121518        {
    1513           *fLog << warn << GetDescriptor()
    1514                 << Form("%s%4.2f%s%4.2f%s%4.2f%s%2i",": Lambda: ",lambda," and Lambda-Check: ",
    1515                     lambdacheck," differ by more than ",fLambdaCheckLimit," in the Blind Pixel Nr.",i)
    1516                 << endl;
     1519          *fLog << warn << GetDescriptor() << ": Lambda="
     1520                << Form("%4.2f", lambda) << " and Lambda-Check="
     1521                << Form("%4.2f", lambdacheck) << " differ by more than "
     1522                << Form("%4.2f", fLambdaCheckLimit) << " in the Blind Pixel Nr."
     1523                << Form("%2i", i) << endl;
    15171524          blindpix.SetValid(kFALSE);
    15181525          continue;
     
    15211528      if (lambdaerr > fLambdaErrLimit)
    15221529        {
    1523           *fLog << warn << GetDescriptor()
    1524                 << Form("%s%4.2f%s%4.2f%s%2i",": Error of Fitted Lambda: ",lambdaerr," is greater than ",
    1525                         fLambdaErrLimit," in Blind Pixel Nr.",i) << endl;
     1530            *fLog << warn << GetDescriptor() << ": Error of Fitted Lambda="
     1531                << Form("%4.2f", lambdaerr) << " is greater than "
     1532                << Form("%4.2f", fLambdaErrLimit)
     1533                << " in Blind Pixel Nr." << Form("%2d", i) << endl;
    15261534          blindpix.SetValid(kFALSE);
    15271535          continue;
     
    22482256      rc = kTRUE;
    22492257    }
    2250   if (IsEnvDefined(env, prefix, "PheErrLimit", print))
    2251     {
    2252       SetPheErrLimit(GetEnvValue(env, prefix, "PheErrLimit", fPheErrLimit));
    2253       rc = kTRUE;
    2254     }
    22552258  if (IsEnvDefined(env, prefix, "CheckDeadPixels", print))
    22562259    {
     
    22832286      rc = kTRUE;
    22842287    }
     2288  if (IsEnvDefined(env, prefix, "PheErrLowerLimit", print))
     2289    {
     2290      SetPheErrLowerLimit(GetEnvValue(env, prefix, "PheErrLowerLimit", fPheErrLowerLimit));
     2291      rc = kTRUE;
     2292    }
     2293  if (IsEnvDefined(env, prefix, "PheErrUpperLimit", print))
     2294    {
     2295      SetPheErrUpperLimit(GetEnvValue(env, prefix, "PheErrUpperLimit", fPheErrUpperLimit));
     2296      rc = kTRUE;
     2297    }
    22852298
    22862299  return rc;
    22872300}
    22882301
     2302
     2303 
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCalc.h

    r7013 r7028  
    5454  static const Float_t fgLambdaCheckLimit;     //! Default for fLambdaCheckLimit   (now set to: 0.2)
    5555  static const Float_t fgLambdaErrLimit;       //! Default for fLabmdaErrLimit     (now set to: 0.5)
    56   static const Float_t fgPheErrLimit;          //! Default for fPheErrLimit        (now set to: 4.5)
     56  static const Float_t fgPheErrLowerLimit;     //! Default for fPheErrLowerLimit   (now set to: 9.0)
     57  static const Float_t fgPheErrUpperLimit;     //! Default for fPheErrUpperLimit   (now set to: 4.5)
    5758  static const Float_t fgFFactorErrLimit;      //! Default for fFFactorErrLimit    (now set to: 4.5)
    5859  static const Float_t fgArrTimeRmsLimit;      //! Default for fArrTimeRmsLimit    (now set to: 3.5)
     
    6869  Float_t fNumHiGainSamples;                   // Number High-Gain FADC slices used by extractor
    6970  Float_t fNumLoGainSamples;                   // Number Low -Gain FADC slices used by extractor
    70   Float_t fPheErrLimit;                        // Limit acceptance nr. phe's w.r.t. area idx mean (in sigmas)
    71   Float_t fFFactorErrLimit;                    // Limit acceptance F-Factor w.r.t. area idx mean
     71  Float_t fPheErrLowerLimit;                   // Lower limit acceptance nr. phe's w.r.t. area idx mean (in sigmas)
     72  Float_t fPheErrUpperLimit;                   // Upper limit acceptance nr. phe's w.r.t. area idx mean (in sigmas)
     73  Float_t fFFactorErrLimit;                    // Limit acceptance F-Factor w.r.t. area idx mean
    7274  Float_t fArrTimeRmsLimit;                    // Limit acceptance RMS of absolute arrival times
    7375  Float_t fSqrtHiGainSamples;                  // Square root nr. High-Gain FADC slices used by extractor
     
    218220  void SetOutputPath        ( TString path="."                   );
    219221  void SetOutputFile        ( TString file="ChargeCalibStat.txt" );
    220   void SetPheErrLimit       ( const Float_t f=fgPheErrLimit            ) { fPheErrLimit       = f;     } 
     222  void SetPheErrLowerLimit  ( const Float_t f=fgPheErrLowerLimit       ) { fPheErrLowerLimit  = f;     }
     223  void SetPheErrUpperLimit  ( const Float_t f=fgPheErrUpperLimit       ) { fPheErrUpperLimit  = f;     }
    221224  void SetPulserColor       ( const MCalibrationCam::PulserColor_t col ) { fPulserColor       = col;   }
    222225
    223   ClassDef(MCalibrationChargeCalc, 1)   // Task calculating Calibration Containers and Quantum Efficiencies
     226  ClassDef(MCalibrationChargeCalc, 2)   // Task calculating Calibration Containers and Quantum Efficiencies
    224227};
    225228
  • trunk/MagicSoft/Mars/mcalib/MCalibrationChargeCam.cc

    r7013 r7028  
    523523      break;
    524524    case 9:
    525       if (!pix.IsFFactorMethodValid())
     525      //      if (!pix.IsFFactorMethodValid())
     526      //        return kFALSE;
     527      if (pix.IsExcluded())
    526528        return kFALSE;
    527529      val = pix.GetPheFFactorMethod();
    528530      break;
    529531    case 10:
    530       if (!pix.IsFFactorMethodValid())
     532      //      if (!pix.IsFFactorMethodValid())
     533      //        return kFALSE;
     534      if (pix.IsExcluded())
    531535        return kFALSE;
    532536      val = pix.GetPheFFactorMethodErr();
     537      if (val < 0.)
     538        val = 0.00001;
    533539      break;
    534540    case 11:
    535       if (!pix.IsFFactorMethodValid())
     541      //      if (!pix.IsFFactorMethodValid())
     542      //        return kFALSE;
     543      if (pix.IsExcluded())
    536544        return kFALSE;
    537545      val = pix.GetMeanConvFADC2Phe();
    538546      break;
    539547    case 12:
    540       if (!pix.IsFFactorMethodValid())
     548      //      if (!pix.IsFFactorMethodValid())
     549      //        return kFALSE;
     550      if (pix.IsExcluded())
    541551        return kFALSE;
    542552      val = pix.GetMeanConvFADC2PheErr();
     553      if (val < 0.)
     554        val = 0.00001;
    543555      break;
    544556    case 13:
    545       if (!pix.IsFFactorMethodValid())
     557      //      if (!pix.IsFFactorMethodValid())
     558      //        return kFALSE;
     559      if (pix.IsExcluded())
    546560        return kFALSE;
    547561      val = pix.GetMeanFFactorFADC2Phot();
    548562      break;
    549563    case 14:
    550       if (!pix.IsFFactorMethodValid())
     564      //      if (!pix.IsFFactorMethodValid())
     565      //        return kFALSE;
     566      if (pix.IsExcluded())
    551567        return kFALSE;
    552568      val = pix.GetMeanFFactorFADC2PhotErr();
     569      if (val < 0.)
     570        val = 0.00001;
    553571      break;
    554572    case 15:
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc

    r7013 r7028  
    171171const TString MHCalibrationChargeCam::gsAbsHistXTitle     = "Time [FADC slices]";
    172172const TString MHCalibrationChargeCam::gsAbsHistYTitle     = "Nr. events";
    173 const Float_t MHCalibrationChargeCam::fgNumHiGainSaturationLimit = 0.085;
     173const Float_t MHCalibrationChargeCam::fgNumHiGainSaturationLimit = 0.15;
    174174const Float_t MHCalibrationChargeCam::fgNumLoGainSaturationLimit = 0.005;
    175175const Float_t MHCalibrationChargeCam::fgTimeLowerLimit           = 1.;
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationHiLoCam.cc

    r7014 r7028  
    126126const TString MHCalibrationHiLoCam::gsHistXTitle = "Amplification Ratio [1]";
    127127const TString MHCalibrationHiLoCam::gsHistYTitle = "Nr. events";
     128
    128129// --------------------------------------------------------------------------
    129130//
     
    161162  SetHistYTitle(gsHistYTitle.Data());
    162163
     164  SetOscillations(kFALSE);
    163165}
    164166
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationPulseTimeCam.cc

    r6870 r7028  
    441441        }
    442442
    443       //      *fLog << (Int_t)max << "  " << (Int_t)maxpos << endl;
    444 
    445443      if (max < fLowerSignalLimit)
    446444        continue;
  • trunk/MagicSoft/Mars/mjobs/MJCalibrateSignal.cc

    r7005 r7028  
    307307    MHCalibrationChargePINDiode hpndiod;
    308308    MHCalibrationRelTimeCam     hrelcam;
     309    MHCalibrationHiLoCam        hilocam;
     310    MHCalibrationPulseTimeCam   hpulcam;
    309311
    310312    hchacam.SetOscillations(kFALSE);
     
    576578    MFillH filcam(&hchacam, "MExtractedSignalCam",        "FillChargeCam");
    577579    MFillH filtme(&hrelcam, "MArrivalTimeCam",            "FillRelTime");
    578     MFillH filhil("MHCalibrationHiLoCam",        "MExtractedSignalCam",        "FillHiLoRatio");
    579     MFillH filpul("MHCalibrationPulseTimeCam",  "MRawEvtData",                "FillPulseTime");
     580    MFillH filhil(&hilocam, "MExtractedSignalCam",        "FillHiLoRatio");
     581    MFillH filpul(&hpulcam, "MRawEvtData",                "FillPulseTime");
    580582    filpin.SetBit(MFillH::kDoNotDisplay);
    581583    filbnd.SetBit(MFillH::kDoNotDisplay);
     
    735737      tlist2.AddToList(&filhil);
    736738    if (fIsPulsePosCheck)
    737       tlist2.AddToList(&filpul);
     739        tlist2.AddToList(&filpul);
     740    if (fIsHiLoCalibration)
     741    {
     742        plist.AddToList(&hilocam);
     743        tlist2.AddToList(&filhil);
     744    }
     745    if (fIsPulsePosCheck)
     746    {
     747        plist.AddToList(&hpulcam);
     748        tlist2.AddToList(&filpul);
     749    }
     750
    738751    tlist2.AddToList(&fill2);
    739752    tlist2.AddToList(&calib);
  • trunk/MagicSoft/Mars/mjobs/MJCalibration.cc

    r7023 r7028  
    842842      // for the datacheck, fix the ranges!!
    843843      //
    844       const Double_t max = 11.;
     844      const Double_t max = 12.;
    845845      obj8->SetMinimum(0.);
    846       obj8->SetMaximum(11.);
     846      obj8->SetMaximum(max);
    847847      //
    848848      // Set the datacheck sizes:
     
    857857      pave->SetBit(kCanDelete);
    858858      pave->ConvertNDCtoPad();
    859       pave->SetTextSize(0.05);
     859      pave->SetTextSize(0.045);
    860860      pave->AddText("  ");
    861       TText *t1 = pave->AddText(Form("Signal smaller 4.5 Pedestal RMS:                 %3i pixels",
     861      TText *t1 = pave->AddText(Form("Signal smaller 4.5 Pedestal RMS:               %3i pixels",
    862862                                       CountBadPixels(&disp24,1)));
    863       t1->SetTextColor(gStyle->GetColorPalette(Int_t(1./max*numcol + 1.)));
     863      t1->SetTextColor(gStyle->GetColorPalette(Int_t(1./max*numcol)));
    864864      t1->SetTextAlign(12);
    865       TText *t2 = pave->AddText(Form("%s%3i%s","Signal Rel. error too large:                            ",
     865      TText *t2 = pave->AddText(Form("%s%3i%s","Signal Rel. error too large:                          ",
    866866                                       CountBadPixels(&disp24,2)," pixels"));
    867       t2->SetTextColor(gStyle->GetColorPalette(Int_t(2./max*numcol + 1.)));
     867      t2->SetTextColor(gStyle->GetColorPalette(Int_t(2./max*numcol)));
    868868      t2->SetTextAlign(12);
    869       TText *t4 = pave->AddText(Form("Low Gain Saturation:                                     %3i pixels",
     869      TText *t4 = pave->AddText(Form("Low Gain Saturation:                                   %3i pixels",
    870870                                       CountBadPixels(&disp24,3)));
    871       t4->SetTextColor(gStyle->GetColorPalette(Int_t(3./max*numcol + 1.)));
     871      t4->SetTextColor(gStyle->GetColorPalette(Int_t(3./max*numcol)));
    872872      t4->SetTextAlign(12);
    873       TText *t5 = pave->AddText(Form("Mean Arr. Time In First Extraction Bin:        %3i pixels",
     873      TText *t5 = pave->AddText(Form("Mean Arr. Time In First Extraction Bin:      %3i pixels",
    874874                                       CountBadPixels(&disp24,4)));
    875       t5->SetTextColor(gStyle->GetColorPalette(Int_t(4./max*numcol + 1.)));
     875      t5->SetTextColor(gStyle->GetColorPalette(Int_t(4./max*numcol)));
    876876      t5->SetTextAlign(12);
    877       TText *t6 = pave->AddText(Form("Mean Arr. Time In Last 2 Extraction Bins:   %3i pixels",
     877      TText *t6 = pave->AddText(Form("Mean Arr. Time In Last 2 Extraction Bins:  %3i pixels",
    878878                                       CountBadPixels(&disp24,5)));
    879       t6->SetTextColor(gStyle->GetColorPalette(Int_t(5./max*numcol + 1.)));
     879      t6->SetTextColor(gStyle->GetColorPalette(Int_t(5./max*numcol)));
    880880      t6->SetTextAlign(12);
    881       TText *t9 = pave->AddText(Form("Deviating Number of Photons:                      %3i pixels",
     881      TText *t9 = pave->AddText(Form("Deviating Number of Photons:                    %3i pixels",
    882882                                       CountBadPixels(&disp24,6)));
    883       t9->SetTextColor(gStyle->GetColorPalette(Int_t(6./max*numcol + 1.)));
     883      t9->SetTextColor(gStyle->GetColorPalette(Int_t(6./max*numcol)));
    884884      t9->SetTextAlign(12);
    885       TText *t10= pave->AddText(Form("High-Gain Histogram Overflow:                    %3i pixels",
     885      TText *t10= pave->AddText(Form("High-Gain Histogram Overflow:                  %3i pixels",
    886886                                       CountBadPixels(&disp24,7 )));
    887       t10->SetTextColor(gStyle->GetColorPalette(Int_t(7./max*numcol + 1.)));
     887      t10->SetTextColor(gStyle->GetColorPalette(Int_t(7./max*numcol)));
    888888      t10->SetTextAlign(12);
    889       TText *t11= pave->AddText(Form("Low-Gain Histogram Overflow:                     %3i pixels",
     889      TText *t11= pave->AddText(Form("Low-Gain Histogram Overflow:                   %3i pixels",
    890890                                       CountBadPixels(&disp24,8 )));
    891       t11->SetTextColor(gStyle->GetColorPalette(Int_t(8./max*numcol + 1.)));
     891      t11->SetTextColor(gStyle->GetColorPalette(Int_t(8./max*numcol)));
    892892      t11->SetTextAlign(12);
    893       TText *t12= pave->AddText(Form("Presumably dead from Ped. Rms:                %3i pixels",
     893      TText *t12= pave->AddText(Form("Presumably dead from Ped. Rms:              %3i pixels",
    894894                                       CountBadPixels(&disp24,9 )));
    895       t12->SetTextColor(gStyle->GetColorPalette(Int_t(9./max*numcol + 1.)));
     895      t12->SetTextColor(gStyle->GetColorPalette(Int_t(9./max*numcol)));
    896896      t12->SetTextAlign(12);
    897       TText *t13= pave->AddText(Form("Fluctuating Pulse Arrival Times:                   %3i pixels",
     897      TText *t13= pave->AddText(Form("Fluctuating Pulse Arrival Times:                 %3i pixels",
    898898                                       CountBadPixels(&disp24,10)));
    899       t13->SetTextColor(gStyle->GetColorPalette(Int_t(10./max*numcol + 1.)));
     899      t13->SetTextColor(gStyle->GetColorPalette(Int_t(10./max*numcol)));
    900900      t13->SetTextAlign(12);
    901       TText *t14= pave->AddText(Form("Previously Excluded:                                     %3i pixels",
     901      TText *t17 = pave->AddText(Form("Deviating Number of Photo-electrons:       %3i pixels",
    902902                                       CountBadPixels(&disp24,11)));
    903       t14->SetTextColor(gStyle->GetColorPalette(Int_t(11./max*numcol + 1.)));
     903      t17->SetTextColor(gStyle->GetColorPalette(Int_t(11./max*numcol)));
     904      t17->SetTextAlign(12);
     905      TText *t14= pave->AddText(Form("Previously Excluded:                                   %3i pixels",
     906                                       CountBadPixels(&disp24,12)));
     907      t14->SetTextColor(gStyle->GetColorPalette(Int_t(12./max*numcol)));
    904908      t14->SetTextAlign(12);
    905909      pave->Draw();
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r7013 r7028  
    983983      {
    984984        if (fExtractor->InheritsFrom("MExtractTimeAndCharge"))
    985           hpedcam.SetFitStart(-10.*((MExtractTimeAndCharge*)fExtractor)->GetWindowSizeHiGain());
     985          {
     986              if (fExtractionType!=kFundamental)
     987              {
     988                  const MExtractTimeAndCharge &e = *static_cast<MExtractTimeAndCharge*>(fExtractor);
     989                  hpedcam.SetFitStart(-5*e->GetWindowSizeHiGain());
     990              }
     991              else
     992                  hpedcam.SetFitStart(10.);
     993          }
    986994       
    987995        pedcalc.SetIntermediateStorage();
  • trunk/MagicSoft/Mars/mpointing/MSrcPosCalc.cc

    r6992 r7028  
    291291    //--------------------------------------------
    292292
    293     // pos0[3] = TMath::Cos(theta0)
    294 
    295     const Double_t YC0 = TMath::Cos(theta0)*TMath::Tan(theta)*TMath::Cos(phi-phi0) - TMath::Sin(theta0);
    296     const Double_t YC1 = TMath::Cos(theta0) + TMath::Sin(theta0)*TMath::Tan(theta);
    297     const Double_t YC  = YC0 / YC1;
    298 
    299     //--------------------------------------------
    300 
    301     const Double_t XC0 =  TMath::Cos(theta0) - YC*TMath::Sin(theta0);
    302     const Double_t XC  = -TMath::Sin(phi-phi0) * TMath::Tan(theta) * XC0;
     293    /* --- OLD ---
     294     const Double_t YC0 = TMath::Cos(theta0)*TMath::Tan(theta)*TMath::Cos(phi-phi0) - TMath::Sin(theta0);
     295     const Double_t YC1 = TMath::Cos(theta0) + TMath::Sin(theta0)*TMath::Tan(theta);
     296     const Double_t YC  = YC0 / YC1;
     297
     298     const Double_t XC0 =  TMath::Cos(theta0) - YC*TMath::Sin(theta0);
     299     const Double_t XC  = -TMath::Sin(phi-phi0) * TMath::Tan(theta) * XC0;
     300     */
     301
     302    /* --- NEW --- */
     303    const Double_t XC0 = TMath::Sin(theta)*TMath::Sin(phi-phi0);
     304    const Double_t XC1 = TMath::Cos(theta0)*TMath::Cos(theta);
     305    const Double_t XC2 = TMath::Sin(theta0)*TMath::Sin(theta)*TMath::Cos(phi-phi0);
     306
     307    const Double_t YC0 = TMath::Sin(theta0)*TMath::Cos(theta);
     308    const Double_t YC1 = TMath::Cos(theta0)*TMath::Sin(theta)*TMath::Cos(phi-phi0);
     309
     310    const Double_t XC  =  - XC0     / (XC1 + XC2);
     311    const Double_t YC  = (-YC0+YC1) / (XC1 + XC2);
    303312
    304313    //--------------------------------------------
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.cc

    r6913 r7028  
    7272const Byte_t MExtractTimeAndChargeDigitalFilter::fgLoGainFirst             =  1;
    7373const Byte_t MExtractTimeAndChargeDigitalFilter::fgLoGainLast              = 14;
    74 const Int_t  MExtractTimeAndChargeDigitalFilter::fgWindowSizeHiGain        =  6;
     74const Int_t  MExtractTimeAndChargeDigitalFilter::fgWindowSizeHiGain        =  4;
    7575const Int_t  MExtractTimeAndChargeDigitalFilter::fgWindowSizeLoGain        =  6;
    7676const Int_t  MExtractTimeAndChargeDigitalFilter::fgBinningResolutionHiGain = 10;
     
    7878const Int_t  MExtractTimeAndChargeDigitalFilter::fgSignalStartBinHiGain    =  4;
    7979const Int_t  MExtractTimeAndChargeDigitalFilter::fgSignalStartBinLoGain    =  4;
    80 const TString MExtractTimeAndChargeDigitalFilter::fgNameWeightsFile        = "msignal/cosmics_weights.dat";
     80const TString MExtractTimeAndChargeDigitalFilter::fgNameWeightsFile        = "msignal/cosmics_weights46.dat";
    8181const Float_t MExtractTimeAndChargeDigitalFilter::fgOffsetLoGain           =  1.7; // 5 ns
    8282const Float_t MExtractTimeAndChargeDigitalFilter::fgLoGainStartShift       = -2.8;
Note: See TracChangeset for help on using the changeset viewer.