00001 #ifndef TrackRecoDeDx_DeDxEstimatorProducer_H 00002 #define TrackRecoDeDx_DeDxEstimatorProducer_H 00003 // user include files 00004 #include "FWCore/Framework/interface/Frameworkfwd.h" 00005 #include "FWCore/Framework/interface/EDProducer.h" 00006 00007 #include "FWCore/Framework/interface/Event.h" 00008 #include "FWCore/Framework/interface/MakerMacros.h" 00009 00010 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00011 00012 #include "RecoTracker/DeDx/interface/BaseDeDxEstimator.h" 00013 #include "RecoTracker/DeDx/interface/DeDxTools.h" 00014 00015 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" 00016 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h" 00017 #include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h" 00018 00019 #include <ext/hash_map> 00020 00021 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2D.h" 00022 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2D.h" 00023 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h" 00024 00025 #include "TFile.h" 00026 #include "TChain.h" 00027 00028 00029 // 00030 // class declaration 00031 // 00032 00033 class DeDxEstimatorProducer : public edm::EDProducer { 00034 00035 public: 00036 00037 explicit DeDxEstimatorProducer(const edm::ParameterSet&); 00038 ~DeDxEstimatorProducer(); 00039 00040 private: 00041 virtual void beginRun(edm::Run const& run, const edm::EventSetup&) override; 00042 virtual void produce(edm::Event&, const edm::EventSetup&) override; 00043 virtual void endJob() ; 00044 00045 int getCharge(const SiStripCluster* Cluster, int& Saturating_Strips,const uint32_t &); 00046 // int getCharge(const SiStripRecHit2D* sistripsimplehit, int& Saturating_Strips); 00047 void MakeCalibrationMap(); 00048 00049 00050 // ----------member data --------------------------- 00051 BaseDeDxEstimator* m_estimator; 00052 00053 edm::InputTag m_trajTrackAssociationTag; 00054 edm::InputTag m_tracksTag; 00055 00056 bool usePixel; 00057 bool useStrip; 00058 double MeVperADCPixel; 00059 double MeVperADCStrip; 00060 00061 unsigned int MaxNrStrips; 00062 unsigned int MinTrackHits; 00063 00064 std::string m_calibrationPath; 00065 bool useCalibration; 00066 bool shapetest; 00067 00068 private : 00069 struct stModInfo{int DetId; float Thickness; float Distance; float Normalization; double Gain;}; 00070 00071 class isEqual{ 00072 public: 00073 template <class T> bool operator () (const T& PseudoDetId1, const T& PseudoDetId2) { return PseudoDetId1==PseudoDetId2; } 00074 }; 00075 00076 __gnu_cxx::hash_map<unsigned int, stModInfo*, __gnu_cxx::hash<unsigned int>, isEqual > MODsColl; 00077 }; 00078 00079 #endif 00080