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 UInt_t uUseCoarseCorrectedTime; // Switch between timeCorr and timeCorr with correction for coarse count cycle (relative to trigger) 00023 00024 // Strip RPCs settings 00025 UInt_t uTdcTypeStrip; // Tell which tdc type to use for this strip RPC: 0 = CAEN, 1 = VFTX, 2 = MIXED 00026 TString sStripRpcName; // Name of each strip RPC for the beam profile monitor 00027 Double_t dStripRpcPosX; // Position of each strip RPC in X direction, in cm 00028 Double_t dStripRpcPosY; // Position of each strip RPC in Y direction, in cm 00029 Double_t dStripRpcPosZ; // Position of each strip RPC in Z direction, in cm 00030 UInt_t uNbStrips; // Nb of strips for the beam profile monitor 00031 Double_t dStripWidth; // Width of strips in cm for the beam profile monitor 00032 Double_t dStripLength; // Length of strips in cm 00033 Double_t dTimeConv; // Time conversion factor in cm/ns for the beam profile monitor 00034 Double_t dStripHitMaxDistance; // Max distance between the hit position and cluster mean to be included in cluster 00035 UInt_t uRejectMultipleHits; // Enable/disable the rejection of strip hits where 1 end of the strip had multiple tdc hits 00036 UInt_t uOrientation; // Detector orientation: 0 = horizontal strip, 1 = vertical strips 00037 Int_t iBeamProfileSize; // Size of the beam profile histogram along X axis in cm 00038 Int_t iTriggerSelection; // Trigger required for histo filling. -1 means not selection. 00039 00040 UInt_t uTdcStripType[NB_STRIPS_MAX]; // List of tdc type for each strip ( 0 = CAEN, 1 = VFTX ) 00041 UInt_t uTdcStripNoisy[NB_STRIPS_MAX]; // List of "noisy flag" for each strip ( 0 = ok, 1 = noisy ) 00042 UInt_t uTdcStripDead[NB_STRIPS_MAX]; // List of "dead flag" for each strip ( 0 = ok, 1 = dead ) 00043 UInt_t uTdcStripLeftTot[NB_STRIPS_MAX]; // List of tdc index for the left side tot of each strip 00044 UInt_t uChannelStripLeftTot[NB_STRIPS_MAX]; // List of channels inside tdc for the left side tot of each strip 00045 UInt_t uTdcStripLeftTime[NB_STRIPS_MAX]; // List of tdc index for the left side time of each strip 00046 UInt_t uChannelStripLeftTime[NB_STRIPS_MAX]; // List of channels inside tdc for the left side time of each strip 00047 UInt_t uTdcStripRightTime[NB_STRIPS_MAX]; // List of tdc index for the right side time of each strip 00048 UInt_t uChannelStripRightTime[NB_STRIPS_MAX];// List of channels inside tdc for the right side time of each strip 00049 UInt_t uTdcStripRightTot[NB_STRIPS_MAX]; // List of tdc index for the right side tot of each strip 00050 UInt_t uChannelStripRightTot[NB_STRIPS_MAX]; // List of channels inside tdc for the right side tot of each strip 00051 00052 Double_t dProfOffsetList[NB_STRIPS_MAX]; // List of the time offsets for each strip in beam profile monitor in ps 00053 Double_t dRefOffsetList[NB_STRIPS_MAX]; // List of the time offsets for each strip in reference profile monitor in ps 00054 00055 Double_t dOffsetListLeft[NB_STRIPS_MAX]; // List of the time offsets for each strip in beam profile monitor in ns 00056 Double_t dOffsetListRight[NB_STRIPS_MAX]; // List of the time offsets for each strip in beam profile monitor in ns 00057 00058 UInt_t uUseChargeGravityCenter; // Enable/disable the center of gravity weighting for position calculation 00059 Double_t dToTGainListLeft[NB_STRIPS_MAX]; // List of the tot gain for each strip in beam profile monitor 00060 Double_t dTotOffsetListLeft[NB_STRIPS_MAX]; // List of the tot offsets for each strip in beam profile monitor in ps 00061 Double_t dToTGainListRight[NB_STRIPS_MAX]; // List of the tot gain for each strip in beam profile monitor 00062 Double_t dTotOffsetListRight[NB_STRIPS_MAX]; // List of the tot offsets for each strip in beam profile monitor in ps 00063 00064 UInt_t uInitialOffsetCalib; // Use profile mean instead of fit result to generate initial Reference offsets 00065 Double_t dLowerBoundFitBeamProfile; // Lower limit for the fit function on Beam Profile 00066 Double_t dUpperBoundFitBeamProfile; // Upper limit for the fit function on Beam Profile 00067 Double_t dLowerBoundFitRefProfile; // Lower limit for the fit function on Reference Profile 00068 Double_t dUpperBoundFitRefProfile; // Upper limit for the fit function on Reference Profile 00069 Double_t dInitialValueFitParBeamProfile[4]; // Initial value for fit function parameters used on the beam profile 00070 Double_t dInitialValueFitParRefProfile[4]; // Initial value for fit function parameters used on the reference profile 00071 00072 Double_t dOffsetMatching[NB_STRIPS_MAX]; // List of the time offsets for each strip in matching in ps 00073 00074 //functions 00075 TRpcParam(const char* name = 0); //Constructor 00076 00077 ~TRpcParam(); //Destructor 00078 00079 Int_t PrintOptions(); //prints out the parameters 00080 00081 private: 00082 Bool_t ReadOptions(); //reads out the data from the text file 00083 00084 Bool_t CalculateLeftRightOffset(); 00085 00086 ClassDef(TRpcParam,1) 00087 }; 00088 00089 #endif // TRPCPARAM_H