CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/RecoLocalTracker/SiStripRecHitConverter/interface/StripCPE.h

Go to the documentation of this file.
00001 #ifndef RecoLocalTracker_SiStripRecHitConverter_StripCPE_H
00002 #define RecoLocalTracker_SiStripRecHitConverter_StripCPE_H
00003 
00004 #include "RecoLocalTracker/ClusterParameterEstimator/interface/StripClusterParameterEstimator.h"
00005 
00006 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00007 #include "MagneticField/Engine/interface/MagneticField.h"
00008 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00009 #include "CondFormats/SiStripObjects/interface/SiStripLorentzAngle.h"
00010 #include "CondFormats/SiStripObjects/interface/SiStripConfObject.h"
00011 #include "CondFormats/SiStripObjects/interface/SiStripLatency.h"
00012 #include <ext/hash_map>
00013 class StripTopology;
00014 
00015 class StripCPE : public StripClusterParameterEstimator 
00016 {
00017 public:
00018 
00019   StripClusterParameterEstimator::LocalValues localParameters( const SiStripCluster&) const; 
00020   StripClusterParameterEstimator::LocalValues localParameters( const SiStripCluster& cl, const GeomDetUnit&) const;
00021   
00022   StripCPE( edm::ParameterSet & conf, 
00023             const MagneticField&, 
00024             const TrackerGeometry&, 
00025             const SiStripLorentzAngle&,
00026             const SiStripConfObject&,
00027             const SiStripLatency&);    
00028   LocalVector driftDirection(const StripGeomDetUnit* det) const;
00029   void clearCache() {m_Params.clear();}
00030 
00031  protected:  
00032 
00033   const bool peakMode_;
00034   const TrackerGeometry & geom_;
00035   const MagneticField& magfield_ ;
00036   const SiStripLorentzAngle& LorentzAngleMap_;
00037   std::vector<double> shift;
00038   std::vector<double> xtalk1;
00039   std::vector<double> xtalk2;
00040 
00041   struct Param {
00042     Param() : topology(0) {}
00043     StripTopology const * topology;
00044     LocalVector drift;
00045     float thickness, pitch_rel_err2, maxLength;
00046     int nstrips;
00047     SiStripDetId::ModuleGeometry moduleGeom;
00048     float coveredStrips(const LocalVector&, const LocalPoint&) const;
00049   };
00050   Param const & param(const uint32_t detid) const;
00051 
00052 private:
00053 
00054   Param & fillParam(Param & p, const GeomDetUnit *  det);
00055   typedef  __gnu_cxx::hash_map< unsigned int, Param> Params;  
00056   Params m_Params;
00057 
00058 };
00059 #endif