// Author: Andrew M. Rogers, NSCL 07/01/2006
//* Copyright (C) 2006-2008 Andrew M. Rogers

#ifndef __THIRAPIXEL_H
#define __THIRAPIXEL_H

#include <iostream>

#include <TROOT.h>
#include <TBranch.h>
#include <TObject.h>
#include <TTree.h>
#include <TVector3.h>

#ifndef  __ROOTDEFINE_H
#include "rootDefine.h"
#define  __ROOTDEFINE_H
#endif
#ifndef  __TCRANGE_H
#include "TCrange.h"
#define  __TCRANGE_H
#endif

#include "TTele.h"
  //#include "THiRA.h"

class TTele;
class THiRA;

using namespace std;


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// THiRAPixel                                                           //
//                                                                      //
// A THiRAPixel class derives from TObject.  This Class provides the    //
// structure for a hit pixel defined in a HiRA telescope.               //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

class THiRAPixel : public TObject {
 private:
  TCrange       *fCRange;                               //! Energy-Range pointer.

 protected:
  TString      fName;                                  //! Object identifier
  TString      fTitle;                                 //! Object title

 public:
  //  THiRA       *parent;                              //! Parent class.

  TVector3     pixVec;                                 //
  Double_t     ETot;                                   //  Total Energy.
  Double_t     pETot;                                  //  Proton total energy.
  Double_t     dETot;                                  //  Deuteron total energy.
  Double_t     tETot;                                  //  Triton total energy.
  Double_t     He3ETot;                                //  3He total energy.
  Double_t     He4ETot;                                //  4He total energy.

  UShort_t     fTeleID;                                //  Telescope ID number.
  UShort_t     DEstrip;                                //  dE strip number.
  UShort_t     EFstrip;                                //  EF strip number.
  UShort_t     EBstrip;                                //  EB strip number.
  UShort_t     CsISeg;                                 //  CsI segment number.
  UShort_t     fCsIHits;                               //
  UShort_t     fMult;                                  //  "True" event multiplicity.
  
  
  Double_t     E_DE;                                   //
  Double_t     E_EF;                                   //
  Double_t     E_EB;                                   //
  Double_t     E_CsI;                                  //
  Double_t     T_EF;                                   //
  Double_t     T_DE;                                   //
  Double_t     T_EB;                                   //
  Double_t     T_CsI;                                  //

  TBranch     *b_pETot;                                //!
  TBranch     *b_dETot;                                //!
  TBranch     *b_tETot;                                //!
  TBranch     *b_He3ETot;                              //!
  TBranch     *b_He4ETot;                              //!
  TBranch     *b_fTeleID;                              //!
  TBranch     *b_DEstrip;                              //!
  TBranch     *b_EFstrip;                              //!
  TBranch     *b_EBstrip;                              //!
  TBranch     *b_CsISeg;                               //!
  TBranch     *b_fCsIHits;                             //!
  TBranch     *b_fMult;                                //!
  TBranch     *b_E_DE;                                 //!
  TBranch     *b_E_EF;                                 //!
  TBranch     *b_E_EB;                                 //!
  TBranch     *b_E_CsI;                                //!
  TBranch     *b_T_DE;                                 //!
  TBranch     *b_T_EF;                                 //!
  TBranch     *b_T_EB;                                 //!
  TBranch     *b_T_CsI;                                //!

  TTree        *fChain;         //! Pointer to the analyzed TTree or TChain
  Int_t        fCurrent;        //! Current Tree number in a TChain

 public:
  THiRAPixel(): fName(), fTitle() {}
  ~THiRAPixel() {}

  const Char_t  *GetName() const { return fName; }
  const Char_t  *GetTitle() const { return fTitle; }
  void           SetName(const Char_t *name);
  void           SetNameTitle(const Char_t *name, const Char_t *title);
  void           SetTitle(const Char_t *title=""); 

  THiRAPixel    *AddHit(TCrange *p,
			Int_t *materials,
			TTele *tele,
			Int_t stripEF,
			Int_t stripEB,
			UShort_t segCsI,
			Int_t hit,
			UShort_t nCsIHits);
  void         Calculate();                                 // Calculate quantities.
  void         Calibrate();                                 // Calibrate detector.
  void         Clear(Option_t *option="");                  // Clear all members.
  //  void         Copy(TObject &pix) const;                // The copy method.
  void         Fill();
  Int_t        GetTower(THiRA *hira, Int_t face);           //
  void         InitClass(TString name);                     // Initialize the class.
  Bool_t       IsBad(THiRA *hira);                          // Check if any element defining the pixel is bad.
  Bool_t       IsBad(THiRA *hira,Int_t teleID,Char_t *face,
		     Int_t element);                        // Check if a specific pixel element is bad.
  void         InitTree(TTree *tree);                       // Initialize the tree.
  


  ClassDef(THiRAPixel,6)     // A HiRA pixel.

};

#endif


Last change: Sun Dec 21 12:38:48 2008
Last generated: 2008-12-21 12:38

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.