//////////////////////////////////////////////////////////////////////////
//
// THaCoincTimeE06010
//
// specalized class for E06010 bigbite coincident time calculation
//
// Electron Arm is Bigbite spectrometer with electron package
// Hadron Arm is LHRS spectrometer with s2m as timing detector
//
// Units: m & ns
//
//////////////////////////////////////////////////////////////////////////
//    
// Author: Jin Huang <mailto:jinhuang@jlab.org>    Jul 2009
//	Modifications:
//
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_THaCoincTimeE06010
#define ROOT_THaCoincTimeE06010

#include "THaBigBite.h"
#include "THaHRS.h"

#include "THaScintillator.h"
#include "THaScintPlaneDet.h"

#include "THaPhysicsModule.h"


//------------------------------------------------------//
//
//	Debug Definitions
//	place this section below any other head files
//
//------------------------------------------------------//
#ifdef DEBUG_LEVEL
#   undef DEBUG_LEVEL
#endif

//	DEBUG_LEVEL;	
//	=0	or not define: no debug, full speed 
//	>=1	enable debug extra warning (suggested setting)
//	>=2	above + enable debug assert
//	>=3	above + enable debug extra info
//	>=4	above + massive info (in a for or while)
//  >=5 Decode dump  
#define DEBUG_LEVEL   2

#include    "DebugDef.h"
//------------------------------------------------------//

class TCoincInfo: public TObject
{
    public:
        TCoincInfo(Double_t BBRFTime,Double_t LRFTime,Double_t CoincTime)
    :fBBRFTime(BBRFTime),fLRFTime(LRFTime),fCoincTime(CoincTime){};
        ~TCoincInfo(){};

        Double_t GetBBRFTime() const{return fBBRFTime;}
        Double_t GetLRFTime() const{return fLRFTime;}
        Double_t GetCoincTime() const{return fCoincTime;}

    protected:
        Double_t fBBRFTime,fLRFTime;
        Double_t fCoincTime;

        ClassDef(TCoincInfo,0); //just use to store coincident informations
};

class THaCoincTimeE06010 : public THaPhysicsModule {


    public:
        virtual ~THaCoincTimeE06010();
        THaCoincTimeE06010( const char* name, const char* description,
                            THaBigBite *BigBite, THaHRS *HRS);//constructor
    	
        virtual EStatus   Init( const TDatime& run_time );

        virtual void      ClearEvent();
        virtual Int_t     Process( const THaEvData& );

        const char* GetDBFileName() const
        {
		// All coinc module reads db_CT.dat Database.
            return "CT";
        }


    public:
        Double_t    fHadronMass;    // masses to use for coinc. time
        Double_t    fTOff;          // timing offset
        Double_t    fBaseTOff;      // base timing offset
        Double_t    fBBTrx;         // timing correction coefficient for BB.tr.x
        
        Double_t    fCoinTDCRes;    // TDC Resolution for DL.t3
        UInt_t  fCoinTDCRollOver;
        UInt_t  fCoinTDCROC ;
        UInt_t  fCoinTDCSlot ;
        UInt_t  fCoinTDCChan;
        UInt_t  fCoinTDCRefChan;
        Double_t  fCoinTriggerCenter;
        
        static const Double_t    fLTimeConvertion;    // Convert from second to ns
        static const Double_t    c;    // speed of light
        static const Double_t    fMissingRefWarningRatio;

        UInt_t		fNTrBB, fNTrL;       // number of tracks in spectrometers
  	
        UInt_t		GetNCoinc() const { return fCoincInfo->GetLast()+1; } // return number of coinc combinations

    protected:
        THaBigBite *fBigBite;
        THaHRS *fHRS;

        THaScintillator     *ls2;
        THaScintPlaneDet    *bbs;

        Double_t fCoinTriggerTime;

    protected:
        virtual Int_t ReadDatabase( const TDatime& date );
        virtual Int_t DefineVariables( EMode mode = kDefine );

        TClonesArray* fCoincInfo;
        
        virtual void CaclCoin(UInt_t ltr, UInt_t bbtr);
	
	
    private:
        ClassDef(THaCoincTimeE06010,0); //specalized class for E06010 bigbite coincident time calculation
};


#endif




Last update: Tue Jul 7 19:26:16 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.