Changeset 18243 for trunk/Mars/msignal


Ignore:
Timestamp:
06/20/15 15:47:28 (10 years ago)
Author:
Daniela Dorner
Message:
added new parameter fTimeSlope to the output of the calibration
Location:
trunk/Mars/msignal
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Mars/msignal/MExtractFACT.cc

    r17835 r18243  
    171171        //
    172172        Float_t max  = -1;
     173        Float_t tmax  = -1;
    173174        if (pmax>pbeg && pmax<pend-1)
    174175        {
     
    194195                        max = exp(a + b*dx + c*dx*dx);
    195196
    196                         // Time is position of maximum
    197                         //time = dx;
    198                         //time += Int_t(pmax-ptr);
     197                        // tmax is position of maximum
     198                        tmax = dx;
     199                        tmax += Int_t(pmax-ptr);
    199200                    }
    200201                }
     
    203204
    204205        Float_t time = -1;
     206        Float_t slope = -1;
    205207        if (max>=0)
    206208        {
     
    217219                time = (max/2-pmax[0])/(pmax[1]-pmax[0]);
    218220                time += Int_t(pmax-ptr);
     221                slope = tmax - time;
    219222            }
    220223        }
     
    232235        pix.SetGainSaturation(0);
    233236
    234         tix.SetArrivalTime(time);
     237        tix.SetArrivalTime(time, slope);
    235238        tix.SetGainSaturation(0);
    236239    }
  • trunk/Mars/msignal/MSignalCam.cc

    r9573 r18243  
    584584// 10: as 0, but returns kFALSE if signal <=0
    585585// 11: as 8, but returns kFALSE if signal <=0
     586// 12: time slope
    586587//
    587588Bool_t MSignalCam::GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type) const
     
    668669        return pix.GetNumPhotons()>0;
    669670
     671    case 12: // time slope
     672        val = pix.GetTimeSlope();
     673        break;
     674
    670675    case 9:
    671676    default:
  • trunk/Mars/msignal/MSignalPix.cc

    r12938 r18243  
    6464//    size of the calibrated data by roughly 0.5%
    6565//
     66// Version 8:
     67// ----------
     68//  - added new time variable fTimeSlope describing the width of the rise time
     69//
    6670////////////////////////////////////////////////////////////////////////////
    6771#include "MSignalPix.h"
     
    8084MSignalPix::MSignalPix(Float_t phot, Float_t errphot) :
    8185    fIsCore(kFALSE), fRing(1), fIdxIsland(-1),
    82     fPhot(phot), fErrPhot(errphot), fArrivalTime(-1)
     86    fPhot(phot), fErrPhot(errphot), fArrivalTime(-1),
     87    fTimeSlope(-1)
    8388{
    8489    MMath::ReducePrecision(fPhot);
     
    9499    fErrPhot     =  0;
    95100    fArrivalTime = -1;
     101    fTimeSlope = -1;
    96102}
    97103
  • trunk/Mars/msignal/MSignalPix.h

    r8528 r18243  
    1919    Float_t  fErrPhot;       // the error of fPhot
    2020    Float_t  fArrivalTime;   // Calibrated Arrival Time
     21    Float_t  fTimeSlope;     // Time between half rise time and position of maximum
    2122
    2223public:
     
    2425    MSignalPix(const MSignalPix &pix)
    2526        : fIsCore(pix.fIsCore), fRing(pix.fRing), fIdxIsland(pix.fIdxIsland),
    26         fPhot(pix.fPhot), fErrPhot(pix.fErrPhot), fArrivalTime(pix.fArrivalTime)
     27        fPhot(pix.fPhot), fErrPhot(pix.fErrPhot), fArrivalTime(pix.fArrivalTime),
     28        fTimeSlope(pix.fTimeSlope)
    2729    {
    2830    }
     
    3941        pix.fErrPhot     = fErrPhot;
    4042        pix.fArrivalTime = fArrivalTime;
     43        pix.fTimeSlope   = fTimeSlope;
    4144    }
    4245    void    Print(Option_t *opt = NULL) const;
     
    4649    Float_t GetErrorPhot() const          { return fErrPhot; }
    4750    Float_t GetArrivalTime() const        { return fArrivalTime; }
     51    Float_t GetTimeSlope() const          { return fTimeSlope; }
    4852
    4953    Bool_t  IsPixelUsed() const           { return fRing>0; }
     
    6569    void    Set(Float_t np, Float_t ep)   { MMath::ReducePrecision(np); MMath::ReducePrecision(ep);  fPhot = np; fErrPhot = ep; }
    6670    void    SetArrivalTime(Float_t tm)    { fArrivalTime = tm; }
     71    void    SetTimeSlope(Float_t ts)      { fTimeSlope = ts; }
    6772
    6873    //void    AddNumPhotons(Float_t f)      { fPhot += f; }
    6974    //void    Scale(Float_t f)              { fPhot /= f; }
    7075
    71     ClassDef(MSignalPix, 7)  // class containing information about the Cerenkov Photons in a pixel
     76    ClassDef(MSignalPix, 8)  // class containing information about the Cerenkov Photons in a pixel
    7277};
    7378
Note: See TracChangeset for help on using the changeset viewer.