CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/RecoTracker/DeDx/interface/DeDxDiscriminatorProducer.h

Go to the documentation of this file.
00001 #ifndef TrackRecoDeDx_DeDxDiscriminatorProducer_H
00002 #define TrackRecoDeDx_DeDxDiscriminatorProducer_H
00003 
00004 #include "FWCore/Framework/interface/Frameworkfwd.h"
00005 #include "FWCore/Framework/interface/EDProducer.h"
00006 #include "FWCore/Framework/interface/Event.h"
00007 #include "FWCore/Framework/interface/MakerMacros.h"
00008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00009 
00010 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
00011 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h"
00012 #include "Geometry/TrackerGeometryBuilder/interface/PixelGeomDetUnit.h" 
00013 
00014 #include "Geometry/CommonDetUnit/interface/GeomDetUnit.h"
00015 #include "Geometry/CommonDetUnit/interface/GeomDetType.h"
00016 #include "Geometry/CommonTopologies/interface/StripTopology.h"
00017 
00018 #include "DataFormats/GeometrySurface/interface/TrapezoidalPlaneBounds.h"
00019 #include "DataFormats/GeometrySurface/interface/RectangularPlaneBounds.h"
00020 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit1D.h"
00021 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2D.h"
00022 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2D.h"
00023 
00024 #include "TrackingTools/PatternTools/interface/Trajectory.h"
00025 #include "TrackingTools/PatternTools/interface/TrajTrackAssociation.h"
00026 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
00027 
00028 #include "CondFormats/PhysicsToolsObjects/interface/Histogram3D.h"
00029 
00030 #include "RecoTracker/DeDx/interface/DeDxDiscriminatorTools.h"
00031 #include "RecoTracker/DeDx/interface/DeDxTools.h"
00032 
00033 
00034 #include "TH3F.h"
00035 #include "TChain.h"
00036 
00037 #include <ext/hash_map>
00038 
00039 
00040 // using namespace edm;
00041 // using namespace reco;
00042 // using namespace std;
00043 // using namespace __gnu_cxx;
00044 
00045 
00046 
00047 
00048 class DeDxDiscriminatorProducer : public edm::EDProducer {
00049 
00050 public:
00051 
00052   explicit DeDxDiscriminatorProducer(const edm::ParameterSet&);
00053   ~DeDxDiscriminatorProducer();
00054 
00055 private:
00056   virtual void beginRun(edm::Run & run, const edm::EventSetup&) ;
00057   virtual void produce(edm::Event&, const edm::EventSetup&);
00058   virtual void endJob() ;
00059 
00060   double GetProbability(const SiStripCluster*   cluster, TrajectoryStateOnSurface trajState);
00061   double ComputeDiscriminator (std::vector<double>& vect_probs);
00062   int    ClusterSaturatingStrip(const SiStripCluster*   cluster);
00063   void   MakeCalibrationMap();
00064 
00065 
00066 
00067   // ----------member data ---------------------------
00068   edm::InputTag                     m_trajTrackAssociationTag;
00069   edm::InputTag                     m_tracksTag;
00070 
00071   bool usePixel;
00072   bool useStrip;
00073   double MeVperADCPixel;
00074   double MeVperADCStrip;
00075 
00076   std::string                       m_calibrationPath;
00077   bool                              useCalibration;
00078   bool                              shapetest;
00079 
00080 
00081   const TrackerGeometry* m_tracker;
00082 
00083   PhysicsTools::Calibration::HistogramD3D DeDxMap_;
00084 
00085   double       MinTrackMomentum;
00086   double       MaxTrackMomentum;
00087   double       MinTrackEta;
00088   double       MaxTrackEta;
00089   unsigned int MaxNrStrips;
00090   unsigned int MinTrackHits;
00091   double       MaxTrackChiOverNdf;
00092 
00093   unsigned int Formula;
00094   std::string       Reccord;
00095   std::string       ProbabilityMode;
00096 
00097 
00098   TH3D*        Prob_ChargePath;
00099 
00100 
00101 
00102    private :
00103       struct stModInfo{int DetId; int SubDet; float Eta; float R; float Thickness; int NAPV; double Gain;};
00104 
00105       class isEqual{
00106          public:
00107                  template <class T> bool operator () (const T& PseudoDetId1, const T& PseudoDetId2) { return PseudoDetId1==PseudoDetId2; }
00108       };
00109 
00110   __gnu_cxx::hash_map<unsigned int, stModInfo*,  __gnu_cxx::hash<unsigned int>, isEqual > MODsColl;
00111 };
00112 
00113 #endif
00114