Changeset 7430 for trunk


Ignore:
Timestamp:
11/25/05 14:47:57 (19 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft
Files:
6 added
12 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/tpoint/tpoint0511.txt

    r7413 r7430  
    23123168.12716 80.59168 210.4925 71.54071 7.576667 31.88833 -0.03744638 -0.07208734 53693.175008 209.8 2.599
    232232
    233 
    234 Star             Mag    Zd    Az
    235 -----------------------------------
    236 
    237 
    238 A couple of times we have had the LED's out of control
    239 One time we have had one missidentified LED, we have increased the
    240 power but we do not know if that might have affected some of the
    241 TPoints.
    242 
    243 
    244 
     233#A couple of times we have had the LED's out of control
     234#One time we have had one missidentified LED, we have increased the
     235#power but we do not know if that might have affected some of the
     236#TPoints.
    245237
    246238# --- 19.11.2005 --- 04:20:24.958
     
    352344# Procyon          0.38   31   224
    353345-136.0317 59.25554 6.466056 50.37589 7.655 5.225 -0.019558 -0.0500969 53695.259343 218.4 2.559
     346
     347# --- 22.11.2005 --- 01:11:49.152
     348# Aldebaran    0.99    14   148
     349147.6424 75.77395 290.0378 66.77682 4.598611 16.50917 0.00772435 -0.03733079 53696.049874 196 2.609
     350# Bellatrix    1.64    28   139 
     351138.5034 61.59108 280.9654 52.6034 5.418889 6.349722 0.002053421 -0.003312232 53696.054524 211.2 2.743
     352# Betelgeuse   0.57    31   128
     353# (after pressing TPoint button program hangs, restart procedure)
     354128.0873 58.6125 270.5768 49.63084 5.919444 7.406944 0.0069852 -0.01660267 53696.058931 202.4 2.628
     355# Alnilam      1.72    34   148
     356146.5996 55.32778 289.1033 46.34662 5.603611 -1.201944 0.00304804 -0.02654928 53696.062883 201 3.394
     357
     358# --- 22.11.2005 --- 01:32:47.983
     359147.4849 55.59662 289.9805 46.61629 5.603611 -1.201944 0.002805165 -0.01497349 53696.064444 209.8 2.935
     360# Rigel        0.28    38   163
     361162.7226 51.63319 305.2246 42.65702 5.242222 -8.201667 0.005640842 -0.0245142 53696.068699 207.5 2.966
     362# Alcyone      2.87    14   254
     363-106.3161 76.22057 36.04596 67.34977 3.791389 24.105 0.009521167 -0.01326672 53696.078325 194.3 3.465
     364# Capella      0.08    18    12
     36512.7777 72.215 155.2268 63.20979 5.278056 45.99806 -0.005510584 -0.01390653 53696.084507 216.1 2.929
     366# Alnilam      1.72    30   168
     367167.7003 59.4683 310.1681 50.48085 5.603611 -1.201944 -0.001850105 -0.001900823 53696.096206 202.9 3.373
     368# Alnath       1.68     2    95
     369##95.06102 88.36566 235.4655 79.33203 5.438056 28.6075 -0.008179862 0.372401 53696.101428 218.5 3.557
     370# Sirius      -1.46    49         157
     371157.0307 41.40663 299.5379 32.41457 6.7525 -16.71611 -0.01364341 -0.01041002 53696.111838 215.7 2.81
     372# Mirzam       1.98    48         166
     373166.1499 42.1728 308.6504 33.18098 6.378333 -17.95583 -0.01317884 -0.005149653 53696.115809 216.4 3.712
     374# Betelgeuse   0.50    21         175       
     375174.0767 68.58123 316.519 59.56209 5.919444 7.406944 -0.02401434 -0.02888986 53696.120548 206.7 2.568
     376# Rigel        0.12    38         197
     377-163.4645 51.74076 339.0207 42.89641 5.242222 -8.201667 0.01406841 -0.0149119 53696.126832 211.7 2.607
     378# Arneb        2.58    47         190
     379-170.2435 42.86948 332.2526 34.02421 5.545556 -17.82222 0.00983937 -0.009990318 53696.131773 215.1 3.243
     380# Menkar       2.53    51         250
     381-109.8901 39.04712 32.61235 30.22638 3.038056 4.089722 0.03597402 -0.009545012 53696.137186 215 3.151
     382# Zaurak       2.95    54         223
     383-136.7924 36.05695 5.714952 27.22074 3.967222 -13.50861 0.01669919 -0.0167933 53696.141561 221.1 3.51
     384# Bellatrix    1.64    27         215       
     385-144.9439 63.52904 357.5219 54.65627 5.418889 6.349722 -0.005499875 -0.02010735 53696.147154 212 2.666
     386# Alnilam      1.70    33         207
     387-153.7852 57.2557 348.6835 48.39122 5.603611 -1.201944 -0.001947268 -0.00500495 53696.151745 215.3 2.714
     388# Mebsuta      2.98     4         166
     389164.7775 86.24204 306.5991 77.21874 6.732222 25.13111 -0.002773079 -0.05177016 53696.157353 201.4 3.327
     390# Calx         2.88     8         221
     391-139.4591 81.94122 2.701414 73.04546 6.382778 22.51361 -0.005572471 0.02885225 53696.161526 216.1 3.229
     392# Adhara       1.50    58         179
     393##178.717 32.15044 321.2284 23.29679 6.976944 -28.97222 0.1252073 -0.01353253 53696.167041 223.5 3.233
     394177.5345 34.81027 320.0374 25.84212 7.14 -26.39333 0.0100337 -0.004259739 53696.170971 205.9 4.001
     395# Menkalinan   1.90    22   323     
     396-37.02937 68.23066 105.4265 59.35999 5.992222 44.9475 0.0001547855 -0.006749828 53696.180633 214.8 2.945
     397
     398
     399# ********** NEW Pointing model installed **********
     400
     401# --- 24.11.2005 --- 04:26:17.324
     402# Castor                1.58     3    22
     40326.27928 86.52456 168.2752 77.48686 7.576667 31.88833 -0.01672364 -0.1968919 53698.184923 195 2.635
     404# Pollux                1.22     2   107
     405105.7607 87.41624 247.506 78.37515 7.755278 28.02611 -0.01717839 -0.2953504 53698.189567 201.7 2.57
     406# Sirius               -1.46
     407# (no valid because of passing clouds)
     408# -156.0455 41.09796 346.4594 32.24075 6.7525 -16.71611 -0.003426398 -0.01840931 53698.207343 197.2 3.353
     409# Betelgeuse    0.50    38   243 
     410-117.5028 51.90143 24.969 43.0686 5.919444 7.406944 0.02049739 -0.002042256 53698.213876 209.1 3.591
     411# Rigel         0.12    58   237
     412-122.9476 32.59683 19.56346 23.75063 5.242222 -8.201667 0.007916905 -0.01473896 53698.219268 210.5 2.581
     413# Capella               0.08    41   -52
     414-51.7696 48.90804 90.75324 40.04845 5.278056 45.99806 -0.005096606 -0.02454738 53698.227554 197.9 2.627
  • trunk/MagicSoft/Mars/Changelog

    r7429 r7430  
    2525   * datacenter/macros/plotdb.C:
    2626     - added new tabs for new columns
     27
     28   * mcamera/CameraLinkDef.h, mcamera/Makefile:
     29     - added new classes MCameraTH, MCameraTD and MCameraRecTemp
     30
     31   * mhcalib/MHCalibrationPulseTimeCam.[h,cc]:
     32     - added some const-qualifiers
     33
     34   * mreport/MReportCC.[h,cc]:
     35     - updated to allow reading new CC reports
     36
     37   * merpp.cc:
     38     - added contentent of new CC report to CC output tree
     39
     40
     41
     42 2005/11/25 Daniel Mazin (2005/11/02)
     43
     44   * mreflector/MRflEvtHeader.h
     45     - added parameters first interaction point, telescope phi and theta,
     46       fitted quantities from CORSIKA (number of particles in the shower
     47       maximum, t0, tmax, chi2), fraction of electrons, muons and other
     48       particles. Added getters and setters.
     49
     50   * mfileio/MReadRflFile.cc
     51     - filled in the variables above
     52
     53
     54
     55 2005/11/25 A. Moralejo (2005/10/14)
     56
     57   * mreflector/MRflEvtHeader.h
     58     - added parameters: energy, versor of primary's momentum and core
     59       position on ground. Added getters and setters.
     60
     61   * mfileio/MReadRflFile.cc
     62     - filled in the variables above
     63
     64
     65
     66 2005/11/25 Toni Coarasa (09/09/2005)
     67
     68  * msignal/MExtractTimeAndChargeDigitalFilter.cc
     69    - fix a bug in the calculation of the high-gain times:
     70      They were all shifted by the same amount "fHiGainFirst". This
     71      caused an offset of usually 3 FADC slices in the times calculated
     72      from high-gain and from low-gain. The bug did not have any effect
     73      on the calibration runs because there, fHiGainFirst was set to 0.
     74      The bug was there since 30.1.2005.
    2775
    2876
  • trunk/MagicSoft/Mars/merpp.cc

    r7188 r7430  
    346346            w->AddContainer("MTimeDrive",         "Drive");
    347347            w->AddContainer("MReportCC",          "CC");
     348            w->AddContainer("MCameraTH",          "CC");
     349            w->AddContainer("MCameraTD",          "CC");
     350            w->AddContainer("MCameraRecTemp",     "CC");
    348351            w->AddContainer("MTimeCC",            "CC");
    349352            w->AddContainer("MReportStarguider",  "Starguider");
  • trunk/MagicSoft/Mars/mfileio/MReadRflFile.cc

    r4898 r7430  
    7676        fIn->read((char*)&revth, sizeof(RflEventHeader_old));
    7777        fEvtHeader->SetEvtNumber((int)revth.EvtNumber);
    78 //        *fLog << "Event Number: " << revth.EvtNumber;
    79 //        *fLog << "  Primary ID: " << revth.PrimaryID;
    80 //        *fLog << "  Run Number: " << revth.RunNumber << endl;
    81         return (bool)*fIn;
    8278    }
    8379    else
     
    8682        fIn->read((char*)&revth, sizeof(RflEventHeader));
    8783        fEvtHeader->SetEvtNumber((int)revth.EvtNumber);
    88 //        *fLog << "Event Number: " << revth.EvtNumber;
    89 //        *fLog << "  Primary ID: " << revth.PrimaryID;
    90 //        *fLog << "  Run Number: " << revth.RunNumber << endl;
    91         return (bool)*fIn;
    92     }
    93 }
    94 
    95 enum {
    96     kError,
    97     kEndOfFile,
    98     kStartOfRun,
    99     kEndOfRun,
    100     kStartOfEvtData,
    101     kEndOfEvtData,
    102     kUndefined
    103 };
    104 
     84        fEvtHeader->SetEnergy((int)revth.Etotal);
     85        fEvtHeader->SetMomentum(revth.p[0], revth.p[1], revth.p[2]);
     86        fEvtHeader->SetCorePosition(revth.CorePos[0][0], revth.CorePos[1][0]);
     87       
     88        fEvtHeader->SetHeightFirstInt((Float_t)revth.zFirstInt);
     89
     90        fEvtHeader->SetPhi((Float_t)revth.telescopePhi);
     91        fEvtHeader->SetTheta((Float_t)revth.telescopeTheta);
     92
     93        fEvtHeader->SetNmax((Float_t)revth.longi_Nmax);
     94        fEvtHeader->SetT0((Float_t)revth.longi_t0);
     95        fEvtHeader->SetTmax((Float_t)revth.longi_tmax);
     96        fEvtHeader->SetChi2((Float_t)revth.longi_chi2);
     97
     98        fEvtHeader->SetEFraction((Float_t)revth.elec_cph_fraction);
     99        fEvtHeader->SetMFraction((Float_t)revth.muon_cph_fraction);
     100        fEvtHeader->SetOFraction((Float_t)revth.other_cph_fraction);
     101    }
     102
     103    return (bool)*fIn;
     104}
    105105
    106106int MReadRflFile::ReadFlag()
     
    111111    if (!fIn)
    112112        return kError;
    113 
    114     //*fLog << "<" << TString(&flag[1], 11)  << ">" <<endl;
    115113
    116114    if (FlagIsA(flag, FLAG_END_OF_FILE))
  • trunk/MagicSoft/Mars/mfileio/MReadRflFile.h

    r6499 r7430  
    1818{
    1919private:
    20     ifstream *fIn;          // the inputfile
    21     TList    *fFileNames;   // Array which stores the \0-terminated filenames
     20    enum {
     21        kError,
     22        kEndOfFile,
     23        kStartOfRun,
     24        kEndOfRun,
     25        kStartOfEvtData,
     26        kEndOfEvtData,
     27        kUndefined
     28    };
    2229
    23     MRflEvtData *fEvtData;        //!
    24     MRflEvtHeader *fEvtHeader;
    25     MRflRunHeader *fRunHeader;
     30    ifstream *fIn;              // the inputfile
     31    TList    *fFileNames;       // Array which stores the \0-terminated filenames
    2632
    27     UInt_t fNumFile;
    28     UInt_t fEntries; // TO BE IMPLEMENTED
     33    MRflEvtData   *fEvtData;    //!
     34    MRflEvtHeader *fEvtHeader;  //!
     35    MRflRunHeader *fRunHeader;  //!
     36
     37    UInt_t  fNumFile;
     38    UInt_t  fEntries;           // TO BE IMPLEMENTED
    2939    TString fFileName;
    3040
    31     Float_t fCurrentVersion; //! Version of currently open rfl file
     41    Float_t fCurrentVersion;    //! Version of currently open rfl file
    3242
    3343    float  ReadVersion();
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationPulseTimeCam.cc

    r7288 r7430  
    102102#include "MHCalibrationCam.h"
    103103
    104 #include "MLog.h"
    105 #include "MLogManip.h"
    106 
    107 #include "MParList.h"
    108 
    109 #include "MHCalibrationPix.h"
    110 
    111 #include "MCalibrationIntensityCam.h"
    112 #include "MCalibrationChargeCam.h"
    113 #include "MCalibrationChargePix.h"
    114 
    115 #include "MGeomCam.h"
    116 #include "MGeomPix.h"
    117 
    118 #include "MBadPixelsIntensityCam.h"
    119 #include "MBadPixelsCam.h"
    120 #include "MBadPixelsPix.h"
    121 
    122 #include "MRawEvtData.h"
    123 #include "MRawRunHeader.h"
    124 #include "MRawEvtPixelIter.h"
    125 
    126 #include "MExtractedSignalCam.h"
    127 #include "MExtractedSignalPix.h"
    128 
    129 #include "MArrayI.h"
    130 #include "MArrayD.h"
    131 
    132104#include <TOrdCollection.h>
    133105#include <TPad.h>
     
    140112#include <TGraph.h>
    141113#include <TEnv.h>
     114
     115#include "MLog.h"
     116#include "MLogManip.h"
     117
     118#include "MParList.h"
     119
     120#include "MHCalibrationPix.h"
     121
     122#include "MCalibrationIntensityCam.h"
     123#include "MCalibrationChargeCam.h"
     124#include "MCalibrationChargePix.h"
     125
     126#include "MGeomCam.h"
     127#include "MGeomPix.h"
     128
     129#include "MBadPixelsIntensityCam.h"
     130#include "MBadPixelsCam.h"
     131#include "MBadPixelsPix.h"
     132
     133#include "MRawEvtData.h"
     134#include "MRawRunHeader.h"
     135#include "MRawEvtPixelIter.h"
     136
     137#include "MExtractedSignalCam.h"
     138#include "MExtractedSignalPix.h"
     139
     140#include "MArrayI.h"
     141#include "MArrayD.h"
    142142
    143143ClassImp(MHCalibrationPulseTimeCam);
     
    512512  *fLog << endl;
    513513
    514   MCalibrationCam *calcam  = fIntensCam ? fIntensCam->GetCam() : fCam;
     514  MCalibrationCam &calcam  = *(fIntensCam ? fIntensCam->GetCam() : fCam);
    515515  //
    516516  // Perform the fitting for the High Gain (done in MHCalibrationCam)
     
    524524        continue;
    525525     
    526       MCalibrationPix &pix    = (*calcam)[i];
     526      MCalibrationPix &pix    = calcam[i];
    527527      CalcHists(hist,pix);
    528528    }
     
    534534    {
    535535     
    536       MHCalibrationPix &hist = GetAverageHiGainArea(j);     
    537       MCalibrationPix  &pix  = calcam->GetAverageArea(j);
     536      MHCalibrationPix &hist = GetAverageHiGainArea(j);
     537      MCalibrationPix  &pix  = calcam.GetAverageArea(j);
    538538      CalcHists(hist,pix);
    539539  }
     
    541541  for (Int_t j=0; j<fAverageHiGainSectors->GetSize(); j++)
    542542    {
    543       MHCalibrationPix &hist = GetAverageHiGainSector(j);     
    544       MCalibrationPix  &pix  = calcam->GetAverageSector(j);
     543      MHCalibrationPix &hist = GetAverageHiGainSector(j);
     544      MCalibrationPix  &pix  = calcam.GetAverageSector(j);
    545545      CalcHists(hist,pix);
    546546    }
     
    549549}
    550550
    551 void MHCalibrationPulseTimeCam::CalcHists(MHCalibrationPix &hist, MCalibrationPix &pix)
     551void MHCalibrationPulseTimeCam::CalcHists(MHCalibrationPix &hist, MCalibrationPix &pix) const
    552552{
    553553
  • trunk/MagicSoft/Mars/mhcalib/MHCalibrationPulseTimeCam.h

    r6729 r7430  
    6161  void   DrawDataCheckPixel(MHCalibrationPix &pix, const Float_t refline);
    6262  void   DisplayRefLines   ( const TH1F *hist,           const Float_t refline) const;
    63   void   CalcHists         (MHCalibrationPix &hist, MCalibrationPix &pix);
     63  void   CalcHists         (MHCalibrationPix &hist, MCalibrationPix &pix) const;
    6464
    6565  Int_t ReadEnv        ( const TEnv &env, TString prefix, Bool_t print);
  • trunk/MagicSoft/Mars/mreflector/MRflEvtHeader.cc

    r2136 r7430  
    1818!   Author(s): Thomas Bretz, 5/2003 <mailto:tbretz@astro.uni-wuerzburg.de>
    1919!
    20 !   Copyright: MAGIC Software Development, 2000-2003
     20!   Copyright: MAGIC Software Development, 2000-2005
    2121!
    2222!
  • trunk/MagicSoft/Mars/mreflector/MRflEvtHeader.h

    r2136 r7430  
    66#endif
    77
     8#ifndef ROOT_TVector3
     9#include <TVector3.h>
     10#endif
     11
    812class MRflEvtHeader : public MParContainer
    913{
    1014    Int_t fEvtNumber;
    1115
     16    Float_t fEnergy;         // [GeV] of primary
     17
     18    TVector3 fMomentum;      // versor of momentum of primary
     19    TVector2 fCorePosition;  // shower core position on ground
     20
     21    Float_t fHeightFirstInt; // [cm] z coordinate (height) of first interaction
     22
     23    Float_t fPhi;            // Phi of the telescope
     24    Float_t fTheta;          // Theta of the telescope [rad]
     25
     26    Float_t fNmax;           // number of particles in shower maximum fitted by CORSIKA
     27    Float_t fT0;             // depth of first interaction point fitted by CORSIKA
     28    Float_t fTmax;           // depth of the shower maximum fitted by CORSIKA
     29    Float_t fChi2;           // quality of the fit to longit shower development
     30
     31    /* Now follow the fraction of photons reaching the camera produced by  *
     32     * electrons, muons and other particles respectively:                  */
     33    Float_t fEFraction;      // elec_cph_fraction
     34    Float_t fMFraction;      // muon_cph_fraction
     35    Float_t fOFraction;      // other_cph_fraction
     36
    1237public:
    1338    MRflEvtHeader(const char *name=NULL, const char *title=NULL);
    1439
     40    // Getter
    1541    Int_t GetEvtNumber() const { return fEvtNumber; }
     42
     43    Float_t GetEnergy() const { return fEnergy; }
     44
     45    const TVector3 &GetMomentum() const { return fMomentum; }
     46    const TVector2 &GetCorePosition() const { return fCorePosition; }
     47
     48    Float_t GetHeightFirstInt() const { return fHeightFirstInt; }
     49
     50    Float_t GetPhi() const   { return fPhi; }
     51    Float_t GetTheta() const { return fTheta; }
     52
     53    Float_t GetNmax() const  { return fNmax; }
     54    Float_t GetT0() const    { return fT0; }
     55    Float_t GetTmax() const  { return fTmax; }
     56    Float_t GetChi2() const  { return fChi2; }
     57
     58    Float_t GetEFraction() const { return fEFraction; }
     59    Float_t GetMFraction() const { return fMFraction; }
     60    Float_t GetOFraction() const { return fOFraction; }
     61
     62    // Setter
    1663    void SetEvtNumber(Int_t n) { fEvtNumber = n; }
     64    void SetEnergy(Float_t x) { fEnergy = x; }
     65    void SetMomentum(const TVector3 &v) { fMomentum = v; }
     66    void SetCorePosition(const TVector2 &v) { fCorePosition = v; }
    1767
    18     ClassDef(MRflEvtHeader, 0) // Header of an event from the reflector program
     68    void SetMomentum(Float_t px, Float_t py, Float_t pz) { fMomentum = TVector3(px, py, pz); }
     69    void SetCorePosition(Float_t cx, Float_t cy) { fCorePosition = TVector2(cx, cy); }
     70    void SetHeightFirstInt(Float_t x) { fHeightFirstInt = x; }
     71
     72    void SetPhi(Float_t x)   { fPhi = x; }
     73    void SetTheta(Float_t x) { fTheta = x; }
     74     
     75    void SetNmax(Float_t x)  { fNmax = x ; }
     76    void SetT0(Float_t x)    { fT0 = x; }
     77    void SetTmax(Float_t x)  { fTmax = x ; }
     78    void SetChi2(Float_t x)  { fChi2 = x ; }
     79     
     80    void SetEFraction(Float_t x) { fEFraction = x ; }
     81    void SetMFraction(Float_t x) { fMFraction = x ; }
     82    void SetOFraction(Float_t x) { fOFraction = x ; }
     83     
     84    ClassDef(MRflEvtHeader, 1) // Header of an event from the reflector program
    1985};
    2086
  • trunk/MagicSoft/Mars/mreport/MReportCC.cc

    r7188 r7430  
    4343#include "MLogManip.h"
    4444
    45 #include "MAstro.h"
     45#include "MParList.h"
     46
     47#include "MCameraTH.h"
     48#include "MCameraTD.h"
     49#include "MCameraRecTemp.h"
    4650
    4751ClassImp(MReportCC);
     
    6266// --------------------------------------------------------------------------
    6367//
     68// FindCreate the following objects:
     69//  - MCameraTH
     70//
     71Bool_t MReportCC::SetupReading(MParList &plist)
     72{
     73    fTH = (MCameraTH*)plist.FindCreateObj("MCameraTH");
     74    if (!fTH)
     75        return kFALSE;
     76
     77    fTD = (MCameraTD*)plist.FindCreateObj("MCameraTD");
     78    if (!fTD)
     79        return kFALSE;
     80
     81    fRecTemp = (MCameraRecTemp*)plist.FindCreateObj("MCameraRecTemp");
     82    if (!fRecTemp)
     83        return kFALSE;
     84
     85    return MReport::SetupReading(plist);
     86}
     87
     88// --------------------------------------------------------------------------
     89//
     90// Check whether the given TString begins with the given tag. Remove
     91// the tag from the string.
     92//
     93Bool_t MReportCC::CheckTag(TString &str, const char *tag) const
     94{
     95    if (!str.BeginsWith(tag))
     96    {
     97        *fLog << warn << "WARNING - '" << tag << "' tag not found." << endl;
     98        return kFALSE;
     99    }
     100    str.Remove(0, strlen(tag)); // Remove Tag
     101    return kTRUE;
     102}
     103
     104
     105// --------------------------------------------------------------------------
     106//
    64107// Interprete the body of the CC-REPORT string
    65108//
    66 Int_t MReportCC::InterpreteBody(TString &str, Int_t ver)
    67 {
    68     if (ver<200404070)
    69     {
    70         *fLog << err << "ERROR - MReportCC::InterpreteBody not prepared for ";
    71         *fLog << " report-files with version<200404070" << endl;
    72         return kFALSE;
    73     }
    74 
     109Bool_t MReportCC::InterpreteCC(TString &str, Int_t ver)
     110{
    75111    const Int_t skip = ver<200407270 ? 30 : 31;
    76112
     113    // Remove the 30/31 tokens of the subsystem status
     114    //  table 12.1 p59
    77115    for (int i=0; i<skip; i++)
    78116        str.Remove(0, str.First(' ')+1);
     
    86124    {
    87125        *fLog << warn << "WARNING - Wrong number of arguments." << endl;
    88         return kCONTINUE;
     126        return kFALSE;
    89127    }
    90128
    91129    str.Remove(0, len);
    92130
    93     for (int i=0; i<4; i++)  // 2*UPS, TH, 577%x, TD, 577%x
    94         str.Remove(0, str.First(' ')+1);
     131    return kTRUE;
     132}
     133
     134// --------------------------------------------------------------------------
     135//
     136// Interprete the TH (discriminator thresholds) part of the report
     137//
     138Bool_t MReportCC::InterpreteTH(TString &str)
     139{
     140    if (!CheckTag(str, "TH "))
     141        return kFALSE;
     142
     143    const char *pos = str.Data();
     144    const char *end = str.Data()+577*2;
     145
     146    Int_t i=0;
     147    while (pos<end)
     148    {
     149        const Char_t hex[2] = { pos[0], pos[1] };
     150        pos += 2;
     151
     152        const Int_t n=sscanf(hex, "%2hx", &fTH->fTH[i++]);
     153        if (n==1)
     154            continue;
     155
     156        *fLog << warn << "WARNING - Reading hexadecimal TH information." << endl;
     157        return kFALSE;
     158    }
     159
     160    str.Remove(0, end-str.Data()); // Remove TH
     161    str=str.Strip(TString::kLeading);
     162    return kTRUE;
     163}
     164
     165// --------------------------------------------------------------------------
     166//
     167// Interprete the TD (discriminator delays) part of the report
     168//
     169Bool_t MReportCC::InterpreteTD(TString &str, Int_t ver)
     170{
     171    if (!CheckTag(str, "TD "))
     172        return kFALSE;
     173
     174    const Int_t numpix = ver<200510250 ? 500 : 577;
     175
     176    const char *pos = str.Data();
     177    const char *end = str.Data()+numpix*2;
     178
     179    Int_t i=0;
     180    while (pos<end)
     181    {
     182        const Char_t hex[3] = { pos[0], pos[1], 0 };
     183        pos += 2;
     184
     185        const Int_t n=sscanf(hex, "%2hx", &fTD->fTD[i++]);
     186        if (n==1)
     187            continue;
     188
     189        *fLog << warn << "WARNING - Reading hexadecimal TD information." << endl;
     190        return kFALSE;
     191    }
     192
     193    str.Remove(0, end-str.Data()); // Remove TD
     194    str=str.Strip(TString::kLeading);
     195    return kTRUE;
     196}
     197
     198
     199// --------------------------------------------------------------------------
     200//
     201// Interprete the receiver board temperature part of the report
     202//
     203Bool_t MReportCC::InterpreteRecTemp(TString &str)
     204{
     205    if (!CheckTag(str, "RECTEMP "))
     206        return kFALSE;
     207
     208    Int_t len;
     209    for (Int_t i=0; i<76; i++)
     210    {
     211        const Int_t n=sscanf(str.Data(), "%f %n", &fRecTemp->fRecTemp[i], &len);
     212        str.Remove(0, len);
     213
     214        if (n==1)
     215            continue;
     216
     217        *fLog << warn << "WARNING - Reading Receiver Board Temperature information." << endl;
     218        return kFALSE;
     219    }
     220
     221    return kTRUE;
     222}
     223
     224// --------------------------------------------------------------------------
     225//
     226// Interprete the body of the CC-REPORT string
     227//
     228Int_t MReportCC::InterpreteBody(TString &str, Int_t ver)
     229{
     230    if (ver<200404070)
     231    {
     232        *fLog << err << "ERROR - MReportCC::InterpreteBody not prepared for ";
     233        *fLog << " report-files with version<200404070" << endl;
     234        return kFALSE;
     235    }
     236
     237    if (!InterpreteCC(str, ver))
     238        return kCONTINUE;
     239
     240    if (!InterpreteTH(str))
     241        return kCONTINUE;
     242
     243    if (!InterpreteTD(str, ver))
     244        return kCONTINUE;
     245
     246    if (ver>200510250)
     247        if (!InterpreteRecTemp(str))
     248            return kCONTINUE;
    95249
    96250    if (str.Strip(TString::kBoth)!=(TString)"OVER")
    97251    {
    98         *fLog << err << "ERROR - Termination (OVER) too far away." << endl;
     252        *fLog << warn << "WARNING - 'OVER' tag not found." << endl;
    99253        return kCONTINUE;
    100254    }
  • trunk/MagicSoft/Mars/mreport/MReportCC.h

    r7188 r7430  
    66#endif
    77
     8class MCameraTH;
     9class MCameraTD;
     10class MCameraRecTemp;
     11
    812class MReportCC : public MReport
    913{
    1014private:
    11     Float_t fHumidity;       // [%]
    12     Float_t fTemperature;    // [deg] celsius
    13     Float_t fWindSpeed;      // [km/h]
    14     Float_t fSolarRadiation; // [W/m^2] IR-Radiation
     15    Float_t fHumidity;        // [%]
     16    Float_t fTemperature;     // [deg] celsius
     17    Float_t fWindSpeed;       // [km/h]
     18    Float_t fSolarRadiation;  // [W/m^2] IR-Radiation
    1519
    16     Float_t fUPSStatus;      // arbitrary units (still not properly defined)
    17     Float_t fDifRubGPS;      // [us] Difference between the Rubidium clock time and the time provided by the GPS receiver
     20    Float_t fUPSStatus;       // arbitrary units (still not properly defined)
     21    Float_t fDifRubGPS;       // [us] Difference between the Rubidium clock time and the time provided by the GPS receiver
    1822
     23    MCameraTH      *fTH;      //! Discriminator thresholds
     24    MCameraTD      *fTD;      //! Discriminator delays
     25    MCameraRecTemp *fRecTemp; //! Receiver Board temperatures
     26
     27    // Internal
     28    Bool_t SetupReading(MParList &plist);
     29    Bool_t CheckTag(TString &str, const char *tag) const;
     30
     31    Bool_t InterpreteCC(TString &str, Int_t ver);
     32    Bool_t InterpreteTH(TString &str);
     33    Bool_t InterpreteTD(TString &str, Int_t ver);
     34    Bool_t InterpreteRecTemp(TString &str);
     35
     36    // MReport
    1937    Int_t InterpreteBody(TString &str, Int_t ver);
    2038
  • trunk/MagicSoft/Mars/msignal/MExtractTimeAndChargeDigitalFilter.cc

    r7194 r7430  
    232232    }
    233233
    234     // New weights set
     234    //
     235    // shift the times back to the right reference (start counting from 0)
     236    //
     237    // The high-gain has the extraction offset (fHiGainFirst) already included
     238    // here for speed reason. The low-gain has a changing extraction offset,
     239    // so it will be added at every event (in FindTimeAndChargeLoGain)
    235240    fTimeShiftHiGain = 0.5 + 1./fBinningResolutionHiGain + fHiGainFirst;
    236241    fTimeShiftLoGain = 0.5 + 1./fBinningResolutionLoGain;
     
    474479      return;
    475480
    476   time = max_p + fTimeShiftHiGain + (Float_t)fHiGainFirst /* this shifts the time to the start of the rising edge */
    477       - ((Float_t)t_iter)/fBinningResolutionHiGain;
     481  // here, the first high-gain slice is already included in the fTimeShiftHiGain
     482  time = fTimeShiftHiGain + max_p - Float_t(t_iter)/fBinningResolutionHiGain;
    478483
    479484  const Float_t timefineadjust = time_sum/sum;
Note: See TracChangeset for help on using the changeset viewer.