CMS 3D CMS Logo

CSCXonStrip_MatchGatti.h
Go to the documentation of this file.
1 #ifndef CSCRecHitD_CSCXonStrip_MatchGatti_h
2 #define CSCRecHitD_CSCXonStrip_MatchGatti_h
3 //---- Large part taken from RecHitB
4 
17 
18 #include <map>
19 #include <vector>
20 
21 class CSCLayer;
22 class CSCChamberSpecs;
23 
25 public:
26  explicit CSCXonStrip_MatchGatti(const edm::ParameterSet& ps);
27 
29 
30  // Member functions
31 
33  void findXOnStrip(const CSCDetId& id,
34  const CSCLayer* layer,
35  const CSCStripHit& stripHit,
36  int centralStrip,
37  float& xWithinChamber,
38  float& stripWidth,
39  const float& tpeak,
40  float& xWithinStrip,
41  float& sigma,
42  int& quality_flag);
43 
45  void initChamberSpecs();
46 
48  void setupMatrix();
49 
52 
53 private:
54  // No copying of this class
57 
58  double h; // This is the distance between strip and wire planes
59  float stripWidth;
60  double r; // This is the ratio h/stripwidth
61 
62  double k_1, k_2, k_3, sqrt_k_3, norm; // See equation above for description
63 
64  // The charge (3x3); [1][1] is the maximum
65  float chargeSignal[3][3]; // 3x3 data array for gatti fit
66 
68  float xt_l[3][3], xt_r[3][3];
69  float xt_lr0[3], xt_lr1[3], xt_lr2[3];
70 
72  float v11[3], v12[3], v13[3], v22[3], v23[3], v33[3];
73 
75  float a11[3], a12[3], a13[3], a22[3], a23[3], a33[3];
76 
77  // Store chamber specs
79 
80  // Store XT-corrected charges - 3x3 sum; Left, Central, Right charges (3 time-bins summed)
81 
83 
84  // Parameter settings from config file
85  bool useCalib;
87  float xtalksOffset;
88 
89  // Cache pointer to conditions for current event
91 
92  // some variables and functions to use
93 
94  // "Match Gatti" calculations
95  double calculateXonStripError(float stripWidth, bool ME1_1);
96  double calculateXonStripPosition(float stripWidth, bool ME1_1);
97  double xfError_Noise(double noise);
98  double xfError_XTasym(double XTasym);
99 
100  double estimated2Gatti(double Xestimated, float StripWidth, bool ME1_1);
101  double estimated2GattiCorrection(double Xestimated, float StripWidth, bool ME1_1);
102 
105 
106  static const int n_SW_noME1_1 = 11;
107  static const int n_SW_ME1_1 = 6;
108  static const int n_val = 501;
109  //std::vector <std::vector <float> > Xcorrection(N_SW, std::vector <float> (N_val));
113 
114  float noise_level;
116  float const_syst;
117 
145 };
146 
147 #endif
double xfError_XTasym(double XTasym)
float a11[3]
Store elements of auto-correlation matrices: 0 = left, 1 = middle, 2 = right.
CSCXonStrip_MatchGatti & operator=(const CSCXonStrip_MatchGatti &)
void getCorrectionValues(std::string Estimator)
float xt_l[3][3]
x-talks 0 = left, 1 = middle, 2 = right ; and then second [] is for time bin tmax-1, tmax, tmax+1
double estimated2Gatti(double Xestimated, float StripWidth, bool ME1_1)
const CSCRecoConditions * recoConditions_
constexpr std::array< uint8_t, layerIndexSize > layer
void setConditions(const CSCRecoConditions *reco)
Cache pointer to conditions data.
double xfError_Noise(double noise)
double estimated2GattiCorrection(double Xestimated, float StripWidth, bool ME1_1)
double calculateXonStripError(float stripWidth, bool ME1_1)
const CSCChamberSpecs * specs_
double calculateXonStripPosition(float stripWidth, bool ME1_1)
void setupMatrix()
Set matrix for XT corrections and noise.
float v11[3]
Store elements of matrices for chi^2 computation: 0 = left, 1 = middle, 2 = right.
float x_correction_noME1_1[n_SW_noME1_1][n_val]
void findXOnStrip(const CSCDetId &id, const CSCLayer *layer, const CSCStripHit &stripHit, int centralStrip, float &xWithinChamber, float &stripWidth, const float &tpeak, float &xWithinStrip, float &sigma, int &quality_flag)
Returns fitted local x position and its estimated error.
float x_correction_ME1_1[n_SW_ME1_1][n_val]
fixed size matrix
void initChamberSpecs()
Use specs to setup Gatti parameters.
CSCXonStrip_MatchGatti(const edm::ParameterSet &ps)