Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-03-09 04:50:34

0001 #ifndef TrackRecoDeDx_DeDxEstimatorProducer_H
0002 #define TrackRecoDeDx_DeDxEstimatorProducer_H
0003 // user include files
0004 
0005 #include <memory>
0006 
0007 #include "FWCore/Framework/interface/Frameworkfwd.h"
0008 #include "FWCore/Framework/interface/stream/EDProducer.h"
0009 #include "FWCore/Framework/interface/Event.h"
0010 #include "FWCore/Framework/interface/MakerMacros.h"
0011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0012 #include "FWCore/Framework/interface/ESHandle.h"
0013 
0014 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0015 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h"
0016 #include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h"
0017 #include "Geometry/CommonDetUnit/interface/GluedGeomDet.h"
0018 
0019 #include "DataFormats/Common/interface/ValueMap.h"
0020 #include "DataFormats/TrackReco/interface/DeDxData.h"
0021 #include "DataFormats/TrackReco/interface/TrackDeDxHits.h"
0022 #include "DataFormats/TrackReco/interface/DeDxHit.h"
0023 #include "DataFormats/TrackReco/interface/Track.h"
0024 
0025 #include "RecoTracker/DeDx/interface/BaseDeDxEstimator.h"
0026 #include "RecoTracker/DeDx/interface/GenericAverageDeDxEstimator.h"
0027 #include "RecoTracker/DeDx/interface/TruncatedAverageDeDxEstimator.h"
0028 #include "RecoTracker/DeDx/interface/GenericTruncatedAverageDeDxEstimator.h"
0029 #include "RecoTracker/DeDx/interface/MedianDeDxEstimator.h"
0030 #include "RecoTracker/DeDx/interface/UnbinnedFitDeDxEstimator.h"
0031 #include "RecoTracker/DeDx/interface/ProductDeDxDiscriminator.h"
0032 #include "RecoTracker/DeDx/interface/SmirnovDeDxDiscriminator.h"
0033 #include "RecoTracker/DeDx/interface/ASmirnovDeDxDiscriminator.h"
0034 #include "RecoTracker/DeDx/interface/BTagLikeDeDxDiscriminator.h"
0035 
0036 #include "RecoTracker/DeDx/interface/DeDxTools.h"
0037 
0038 #include "TrackingTools/PatternTools/interface/TrajTrackAssociation.h"
0039 #include "TrackingTools/PatternTools/interface/TrajTrackAssociation.h"
0040 
0041 //
0042 // class declaration
0043 //
0044 
0045 class DeDxEstimatorProducer : public edm::stream::EDProducer<> {
0046 public:
0047   explicit DeDxEstimatorProducer(const edm::ParameterSet&);
0048   ~DeDxEstimatorProducer() override;
0049   static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
0050 
0051 private:
0052   void beginRun(edm::Run const& run, const edm::EventSetup&) override;
0053   void produce(edm::Event&, const edm::EventSetup&) override;
0054 
0055   void makeCalibrationMap(const TrackerGeometry& tkGeom);
0056   void processHit(const TrackingRecHit* recHit,
0057                   float trackMomentum,
0058                   float& cosine,
0059                   reco::DeDxHitCollection& dedxHits,
0060                   int& NClusterSaturating);
0061 
0062   // ----------member data ---------------------------
0063   std::unique_ptr<BaseDeDxEstimator> m_estimator;
0064 
0065   edm::EDGetTokenT<reco::TrackCollection> m_tracksTag;
0066 
0067   bool usePixel;
0068   bool useStrip;
0069   float meVperADCPixel;
0070   float meVperADCStrip;
0071 
0072   unsigned int MaxNrStrips;
0073 
0074   std::string m_calibrationPath;
0075   bool useCalibration;
0076   bool shapetest;
0077 
0078   std::vector<std::vector<float> > calibGains;
0079   unsigned int m_off;
0080 
0081   const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> tkGeomToken;
0082   const TrackerGeometry* tkGeom = nullptr;
0083 };
0084 
0085 #endif