00001 #ifndef TBEAMMONITORPROC_H 00002 #define TBEAMMONITORPROC_H 00003 00004 #include "TCBMBeamtimeProc.h" 00005 00006 #include "TBeamMonitorParam.h" 00007 #include "TBeamMonitorEvent.h" 00008 #include "TMbsCrateEvent.h" 00009 #include "TTriglogEvent.h" 00010 #if defined(ROOTCONV_WITHGET4) || defined(ROOTCONV_WITHHODO) 00011 #include "TRocEvent.h" 00012 #endif 00013 #include "TEpicsEvent.h" 00014 #include "../VFTX/TVftxEvent.h" 00015 00016 #include "TH1.h" 00017 #include "TH2.h" 00018 #include "TGo4WinCond.h" 00019 #include "TGo4PolyCond.h" 00020 #include "TString.h" 00021 #include "TLatex.h" 00022 #include <vector> 00023 00024 class TBeamMonitorProc : public TCBMBeamtimeProc { 00025 00026 public: 00027 00028 TBeamMonitorProc(const char* name = 0); 00029 virtual ~TBeamMonitorProc(); 00030 00031 virtual void InitEvent(TGo4EventElement*); 00032 virtual void FinalizeEvent(); 00033 00034 protected: 00035 00036 TBeamMonitorParam * fPar; 00037 00038 TMbsCrateEvent * fCrateInputEvent; 00039 00040 TTriglogEvent * fTriglogInputEvent; 00041 00042 #if defined(ROOTCONV_WITHGET4) || defined(ROOTCONV_WITHHODO) 00043 TRocEvent * fRocInputEvent; 00044 #endif 00045 TEpicsEvent * fEpicsInputEvent; 00046 00047 TVftxEvent * fVftxInputEvent; 00048 00049 TBeamMonitorEvent * fOutputEvent; 00050 00051 // Offset to use when comparing times from CAEN and from VFTX TDCs 00052 Double_t dCaenVftxOffset; 00053 00054 // MBS time for Rate plots 00055 UInt_t uFirstMbsTimeIntegration; 00056 UInt_t uFirstMbsTimeStep; 00057 UInt_t uLastMbsTimeStep; 00058 // Vectors to hold the counts per strip 00059 // std::vector< std::vector< UInt_t > > vStepStripCounts; 00060 UInt_t vStepStripCounts[NB_STRIP_RPC_MAX][NB_STRIPS_MAX]; 00061 00062 TH1* fPmtDiff; // time difference between two PMT signals 00063 00064 // Strip RPCs 00065 TH2* fBeamProfileStripRpc[NB_STRIP_RPC_MAX]; // Attempt to get beam profile with Strip RPCs 00066 TH2* fTotLeftStripRpc[NB_STRIP_RPC_MAX]; // Attempt to get tot profile with Strip RPCs for the left side 00067 TH2* fTotRightStripRpc[NB_STRIP_RPC_MAX]; // Attempt to get tot profile with Strip RPCs for the right side 00068 TH1* fMultiplicityStripRpc[NB_STRIP_RPC_MAX]; // Attempt to get multiplicity graph with Strip RPCs 00069 TH2* fStripRateStripRpc[NB_STRIP_RPC_MAX]; // Attempt to get the rate per strip graph with Strip RPCs 00070 TH1* fCounterRateStripRpc[NB_STRIP_RPC_MAX]; // Attempt to get the rate per counter vs time graph with Strip RPCs 00071 00072 TH2* fDualMultiplicityStripRpc[ 00073 (NB_STRIP_RPC_MAX-1)*(NB_STRIP_RPC_MAX-2)/2]; // Attempt to get multiplicity graph with Strip RPCs 00074 00075 // Pad RPCs 00076 TH2* fBeamProfilePadRpc[NB_PAD_RPC_MAX]; // Attempt to get beam profile with Pad RPCs 00077 00078 // TDC mix test 00079 TH1* fTdcOffsetTestSameCV; // Test of the offset between CAEN and VFTX, ref in same tdcs 00080 TH1* fTdcOffsetTestDiffCV; // Test of the offset between CAEN and VFTX, ref in diff tdcs 00081 TH1* fTdcOffsetTestDiffC; // Test of the offset between CAEN and VFTX, ref in diff caen 00082 TH1* fTdcOffsetTestDiffV; // Test of the offset between CAEN and VFTX, ref in diff vftx 00083 TH1* fTdcResolutionTestSameC; // Test of the resolution between CAEN and CAEN, same board 00084 TH1* fTdcResolutionTestDiffC; // Test of the resolution between CAEN and CAEN, diff board 00085 TH1* fTdcResolutionTestSameV; // Test of the resolution between CAEN and CAEN, same board 00086 TH1* fTdcResolutionTestDiffV; // Test of the resolution between CAEN and CAEN, diff board 00087 00088 /* ScalOrMu */ 00089 TH1* fScalOrMu[SCALORMU_NB_SCAL]; 00090 UInt_t uLastScalerScalOrMu[SCALORMU_NB_SCAL]; 00091 UInt_t uLastMbsMilliTime[SCALORMU_NB_SCAL]; 00092 UInt_t uLastMbsTime[SCALORMU_NB_SCAL]; 00093 UInt_t uInitialMbsTime; 00094 UInt_t uInitialMilliTime; 00095 00096 /* Triglog */ 00097 Int_t iScaler2BinNb; 00098 Double_t dScaler2BinMax; 00099 TH1* fScaler2[N_SCALERS_CH]; 00100 UInt_t uLastScaler2[N_SCALERS_CH]; 00101 UInt_t uLastScaler1_16[N_SCALERS_CH]; 00102 UInt_t uInitialScaler1_16; 00103 // UInt_t uLastMbsMilliTimeScal2[N_SCALERS_CH]; 00104 // UInt_t uLastMbsTimeScal2[N_SCALERS_CH]; 00105 protected: 00106 00107 ClassDef(TBeamMonitorProc,1) 00108 }; 00109 00110 #endif //TUNPACKPROCESSOR_H 00111