Ignore:
Timestamp:
08/18/15 10:28:44 (9 years ago)
Author:
Jens Buss
Message:
merged Trunk into Branch
Location:
branches/MarsGapdTimeJitter
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/MarsGapdTimeJitter

  • branches/MarsGapdTimeJitter/msignal/MExtractFACT.cc

    r17835 r18282  
    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        {
     
    208210
    209211            // Time is position of half hight leading edge
    210             pend = std::max(pbeg, pmax-10);
     212            pend = std::max(pbeg, pmax-15);
    211213            for (;pmax>=pend; pmax--)
    212214                if (*pmax<max/2)
     
    217219                time = (max/2-pmax[0])/(pmax[1]-pmax[0]);
    218220                time += Int_t(pmax-ptr);
     221                slope = tmax - time;
    219222            }
    220223        }
     
    223226        {
    224227            time = gRandom->Uniform(rangehi)+fHiGainFirst+1;
    225             max  = pbeg[uint16_t(time)];
     228            max  = ptr[uint16_t(time)];
    226229        }
    227230
     
    232235        pix.SetGainSaturation(0);
    233236
    234         tix.SetArrivalTime(time);
     237        tix.SetArrivalTime(time, slope);
    235238        tix.SetGainSaturation(0);
    236239    }
  • branches/MarsGapdTimeJitter/msignal/MSignalCam.cc

    r9573 r18282  
    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
     
    593594
    594595    // Used inlcudes status unampped
    595     if (!pix.IsPixelUsed() && (type<6 || type==8))
     596    if (!pix.IsPixelUsed() && (type<6 || type==8 || type==14))
    596597        return kFALSE;
    597598
     
    668669        return pix.GetNumPhotons()>0;
    669670
     671    case 13: // time slope
     672        val = pix.GetTimeSlope();
     673        break;
     674
     675    case 14: // time slope
     676        if (pix.IsPixelUnmapped())
     677            return kFALSE;
     678        val = pix.GetTimeSlope();
     679        break;
     680
    670681    case 9:
    671682    default:
  • branches/MarsGapdTimeJitter/msignal/MSignalPix.cc

    r12938 r18282  
    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
  • branches/MarsGapdTimeJitter/msignal/MSignalPix.h

    r8528 r18282  
    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.