File indexing completed on 2023-10-25 10:00:15
0001 #ifndef CSCRecHitD_CSCXonStrip_MatchGatti_h
0002 #define CSCRecHitD_CSCXonStrip_MatchGatti_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #include <RecoLocalMuon/CSCRecHitD/src/CSCStripHit.h>
0015 #include <RecoLocalMuon/CSCRecHitD/src/CSCRecoConditions.h>
0016 #include <FWCore/ParameterSet/interface/ParameterSet.h>
0017
0018 #include <map>
0019 #include <vector>
0020
0021 class CSCLayer;
0022 class CSCChamberSpecs;
0023
0024 class CSCXonStrip_MatchGatti {
0025 public:
0026 explicit CSCXonStrip_MatchGatti(const edm::ParameterSet& ps);
0027
0028 ~CSCXonStrip_MatchGatti();
0029
0030
0031
0032
0033 void findXOnStrip(const CSCDetId& id,
0034 const CSCLayer* layer,
0035 const CSCStripHit& stripHit,
0036 int centralStrip,
0037 float& xWithinChamber,
0038 float& stripWidth,
0039 const float& tpeak,
0040 float& xWithinStrip,
0041 float& sigma,
0042 int& quality_flag);
0043
0044
0045 void initChamberSpecs();
0046
0047
0048 void setupMatrix();
0049
0050
0051 void setConditions(const CSCRecoConditions* reco) { recoConditions_ = reco; }
0052
0053 private:
0054
0055 CSCXonStrip_MatchGatti(const CSCXonStrip_MatchGatti&);
0056 CSCXonStrip_MatchGatti& operator=(const CSCXonStrip_MatchGatti&);
0057
0058 double h;
0059 float stripWidth;
0060 double r;
0061
0062 double k_1, k_2, k_3, sqrt_k_3, norm;
0063
0064
0065 float chargeSignal[3][3];
0066
0067
0068 float xt_l[3][3], xt_r[3][3];
0069 float xt_lr0[3], xt_lr1[3], xt_lr2[3];
0070
0071
0072 float v11[3], v12[3], v13[3], v22[3], v23[3], v33[3];
0073
0074
0075 float a11[3], a12[3], a13[3], a22[3], a23[3], a33[3];
0076
0077
0078 const CSCChamberSpecs* specs_;
0079
0080
0081
0082 double q_sum, q_sumL, q_sumC, q_sumR;
0083
0084
0085 bool useCalib;
0086 bool use3TimeBins;
0087 float xtalksOffset;
0088
0089
0090 const CSCRecoConditions* recoConditions_;
0091
0092
0093
0094
0095 double calculateXonStripError(float stripWidth, bool ME1_1);
0096 double calculateXonStripPosition(float stripWidth, bool ME1_1);
0097 double xfError_Noise(double noise);
0098 double xfError_XTasym(double XTasym);
0099
0100 double estimated2Gatti(double Xestimated, float StripWidth, bool ME1_1);
0101 double estimated2GattiCorrection(double Xestimated, float StripWidth, bool ME1_1);
0102
0103 void getCorrectionValues(std::string Estimator);
0104 void hardcodedCorrectionInitialization();
0105
0106 static const int n_SW_noME1_1 = 11;
0107 static const int n_SW_ME1_1 = 6;
0108 static const int n_val = 501;
0109
0110 float x_correction_noME1_1[n_SW_noME1_1][n_val];
0111 float x_correction_ME1_1[n_SW_ME1_1][n_val];
0112 float x_centralVal[n_val];
0113
0114 float noise_level;
0115 float xt_asymmetry;
0116 float const_syst;
0117
0118 float noise_level_ME1a;
0119 float xt_asymmetry_ME1a;
0120 float const_syst_ME1a;
0121 float noise_level_ME1b;
0122 float xt_asymmetry_ME1b;
0123 float const_syst_ME1b;
0124 float noise_level_ME12;
0125 float xt_asymmetry_ME12;
0126 float const_syst_ME12;
0127 float noise_level_ME13;
0128 float xt_asymmetry_ME13;
0129 float const_syst_ME13;
0130 float noise_level_ME21;
0131 float xt_asymmetry_ME21;
0132 float const_syst_ME21;
0133 float noise_level_ME22;
0134 float xt_asymmetry_ME22;
0135 float const_syst_ME22;
0136 float noise_level_ME31;
0137 float xt_asymmetry_ME31;
0138 float const_syst_ME31;
0139 float noise_level_ME32;
0140 float xt_asymmetry_ME32;
0141 float const_syst_ME32;
0142 float noise_level_ME41;
0143 float xt_asymmetry_ME41;
0144 float const_syst_ME41;
0145 };
0146
0147 #endif