00001 #ifndef TRPCPARAM_H 00002 #define TRPCPARAM_H 00003 00004 #include "TGo4Parameter.h" 00005 00006 #define NB_STRIPS_MAX 150 // Maximal Nb of strips which can be defined 00007 00008 class TRpcParam : public TGo4Parameter { 00009 public: 00010 //parameters 00011 UInt_t uDebug; // Control the debug output 00012 Int_t iOffsetTdcCaen; // Tdc index in CAEN system used for offset calculation, Offset = 0 if -1 00013 Int_t iOffsetTdcVFTX; // Tdc index in VFTX system used for offset calculation, Offset = 0 if -1 00014 Int_t iOffsetChannelCaen; // Channel index in CAEN system used for offset calculation, Offset = 0 if -1 00015 Int_t iOffsetChannelVFTX; // Channel index in VFTX system used for offset calculation, Offset = 0 if -1 00016 Int_t iDiamondTdcCaen; // Tdc index in CAEN system used for Diamond 00017 Int_t iDiamondChannelCaen; // Channel index in CAEN system used for Diamond 00018 Int_t iDiamondTdcVFTX; // Tdc index in VFTX system used for Diamond 00019 Int_t iDiamondChannelVFTX; // Channel index in VFTX system used for Diamond 00020 Int_t iRateIntegrationDuration; // Time interval between rate histograms reset 00021 Int_t iRateIntegrationStep; // Time interval between rate histograms update, has to be < iRateIntegrationDuration 00022 00023 // Strip RPCs settings 00024 UInt_t uTdcTypeStrip; // Tell which tdc type to use for this strip RPC: 0 = CAEN, 1 = VFTX, 2 = MIXED 00025 TString sStripRpcName; // Name of each strip RPC for the beam profile monitor 00026 Double_t dStripRpcPosX; // Position of each strip RPC in X direction, in cm 00027 Double_t dStripRpcPosY; // Position of each strip RPC in Y direction, in cm 00028 Double_t dStripRpcPosZ; // Position of each strip RPC in Z direction, in cm 00029 UInt_t uNbStrips; // Nb of strips for the beam profile monitor 00030 Double_t dStripWidth; // Width of strips in cm for the beam profile monitor 00031 Double_t dStripLength; // Length of strips in cm 00032 Double_t dTimeConv; // Time conversion factor in cm/ns for the beam profile monitor 00033 UInt_t uOrientation; // Detector orientation: 0 = horizontal strip, 1 = vertical strips 00034 Int_t iBeamProfileSize; // Size of the beam profile histogram along X axis in cm 00035 Int_t iTriggerSelection; // Trigger required for histo filling. -1 means not selection. 00036 00037 UInt_t uTdcStripType[NB_STRIPS_MAX]; // List of tdc type for each strip ( 0 = CAEN, 1 = VFTX ) 00038 UInt_t uTdcStripNoisy[NB_STRIPS_MAX]; // List of "noisy flag" for each strip ( 0 = ok, 1 = noisy ) 00039 UInt_t uTdcStripDead[NB_STRIPS_MAX]; // List of "dead flag" for each strip ( 0 = ok, 1 = dead ) 00040 UInt_t uTdcStripLeftTot[NB_STRIPS_MAX]; // List of tdc index for the left side tot of each strip 00041 UInt_t uChannelStripLeftTot[NB_STRIPS_MAX]; // List of channels inside tdc for the left side tot of each strip 00042 UInt_t uTdcStripLeftTime[NB_STRIPS_MAX]; // List of tdc index for the left side time of each strip 00043 UInt_t uChannelStripLeftTime[NB_STRIPS_MAX]; // List of channels inside tdc for the left side time of each strip 00044 UInt_t uTdcStripRightTime[NB_STRIPS_MAX]; // List of tdc index for the right side time of each strip 00045 UInt_t uChannelStripRightTime[NB_STRIPS_MAX];// List of channels inside tdc for the right side time of each strip 00046 UInt_t uTdcStripRightTot[NB_STRIPS_MAX]; // List of tdc index for the right side tot of each strip 00047 UInt_t uChannelStripRightTot[NB_STRIPS_MAX]; // List of channels inside tdc for the right side tot of each strip 00048 00049 Double_t dProfOffsetList[NB_STRIPS_MAX]; // List of the time offsets for each strip in beam profile monitor in ps 00050 Double_t dRefOffsetList[NB_STRIPS_MAX]; // List of the time offsets for each strip in reference profile monitor in ps 00051 00052 Double_t dOffsetListLeft[NB_STRIPS_MAX]; // List of the time offsets for each strip in beam profile monitor in ns 00053 Double_t dOffsetListRight[NB_STRIPS_MAX]; // List of the time offsets for each strip in beam profile monitor in ns 00054 00055 Double_t dToTGainListLeft[NB_STRIPS_MAX]; // List of the tot gain for each strip in beam profile monitor 00056 Double_t dTotOffsetListLeft[NB_STRIPS_MAX]; // List of the tot offsets for each strip in beam profile monitor in ps 00057 Double_t dToTGainListRight[NB_STRIPS_MAX]; // List of the tot gain for each strip in beam profile monitor 00058 Double_t dTotOffsetListRight[NB_STRIPS_MAX]; // List of the tot offsets for each strip in beam profile monitor in ps 00059 00060 UInt_t uInitialOffsetCalib; // Use profile mean instead of fit result to generate initial Reference offsets 00061 Double_t dLowerBoundFitBeamProfile; // Lower limit for the fit function on Beam Profile 00062 Double_t dUpperBoundFitBeamProfile; // Upper limit for the fit function on Beam Profile 00063 Double_t dLowerBoundFitRefProfile; // Lower limit for the fit function on Reference Profile 00064 Double_t dUpperBoundFitRefProfile; // Upper limit for the fit function on Reference Profile 00065 Double_t dInitialValueFitParBeamProfile[4]; // Initial value for fit function parameters used on the beam profile 00066 Double_t dInitialValueFitParRefProfile[4]; // Initial value for fit function parameters used on the reference profile 00067 00068 Double_t dOffsetMatching[NB_STRIPS_MAX]; // List of the time offsets for each strip in matching in ps 00069 00070 //functions 00071 TRpcParam(const char* name = 0); //Constructor 00072 00073 ~TRpcParam(); //Destructor 00074 00075 Int_t PrintOptions(); //prints out the parameters 00076 00077 private: 00078 Bool_t ReadOptions(); //reads out the data from the text file 00079 00080 Bool_t CalculateLeftRightOffset(); 00081 00082 ClassDef(TRpcParam,1) 00083 }; 00084 00085 #endif // TRPCPARAM_H