#ifndef ROOT_THaScintHit
#define ROOT_THaScintHit

/////////////////////////////////////////////////////////////////////////////
//                                                                         //
// THaScintHit                                                             //
//                                                                         //
/////////////////////////////////////////////////////////////////////////////

#include "TObject.h"
#include "TRef.h"
#include "THaScintBar.h"
#include <cstdio>

class THaScintHit : public TObject {

 public:
 
    
  THaScintHit(const THaScintBar* bar,Int_t planenum, Int_t barnum, 
	      Double_t ypos, Double_t Tof, Double_t HitEnergy, Double_t Tdiff);   
  THaScintHit(const THaScintHit* pScHit = 0);
  THaScintHit(const THaScintHit* pScHit, Int_t clusternum);
  THaScintHit(const THaScintHit* pScHit, Int_t planenum, Int_t barnum_nd);

  virtual ~THaScintHit();

  THaScintBar* GetScintBar() const { return (THaScintBar*)fScBar.GetObject(); }
  Int_t GetPlaneNum() {return fPlaneNum;}
  Int_t GetBarNum() {return fBarNum;}
  Int_t GetBarNum_nd() {return fBarNum_nd;}
  
  Double_t GetHitXPos() {return fHitXPos;}
  Double_t GetHitYPos() {return fHitYPos;}
  Double_t GetHitZPos() {return fHitZPos;}
  
  Double_t GetHitTOF() {return fHitTOF;}
  Double_t GetHitEdep() {return fHitEdep;}
  Double_t GetHitTdiff() {return fTdiff;}
  Int_t GetOrder() {return fOrder;}
  Int_t GetClusterNum() {return fClusterNum;}

  void SetScintBar(THaScintBar* bar) {fScBar=bar;}
  void SetPlaneNum(Int_t planenum) {fPlaneNum=planenum;}
  void SetBarNum(Int_t barnum) {fBarNum=barnum;}
  void SetBarNum_nd(Int_t barnum_nd) {fBarNum_nd=barnum_nd;}
  void SetYHitPos(Double_t ypos) {fHitYPos = ypos;}
  void SetHitTOF(Double_t Tof) {fHitTOF = Tof;}
  void SetHitEdep(Double_t HitEnergy) {fHitEdep = HitEnergy;}
  void SetHitTdiff(Double_t Tdiff) {fTdiff = Tdiff;}
  void SetHitOrder(Int_t order) {fOrder = order;}
  void SetClusterNum(Int_t clusternum) {fClusterNum = clusternum;}

  void AddEnergy(Double_t HitEnergy) {fHitEdep += HitEnergy;}

  Int_t CopyScintHit(const THaScintHit* pScHit);

  void Clear(Option_t *s="");
  
  // need to be able to sort the hits by bar number

  Bool_t IsSortable() const { return kTRUE; }
  Int_t  Compare(const TObject* obj) const;
  
 private:

  TRef fScBar;
  Int_t fPlaneNum;   // this or first plane number
  Int_t fBarNum;     // 
  Int_t fBarNum_nd;  // 
  Double_t fHitXPos; // 
  Double_t fHitYPos; // 
  Double_t fHitZPos; // 
  Double_t fHitTOF;  //   time of hit
  Double_t fTdiff;   //   left-to-right PMT time difference
  Double_t fHitEdep; //   total energy deposited
  Int_t fOrder;
  Int_t fClusterNum;
  
 public:

  ClassDef(THaScintHit,2)  // Reconstructed hit-information for a complete hit
};
/////////////////////////////////////////////////////////////////
#endif

Last update: Tue Jul 7 19:26:17 2009

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.