ROOT logo
//////////////////////////////////////////////////////////////////////////////
//
// $Id:
//
//*-- Author : Martin Jurkovic <martin.jurkovic@ph.tum.de> 2010
//
//////////////////////////////////////////////////////////////////////////////

#ifndef HSTART2HITFPAR_H_
#define HSTART2HITFPAR_H_

#include "TArrayF.h"

#include "hparcond.h"

class HParamList;

class HStart2HitFPar : public HParCond {

private:

   Int_t   fModules;      // Number of modules
   Int_t   fStrips;       // Number of strips (components)
   TArrayF fMeanTime;     // Mean of the time distribution
   TArrayF fWidth;        // Width of the distribution

private:

   HStart2HitFPar(const HStart2HitFPar& source);
   HStart2HitFPar& operator=(const HStart2HitFPar& source);

public:

   HStart2HitFPar(const Char_t* name    = "Start2HitFPar",
                  const Char_t* title   = "Start2 Hit Finder Parameters",
                  const Char_t* context = "Start2HitFParProduction") :
      HParCond(name, title, context),
      fModules(0), fStrips(0) {}
   ~HStart2HitFPar() {}

   void    clear();
   void    printParams();
   void    putParams(HParamList* l);
   Bool_t  getParams(HParamList* l);

   UInt_t  getModules();
   UInt_t  getStrips();
   Float_t getMeanTime(Int_t m, Int_t s);
   Float_t getWidth(Int_t m, Int_t s);

   ClassDef(HStart2HitFPar, 1) // Container for the START2 hit finder parameters
};

inline UInt_t  HStart2HitFPar::getModules()
{
   return fModules;
}

inline UInt_t  HStart2HitFPar::getStrips()
{
   return fStrips;
}

inline Float_t HStart2HitFPar::getMeanTime(Int_t m, Int_t s)
{
   if (m >= 0 && m < fModules &&
       s >= 0 && s < fStrips  &&
       (fStrips * m + s) < fMeanTime.GetSize()) {
      return fMeanTime[fStrips * m + s];
   }
   return -1e10;
}

inline Float_t HStart2HitFPar::getWidth(Int_t m, Int_t s)
{
   if (m >= 0 && m < fModules &&
       s >= 0 && s < fStrips  &&
       (fStrips * m + s) < fWidth.GetSize()) {
      return fWidth[fStrips * m + s];
   }
   return -1e10;
}

#endif /*HSTART2HITFPAR_H_*/
 hstart2hitfpar.h:1
 hstart2hitfpar.h:2
 hstart2hitfpar.h:3
 hstart2hitfpar.h:4
 hstart2hitfpar.h:5
 hstart2hitfpar.h:6
 hstart2hitfpar.h:7
 hstart2hitfpar.h:8
 hstart2hitfpar.h:9
 hstart2hitfpar.h:10
 hstart2hitfpar.h:11
 hstart2hitfpar.h:12
 hstart2hitfpar.h:13
 hstart2hitfpar.h:14
 hstart2hitfpar.h:15
 hstart2hitfpar.h:16
 hstart2hitfpar.h:17
 hstart2hitfpar.h:18
 hstart2hitfpar.h:19
 hstart2hitfpar.h:20
 hstart2hitfpar.h:21
 hstart2hitfpar.h:22
 hstart2hitfpar.h:23
 hstart2hitfpar.h:24
 hstart2hitfpar.h:25
 hstart2hitfpar.h:26
 hstart2hitfpar.h:27
 hstart2hitfpar.h:28
 hstart2hitfpar.h:29
 hstart2hitfpar.h:30
 hstart2hitfpar.h:31
 hstart2hitfpar.h:32
 hstart2hitfpar.h:33
 hstart2hitfpar.h:34
 hstart2hitfpar.h:35
 hstart2hitfpar.h:36
 hstart2hitfpar.h:37
 hstart2hitfpar.h:38
 hstart2hitfpar.h:39
 hstart2hitfpar.h:40
 hstart2hitfpar.h:41
 hstart2hitfpar.h:42
 hstart2hitfpar.h:43
 hstart2hitfpar.h:44
 hstart2hitfpar.h:45
 hstart2hitfpar.h:46
 hstart2hitfpar.h:47
 hstart2hitfpar.h:48
 hstart2hitfpar.h:49
 hstart2hitfpar.h:50
 hstart2hitfpar.h:51
 hstart2hitfpar.h:52
 hstart2hitfpar.h:53
 hstart2hitfpar.h:54
 hstart2hitfpar.h:55
 hstart2hitfpar.h:56
 hstart2hitfpar.h:57
 hstart2hitfpar.h:58
 hstart2hitfpar.h:59
 hstart2hitfpar.h:60
 hstart2hitfpar.h:61
 hstart2hitfpar.h:62
 hstart2hitfpar.h:63
 hstart2hitfpar.h:64
 hstart2hitfpar.h:65
 hstart2hitfpar.h:66
 hstart2hitfpar.h:67
 hstart2hitfpar.h:68
 hstart2hitfpar.h:69
 hstart2hitfpar.h:70
 hstart2hitfpar.h:71
 hstart2hitfpar.h:72
 hstart2hitfpar.h:73
 hstart2hitfpar.h:74
 hstart2hitfpar.h:75
 hstart2hitfpar.h:76
 hstart2hitfpar.h:77
 hstart2hitfpar.h:78
 hstart2hitfpar.h:79
 hstart2hitfpar.h:80
 hstart2hitfpar.h:81
 hstart2hitfpar.h:82
 hstart2hitfpar.h:83
 hstart2hitfpar.h:84