00001 #ifndef CSCRecHitD_CSCXonStrip_MatchGatti_h
00002 #define CSCRecHitD_CSCXonStrip_MatchGatti_h
00003
00004
00014 #include <RecoLocalMuon/CSCRecHitD/src/CSCStripHit.h>
00015 #include <RecoLocalMuon/CSCRecHitD/src/CSCRecoConditions.h>
00016 #include <FWCore/ParameterSet/interface/ParameterSet.h>
00017
00018 #include <map>
00019 #include <vector>
00020
00021 class CSCLayer;
00022 class CSCChamberSpecs;
00023 class CSCFindPeakTime;
00024
00025 class CSCXonStrip_MatchGatti
00026 {
00027 public:
00028
00029 explicit CSCXonStrip_MatchGatti(const edm::ParameterSet& ps);
00030
00031 ~CSCXonStrip_MatchGatti();
00032
00033
00034
00035
00037 void findXOnStrip( const CSCDetId& id, const CSCLayer* layer, const CSCStripHit& stripHit,
00038 int centralStrip, float& xWithinChamber, float& stripWidth,
00039 float& tpeak, float& xWithinStrip, float& sigma, int & quality_flag);
00040
00042 void initChamberSpecs();
00043
00045 void setupMatrix();
00046
00048 void setConditions( const CSCRecoConditions* reco ) {
00049 recoConditions_ = reco;
00050 }
00051
00052 private:
00053
00054
00055 double h;
00056 float stripWidth;
00057 double r;
00058
00059 double k_1, k_2, k_3, sqrt_k_3, norm;
00060
00061
00062 float chargeSignal[3][3];
00063
00065 float xt_l[3][3], xt_r[3][3];
00066 float xt_lr0[3], xt_lr1[3], xt_lr2[3];
00067
00069 float v11[3], v12[3], v13[3], v22[3], v23[3], v33[3];
00070
00072 float a11[3], a12[3], a13[3], a22[3], a23[3], a33[3];
00073
00074
00075
00076 const CSCChamberSpecs* specs_;
00077
00078
00079
00080 double q_sum, q_sumL, q_sumC, q_sumR;
00081
00082
00083 bool useCalib;
00084
00085 bool use3TimeBins;
00086 float xtalksOffset;
00087
00091 const CSCRecoConditions* recoConditions_;
00092
00093
00094 CSCFindPeakTime* peakTimeFinder_;
00095
00096
00097
00098
00099 double calculateXonStripError(float stripWidth, bool ME1_1);
00100 double calculateXonStripPosition(float stripWidth, bool ME1_1);
00101 double xfError_Noise(double noise);
00102 double xfError_XTasym(double XTasym);
00103
00104 double estimated2Gatti(double Xestimated, float StripWidth, bool ME1_1);
00105 double estimated2GattiCorrection(double Xestimated, float StripWidth, bool ME1_1);
00106
00107 void getCorrectionValues(std::string Estimator);
00108 void hardcodedCorrectionInitialization();
00109
00110 static const int n_SW_noME1_1 = 11;
00111 static const int n_SW_ME1_1 = 6;
00112 static const int n_val = 501;
00113
00114 float x_correction_noME1_1[n_SW_noME1_1][n_val];
00115 float x_correction_ME1_1[n_SW_ME1_1][n_val];
00116 float x_centralVal[n_val];
00117
00118 float noise_level;
00119 float xt_asymmetry;
00120 float const_syst;
00121
00122 float noise_level_ME1a;
00123 float xt_asymmetry_ME1a;
00124 float const_syst_ME1a;
00125 float noise_level_ME1b;
00126 float xt_asymmetry_ME1b;
00127 float const_syst_ME1b;
00128 float noise_level_ME12;
00129 float xt_asymmetry_ME12;
00130 float const_syst_ME12;
00131 float noise_level_ME13;
00132 float xt_asymmetry_ME13;
00133 float const_syst_ME13;
00134 float noise_level_ME21;
00135 float xt_asymmetry_ME21;
00136 float const_syst_ME21;
00137 float noise_level_ME22;
00138 float xt_asymmetry_ME22;
00139 float const_syst_ME22;
00140 float noise_level_ME31;
00141 float xt_asymmetry_ME31;
00142 float const_syst_ME31;
00143 float noise_level_ME32;
00144 float xt_asymmetry_ME32;
00145 float const_syst_ME32;
00146 float noise_level_ME41;
00147 float xt_asymmetry_ME41;
00148 float const_syst_ME41;
00149 };
00150
00151 #endif