CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {
26  public:
27 
28  explicit CSCXonStrip_MatchGatti(const edm::ParameterSet& ps);
29 
31 
32 
33  // Member functions
34 
36  void findXOnStrip( const CSCDetId& id, const CSCLayer* layer, const CSCStripHit& stripHit,
37  int centralStrip, float& xWithinChamber, float& stripWidth,
38  const float& tpeak, float& xWithinStrip, float& sigma, int & quality_flag);
39 
41  void initChamberSpecs();
42 
44  void setupMatrix();
45 
49  }
50 
51  private:
52 
53  // No copying of this class
56 
57  double h; // This is the distance between strip and wire planes
58  float stripWidth;
59  double r; // This is the ratio h/stripwidth
60 
61  double k_1, k_2, k_3, sqrt_k_3, norm; // See equation above for description
62 
63  // The charge (3x3); [1][1] is the maximum
64  float chargeSignal[3][3]; // 3x3 data array for gatti fit
65 
67  float xt_l[3][3], xt_r[3][3];
68  float xt_lr0[3], xt_lr1[3], xt_lr2[3];
69 
71  float v11[3], v12[3], v13[3], v22[3], v23[3], v33[3];
72 
74  float a11[3], a12[3], a13[3], a22[3], a23[3], a33[3];
75 
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_
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]
void initChamberSpecs()
Use specs to setup Gatti parameters.
CSCXonStrip_MatchGatti(const edm::ParameterSet &ps)