Ignore:
Timestamp:
06/18/07 15:16:18 (18 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mbadpixels
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.cc

    r8339 r8577  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MBadPixelsTreat.cc,v 1.38 2007-03-01 17:42:27 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MBadPixelsTreat.cc,v 1.39 2007-06-18 14:11:08 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    6464//   MPedPhotCam
    6565//   MBadPixelsCam
     66//   MRawRunHeader
    6667//   [MGeomCam]
    6768//
     
    9798#include "MBadPixelsCam.h"
    9899
     100#include "MRawRunHeader.h"
     101
    99102ClassImp(MBadPixelsTreat);
    100103
     
    109112//
    110113MBadPixelsTreat::MBadPixelsTreat(const char *name, const char *title)
    111     : fGeomCam(0), fEvt(0), fBadPixels(0), fPedPhot1(0), fPedPhot2(0),
    112     fFlags(0), fNumMinNeighbors(3), fMaxArrivalTimeDiff(0.9)
     114    : fGeomCam(0), fEvt(0), fBadPixels(0), fRawRunHeader(0),
     115    fPedPhot1(0), fPedPhot2(0),fFlags(0), fNumMinNeighbors(3),
     116    fMaxArrivalTimeDiff(3.)
    113117{
    114118    fName  = name  ? name  : gsDefName.Data();
     
    146150Int_t MBadPixelsTreat::PreProcess (MParList *pList)
    147151{
     152    fRawRunHeader = (MRawRunHeader*)pList->FindObject(AddSerialNumber("MRawRunHeader"));
     153    if (!fRawRunHeader)
     154    {
     155        *fLog << err << AddSerialNumber("MRawRunHeader") << " not found... aborting." << endl;
     156        return kFALSE;
     157    }
     158
    148159    fBadPixels = (MBadPixelsCam*)pList->FindObject(AddSerialNumber("MBadPixelsCam"));
    149160    if (!fBadPixels)
     
    216227
    217228        if (fPedPhot1 && fPedPhot2)
    218             *fLog << "Maximum arrival time difference: " << fMaxArrivalTimeDiff << endl;
     229            *fLog << "Maximum arrival time difference: " << fMaxArrivalTimeDiff << "ns" << endl;
    219230
    220231    }
     
    434445void MBadPixelsTreat::InterpolateTimes() const
    435446{
     447    const Double_t maxdiff = fMaxArrivalTimeDiff*fRawRunHeader->GetFreqSampling()/1000.;
     448
    436449    const Int_t n = fEvt->GetNumPixels();
    437450    for (int i=0; i<n; i++)
     
    478491
    479492            // Calculate mean arrival time of pixel probably inside the shower
    480             if (TMath::Abs(tm1 - tm2)<fMaxArrivalTimeDiff)
     493            if (TMath::Abs(tm1 - tm2)<maxdiff)
    481494            {
    482495                sum2 += tm1+tm2;
  • trunk/MagicSoft/Mars/mbadpixels/MBadPixelsTreat.h

    r7804 r8577  
    1010class MPedPhotCam;
    1111class MBadPixelsCam;
     12class MRawRunHeader;
    1213
    1314class MBadPixelsTreat : public MTask
    1415{
    1516private:
    16     MGeomCam      *fGeomCam;   //!
    17     MSignalCam    *fEvt;       //!
    18     MBadPixelsCam *fBadPixels; //!
     17    MGeomCam      *fGeomCam;       //! Camera geometry to get the area scaling factors
     18    MSignalCam    *fEvt;           //! Signal Event to be interpolated
     19    MBadPixelsCam *fBadPixels;     //! Bad Pixels to be interpolated
     20    MRawRunHeader *fRawRunHeader;  //! Run header to get the sampling frequency
    1921
    20     MPedPhotCam   *fPedPhot1;  //! Pedestal from extractor used for "no-signal" in InterpolateTimes
    21     MPedPhotCam   *fPedPhot2;  //! Pedestal from extractor used for "no-signal" in InterpolateTimes
     22    MPedPhotCam   *fPedPhot1;      //! Pedestal from extractor used for "no-signal" in InterpolateTimes
     23    MPedPhotCam   *fPedPhot2;      //! Pedestal from extractor used for "no-signal" in InterpolateTimes
    2224
    2325
    24     TList fPedPhotCams;
     26    TList fPedPhotCams;            // List of PedPhotCams to be treated
    2527
    2628    Byte_t  fFlags;                // flag for the method which is used
  • trunk/MagicSoft/Mars/mbadpixels/Makefile

    r8416 r8577  
    2121INCLUDES = -I. -I../mbase -I../manalysis -I../mgeom -I../mgui \
    2222           -I../mmc -I../mpedestal -I../msignal -I../mpointing \
    23            -I../mhbase -I../mhist
     23           -I../mhbase -I../mhist -I../mraw
    2424# MBadPixelsCalc  (manalysis): MPedPhotCam, MSigmabar
    2525# MBadPixelsCalc  (mgeom):     MGeomCam
Note: See TracChangeset for help on using the changeset viewer.