00001 #ifndef CalibTracker_SiPixelLorentzAngleDB_SiPixelLorentzAngleDB_h 00002 #define CalibTracker_SiPixelLorentzAngleDB_SiPixelLorentzAngleDB_h 00003 00004 #include <map> 00005 00006 #include "FWCore/Framework/interface/EDAnalyzer.h" 00007 #include "FWCore/Framework/interface/Event.h" 00008 #include "DataFormats/Common/interface/Handle.h" 00009 #include "FWCore/Framework/interface/EventSetup.h" 00010 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00011 00012 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" 00013 #include "FWCore/MessageLogger/interface/MessageLogger.h" 00014 00015 #include "DataFormats/DetId/interface/DetId.h" 00016 00017 // Magnetic field 00018 #include "MagneticField/Engine/interface/MagneticField.h" 00019 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" 00020 00021 // #include "CalibTracker/SiStripLorentzAngle/interface/SiStripLorentzAngleAlgorithm.h" 00022 00023 class SiPixelLorentzAngleDB : public edm::EDAnalyzer 00024 { 00025 public: 00026 00027 explicit SiPixelLorentzAngleDB(const edm::ParameterSet& conf); 00028 00029 virtual ~SiPixelLorentzAngleDB(); 00030 00031 // virtual void beginJob(const edm::EventSetup& c); 00032 00033 virtual void beginJob(); 00034 00035 virtual void endJob(); 00036 00037 virtual void analyze(const edm::Event& e, const edm::EventSetup& c); 00038 00039 00040 private: 00041 00042 std::vector< std::pair<uint32_t, float> > detid_la; 00043 edm::ParameterSet conf_; 00044 double magneticField_; 00045 std::string recordName_; 00046 float bPixLorentzAnglePerTesla_; 00047 float fPixLorentzAnglePerTesla_; 00048 std::string fileName_; 00049 bool useFile_; 00050 }; 00051 00052 00053 #endif