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 Double_t dStripHitMaxDistance; // Max distance between the hit position and cluster mean to be included in cluster 00034 UInt_t uRejectMultipleHits; // Enable/disable the rejection of strip hits where 1 end of the strip had multiple tdc hits 00035 UInt_t uOrientation; // Detector orientation: 0 = horizontal strip, 1 = vertical strips 00036 Int_t iBeamProfileSize; // Size of the beam profile histogram along X axis in cm 00037 Int_t iTriggerSelection; // Trigger required for histo filling. -1 means not selection. 00038 00039 UInt_t uTdcStripType[NB_STRIPS_MAX]; // List of tdc type for each strip ( 0 = CAEN, 1 = VFTX ) 00040 UInt_t uTdcStripNoisy[NB_STRIPS_MAX]; // List of "noisy flag" for each strip ( 0 = ok, 1 = noisy ) 00041 UInt_t uTdcStripDead[NB_STRIPS_MAX]; // List of "dead flag" for each strip ( 0 = ok, 1 = dead ) 00042 UInt_t uTdcStripLeftTot[NB_STRIPS_MAX]; // List of tdc index for the left side tot of each strip 00043 UInt_t uChannelStripLeftTot[NB_STRIPS_MAX]; // List of channels inside tdc for the left side tot of each strip 00044 UInt_t uTdcStripLeftTime[NB_STRIPS_MAX]; // List of tdc index for the left side time of each strip 00045 UInt_t uChannelStripLeftTime[NB_STRIPS_MAX]; // List of channels inside tdc for the left side time of each strip 00046 UInt_t uTdcStripRightTime[NB_STRIPS_MAX]; // List of tdc index for the right side time of each strip 00047 UInt_t uChannelStripRightTime[NB_STRIPS_MAX];// List of channels inside tdc for the right side time of each strip 00048 UInt_t uTdcStripRightTot[NB_STRIPS_MAX]; // List of tdc index for the right side tot of each strip 00049 UInt_t uChannelStripRightTot[NB_STRIPS_MAX]; // List of channels inside tdc for the right side tot of each strip 00050 00051 Double_t dProfOffsetList[NB_STRIPS_MAX]; // List of the time offsets for each strip in beam profile monitor in ps 00052 Double_t dRefOffsetList[NB_STRIPS_MAX]; // List of the time offsets for each strip in reference profile monitor in ps 00053 Double_t dReference1SignalOffset; // Offset for the 1st reference signal itself => Mean time diff to the full RPC 00054 Double_t dReference2SignalOffset; // Offset for the 1st reference signal itself => Mean time diff to the full RPC 00055 00056 Double_t dOffsetListLeft[NB_STRIPS_MAX]; // List of the time offsets for each strip in beam profile monitor in ns 00057 Double_t dOffsetListRight[NB_STRIPS_MAX]; // List of the time offsets for each strip in beam profile monitor in ns 00058 00059 UInt_t uUseChargeGravityCenter; // Enable/disable the center of gravity weighting for position calculation 00060 Double_t dMinimalTimeBetweenHits; // VFTX: If >0, merge 1st and 2nd hit in same end of a strip if closer than this value (Change ToT) 00061 Double_t dToTGainListLeft[NB_STRIPS_MAX]; // List of the tot gain for each strip in beam profile monitor 00062 Double_t dTotOffsetListLeft[NB_STRIPS_MAX]; // List of the tot offsets for each strip in beam profile monitor in ps 00063 Double_t dToTGainListRight[NB_STRIPS_MAX]; // List of the tot gain for each strip in beam profile monitor 00064 Double_t dTotOffsetListRight[NB_STRIPS_MAX]; // List of the tot offsets for each strip in beam profile monitor in ps 00065 00066 UInt_t uInitialOffsetCalib; // Use profile mean instead of fit result to generate initial Reference offsets 00067 Double_t dLowerBoundFitBeamProfile; // Lower limit for the fit function on Beam Profile 00068 Double_t dUpperBoundFitBeamProfile; // Upper limit for the fit function on Beam Profile 00069 Double_t dLowerBoundFitRefProfile; // Lower limit for the fit function on Reference Profile 00070 Double_t dUpperBoundFitRefProfile; // Upper limit for the fit function on Reference Profile 00071 Double_t dInitialValueFitParBeamProfile[4]; // Initial value for fit function parameters used on the beam profile 00072 Double_t dInitialValueFitParRefProfile[4]; // Initial value for fit function parameters used on the reference profile 00073 00074 Double_t dOffsetMatching[NB_STRIPS_MAX]; // List of the time offsets for each strip in matching in ps 00075 00076 //functions 00077 TRpcParam(const char* name = 0); //Constructor 00078 00079 ~TRpcParam(); //Destructor 00080 00081 Int_t PrintOptions(); //prints out the parameters 00082 00083 private: 00084 Bool_t ReadOptions(); //reads out the data from the text file 00085 00086 Bool_t CalculateLeftRightOffset(); 00087 00088 ClassDef(TRpcParam,1) 00089 }; 00090 00091 #endif // TRPCPARAM_H