TOF/TFndHTof.h

00001 // @(#)fROOT/TOF:$Name:  $:$Id: TFndHTof.h,v 1.21 2007/09/05 11:58:11 Diego_Faso Exp $
00002 // Revision Author: Diego Faso <mailto:faso@to.infn.it>, 2005/06/24
00003 // Original Author: Piergiorgio Cerello <mailto:cerello@to.infn.it>
00004 
00005 #ifndef FROOT_TFndHTof
00006 #define FROOT_TFndHTof
00007 
00009 //                                                //
00010 //               TFndHTof                         //
00011 //                                                //
00012 //  Class for the TOF HDT description             //
00013 //                                                //
00014 //                                                //
00016 
00017 #include "TFndDB.h"
00018 #include "TFndHit.h"
00019 
00020 class TFndHTof : public TFndHit {
00021   
00022  protected:
00023 
00024   Int_t fLayer;          // Layer Number: 1: TOFINO; 2: TOFONE
00025   Int_t fSlab;           // Slab Number [1-12](TOFINO) - [1-72](TOFONE)
00026   Int_t fAdc[2];         // ADC Values
00027   Int_t fLowTdc[2];      // Low thresholds CFD TDC Values
00028   Int_t fLowMeanTimer;      // Low threshold Mean Timer
00029   Int_t fHighTdc[2];      // High thresholds CFD TDC Values
00030   Int_t fHighMeanTimer;      // High threshold Mean Timer
00031 
00032   // ---
00033   Float_t fCalibAdc[2];    // ADC calibrated Values
00034   Float_t fCalibLowTdc[2];    // Low threshold TDC calibrated Values (ns)
00035   Float_t fCalibLowMeanTimer; // Low threshold Mean Timer calibrated Values (ns)
00036   Float_t fCalibHighTdc[2];    // High threshold TDC calibrated Values (ns)
00037   Float_t fCalibHighMeanTimer; // High threshold Mean Timer calibrated Values (ns)
00038   Float_t fEnergyDep;  // Energy deposited:sqrt(adcE*adcP) corrected for light attenuation(adc channels)
00039 
00040   Short_t fBothAdc; // see TFndHit::E_FndHit_BothChan_Flag
00041   Short_t fBothLowTdc; // see TFndHit::E_FndHit_BothChan_Flag
00042   Short_t fBothHighTdc; // see TFndHit::E_FndHit_BothChan_Flag
00043 
00044   Float_t fOverChargeVal; // difference from cut-charge ( >0 if over charge )
00045 
00046  public:
00047 
00048   TFndHTof(const Int_t &channel = -1); // slab: (TOFINO: 1-12; TOFONE: 101-172)
00049   ~TFndHTof();
00050 
00051  private:
00052   void Init(); // initialize all data-members to defaults
00053 
00054  public:
00055   void EvalHit();
00056 
00057   void GetLayer_Slab(Int_t &layer,Int_t &slab) { layer = fLayer; slab = fSlab; }  
00058   Int_t GetLayer() { return fLayer; }
00059   Int_t GetSlab() { return fSlab; } // Slab [1,2,3,...]
00060   
00061   Short_t GetBothAdc() { return fBothAdc; }
00062   Short_t GetBothTdc() { return fBothLowTdc; }
00063   Short_t GetBothLowTdc() { return fBothLowTdc; }
00064   Short_t GetBothHighTdc() { return fBothHighTdc; }
00065   Float_t GetOverChargeValue() { return fOverChargeVal; }
00066 
00067   Int_t GetAdcE() const { return fAdc[E_FIN_SIDE_E]; }
00068   Int_t GetAdcP() const { return fAdc[E_FIN_SIDE_P]; }
00069   
00070   Int_t GetTdcE() const { return GetLowTdcE(); } // used by TOFONE
00071   Int_t GetTdcP() const { return GetLowTdcP(); } // used by TOFONE
00072   Int_t GetMeanTimer() const { return GetLowMeanTimer(); } // used by TOFONE
00073   
00074   Int_t GetLowTdcE() const { return fLowTdc[E_FIN_SIDE_E]; }
00075   Int_t GetLowTdcP() const { return fLowTdc[E_FIN_SIDE_P]; }
00076   Int_t GetLowMeanTimer() const { return fLowMeanTimer;   }
00077   Int_t GetHighTdcE() const { return fHighTdc[E_FIN_SIDE_E]; }
00078   Int_t GetHighTdcP() const { return fHighTdc[E_FIN_SIDE_P]; }
00079   Int_t GetHighMeanTimer() const { return fHighMeanTimer;   }
00080   // ---
00081   Float_t GetCalibAdcE() const { return fCalibAdc[E_FIN_SIDE_E]; }
00082   Float_t GetCalibAdcP() const { return fCalibAdc[E_FIN_SIDE_P]; }
00083   Float_t GetCalibLowTdcE() const { return fCalibLowTdc[E_FIN_SIDE_E]; }
00084   Float_t GetCalibLowTdcP() const { return fCalibLowTdc[E_FIN_SIDE_P]; }
00085   Float_t GetCalibLowMeanTimer() const { return fCalibLowMeanTimer;   }
00086   Float_t GetCalibHighTdcE() const { return fCalibHighTdc[E_FIN_SIDE_E]; }
00087   Float_t GetCalibHighTdcP() const { return fCalibHighTdc[E_FIN_SIDE_P]; }
00088   Float_t GetCalibHighMeanTimer() const { return fCalibHighMeanTimer;   }
00089   Float_t GetEnergyDep() const { return fEnergyDep; }
00090 
00091   // --- --- --- --- --- --- ---- ---
00092   // *** Set Methods ***
00093   //  void SetSlab(Int_t sl_num){ fSlab = sl_num; }  // has been replaced by the SetChannel method
00094   void SetAdc(Int_t ch,E_Fnd_Side side) { fAdc[side] = ch; }
00095   void SetAdcE(Int_t adc)  { fAdc[E_FIN_SIDE_E] = adc; } // to be removed
00096   void SetAdcP(Int_t adc)  { fAdc[E_FIN_SIDE_P] = adc; } // to be removed
00097 
00098   void SetLowTdc(Int_t ch,E_Fnd_Side side) { fLowTdc[side] = ch; }
00099   void SetLowTdcE(Int_t tdc)  { fLowTdc[E_FIN_SIDE_E] = tdc; }
00100   void SetLowTdcP(Int_t tdc)  { fLowTdc[E_FIN_SIDE_P] = tdc; }
00101   void SetLowMeanTimer(Int_t time)  { fLowMeanTimer = time; }   // Set Mean Timer
00102   void SetHighTdc(Int_t ch,E_Fnd_Side side) { fHighTdc[side] = ch; }
00103   void SetHighTdcE(Int_t tdc)  { fHighTdc[E_FIN_SIDE_E] = tdc; }
00104   void SetHighTdcP(Int_t tdc)  { fHighTdc[E_FIN_SIDE_P] = tdc; }
00105   void SetHighMeanTimer(Int_t time)  { fHighMeanTimer = time; }   // Set Mean Timer
00106 
00107   // ---
00108   void PrintHit(Int_t depth=1);
00109 
00110   ClassDef(TFndHTof,2)      // The TOF hit
00111     // streaming version 2: Aug 29, 2007
00112   };
00113 
00114 #endif // FROOT_TFndHTof

Generated on Tue Oct 16 15:40:48 2007 by  doxygen 1.5.2