CMS 3D CMS Logo

PixelErrorParametrization.h

Go to the documentation of this file.
00001 /*
00002   Performs a 3-dimensional parametrization of pixel hits
00003   as a funcion of the cluster size and the two projections
00004   of the impact track angle 
00005   !!! it is valid for 100 X 150 mu pixel size !!!
00006 */
00007 
00008 #ifndef RecoLocalTracker_SiPixelRecHits_PixelErrorParametrization_H
00009 #define RecoLocalTracker_SiPixelRecHits_PixelErrorParametrization_H 1
00010 
00011 //--- For the type of DetUnit
00012 #include "Geometry/CommonDetUnit/interface/GeomDetType.h"
00013 
00014 //--- For the configuration:
00015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00016 
00017 #include <utility>
00018 #include <vector>
00019 #include <string>
00020 #include <iosfwd>
00021 
00022 
00023 class PixelErrorParametrization
00024 {
00025  public:
00026 
00027   PixelErrorParametrization(edm::ParameterSet const& conf);
00028   ~PixelErrorParametrization();
00029   
00031   std::pair<float,float>
00032     getError(GeomDetType::SubDetector pixelPart, 
00033              int sizex, int sizey, 
00034              float alpha, float beta,
00035              bool bigInX = false, 
00036              bool bigInY = false); // Gavril: add big pixel flags, 03/27/07
00037   
00038  private:
00039   float a_min; 
00040   float a_max;
00041   float a_bin; 
00042 
00043   float ys_bl[6];
00044   float ys_bh[6];
00045   
00046   std::vector<float> vec_error_YB;
00047   std::vector<float> vec_error_XB;
00048   std::vector<float> vec_error_YF;
00049   std::vector<float> vec_error_XF;
00050 
00051 
00052   std::string theParametrizationType;
00053   typedef std::vector<std::vector<std::vector<float> > > P3D; 
00054   typedef std::vector<std::vector<float> > P2D;
00055 
00056   // If this is set true, then use the parameterization from CalibTracker/SiPixelErrorEstimation
00057   // If it is set to false, use old parameterization by Susanna Cuciareli
00058   bool useNewParametrization;
00059   
00060   // If  useNewParametrization = true, then useSigma = true assigns gaussian errors. Otherwise asign RMS errors 
00061   bool useSigma;
00062 
00063   // MATRIX FOR Y BARREL ERRORS
00064   //
00065   // vector depending on cluster size:
00066   P3D ybarrel_3D;
00067 
00068   //vector containing beta range
00069   std::vector< std::pair<float,float> > brange_yb;
00070   //
00071   // MATRIX FOR X BARREL ERRORS
00072   //
00073   // vector depending cluster size
00074   P3D xbarrel_3D;
00075 
00076   // 2D vector containing beta bins 
00077   // for X-BARREL depending on x cluster size
00078   P2D bbins_xb;
00079   //
00080   // MATRIX FOR Y FORWARD ERRORS
00081   //
00082   // vector depending cluster size
00083   P3D yforward_3D;
00084 
00085   // pair containing abs(pi/2-beta) range 
00086   // for Y-FORWARD
00087   std::pair<float,float> brange_yf;
00088 
00089   // MATRIX FOR X FORWARD ERRORS
00090   //
00091   // vector depending cluster size
00092   P3D xforward_3D;
00093 
00094   // 1D vector containing beta bins 
00095   // for X-FORWARD
00096   std::vector<float> bbins_xf;
00097 
00098   // Gavril: for barrel x errors, add big pixel flag  
00099   float error_XB(int sizex, float alpha, float beta, bool bigInX); 
00100   float error_XF(int sizex, float alpha, float beta, bool bigInX);
00101   float error_YB(int sizey, float alpha, float beta, bool bigInY);
00102   float error_YF(int sizey, float alpha, float beta, bool bigInY);
00103   float interpolation(std::vector<float>&, float&, 
00104                       std::pair<float,float>&);
00105   int betaIndex(int&, std::vector<float>&, float&);
00106   float linParametrize(bool&, int&, int&, float&);  
00107 
00108   float quadParametrize(bool&, int&, int&, float&);  
00109 
00110   void readXB( P3D& vec3D, const std::string& prefix, 
00111                const std::string& postfix1, const std::string& postfix2);
00112 
00113   void readYB( P3D& vec3D, const std::string& prefix, 
00114                const std::string& postfix1, const std::string& postfix2);
00115 
00116   void readF( P3D& vec3D, const std::string& prefix, 
00117               const std::string& postfix1, const std::string& postfix2);
00118 
00119   std::vector<float> readVec( const std::string& name);
00120 };
00121 #endif

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