Changeset 7202


Ignore:
Timestamp:
07/21/05 11:44:05 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7200 r7202  
    2020
    2121                                                 -*-*- END OF LINE -*-*-
     22 2005/07/21 Thomas Bretz
     23
     24   * mastro/MAstro.[h,cc]:
     25     - added new member function GetDevAbs
     26
     27   * mcamera/MCameraAUX.[h,cc]:
     28     - added new data members for counting house temperatures
     29     - increased class version number to 2
     30
     31   * mcamera/MCameraHV.[h,cc]:
     32     - added new data members for HV settings file name
     33     - increased class version number to 2
     34
     35   * mhflux/MHDisp.cc:
     36     - fixed handling of non-smearing
     37     - fixed calculation of number of entries for the two wobble
     38       histograms
     39
     40   * mjobs/MJStar.cc:
     41     - gave a new name to the task writing the Muon-tree
     42
     43   * mpointing/MHPointing.cc:
     44     - do not check the abs deviation but check both deviations
     45       independantly whether they make sense.
     46     - Plot only hour and minutes
     47
     48   * mpointing/MPointingPosCalc.h:
     49     - fixed wrong #ifndef
     50
     51   * mpointing/Makefile, mpointing/PointingLinkDef.h:
     52     - new class MPointingDev
     53     - new class MPointingDevCalc
     54
     55   * mpointing/PointingIncl.h:
     56     - removed TVector2
     57
     58   * mreport/MReportCamera.[h,cc]:
     59     - added interpretation CHTEMP and HVFIl valid since
     60       arehcas version 200507190 (incl)
     61
     62   * mreport/MReportDrive.cc:
     63     - moved code from GetErrorAbs to MAstro
     64
     65   * mreport/MReportStarguider.[h,cc]:
     66     - moved code from GetDevAbs to MAstro
     67     - added new getter returning a TVector2
     68
     69
     70
    2271 2005/07/19 Thomas Bretz
    2372
     
    4089     - replaced Rate historams by new histogram MHRate
    4190     - added new histogram MHPointing
    42      - gave a new name to writem
    4391
    4492   * mpointing/MSrcPosCorrect.cc:
  • trunk/MagicSoft/Mars/NEWS

    r7196 r7202  
    3030
    3131   - mars: now displays the event time MTime if available
     32
     33   - merpp: Added support for new arehucas version >= 200507190
     34     implementing values for three temperature sensors in the
     35     counting house (MCameraAUX) and the name of the HV settings file
     36     (MCameraHV).
    3237
    3338   - callisto: MCalibrationHiLoCam can now be printed from its context
  • trunk/MagicSoft/Mars/mastro/MAstro.cc

    r7179 r7202  
    601601    return v1.XYvector(); //TVector2(v1.Y(), -v1.X());//v1.XYvector();
    602602}
     603
     604// --------------------------------------------------------------------------
     605//
     606// Calculate the absolute misspointing from the nominal zenith angle nomzd
     607// and the deviations in zd (devzd) and az (devaz).
     608// All values given in deg, the return value, too.
     609//
     610Double_t MAstro::GetDevAbs(Double_t nomzd, Double_t devzd, Double_t devaz)
     611{
     612    const Double_t pzd = nomzd * TMath::DegToRad();
     613    const Double_t azd = devzd * TMath::DegToRad();
     614    const Double_t aaz = devaz * TMath::DegToRad();
     615
     616    const double el = TMath::Pi()/2-pzd;
     617
     618    const double dphi2 = aaz/2.;
     619    const double cos2  = TMath::Cos(dphi2)*TMath::Cos(dphi2);
     620    const double sin2  = TMath::Sin(dphi2)*TMath::Sin(dphi2);
     621    const double d     = TMath::Cos(azd)*cos2 - TMath::Cos(2*el)*sin2;
     622
     623    return TMath::ACos(d)*TMath::RadToDeg();
     624}
  • trunk/MagicSoft/Mars/mastro/MAstro.h

    r7179 r7202  
    7070    static Int_t    GetMagicPeriod(Double_t mjd);
    7171
     72    // Get distance between v1 and v0 in a plain perpendicular to v0 in distance dist
    7273    static TVector2 GetDistOnPlain(const TVector3 &v0, TVector3 v1, Double_t dist=1);
     74
     75    // Calculate absolute misspointing from error in zd and error in az
     76    static Double_t GetDevAbs(Double_t nomzd, Double_t devzd, Double_t devaz);
    7377
    7478    ClassDef(MAstro, 0)
  • trunk/MagicSoft/Mars/mcamera/MCameraAUX.cc

    r2535 r7202  
    1818!   Author(s): Thomas Bretz, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2003
     20!   Copyright: MAGIC Software Development, 2000-2005
    2121!
    2222!
     
    2727// MCameraAUX
    2828//
     29// Class Version 2:
     30//  + Float_t fTempCountingHouse1; // [deg C] Temperature sensor in the counting house 1
     31//  + Float_t fTempCountingHouse2; // [deg C] Temperature sensor in the counting house 2
     32//  + Float_t fTempCountingHouse3; // [deg C] Temperature sensor in the counting house 3
     33//
    2934/////////////////////////////////////////////////////////////////////////////
    3035#include "MCameraAUX.h"
  • trunk/MagicSoft/Mars/mcamera/MCameraAUX.h

    r3666 r7202  
    1010    friend class MReportCamera;
    1111private:
    12     Bool_t fRequestCaosLEDs; // Requested status: o=off, 1=on, bAux_CaOsLEDs_Off/On
    13     Bool_t fRequestFansFADC; // Requested status: o=off, 1=on, bAux_FADC_FANs_Off/On
    14     Bool_t fStatusCaosLEDs;  // Monitored status: o=off, 1=on, Cam.CaOs.LED_state
    15     Bool_t fStatusFansFADC;  // Monitored status: o=off, 1=on, Cam.FADC.Fans_state
     12    Bool_t  fRequestCaosLEDs;    // Requested status: o=off, 1=on, bAux_CaOsLEDs_Off/On
     13    Bool_t  fRequestFansFADC;    // Requested status: o=off, 1=on, bAux_FADC_FANs_Off/On
     14
     15    Bool_t  fStatusCaosLEDs;     // Monitored status: o=off, 1=on, Cam.CaOs.LED_state
     16    Bool_t  fStatusFansFADC;     // Monitored status: o=off, 1=on, Cam.FADC.Fans_state
     17
     18    Float_t fTempCountingHouse1; // [deg C] Temperature sensor in the counting house 1
     19    Float_t fTempCountingHouse2; // [deg C] Temperature sensor in the counting house 2
     20    Float_t fTempCountingHouse3; // [deg C] Temperature sensor in the counting house 3
    1621
    1722public:
     
    2227    }
    2328
    24     Bool_t GetRequestCaosLEDs() const { return fRequestCaosLEDs; }
    25     Bool_t GetRequestFansFADC() const { return fRequestFansFADC; }
    26     Bool_t GetStatusCaosLEDs() const  { return fStatusCaosLEDs;  }
    27     Bool_t GetStatusFansFADC() const  { return fStatusFansFADC;  }
     29    Bool_t  GetRequestCaosLEDs() const    { return fRequestCaosLEDs; }
     30    Bool_t  GetRequestFansFADC() const    { return fRequestFansFADC; }
    2831
    29     ClassDef(MCameraAUX, 1) // Container storing information about the Camera auxiliary system
     32    Bool_t  GetStatusCaosLEDs() const     { return fStatusCaosLEDs;  }
     33    Bool_t  GetStatusFansFADC() const     { return fStatusFansFADC;  }
     34
     35    Float_t GetTempCountingHouse1() const { return fTempCountingHouse1; }
     36    Float_t GetTempCountingHouse2() const { return fTempCountingHouse2; }
     37    Float_t GetTempCountingHouse3() const { return fTempCountingHouse3; }
     38
     39    ClassDef(MCameraAUX, 2) // Container storing information about the Camera auxiliary system
    3040};
    3141
  • trunk/MagicSoft/Mars/mcamera/MCameraHV.cc

    r2535 r7202  
    1818!   Author(s): Thomas Bretz, 11/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2003
     20!   Copyright: MAGIC Software Development, 2000-2005
    2121!
    2222!
     
    2727// MCameraHV
    2828//
     29//
     30// Class Version 2:
     31//  + TString fFileName; // Filename for the HV settings
     32//
     33//
    2934/////////////////////////////////////////////////////////////////////////////
    3035#include "MCameraHV.h"
  • trunk/MagicSoft/Mars/mcamera/MCameraHV.h

    r3985 r7202  
    2323    Short_t fVoltageB;      // [V] Measured voltage of power supply B, hvps2
    2424
    25     Byte_t fCurrentA;       // [mA] Measured current of power supply A, curr1
    26     Byte_t fCurrentB;       // [mA] Measured current of power supply B, curr2
     25    Byte_t  fCurrentA;      // [mA] Measured current of power supply A, curr1
     26    Byte_t  fCurrentB;      // [mA] Measured current of power supply B, curr2
    2727
    2828    TArrayS fHV;            // [V] Measured high Voltages for all PMTs
     29
     30    TString fFileName;      // Filename for the HV settings
    2931
    3032public:
     
    5860    }
    5961
    60     ClassDef(MCameraHV, 1) // Container storing information about the Camera HV
     62    ClassDef(MCameraHV, 2) // Container storing information about the Camera HV
    6163};
    6264
  • trunk/MagicSoft/Mars/mhflux/MHDisp.cc

    r7193 r7202  
    213213    }
    214214
    215     if (fSmearing<=0)
    216     {
    217         fHist.Fill(pos1.X(), pos1.Y(), 0.0, w*w0);
    218         return kTRUE;
    219     }
    220 
    221215    // -------------------------------------------------
    222216    //  The following algorithm may look complicated...
     
    241235    const Int_t    bz     = fHist.GetZaxis()->FindFixBin(0);
    242236
    243     TH1 &bg = fHalf ? fHistBg1 : fHistBg2;
     237    TH2 &bg = fHalf ? fHistBg1 : fHistBg2;
     238
     239    const Bool_t smear = fSmearing>0;
     240    if (!smear)
     241    {
     242        if (!fHistOff)
     243            bg.Fill(pos1.X(), pos1.Y(), w*w0);
     244        else
     245            fHist.Fill(pos1.X(), pos1.Y(), 0.0, w*w0);
     246    }
    244247
    245248    // To calculate significance map smear with 2*theta-cut and
     
    254257            const Double_t cy = axey.GetBinCenter(y);
    255258            const Double_t sp = Sq(px, cy-pos1.Y());
    256             const Double_t dp = sp/psf;
    257 
    258             // Values below 1e-3 (>3.5sigma) are not filled into the histogram
    259             if (dp<4)
     259            if (smear)
    260260            {
    261                 const Double_t rc = TMath::Exp(-dp)/normg;
    262                 if (!fHistOff)
    263                     bg.AddBinContent(bg.GetBin(x, y), rc);
    264                 else
    265                     fHist.AddBinContent(fHist.GetBin(x, y, bz), rc);
     261                const Double_t dp = sp/psf;
     262
     263                // Values below 1e-3 (>3.5sigma) are not filled into the histogram
     264                if (dp<4)
     265                {
     266                    const Double_t rc = TMath::Exp(-dp)/normg;
     267                    if (!fHistOff)
     268                        bg.AddBinContent(bg.GetBin(x, y), rc);
     269                    else
     270                        fHist.AddBinContent(fHist.GetBin(x, y, bz), rc);
     271                }
    266272            }
    267273
     
    285291        }
    286292    }
    287     fHist.SetEntries(fHist.GetEntries()+1);
     293
     294    if (fHistOff)
     295        fHistBg.SetEntries(fHistBg.GetEntries()+1);
     296
     297    if (!smear)
     298        return kTRUE;
    288299
    289300    if (!fHistOff)
    290         bg.SetEntries(fHistBg1.GetEntries()+1);
     301        bg.SetEntries(bg.GetEntries()+1);
     302    else
     303        fHist.SetEntries(fHist.GetEntries()+1);
    291304
    292305    return kTRUE;
  • trunk/MagicSoft/Mars/mjobs/MJStar.cc

    r7196 r7202  
    255255    MWriteRootFile writet(2, rule, fOverwrite?"RECREATE":"NEW"); // EffectiveOnTime
    256256    MWriteRootFile writem(2, rule, fOverwrite?"RECREATE":"NEW"); // Muons
     257    writem.SetName("WriteMuons");
    257258
    258259    // Data
  • trunk/MagicSoft/Mars/mpointing/MHPointing.cc

    r7201 r7202  
    4242
    4343#include "MTime.h"
     44#include "MAstro.h"
    4445
    4546#include "MReportDrive.h"
     
    165166    if (t->GetName()==(TString)"MTimeStarguider")
    166167    {
    167         const Double_t max = 30; // [arcsec] maximum starguider deviation which makes sense
    168 
    169168        AddPoint(fBrightness, tm, fReportSG->GetSkyBrightness());
    170169        AddPoint(fNumStars,   tm, fReportSG->GetNumIdentifiedStars());
    171         if (fReportSG->GetDevAbs()<max)
     170
     171        const Bool_t zdok     = TMath::Abs(fReportSG->GetDevZd())<30;
     172        const Bool_t azok     = TMath::Abs(fReportSG->GetDevAz())<90;
     173
     174        const Double_t devzd  = fReportSG->GetDevZd();
     175        const Double_t devaz  = fReportSG->GetDevAz();
     176
     177        if (zdok && azok)
    172178            AddPoint(fDevTimeSG, tm, fReportSG->GetDevAbs());
    173         if (TMath::Abs(fReportSG->GetDevZd())<max)
    174             AddPoint(fDevZd,  tm, fReportSG->GetDevZd());
    175         if (TMath::Abs(fReportSG->GetDevAz())<max)
    176             AddPoint(fDevAz,  tm, fReportSG->GetDevAz());
     179        if (zdok)
     180            AddPoint(fDevZd, tm, devzd);
     181        if (azok)
     182            AddPoint(fDevAz, tm, devaz);
    177183        return kTRUE;
    178184    }
     
    198204        TAxis *axe = h->GetXaxis();
    199205        axe->SetLabelSize(0.033);
    200         axe->SetTimeFormat("%H:%M:%S %F1995-01-01 00:00:00 GMT");
     206        axe->SetTimeFormat("%H:%M %F1995-01-01 00:00:00 GMT");
    201207        axe->SetTimeDisplay(1);
    202208        axe->SetTitle("Time");
  • trunk/MagicSoft/Mars/mpointing/Makefile

    r7199 r7202  
    2323
    2424SRCFILES = MPointing.cc \
     25           MPointingDev.cc \
     26           MPointingDevCalc.cc \
    2527           MPointingPos.cc \
    2628           MPointingPosCalc.cc \
  • trunk/MagicSoft/Mars/mpointing/PointingIncl.h

    r3570 r7202  
    11#ifndef __CINT__
    22
    3 #include <TVector2.h>
    4 
    53#endif // __CINT__
  • trunk/MagicSoft/Mars/mpointing/PointingLinkDef.h

    r7199 r7202  
    66
    77#pragma link C++ class MPointing+;
     8
     9#pragma link C++ class MPointingDev+;
     10#pragma link C++ class MPointingDevCalc+;
    811
    912#pragma link C++ class MPointingPos+;
  • trunk/MagicSoft/Mars/mreport/MReportCamera.cc

    r7188 r7202  
    477477    return kTRUE;
    478478}
     479
     480// --------------------------------------------------------------------------
     481//
     482// Interprete the CHTEMP part
     483//
     484Bool_t MReportCamera::InterpreteCHTEMP(TString &str)
     485{
     486    if (!CheckTag(str, "CHTEMP "))
     487        return kFALSE;
     488
     489    Int_t len, temp1, temp2, temp3;
     490    Int_t n=sscanf(str.Data(), " %d %d %d %n", &temp1, &temp2, &temp3, &len);
     491    if (n!=3)
     492    {
     493        *fLog << warn << "WARNING - Reading information of 'CHTEMP' section." << endl;
     494        return kFALSE;
     495    }
     496
     497    fAUX->fTempCountingHouse1 = temp1*0.01;
     498    fAUX->fTempCountingHouse2 = temp2*0.01;
     499    fAUX->fTempCountingHouse3 = temp3*0.01;
     500
     501    str.Remove(0, len);
     502    str=str.Strip(TString::kBoth);
     503
     504    return kTRUE;
     505}
     506
     507// --------------------------------------------------------------------------
     508//
     509// Interprete the HVFIL part
     510//
     511Bool_t MReportCamera::InterpreteHVFIL(TString &str)
     512{
     513    if (!CheckTag(str, "HVFIL "))
     514        return kFALSE;
     515
     516    str=str.Strip(TString::kBoth);
     517
     518    const Ssiz_t pos = str.First(' ');
     519    if (pos<0)
     520    {
     521        *fLog << warn << "WARNING - Reading information of 'HVFIL' section." << endl;
     522        return kFALSE;
     523    }
     524
     525    fHV->fFileName = str(0, pos);
     526
     527    str.Remove(0, pos);
     528    str=str.Strip(TString::kBoth);
     529
     530    return kTRUE;
     531}
     532
    479533// --------------------------------------------------------------------------
    480534//
     
    576630    }
    577631
     632    if (ver >= 200507190)
     633    {
     634        if (!InterpreteCHTEMP(str))
     635            return kCONTINUE;
     636        if (!InterpreteHVFIL(str))
     637            return kCONTINUE;
     638    }
     639
    578640    if (str!="OVER")
    579641    {
  • trunk/MagicSoft/Mars/mreport/MReportCamera.h

    r6963 r7202  
    4848    Bool_t InterpreteActiveLoad(TString &str);
    4949    Bool_t InterpreteCentralPix(TString &str);
     50    Bool_t InterpreteCHTEMP(TString &str);
     51    Bool_t InterpreteHVFIL(TString &str);
    5052
    5153    Int_t  InterpreteBody(TString &str, Int_t ver);
  • trunk/MagicSoft/Mars/mreport/MReportDrive.cc

    r7197 r7202  
    135135Double_t MReportDrive::GetAbsError() const
    136136{
     137    return MAstro::GetDevAbs(fNominalZd, fErrorZd, fErrorAz);
     138/*
    137139    // For the algorithm see also MReportStarguider
    138140    const Double_t pzd = fNominalZd*TMath::DegToRad();
     
    158160    //
    159161
    160     return acos(d)*TMath::RadToDeg();
     162    return acos(d)*TMath::RadToDeg();*/
    161163}
    162164
  • trunk/MagicSoft/Mars/mreport/MReportStarguider.cc

    r7197 r7202  
    3232// This is the place to get the azimuth-/zenith mispointing of the telescope
    3333// given by the starguider-camera.
     34//
     35//
     36// Starguider reports are available since 2004/11/17.
     37// The nomnial pointing position is available since 2005/03/22
     38// The sky brightness and the number of identified stars since 2005/03/17
    3439//
    3540//
     
    129134Double_t MReportStarguider::GetDevAbs() const
    130135{
    131     // For the algorithm see also MReportDrive
    132     const Double_t pzd = fNominalZd * TMath::DegToRad();
    133     const Double_t azd = fDevZd/60  * TMath::DegToRad();
    134     const Double_t aaz = fDevAz/60  * TMath::DegToRad();
     136    return MAstro::GetDevAbs(fNominalZd, fDevZd/60, fDevAz/60)*60;
     137    /*
     138     // For the algorithm see also MReportDrive
     139     const Double_t pzd = fNominalZd * TMath::DegToRad();
     140     const Double_t azd = fDevZd/60  * TMath::DegToRad();
     141     const Double_t aaz = fDevAz/60  * TMath::DegToRad();
    135142
    136     const double el = TMath::Pi()/2-pzd;
     143     const double el = TMath::Pi()/2-pzd;
    137144
    138     const double dphi2 = aaz/2.;
    139     const double cos2  = cos(dphi2)*cos(dphi2);
    140     const double sin2  = sin(dphi2)*sin(dphi2);
    141     const double d     = cos(azd)*cos2 - cos(2*el)*sin2;
     145     const double dphi2 = aaz/2.;
     146     const double cos2  = cos(dphi2)*cos(dphi2);
     147     const double sin2  = sin(dphi2)*sin(dphi2);
     148     const double d     = cos(azd)*cos2 - cos(2*el)*sin2;
    142149
    143     return acos(d)*TMath::RadToDeg()*60;
     150     return acos(d)*TMath::RadToDeg()*60;
     151     */
    144152}
    145153
  • trunk/MagicSoft/Mars/mreport/MReportStarguider.h

    r7197 r7202  
    44#ifndef MARS_MReport
    55#include "MReport.h"
     6#endif
     7
     8#ifndef ROOT_TVector2
     9#include <TVector2.h>
    610#endif
    711
     
    3135    Double_t GetDevZd() const { return fDevZd; }
    3236    Double_t GetDevAbs() const;
     37    TVector2 GetDev() const { return TVector2(fDevZd, fDevAz); }
    3338
    3439    Double_t GetNominalZd() const { return fNominalZd; }
    3540    Double_t GetNominalAz() const { return fNominalAz; }
     41    TVector2 GetNominalPos() const { return TVector2(fNominalZd, fNominalAz); }
    3642
    3743    Float_t  GetCameraCenterX() const { return fCameraCenterX; }
    3844    Float_t  GetCameraCenterY() const { return fCameraCenterY; }
     45    TVector2 GetCameraCenter() const { return TVector2(fCameraCenterX, fCameraCenterY); }
    3946
    4047    UInt_t   GetNumIdentifiedStars() const { return fNumIdentifiedStars; }
Note: See TracChangeset for help on using the changeset viewer.