CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/RecoLocalMuon/CSCRecHitD/src/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 
00024 class CSCXonStrip_MatchGatti
00025 {
00026  public:
00027 
00028   explicit CSCXonStrip_MatchGatti(const edm::ParameterSet& ps);
00029 
00030   ~CSCXonStrip_MatchGatti();
00031   
00032 
00033   // Member functions
00034   
00036   void findXOnStrip( const CSCDetId& id, const CSCLayer* layer, const CSCStripHit& stripHit,
00037                      int centralStrip, float& xWithinChamber, float& stripWidth,
00038                      const float& tpeak, float& xWithinStrip, float& sigma, int & quality_flag);
00039 
00041   void initChamberSpecs();                       
00042 
00044   void setupMatrix();
00045 
00047   void setConditions( const CSCRecoConditions* reco ) {
00048     recoConditions_ = reco;
00049   }
00050 
00051  private:
00052 
00053   // No copying of this class
00054   CSCXonStrip_MatchGatti( const CSCXonStrip_MatchGatti& );
00055   CSCXonStrip_MatchGatti& operator=( const CSCXonStrip_MatchGatti& );
00056 
00057   double h;                                     // This is the distance between strip and wire planes
00058   float stripWidth;
00059   double r;                                     // This is the ratio h/stripwidth
00060   
00061   double k_1, k_2, k_3, sqrt_k_3, norm;         // See equation above for description
00062     
00063   // The charge (3x3); [1][1] is the maximum 
00064   float chargeSignal[3][3];                                // 3x3 data array for gatti fit
00065 
00067   float xt_l[3][3], xt_r[3][3];
00068   float xt_lr0[3], xt_lr1[3], xt_lr2[3];
00069 
00071   float v11[3], v12[3], v13[3], v22[3], v23[3], v33[3];
00072 
00074   float a11[3], a12[3], a13[3], a22[3], a23[3], a33[3];
00075 
00076 
00077   // Store chamber specs
00078   const CSCChamberSpecs* specs_;
00079 
00080   // Store XT-corrected charges - 3x3 sum; Left, Central, Right charges (3 time-bins summed) 
00081 
00082   double q_sum, q_sumL, q_sumC, q_sumR;
00083 
00084   // Parameter settings from config file
00085   bool useCalib;
00086   bool use3TimeBins;
00087   float xtalksOffset;
00088 
00089   // Cache pointer to conditions for current event
00090   const CSCRecoConditions* recoConditions_;
00091 
00092   // some variables and functions to use
00093 
00094   // "Match Gatti" calculations
00095   double calculateXonStripError(float stripWidth, bool ME1_1);
00096   double calculateXonStripPosition(float stripWidth, bool ME1_1);
00097   double xfError_Noise(double noise);
00098   double xfError_XTasym(double XTasym);
00099 
00100   double estimated2Gatti(double Xestimated, float StripWidth, bool ME1_1);
00101   double estimated2GattiCorrection(double Xestimated, float StripWidth, bool ME1_1);
00102 
00103   void getCorrectionValues(std::string Estimator);
00104   void hardcodedCorrectionInitialization();
00105 
00106   static const int n_SW_noME1_1 = 11;
00107   static const int n_SW_ME1_1 = 6;
00108   static const int n_val = 501;
00109   //std::vector <std::vector <float> > Xcorrection(N_SW, std::vector <float> (N_val));
00110   float x_correction_noME1_1[n_SW_noME1_1][n_val];
00111   float x_correction_ME1_1[n_SW_ME1_1][n_val];
00112   float x_centralVal[n_val];
00113 
00114   float noise_level;
00115   float xt_asymmetry;
00116   float const_syst;
00117 
00118   float noise_level_ME1a;
00119   float xt_asymmetry_ME1a;
00120   float const_syst_ME1a;
00121   float noise_level_ME1b;
00122   float xt_asymmetry_ME1b;
00123   float const_syst_ME1b;
00124   float noise_level_ME12;
00125   float xt_asymmetry_ME12;
00126   float const_syst_ME12;
00127   float noise_level_ME13;
00128   float xt_asymmetry_ME13;
00129   float const_syst_ME13;
00130   float noise_level_ME21;
00131   float xt_asymmetry_ME21;
00132   float const_syst_ME21;
00133   float noise_level_ME22;
00134   float xt_asymmetry_ME22;
00135   float const_syst_ME22;
00136   float noise_level_ME31;
00137   float xt_asymmetry_ME31;
00138   float const_syst_ME31;
00139   float noise_level_ME32;
00140   float xt_asymmetry_ME32;
00141   float const_syst_ME32;
00142   float noise_level_ME41;
00143   float xt_asymmetry_ME41;
00144   float const_syst_ME41;
00145 }; 
00146 
00147 #endif