CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_1_8_patch13/src/RecoTracker/DeDx/interface/DeDxEstimatorProducer.h

Go to the documentation of this file.
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 
00014 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00015 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h"
00016 #include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h" 
00017 
00018 #include <ext/hash_map>
00019 
00020 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2D.h"
00021 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2D.h"
00022 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h"
00023 
00024 #include "TFile.h"
00025 #include "TChain.h"
00026 
00027 
00028 //
00029 // class declaration
00030 //
00031 
00032 class DeDxEstimatorProducer : public edm::EDProducer {
00033 
00034 public:
00035 
00036   explicit DeDxEstimatorProducer(const edm::ParameterSet&);
00037   ~DeDxEstimatorProducer();
00038 
00039 private:
00040   virtual void beginRun(edm::Run & run, const edm::EventSetup&) ;
00041   virtual void produce(edm::Event&, const edm::EventSetup&);
00042   virtual void endJob() ;
00043 
00044   int    getCharge(const SiStripCluster*   Cluster, int& Saturating_Strips);
00045 //  int    getCharge(const SiStripRecHit2D* sistripsimplehit, int& Saturating_Strips);
00046   void   MakeCalibrationMap();
00047 
00048 
00049   // ----------member data ---------------------------
00050   BaseDeDxEstimator*                m_estimator;
00051 
00052   edm::InputTag                     m_trajTrackAssociationTag;
00053   edm::InputTag                     m_tracksTag;
00054 
00055   bool usePixel;
00056   bool useStrip;
00057   double MeVperADCPixel;
00058   double MeVperADCStrip;
00059 
00060   unsigned int MaxNrStrips;
00061   unsigned int MinTrackHits;
00062 
00063   std::string                       m_calibrationPath;
00064   bool                              useCalibration;
00065 
00066    private : 
00067       struct stModInfo{int DetId; float Thickness; float Distance; float Normalization; double Gain;};
00068 
00069       class isEqual{
00070          public:
00071                  template <class T> bool operator () (const T& PseudoDetId1, const T& PseudoDetId2) { return PseudoDetId1==PseudoDetId2; }
00072       };
00073   
00074   __gnu_cxx::hash_map<unsigned int, stModInfo*,  __gnu_cxx::hash<unsigned int>, isEqual > MODsColl;
00075 };
00076 
00077 #endif
00078