CMS 3D CMS Logo

CPEFromDetPosition.h

Go to the documentation of this file.
00001 #ifndef RecoLocalTracker_SiPixelRecHits_CPEFromDetPosition_H
00002 #define RecoLocalTracker_SiPixelRecHits_CPEFromDetPosition_H 1
00003 
00004 #include "RecoLocalTracker/ClusterParameterEstimator/interface/PixelClusterParameterEstimator.h"
00005 #include "RecoLocalTracker/SiPixelRecHits/interface/EtaCorrection.h"
00006 
00007 #include "Geometry/CommonDetUnit/interface/GeomDetType.h"
00008 #include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h"
00009 #include "Geometry/TrackerTopology/interface/RectangularPixelTopology.h"
00010 
00011 //#define TP_OLD
00012 #ifdef TP_OLD
00013 #include "Geometry/CommonDetAlgo/interface/MeasurementPoint.h"
00014 #include "Geometry/CommonDetAlgo/interface/MeasurementError.h"
00015 #include "Geometry/Surface/interface/GloballyPositioned.h"
00016 #else  // new location
00017 #include "DataFormats/GeometryCommonDetAlgo/interface/MeasurementPoint.h"
00018 #include "DataFormats/GeometryCommonDetAlgo/interface/MeasurementError.h"
00019 #include "DataFormats/GeometrySurface/interface/GloballyPositioned.h"
00020 #endif
00021 
00022 //--- For the configuration:
00023 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00024 
00025 
00026 // &&& Let's hope for the best... //#include "CommonDet/BasicDet/interface/Enumerators.h"
00027 
00028 #include <utility>
00029 #include <vector>
00030 
00031 // &&& Now explicitly included...  //class MeasurementError;
00032 // class GeomDetUnit;
00033 
00034 #if 0
00035 
00039 #endif
00040 class MagneticField;
00041 class CPEFromDetPosition : public PixelClusterParameterEstimator 
00042 {
00043  public:
00044   // CPEFromDetPosition( const DetUnit& det );
00045   CPEFromDetPosition(edm::ParameterSet const& conf, const MagneticField*);
00046     
00047   // LocalValues is typedef for pair<LocalPoint,LocalError> 
00048   LocalValues localParameters( const SiPixelCluster & cl, 
00049                                const GeomDetUnit    & det ) const {
00050     return std::make_pair( localPosition(cl,det), localError(cl,det) );
00051   }
00052 
00053   LocalPoint localPosition(const SiPixelCluster& cl, const GeomDetUnit & det) const ;
00054   LocalError localError   (const SiPixelCluster& cl, const GeomDetUnit & det) const ;
00055   
00056  protected:
00057   //members
00058   mutable const PixelGeomDetUnit* theDet;
00059   mutable const RectangularPixelTopology * theTopol;
00060   mutable GeomDetType::SubDetector thePart;
00061   mutable EtaCorrection theEtaFunc;
00062   mutable float theThickness;
00063   mutable float thePitchX;
00064   mutable float thePitchY;
00065   mutable float theOffsetX;
00066   mutable float theOffsetY;
00067   mutable float theNumOfRow;
00068   mutable float theNumOfCol;
00069   mutable  float theDetZ;
00070   mutable float theDetR;
00071   mutable float theLShiftX;
00072   mutable float theLShiftY;
00073 
00074   mutable float theSign;
00075 
00076   mutable float theTanLorentzAnglePerTesla;   // Lorentz angle tangent per Tesla
00077   int   theVerboseLevel;              // algorithm's verbosity
00078 
00079   //magnetic field
00080   const MagneticField* magfield_;
00081 
00082   // switch on/off E.B effect
00083   bool  alpha2Order;
00084 
00085   // Private methods
00086   void       setTheDet( const GeomDetUnit & det ) const ;
00087   //
00088   MeasurementPoint measurementPosition( const SiPixelCluster&, 
00089                                         const GeomDetUnit & det) const ;
00090   MeasurementError measurementError   ( const SiPixelCluster&, 
00091                                         const GeomDetUnit & det) const ;
00092   //float chaWidth2X(const float&) const;
00093 
00094   //methods
00095   float err2X(bool&, int&) const;
00096   float err2Y(bool&, int&) const;
00097   bool isFlipped() const;
00098   // parameters for the position assignment
00099   float chargeWidthX()const;
00100   float chargeWidthY()const;
00101   float geomCorrectionX(float xpos)const;
00102   float geomCorrectionY(float ypos)const;
00103   //float geomCorrection()const;
00104   float estimatedAlphaForBarrel(const float&) const;
00105   
00106   // Determine the Lorentz shift correction along local x and y.
00107   float lorentzShiftX()const;
00108   float lorentzShiftY()const;
00109 
00110   // returns position in x
00111   float xpos( const SiPixelCluster& ) const;
00112   //returns position in y
00113   float ypos( const SiPixelCluster& ) const;
00114 
00115   // charge on the first, last  and  inner pixels on x and y 
00116   std::vector<float> 
00117     xCharge(const std::vector<SiPixelCluster::Pixel>&, const float&, const float&)const; 
00118   std::vector<float> 
00119     yCharge(const std::vector<SiPixelCluster::Pixel>&, const float&, const float&)const; 
00120 
00121   LocalVector driftDirection( GlobalVector bfield )const ;
00122   typedef GloballyPositioned<double> Frame;
00123 };
00124 
00125 #endif
00126 
00127 
00128 
00129 

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