CMS 3D CMS Logo

CMSSW_4_4_3_patch1/src/RecoEcal/EgammaCoreTools/interface/PositionCalc.h

Go to the documentation of this file.
00001 #ifndef RecoEcal_EgammaCoreTools_PositionCalc_h
00002 #define RecoEcal_EgammaCoreTools_PositionCalc_h
00003 
00015 #include <vector>
00016 #include <map>
00017 
00018 #include "DataFormats/EcalRecHit/interface/EcalRecHit.h"
00019 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00020 #include "DataFormats/EcalDetId/interface/EBDetId.h"
00021 #include "DataFormats/Math/interface/Point3D.h"
00022 #include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
00023 #include "FWCore/Framework/interface/Frameworkfwd.h"
00024 
00025 class PositionCalc
00026 {
00027  public:
00028   // You must call Initialize before you can calculate positions or 
00029   // covariances.
00030 
00031   PositionCalc(const edm::ParameterSet& par);
00032   PositionCalc() { };
00033 
00034   const PositionCalc& operator=(const PositionCalc& rhs);
00035 
00036   // Calculate_Location calculates an arithmetically or logarithmically
00037   // weighted average position of a vector of DetIds, which should be
00038   // a subset of the map used to Initialize.
00039 
00040   math::XYZPoint Calculate_Location( const std::vector< std::pair< DetId, float > >&      iDetIds  ,
00041                                      const EcalRecHitCollection*    iRecHits ,
00042                                      const CaloSubdetectorGeometry* iSubGeom ,
00043                                      const CaloSubdetectorGeometry* iESGeom = 0 ) ;
00044 
00045  private:
00046   bool    param_LogWeighted_;
00047   double  param_T0_barl_;
00048   double  param_T0_endc_;
00049   double  param_T0_endcPresh_;
00050   double  param_W0_;
00051   double  param_X0_;
00052 
00053   const CaloSubdetectorGeometry* m_esGeom ;
00054   bool m_esPlus ;
00055   bool m_esMinus ;
00056 
00057 };
00058 
00059 #endif