Ignore:
Timestamp:
01/24/04 01:40:03 (21 years ago)
Author:
gaug
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/manalysis
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/manalysis/MArrivalTime.cc

    r2785 r2902  
    6262}
    6363
     64void MArrivalTime::InitSize(Int_t i)
     65{
     66 
     67  if (fData.GetSize() >= i)
     68    return;
     69  else
     70    fData.Set(i);
     71}
     72
     73//
     74// Set the arrival time in one pixel
     75//
     76void MArrivalTime::SetTime(Int_t i, Float_t t)
     77{
     78
     79  if (i < fData.GetSize())
     80    fData.AddAt(t,i);
     81  else
     82    {
     83      fData.Set(i+1);
     84      fData.AddAt(t,i);
     85    }
     86}
     87
    6488//
    6589// Calculates the arrival time for each pixel
  • trunk/MagicSoft/Mars/manalysis/MArrivalTime.h

    r2785 r2902  
    2121class MArrivalTime : public MCamEvent
    2222{
    23 private:
     23
     24 private:
    2425    TArrayF fData;  // Stores the arrival times
    2526 
     
    3233    TArrayS fCluster; // Idxs of the pixels in the current cluster
    3334    TArrayS fakeData; //Test purpose
     35
    3436public:
     37
    3538    MArrivalTime(const char *name=NULL, const char *title=NULL);
    3639    ~MArrivalTime() { }
     
    4851                                       Short_t idx, Short_t *dimCluster);
    4952
     53    void SetTime(Int_t i, Float_t time);
     54    void InitSize(Int_t i);
     55   
    5056    const TArrayF &GetData() const { return fData; }
    5157
  • trunk/MagicSoft/Mars/manalysis/MExtractedSignalPix.cc

    r2768 r2902  
    7272{
    7373
    74   fExtractedSignalHiGain = gkSignalInitializer;
     74  fExtractedSignalHiGain      = gkSignalInitializer;
    7575  fExtractedSignalHiGainError = gkSignalInitializer;
    76   fExtractedSignalLoGain = gkSignalInitializer;
     76  fExtractedSignalLoGain      = gkSignalInitializer;
    7777  fExtractedSignalLoGainError = gkSignalInitializer;
    7878 
     
    8282
    8383}
     84
     85void MExtractedSignalPix::SetExtractedSignal(Float_t sig, Float_t sigerr)   
     86{
     87 
     88  fExtractedSignalHiGain      = sig;
     89  fExtractedSignalHiGainError = sigerr;
     90
     91  return;
     92}
     93
     94
     95void MExtractedSignalPix::SetExtractedSignal(Float_t sighi, Float_t sighierr,
     96                                             Float_t siglo, Float_t sigloerr)   
     97{
     98  fExtractedSignalHiGain = sighi;
     99  fExtractedSignalHiGainError = sighierr;
     100  fExtractedSignalLoGain = siglo;
     101  fExtractedSignalLoGainError = sigloerr;
     102 
     103  return;
     104}
     105
     106Bool_t MExtractedSignalPix::IsValid() const
     107{
     108
     109 return fExtractedSignalHiGain >= 0. || fExtractedSignalHiGainError >= 0.;
     110 
     111}
     112
     113
     114void MExtractedSignalPix::SetGainSaturation(Bool_t sat, Byte_t higain, Byte_t logain)
     115{
     116
     117  fIsLoGainUsed = sat;
     118  fNumHiGainSaturated = higain;
     119  fNumLoGainSaturated = logain;
     120
     121  return;
     122
     123}
     124
     125
    84126
    85127void MExtractedSignalPix::PrintOut()
  • trunk/MagicSoft/Mars/manalysis/MExtractedSignalPix.h

    r2845 r2902  
    1919  Byte_t fNumLoGainSaturated;
    2020
    21     // FIXME: Will be removed. Must be stored in MArrivalTime
    22   Float_t fMeanArrivalTime;
    23   Float_t fWidthArrivalTime;
    24   Float_t fTailArrivalTime;
    25 
    2621public:
    2722
     
    3126
    3227    // Setter
    33     void SetExtractedSignal(Float_t sig, Float_t sigerr)   
    34     {
    35         fExtractedSignalHiGain = sig; fExtractedSignalHiGainError = sigerr;
    36     }
    37 
    38     void SetExtractedSignal(Float_t sighi, Float_t sighierr,Float_t siglo, Float_t sigloerr)   
    39     {
    40         fExtractedSignalHiGain = sighi;
    41         fExtractedSignalHiGainError = sighierr;
    42         fExtractedSignalLoGain = siglo;
    43         fExtractedSignalLoGainError = sigloerr;
    44     }
    45 
    46     void SetGainSaturation(Bool_t sat, Byte_t higain, Byte_t logain)
    47     {
    48         fIsLoGainUsed = sat; fNumHiGainSaturated = higain; fNumLoGainSaturated = logain;
    49     }
    50 
    51     void SetArrivalTimes(Float_t mean, Float_t width, Float_t tail)
    52     {
    53         fMeanArrivalTime = mean; fWidthArrivalTime = width; fTailArrivalTime = tail;
    54     }
     28    void SetExtractedSignal(Float_t sig, Float_t sigerr);
     29    void SetExtractedSignal(Float_t sighi, Float_t sighierr,Float_t siglo, Float_t sigloerr);
     30    void SetGainSaturation(Bool_t sat, Byte_t higain, Byte_t logain);
    5531
    5632    // Getter
     
    6137    Float_t GetExtractedSignalLoGainError() const { return fExtractedSignalLoGainError; }
    6238
    63     Float_t GetMeanArrivalTime()            const { return fMeanArrivalTime; }
    64     Float_t GetWidthArrivalTime()           const { return fWidthArrivalTime; }
    65     Float_t GetTailArrivalTime()            const { return fTailArrivalTime; }
    66 
    6739    Byte_t GetNumLoGainSaturated()          const { return fNumLoGainSaturated; }
    6840
    6941    Bool_t IsLoGainUsed() const { return fIsLoGainUsed; }
    70     Bool_t IsValid() const      { return fExtractedSignalHiGain >= 0. || fExtractedSignalHiGainError >= 0.; }
     42    Bool_t IsValid() const;   
    7143
    7244    void PrintOut();
Note: See TracChangeset for help on using the changeset viewer.