00001 #ifndef __TMARH1LARCALPARAMETERS_H 00002 #define __TMARH1LARCALPARAMETERS_H 00003 00004 #include "H1Arrays/H1ArrayF.h" 00005 #include <TRandom.h> 00006 #include <TString.h> 00007 00008 using namespace std; 00009 class TMarH1LarCalParameters : public TObject 00010 { 00011 00012 private: 00013 00014 TString fDataSet; // Name of data set to be read in from H1SteerManager 00015 Int_t fRunPeriod; // Period of data set to be read in from H1SteerManager 00016 TString fRunPeriodName; // Name of period of data set to be read in from H1SteerManager 00017 00018 H1ArrayF* fOctantConstants; // Wheel/octant dependent calibration constants 00019 H1ArrayF* fZimpactConstants; // Zimpact dependent calibration constants 00020 H1ArrayF* fForwardWheelConstants; // Zimpact dependent calibration constants for forward Wheel 00021 H1ArrayF* fEnergyResolutionConstantsData; // Energy resolution constants for data 00022 H1ArrayF* fEnergyResolutionConstantsMC; // Energy resolution constants for MC 00023 00024 Double_t fOctantCalibrationFactor; // wheel/octant calibration factor to be applied to data/Monte Carlo 00025 Double_t fZimpactCalibrationFactor; // zimpact calibration factor to be applied to data/Monte Carlo 00026 Double_t fForwardWheelCalibrationFactor; // (forward) wheel calibration factor to be applied to data/Monte Carlo 00027 Double_t fResolutionSmearingFactor; // smearing factor to be applied to Monte Carlo 00028 00029 Bool_t bReadOctantConstants; // Boolean flag to control reading new constants from H1SteerManager 00030 Bool_t bReadZimpactConstants; // Boolean flag to control reading new constants from H1SteerManager 00031 Bool_t bReadForwardWheelConstants; // Boolean flag to control reading new constants from H1SteerManager 00032 Bool_t bReadEnergyResolutionConstants; // Boolean flag to control reading new constants from H1SteerManager 00033 00034 TRandom* fRandom; // Pointer to TRandom for gaussian smearing 00035 00036 00037 /* enum fLarWheelBoundaries{ */ 00038 /* // IDs for indexing the zBoundaries */ 00039 /* eSpaCal_BBE,eCB1,eCB2a,eCB2b,eCB3a,eCB3b,eFB,eIF_OF */ 00040 /* }; */ 00041 00042 00043 public: 00044 00045 TMarH1LarCalParameters(TString DataSet, Int_t RunPeriod=5); 00046 ~TMarH1LarCalParameters(); 00047 00048 // File reader for coefficient files 00049 void SetCalibrationParametersFile(TString filename); 00050 void Reset(); 00051 00052 //Getters 00053 Double_t GetOctantCalibrationFactor(Float_t &phi, Float_t &zimpact); 00054 Double_t GetZimpactCalibrationFactor(Float_t &zimpact); 00055 Double_t GetForwardWheelCalibrationFactor(Float_t &zimpact); 00056 Double_t GetResolutionSmearingFactor(Float_t &zImpact); 00057 00058 private: 00059 00060 //Setters 00061 Int_t SetLarOctant(Float_t &phi); 00062 Int_t SetLarWheel(Float_t &zimpact); 00063 Int_t SetLarZBin(Float_t &zimpact, Int_t binsize); 00064 Int_t SetForwardWheelZBin(Float_t &zimpact); 00065 00066 void SetOctantConstants(); // Wheel/octant dependent calibration constants 00067 void SetZimpactConstants(); // Zimpact dependent calibration constants 00068 void SetForwardWheelConstants(); // Zimpact dependent calibration constants for forward wheels 00069 void SetEnergyResolutionConstants(); // Energy resolution constants 00070 00071 void SetOctantCalibrationFactors(Float_t &phi, Float_t &zimpact); // Wheel/octant dependent calibration factors 00072 void SetZimpactCalibrationFactors(Float_t &zimpact); // Zimpact dependent calibration factors 00073 void SetForwardWheelCalibrationFactors(Float_t &zimpact); // Zimpact dependent calibration constants for forward wheels 00074 void SetResolutionSmearingFactors(Float_t &zimpact); // Zimpact based smearing factors 00075 00076 00077 public: 00078 00079 ClassDef(TMarH1LarCalParameters, 1) // Class for calculation of Electron Calibration Factors 00080 00081 }; 00082 00083 #endif