ROOT logo
#ifndef HEMCCAL_H
#define HEMCCAL_H

using namespace std;

#include "TObject.h"

class HEmcCal : public TObject {
protected:
  UChar_t nHits;        // number of hits in this cell
  Float_t lead;         // lead time w/o twc correction and calibration
  Float_t width;        // width w/0 calibration
  Float_t time;         // time of hit
  Float_t energy;       // energy deposited in one crystal
  Char_t  sector;       // sector number (0..5)
  UChar_t cell;         // cell number (0..254)
  Char_t  row;          // row number (0..14)
  Char_t  column;       // column number (0..16)
  Bool_t  isRpcMatch;   // kTRUE Emc cell has matching with RPC
  Short_t clusterIndex; // index of EmcCluster object
  Short_t statusTime;   // >0 - ok.; <0 - hit was kicked out by threshold; =0-real data

public:
  HEmcCal() :
    nHits(0),
    lead(-100.F),
    width(-10.F),
    time(-999.F),
    energy(-999.F),
    sector(-1),
    cell(0),
    row(-1),
    column(-1),
    isRpcMatch(kFALSE),
    clusterIndex(-1),
    statusTime(0)
  {
  }
  ~HEmcCal() {}
  virtual void clear(void);

  void setAddress(Char_t se, UChar_t ce, Char_t ro, Char_t co);
  void setNHits(UChar_t n)        {nHits  = n;}
  void setLead(Float_t l)         {lead   = l;}
  void setWidth(Float_t w)        {width  = w;}
  void setTime(Float_t t)         {time   = t;}
  void setEnergy(Float_t e)       {energy = e;}
  void setSector(Char_t s)        {sector = s;}
  void setCell(UChar_t c)         {cell   = c;}
  void setRow(Char_t r)           {row    = r;}
  void setColumn(Char_t c)        {column = c;}
  void setMatchedRpc(Bool_t f=kTRUE)    {isRpcMatch  = f;}
  void setClusterIndex(Short_t i) {clusterIndex = i;}
  void setStatus(Int_t f)         {statusTime = f;}

  void    getAddress(Char_t & se, UChar_t & ce, Char_t & ro, Char_t & co);
  UChar_t getNHits(void)        const {return nHits;}
  Float_t getLead(void)         const {return lead;}
  Float_t getWidth(void)        const {return width;}
  Float_t getTime(void)         const {return time;}
  Float_t getEnergy(void)       const {return energy;}
  Char_t  getSector(void)       const {return sector;}
  UChar_t getCell(void)         const {return cell;}
  Char_t  getRow(void)          const {return row;}
  Char_t  getColumn(void)       const {return column;}
  Bool_t  isMatchedRpc(void)    const {return isRpcMatch; }
  Short_t getClusterIndex(void) const {return clusterIndex;}
  Short_t getStatus(void)       const {return statusTime;}

  ClassDef(HEmcCal,1) //EMC cal data class
};

inline void HEmcCal::setAddress(Char_t se, UChar_t ce, Char_t ro, Char_t co) {
  sector = se;
  cell   = ce;
  row    = ro;
  column = co;
}

inline void HEmcCal::getAddress(Char_t & se, UChar_t & ce, Char_t & ro, Char_t & co) {
  se = sector;
  ce = cell;
  ro = row;
  co = column;
}

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