ROOT logo
#ifndef HTOFHIT_H
#define HTOFHIT_H

#include "TObject.h"

class HTofHit : public TObject {
private:
  Int_t  index; //Index
  Float_t  tof; //time-of-flight (ns)
  Float_t  xpos; //X coordinate in the scint. rod reference system (mm)
  Float_t  xposAdc; // X coordinate calculated from ADC data (mm)
  Float_t  edep; // energy deposited in scint. rod by particle
  Float_t  lAmp; // amplitude of the signal registered by left PMT
  Float_t  rAmp; // amplitude of the signal registered by right PMT
  Float_t  xlab; //X in the lab system (mm)
  Float_t  ylab; //Y in the lab system (mm)
  Float_t  zlab; //Z in the lab system (mm)
  Float_t  dist; //distance of the hit from the target (mm)
  Float_t  theta; //theta angle of the hit (in deg)
  Float_t  phi;   //phi angle of the hit (in deg)
  Char_t  sector, module, cell; //Location
  Int_t  flagAdc;
public:
  HTofHit(void) : index(-1),tof(0.0F), xpos(0.0F) {}
  ~HTofHit(void) {}
  Int_t getIndex(void) {return  index;}
  Char_t getSector(void) {return  sector;}
  Char_t getModule(void) {return  module;}
  Char_t getCell(void) {return  cell;}
  Float_t getTof(void) {return tof;}
  Float_t getXpos(void) {return  xpos;}
  Float_t getXposAdc(void) {return xposAdc;}
  Float_t getEdep(void) {return edep;}
  Float_t getLeftAmp(void) {return lAmp;}
  Float_t getRightAmp(void) {return rAmp;}
  void getXYZLab(Float_t &x, Float_t &y, Float_t &z) { x = xlab; y = ylab; z = zlab; }
  void getDistance(Float_t &d) { d = dist; }
  void getTheta(Float_t &th) { th = theta; }
  void getPhi(Float_t &ph) { ph = phi; }
  Int_t getAdcFlag(void) {return flagAdc; }
  void setIndex(Int_t idx) { index=idx;}
  void setSector(Char_t s) { sector=s;}
  void setModule(Char_t m) { module=m;}
  void setCell(Char_t c) { cell=c;}
  void setTof(Float_t atof) {tof=atof;}
  void setXpos(Float_t axpos) {xpos=axpos;}
  void setXposAdc(Float_t axposAdc) {xposAdc=axposAdc;}
  void setEdep(Float_t aedep) {edep=aedep;}
  void setLeftAmp(Float_t alAmp) {lAmp=alAmp;}
  void setRightAmp(Float_t arAmp) {rAmp=arAmp;}
  void setXYZLab(Float_t x, Float_t y, Float_t z) { xlab = x; ylab = y; zlab = z; }
  void setDistance(Float_t d) { dist = d; }
  void setTheta(Float_t th) { theta = th; }
  void setPhi(Float_t ph) { phi = ph; }
  void setAdcFlag(Int_t af) {flagAdc = af; }
  void setValues(Float_t atof,Float_t axpos) {tof=atof;xpos=axpos;}
  Int_t operator< (const HTofHit &hit) { return tof<hit.tof && xpos<hit.xpos;}
  Int_t operator>(const HTofHit &hit) {return tof>hit.tof && xpos>hit.xpos;}
  Int_t operator!=(const HTofHit &hit) { return tof!=hit.tof || xpos!=hit.xpos;}
  HTofHit &operator=(const HTofHit &a) {
    tof=a.tof; xpos=a.xpos;
    return *this;
  }
  ClassDef(HTofHit,2) //Class with data for a TOF hit
};

#endif /* !HTOFHIT_H */

 htofhit.h:1
 htofhit.h:2
 htofhit.h:3
 htofhit.h:4
 htofhit.h:5
 htofhit.h:6
 htofhit.h:7
 htofhit.h:8
 htofhit.h:9
 htofhit.h:10
 htofhit.h:11
 htofhit.h:12
 htofhit.h:13
 htofhit.h:14
 htofhit.h:15
 htofhit.h:16
 htofhit.h:17
 htofhit.h:18
 htofhit.h:19
 htofhit.h:20
 htofhit.h:21
 htofhit.h:22
 htofhit.h:23
 htofhit.h:24
 htofhit.h:25
 htofhit.h:26
 htofhit.h:27
 htofhit.h:28
 htofhit.h:29
 htofhit.h:30
 htofhit.h:31
 htofhit.h:32
 htofhit.h:33
 htofhit.h:34
 htofhit.h:35
 htofhit.h:36
 htofhit.h:37
 htofhit.h:38
 htofhit.h:39
 htofhit.h:40
 htofhit.h:41
 htofhit.h:42
 htofhit.h:43
 htofhit.h:44
 htofhit.h:45
 htofhit.h:46
 htofhit.h:47
 htofhit.h:48
 htofhit.h:49
 htofhit.h:50
 htofhit.h:51
 htofhit.h:52
 htofhit.h:53
 htofhit.h:54
 htofhit.h:55
 htofhit.h:56
 htofhit.h:57
 htofhit.h:58
 htofhit.h:59
 htofhit.h:60
 htofhit.h:61
 htofhit.h:62
 htofhit.h:63
 htofhit.h:64
 htofhit.h:65
 htofhit.h:66
 htofhit.h:67
 htofhit.h:68