Changeset 3213 for trunk


Ignore:
Timestamp:
02/17/04 16:52:29 (21 years ago)
Author:
hbartko
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
21 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r3212 r3213  
    44
    55                                                 -*-*- END OF LINE -*-*-
     6
     7 2004/02/11: Hendrik Bartko
     8
     9   * msignal/MArrivalTimeCam.[h,cc], manalysis/Makefile,
     10     msignal/AnalysisLinkDef.h, MGeomApply.cc:
     11     - new: Storage Container for the ArrivalTime in the camera
     12   
     13   * msignal/MArrivalTimePix.[h,cc], manalysis/Makefile,
     14     msignal/AnalysisLinkDef.h:
     15     - new: Storage Container for ArrivalTime information of one pixel
     16
     17   * manalysis/MArrivalTimeCalc2.[h,cc]:
     18     - added functionality to compute error of the extracted ArrivalTime
     19     - calculated ArrivalTime is stored in MArrivalTimeCam
     20
     21   * MGeomApply.cc
     22     - geometry is applied to MArrivalTimeCam
     23
     24   * Makefile:
     25     - msignal is included
     26
    627
    728 2004/02/17: Sebastian Raducci
  • trunk/MagicSoft/Mars/Makefile

    r3069 r3213  
    4343          mhist \
    4444          manalysis \
     45          msignal \
    4546          mbadpixels \
    4647          mcalib \
  • trunk/MagicSoft/Mars/NEWS

    r3208 r3213  
    11                                                               -*-*- END -*-*-
    22 *** Version <cvs>
     3
     4   - added new class MArrivalTimeCam/MArrivalTimePix:
     5     Storage containers to hold the ArrivalTime of the camera/pixel
    36
    47   - added new classes for the calibration of relative arrival times:
  • trunk/MagicSoft/Mars/manalysis/MArrivalTimeCalc2.cc

    r3104 r3213  
    4646#include "MPedestalPix.h"
    4747
    48 #include "MArrivalTime.h"
    49 
     48#include "MArrivalTimeCam.h"
     49#include "MArrivalTimePix.h"
    5050
    5151
     
    144144    }
    145145
    146     fArrivalTime = (MArrivalTime*)pList->FindCreateObj(AddSerialNumber("MArrivalTime"));
     146    fArrivalTime = (MArrivalTimeCam*)pList->FindCreateObj(AddSerialNumber("MArrivalTimeCam"));
    147147    if (!fArrivalTime)
    148148        return kFALSE;
     
    151151}
    152152
    153 void MArrivalTimeCalc2::FindSignalTime(Byte_t *ptr, Byte_t size, Float_t &time, Int_t &sat, Byte_t pedes) const
     153void MArrivalTimeCalc2::FindSignalTime(Byte_t *ptr, Byte_t size, Float_t &time, Float_t &deltatime, Int_t &sat, Float_t pedes, Float_t pedrms) const
    154154{
    155155    const Byte_t *end = ptr + size;
     
    203203
    204204    Int_t timesignalsum = 0; 
     205    Int_t timesquaredsum =0;
    205206    Int_t timesum =0;   
    206207   
     
    210211      timesignalsum += *p*(p-ptr);
    211212      timesum += p-ptr;
     213      timesquaredsum  += (p-ptr)*(p-ptr);
    212214    }
    213215   
     
    219221    time = pedsubsum != 0 ? pedsubtimesignalsum / pedsubsum : 1;
    220222
    221  
     223    deltatime = pedsubsum != 0 ? pedrms / pedsubsum * sqrt(timesquaredsum - fWindowSize*time) : 1;
    222224}
    223225
     
    238240        // Find signal in hi- and lo-gain
    239241        //
    240         Float_t timehi, timelo;
     242        Float_t timehi, timelo, deltatimehi, deltatimelo;
    241243        Int_t sathi, satlo;
    242244
     
    247249
    248250        const MPedestalPix  &ped = (*fPedestals)[pixid];
     251
     252        MArrivalTimePix &pix = (*fArrivalTime)[pixid];
    249253     
    250254        const Float_t pedes  = ped.GetPedestal();
    251         //  const Float_t pedrms = ped.GetPedestalRms();
    252 
    253 
    254         FindSignalTime(pixel.GetHiGainSamples()+fHiGainFirst, fNumHiGainSamples, timehi, sathi, pedes);
    255         FindSignalTime(pixel.GetLoGainSamples()+fLoGainFirst, fNumLoGainSamples, timelo, satlo, pedes);
    256         if (satlo)
     255        const Float_t pedrms = ped.GetPedestalRms();
     256
     257
     258        FindSignalTime(pixel.GetHiGainSamples()+fHiGainFirst, fNumHiGainSamples, timehi, deltatimehi, sathi, pedes, pedrms);
     259        FindSignalTime(pixel.GetLoGainSamples()+fLoGainFirst, fNumLoGainSamples, timelo, deltatimelo, satlo, pedes, pedrms);
     260       
     261        if (satlo)
    257262            sat++;
    258263     
    259         if (!sathi)
    260         {
    261           fArrivalTime->SetTime(pixid,timehi);
    262         }
    263         else
    264           fArrivalTime->SetTime(pixid,timelo);
     264        pix.SetArrivalTime(timehi, deltatimehi,
     265                           timelo, deltatimelo);       
     266       
     267        pix.SetGainSaturation(sathi, sathi, satlo);
    265268
    266269
  • trunk/MagicSoft/Mars/manalysis/MArrivalTimeCalc2.h

    r3104 r3213  
    1010
    1111class MPedestalCam;
    12 class MExtractedSignalCam;
    13 class MArrivalTime;
     12class MArrivalTimeCam;
    1413
    1514class MArrivalTimeCalc2 : public MTask
     
    2221
    2322    MPedestalCam        *fPedestals;    // Pedestals of all pixels in the camera
    24     // MExtractedSignalCam *fSignals;      // Extracted signal of all pixels in the camera
    2523
    2624    MRawEvtData         *fRawEvt;       // raw event data (time slices)
     
    2826
    2927   
    30     MArrivalTime        *fArrivalTime;  // Arrival Time of FADC sample
     28    MArrivalTimeCam        *fArrivalTime;  // Arrival Time of FADC sample
    3129     
    3230 
     
    4240    Byte_t  fSaturationLimit;
    4341
    44     void   FindSignalTime(Byte_t *ptr, Byte_t size, Float_t &time, Int_t &sat, Byte_t pedes) const;
     42    void   FindSignalTime(Byte_t *ptr, Byte_t size, Float_t &time,  Float_t &deltatime, Int_t &sat, Float_t pedes, Float_t pedrms) const;
    4543
    4644    Int_t  PreProcess(MParList *pList);
     
    5755
    5856#endif
     57
     58
  • trunk/MagicSoft/Mars/manalysis/MGeomApply.cc

    r3069 r3213  
    3838//   MBlindPixels
    3939//   MArrivalTime
     40//   MArrivalTimeCam
     41//   MArrivalTimePix
    4042//
    4143//  It uses the geometry (MGeomCam) found in the parameter list.
     
    5456//   [MBlindPixels]
    5557//   [MArrivalTime]
     58//   [MArrivalTimeCam]
    5659//
    5760//////////////////////////////////////////////////////////////////////////////
     
    7275#include "MExtractedSignalCam.h"
    7376#include "MBlindPixels.h"
     77#include "MArrivalTimeCam.h"
     78
    7479
    7580ClassImp(MGeomApply);
     
    148153        tme->InitSize(cam->GetNumPixels());
    149154
     155    MArrivalTimeCam *tmecam = (MArrivalTimeCam*)pList->FindObject(AddSerialNumber("MArrivalTimeCam"));
     156    if (tmecam)
     157      tmecam->InitSize(cam->GetNumPixels());
     158
     159
    150160    return kTRUE;
    151161}
  • trunk/MagicSoft/Mars/manalysis/Makefile

    r3209 r3213  
    2424INCLUDES = -I. -I../mbase -I../mmc -I../mraw -I../mgeom -I../mfilter \
    2525           -I../mdata -I../mhbase -I../mhist -I../mgui -I../mimage   \
    26            -I../mhistmc -I../mfileio -I../mmain -I../mcalib          \
     26           -I../mhistmc -I../mfileio -I../mmain -I../mcalib -I../msignal         \
    2727           -I../mpointing -I../mtools
    2828# mcalib: MGeomApply (MCalibrationCam)
Note: See TracChangeset for help on using the changeset viewer.