#ifndef __S800ROOTGLOBALS_H
#define __S800ROOTGLOBALS_H 1
#endif
#ifndef __TS800SCINTILLATOR_H
#define __TS800SCINTILLATOR_H

#ifndef __S800PACKETS_H
#include "S800Packets.h"
#define __S8000PACKETS_H
#endif
#ifndef __S800DEFINE_H
#include "S800define.h"
#define __S800DEFINE_H
#endif
#ifndef __ROOTDEFINE_H
#define __ROOTDEFINE_H
#include "rootDefine.h"
#endif

#include "TBranch.h"
#include "TObject.h"
#include <TRandom3.h>
#include "TSpline.h"
#include "TString.h"
#include "TTree.h"

//#include "TS800.h"

using namespace std;

// Forward class declarations
class TS800;

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TS800Scintillator                                                    //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

class TS800Scintillator : public TObject{
 private:
  TRandom3     fRandom;                    //! The class's random number generator.
  TSpline3     *e1Spline;                  //! e1.time correcting cubic spline.

 public:
  Bool_t       fE1SplineCorr;              //! Use a defined cubic spline to correct e1.time.

 public:
  TS800Scintillator *fCon;                 //!
  TS800*       parent;                     //! Parent S800 class.

  TString      name;                       //! Object identifier.

  Double_t     avgTimeOffset;              //! Average offset for corrected cubic spline e1.time.
  Double_t     timeUpSlope;                //!
  Double_t     timeDownSlope;              //!
  Double_t     timeSlope;                  //!

  UShort_t     de_up;                      // 
  UShort_t     de_down;                    //
  UShort_t     time_up;                    //  Raw time for the upper PMT of the scintillator.
  UShort_t     time_down;                  //  Raw time for the lower PMT of the scintillator.
  Double_t     de;                         //
  Double_t     tup;                        //  Trigger corrected time_up.
  Double_t     tdown;                      //  Trigger corrected time_down.
  Double_t     time;                       //  Calculated time.
  
  TBranch      *b_de_up;                   //!
  TBranch      *b_de_down;                 //!
  TBranch      *b_time_up;                 //!
  TBranch      *b_time_down;               //!
  TBranch      *b_de;                      //!
  TBranch      *b_tup;                     //!
  TBranch      *b_tdown;                   //!
  TBranch      *b_time;                    //!

  TTree        *fChain;                    //!
  Int_t        fCurrent;                               //! Current Tree number in a TChain
  
 public:
  TS800Scintillator() {fRandom.SetSeed(0);}
  virtual ~TS800Scintillator() {}
  TS800Scintillator(const TS800Scintillator &);    // The copy constructor.

  void      Calculate(Long64_t entry);             // Calculate an entry.
  void      Calibrate(Long64_t entry);             // Calibrate an entry.
  void      Clear(Option_t *option="");            //
  void      Copy(TObject &eN) const;               // The copy method.
  void      Correct(TSpline3 *e1Spline);           //
  void      Correct(Double_t Mean, Double_t Sigma,void *func);//
  void      GetEntry(Int_t i);                     //
  void      InitClass(TString iname, TS800* itop); //
  void      InitTree(TTree *tree);                 //
  Bool_t    LoadSpline(Char_t *splineFile);        // Load time correcting cubic splines.

  //  Double_t e1GDistro(Double_t *x, Double_t *par);

  UShort_t* Unpack(UShort_t *p, UShort_t ID);      //
  
  ClassDef(TS800Scintillator,6)
};



#endif

Last change: Sun Dec 21 12:38:57 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.