Changeset 6063 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
01/27/05 20:26:49 (20 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationChargeCam.cc

    r5953 r6063  
    173173const Float_t MHCalibrationChargeCam::fgNumLoGainSaturationLimit = 0.005;
    174174const Float_t MHCalibrationChargeCam::fgTimeLowerLimit           = 1.;
    175 const Float_t MHCalibrationChargeCam::fgTimeUpperLimit           = 2.;
     175const Float_t MHCalibrationChargeCam::fgTimeUpperLimit           = 3.;
    176176// 1Led Green, 1 LED blue, 5 LEDs blue, 10 LEDs blue, 10 LEDs UV, CT1, 5Leds Green
    177177const Float_t MHCalibrationChargeCam::gkHiGainInnerRefLines[7]   = { 245., 323. , 1065., 1467., 180., 211. , 533.5};   
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.cc

    r6031 r6063  
    4444#include <TLegend.h>
    4545#include <TPad.h>
     46#include <TEnv.h>
    4647
    4748// mars core
     
    8788using namespace std;
    8889
    89 const Double_t MJPedestal::fgPedestalMin = 4.;
    90 const Double_t MJPedestal::fgPedestalMax = 16.;
    91 const Double_t MJPedestal::fgPedRmsMin   = 0.;
    92 const Double_t MJPedestal::fgPedRmsMax   = 20.;
    93 
    94 const Float_t  MJPedestal::fgRefPedClosedLids       = 9.635;
    95 const Float_t  MJPedestal::fgRefPedExtraGalactic    = 9.93;
    96 const Float_t  MJPedestal::fgRefPedGalactic         = 10.03;
    97 const Float_t  MJPedestal::fgRefPedRmsClosedLidsInner    = 1.7;
    98 const Float_t  MJPedestal::fgRefPedRmsExtraGalacticInner = 5.6;
    99 const Float_t  MJPedestal::fgRefPedRmsGalacticInner      = 6.92;
    100 const Float_t  MJPedestal::fgRefPedRmsClosedLidsOuter    = 1.7;
    101 const Float_t  MJPedestal::fgRefPedRmsExtraGalacticOuter = 3.35;
    102 const Float_t  MJPedestal::fgRefPedRmsGalacticOuter      = 4.2;
    103 
     90const TString  MJPedestal::fgReferenceFile = "mjobs/pedestalref.rc";
    10491// --------------------------------------------------------------------------
    10592//
     
    115102//
    116103MJPedestal::MJPedestal(const char *name, const char *title)
    117     : fRuns(0), fExtractor(NULL), fDisplayType(kDisplayNormal),
     104    : fRuns(0), fExtractor(NULL), fDisplayType(kDisplayDataCheck),
    118105      fDataCheck(kFALSE), fExtractType(kUsePedRun), fExtractionType(kFundamental)
    119106{
     
    124111    SetUsePedRun();
    125112    SetPathIn("");
     113    SetReferenceFile();
     114
     115    //
     116    // Default references for case that no value references file is there
     117    // (should not occur)
     118    //
     119
     120    fPedestalMin                 = 4.;
     121    fPedestalMax                 = 16.;
     122    fPedRmsMin                   = 0.;
     123    fPedRmsMax                   = 20.;
     124    fRefPedClosedLids            = 9.635;
     125    fRefPedExtraGalactic         = 9.93;
     126    fRefPedGalactic              = 10.03;
     127    fRefPedRmsClosedLidsInner    = 1.7;
     128    fRefPedRmsExtraGalacticInner = 5.6;
     129    fRefPedRmsGalacticInner      = 6.92;
     130    fRefPedRmsClosedLidsOuter    = 1.7;
     131    fRefPedRmsExtraGalacticOuter = 3.35;
     132    fRefPedRmsGalacticOuter      = 4.2;
    126133}
    127134
     
    395402        if (fExtractionType==kFundamental/*!fExtractorResolution*/)
    396403          {
    397             obj1->SetMinimum(fgPedestalMin);
    398             obj1->SetMaximum(fgPedestalMax);
     404            obj1->SetMinimum(fPedestalMin);
     405            obj1->SetMaximum(fPedestalMax);
    399406            //
    400407            // Set the datacheck sizes:
     
    436443        // for the datacheck, fix the ranges!!
    437444        //
    438         obj3->SetMinimum(fgPedRmsMin);
    439         obj3->SetMaximum(fgPedRmsMax);
     445        obj3->SetMinimum(fPedRmsMin);
     446        obj3->SetMaximum(fPedRmsMax);
    440447        //
    441448        // Set the datacheck sizes:
     
    571578 
    572579  line.SetLineColor(kBlue);
    573   TLine *l1 = line.DrawLine(0, what ? fgRefPedRmsGalacticInner : fgRefPedGalactic,
    574                             x, what ? fgRefPedRmsGalacticInner : fgRefPedGalactic);
     580  TLine *l1 = line.DrawLine(0, what ? fRefPedRmsGalacticInner : fRefPedGalactic,
     581                            x, what ? fRefPedRmsGalacticInner : fRefPedGalactic);
    575582 
    576583  line.SetLineColor(kYellow);
    577   TLine *l2 = line.DrawLine(0, what ? fgRefPedRmsExtraGalacticInner : fgRefPedExtraGalactic,
    578                             x, what ? fgRefPedRmsExtraGalacticInner : fgRefPedExtraGalactic);
     584  TLine *l2 = line.DrawLine(0, what ? fRefPedRmsExtraGalacticInner : fRefPedExtraGalactic,
     585                            x, what ? fRefPedRmsExtraGalacticInner : fRefPedExtraGalactic);
    579586 
    580587  line.SetLineColor(kMagenta);
    581   TLine *l3 = line.DrawLine(0, what ? fgRefPedRmsClosedLidsInner : fgRefPedClosedLids,
    582                             x, what ? fgRefPedRmsClosedLidsInner : fgRefPedClosedLids);
     588  TLine *l3 = line.DrawLine(0, what ? fRefPedRmsClosedLidsInner : fRefPedClosedLids,
     589                            x, what ? fRefPedRmsClosedLidsInner : fRefPedClosedLids);
    583590 
    584591  if (geom->InheritsFrom("MGeomCamMagic"))
     
    588595
    589596        line.SetLineColor(kBlue);
    590         line.DrawLine(398, fgRefPedRmsGalacticOuter,
    591                       x2,  fgRefPedRmsGalacticOuter);
     597        line.DrawLine(398, fRefPedRmsGalacticOuter,
     598                      x2,  fRefPedRmsGalacticOuter);
    592599       
    593600        line.SetLineColor(kYellow);
    594         line.DrawLine(398, fgRefPedRmsExtraGalacticOuter,
    595                       x2,  fgRefPedRmsExtraGalacticOuter);
     601        line.DrawLine(398, fRefPedRmsExtraGalacticOuter,
     602                      x2,  fRefPedRmsExtraGalacticOuter);
    596603       
    597604        line.SetLineColor(kMagenta);
    598         line.DrawLine(398, fgRefPedRmsClosedLidsOuter,
    599                       x2,  fgRefPedRmsClosedLidsOuter);
     605        line.DrawLine(398, fRefPedRmsClosedLidsOuter,
     606                      x2,  fRefPedRmsClosedLidsOuter);
    600607      }
    601608 
     
    743750
    744751    SetExtractor((MExtractor*)tenv.GetTask());
     752
     753    fReferenceFile = GetEnv("ReferenceFile",fReferenceFile.Data());
     754
     755    TEnv refenv(fReferenceFile);
     756   
     757    fPedestalMin                 = refenv.GetValue("PedestalMin",fPedestalMin);                 
     758    fPedestalMax                 = refenv.GetValue("PedestalMax",fPedestalMax);                 
     759    fPedRmsMin                   = refenv.GetValue("PedRmsMin",fPedRmsMin);                   
     760    fPedRmsMax                   = refenv.GetValue("PedRmsMax",fPedRmsMax);                   
     761    fRefPedClosedLids            = refenv.GetValue("RefPedClosedLids",fRefPedClosedLids);           
     762    fRefPedExtraGalactic         = refenv.GetValue("RefPedExtraGalactic",fRefPedExtraGalactic);         
     763    fRefPedGalactic              = refenv.GetValue("RefPedGalactic",fRefPedGalactic);             
     764    fRefPedRmsClosedLidsInner    = refenv.GetValue("RefPedRmsClosedLidsInner",fRefPedRmsClosedLidsInner);   
     765    fRefPedRmsExtraGalacticInner = refenv.GetValue("RefPedRmsExtraGalacticInner",fRefPedRmsExtraGalacticInner);
     766    fRefPedRmsGalacticInner      = refenv.GetValue("RefPedRmsGalacticInner",fRefPedRmsGalacticInner);     
     767    fRefPedRmsClosedLidsOuter    = refenv.GetValue("RefPedRmsClosedLidsOuter",fRefPedRmsClosedLidsOuter);   
     768    fRefPedRmsExtraGalacticOuter = refenv.GetValue("RefPedRmsExtraGalacticOuter",fRefPedRmsExtraGalacticOuter);
     769    fRefPedRmsGalacticOuter      = refenv.GetValue("RefPedRmsGalacticOuter",fRefPedRmsGalacticOuter);     
    745770
    746771    return kTRUE;
  • trunk/MagicSoft/Mars/mjobs/MJPedestal.h

    r6031 r6063  
    2424{
    2525private:
    26     static const Double_t fgPedestalMin;                 //! Minimum Axis value for pedestal datacheck display
    27     static const Double_t fgPedestalMax;                 //! Maximum Axis value for pedestal datacheck display
    28     static const Double_t fgPedRmsMin;                   //! Minimum Axis value for ped. RMS datacheck display
    29     static const Double_t fgPedRmsMax;                   //! Maximum Axis value for ped. RMS datacheck display
    3026
    31     static const Float_t  fgRefPedClosedLids;            //! Reference line pedestal for closed lids run
    32     static const Float_t  fgRefPedExtraGalactic;         //! Reference line pedestal for extragalactic source
    33     static const Float_t  fgRefPedGalactic;              //! Reference line pedestal for galactic source
     27    static const TString  fgReferenceFile;   //! default for fReferenceFile ("PedestalRef.rc")
    3428
    35     static const Float_t  fgRefPedRmsClosedLidsInner;    //! Ref. line ped. RMS for closed lids run - inner pixels
    36     static const Float_t  fgRefPedRmsExtraGalacticInner; //! Ref. line ped. RMS for extragalactic source - inner pixels
    37     static const Float_t  fgRefPedRmsGalacticInner;      //! Ref. line ped. RMS for galactic source - inner pixels
     29    Axis_t fPedestalMin;                     //! Minimum Axis value for pedestal datacheck display
     30    Axis_t fPedestalMax;                     //! Maximum Axis value for pedestal datacheck display
     31    Axis_t fPedRmsMin;                       //! Minimum Axis value for ped. RMS datacheck display
     32    Axis_t fPedRmsMax;                       //! Maximum Axis value for ped. RMS datacheck display
     33                                             
     34    Float_t fRefPedClosedLids;               //! Reference line pedestal for closed lids run
     35    Float_t fRefPedExtraGalactic;            //! Reference line pedestal for extragalactic source
     36    Float_t fRefPedGalactic;                 //! Reference line pedestal for galactic source
    3837
    39     static const Float_t  fgRefPedRmsClosedLidsOuter;    //! Ref. line ped. RMS for closed lids run - outer pixels
    40     static const Float_t  fgRefPedRmsExtraGalacticOuter; //! Ref. line ped. RMS for extragalactic source - outer pixels
    41     static const Float_t  fgRefPedRmsGalacticOuter;      //! Ref. line ped. RMS for galactic source - outer pixels
     38    Float_t fRefPedRmsClosedLidsInner;       //! Ref. line ped. RMS for closed lids run - inner pixels
     39    Float_t fRefPedRmsExtraGalacticInner;    //! Ref. line ped. RMS for extragalactic source - inner pixels
     40    Float_t fRefPedRmsGalacticInner;         //! Ref. line ped. RMS for galactic source - inner pixels
    4241
    43     MRunIter   *fRuns;                                   // Used pedestal runs
    44     MExtractor *fExtractor;                              // Signal extractor, used to find the nr. of used FADC slices
     42    Float_t fRefPedRmsClosedLidsOuter;       //! Ref. line ped. RMS for closed lids run - outer pixels
     43    Float_t fRefPedRmsExtraGalacticOuter;    //! Ref. line ped. RMS for extragalactic source - outer pixels
     44    Float_t fRefPedRmsGalacticOuter;         //! Ref. line ped. RMS for galactic source - outer pixels
    4545
    46     MPedestalCam  fPedestalCamIn;                        // Handed over pedestal results
    47     MPedestalCam  fPedestalCamOut;                       // Created pedestal results
    48     MBadPixelsCam fBadPixels;                            // Bad Pixels
     46    TString     fReferenceFile;              // File name containing the reference values
     47
     48    MRunIter   *fRuns;                       // Used pedestal runs
     49    MExtractor *fExtractor;                  // Signal extractor, used to find the nr. of used FADC slices
     50
     51    MPedestalCam  fPedestalCamIn;            // Handed over pedestal results
     52    MPedestalCam  fPedestalCamOut;           // Created pedestal results
     53    MBadPixelsCam fBadPixels;                // Bad Pixels
    4954
    5055    enum Display_t { kDisplayNone, kDisplayNormal, kDisplayDataCheck }; // Possible Display types
    51     Display_t fDisplayType;                              // Chosen Display type
     56    Display_t fDisplayType;                  // Chosen Display type
    5257
    53     enum Storage_t { kNoStorage };                       // Possible flags for the storage of results
    54     Byte_t fStorage;                                     // Bit-field for chosen storage type
     58    enum Storage_t { kNoStorage };           // Possible flags for the storage of results
     59    Byte_t fStorage;                         // Bit-field for chosen storage type
    5560
    56     Bool_t fDataCheck;                                   // Flag if the data check is run on raw data
     61    Bool_t fDataCheck;                       // Flag if the data check is run on raw data
    5762
    5863    enum Extract_t { kUseData, kUsePedRun, kUseHists };  // Possible flags for the extraction of the pedestal
    59     Extract_t fExtractType;                              // Chosen extractor type
     64    Extract_t fExtractType;                  // Chosen extractor type
    6065
    6166    enum Extraction { kFundamental, kWithExtractorRndm, kWithExtractor };
    62     Int_t fExtractionType;                         // Flag if the extractor is used to calculate the pedestals
     67    Int_t fExtractionType;                   // Flag if the extractor is used to calculate the pedestals
    6368
    6469    MExtractor *ReadCalibration() const;
     
    107112    void SetExtractionWithExtractor()     { fExtractionType=kWithExtractor;     /*fPedestalCamOut.SetName("MPedestalExtractor");*/     }
    108113
     114    void SetReferenceFile( const TString ref=fgReferenceFile ) { fReferenceFile = ref; }
     115
    109116    MExtractor *GetExtractor() const { return fExtractor; }
    110117
Note: See TracChangeset for help on using the changeset viewer.