CMS 3D CMS Logo

CSCXonStrip_MatchGatti.h

Go to the documentation of this file.
00001 #ifndef CSCRecHitD_CSCXonStrip_MatchGatti_h
00002 #define CSCRecHitD_CSCXonStrip_MatchGatti_h
00003 //---- Large part taken from RecHitB
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   // Member functions
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;                                     // This is the distance between strip and wire planes
00056   float stripWidth;
00057   double r;                                     // This is the ratio h/stripwidth
00058   
00059   double k_1, k_2, k_3, sqrt_k_3, norm;         // See equation above for description
00060     
00061   // The charge (3x3); [1][1] is the maximum 
00062   float chargeSignal[3][3];                                // 3x3 data array for gatti fit
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   // Store chamber specs
00076   const CSCChamberSpecs* specs_;
00077 
00078   // Store XT-corrected charges - 3x3 sum; Left, Central, Right charges (3 time-bins summed) 
00079 
00080   double q_sum, q_sumL, q_sumC, q_sumR;
00081 
00082   // Parameter settings from config file
00083   bool useCalib;
00084   //bool isData;
00085   bool use3TimeBins;
00086   float xtalksOffset;
00087 
00091   const CSCRecoConditions* recoConditions_;
00092 
00093   // other classes used
00094   CSCFindPeakTime*         peakTimeFinder_;  
00095 
00096   // some variables and funfctions to use
00097 
00098  // "Match Gatti" calculations
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   //std::vector <std::vector <float> > Xcorrection(N_SW, std::vector <float> (N_val));
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

Generated on Tue Jun 9 17:43:50 2009 for CMSSW by  doxygen 1.5.4