File indexing completed on 2024-04-06 12:28:05
0001 #ifndef DeDxTools_H
0002 #define DeDxTools_H
0003
0004 #include <vector>
0005
0006 #include "FWCore/Framework/interface/Frameworkfwd.h"
0007
0008 #include "DataFormats/GeometryCommonDetAlgo/interface/Measurement1D.h"
0009 #include "DataFormats/GeometrySurface/interface/TrapezoidalPlaneBounds.h"
0010 #include "DataFormats/GeometrySurface/interface/RectangularPlaneBounds.h"
0011 #include "DataFormats/DetId/interface/DetId.h"
0012 #include "DataFormats/TrackReco/interface/DeDxHit.h"
0013 #include "DataFormats/TrackReco/interface/TrackDeDxHits.h"
0014 #include "DataFormats/TrackingRecHit/interface/TrackingRecHit.h"
0015 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2D.h"
0016 #include "DataFormats/TrackerRecHit2D/interface/ProjectedSiStripRecHit2D.h"
0017 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit1D.h"
0018 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h"
0019
0020 #include "TrackingTools/PatternTools/interface/Trajectory.h"
0021 #include "TrackingTools/TrajectoryState/interface/TrajectoryStateOnSurface.h"
0022
0023 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0024 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h"
0025 #include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h"
0026 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0027 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0028 #include "Geometry/CommonDetUnit/interface/GeomDetType.h"
0029 #include "Geometry/CommonTopologies/interface/StripTopology.h"
0030 #include "CondFormats/PhysicsToolsObjects/interface/Histogram3D.h"
0031 #include "CondFormats/DataRecord/interface/SiStripDeDxMip_3D_Rcd.h"
0032 #include "CondFormats/DataRecord/interface/SiStripDeDxElectron_3D_Rcd.h"
0033 #include "CondFormats/DataRecord/interface/SiStripDeDxProton_3D_Rcd.h"
0034 #include "CondFormats/DataRecord/interface/SiStripDeDxPion_3D_Rcd.h"
0035 #include "CondFormats/DataRecord/interface/SiStripDeDxKaon_3D_Rcd.h"
0036
0037 #include "TFile.h"
0038 #include "TChain.h"
0039 #include "TH3F.h"
0040
0041 namespace deDxTools {
0042 bool shapeSelection(const SiStripCluster& ampls);
0043 int getCharge(const SiStripCluster* cluster,
0044 int& nSatStrip,
0045 const GeomDetUnit& detUnit,
0046 const std::vector<std::vector<float>>& calibGains,
0047 const unsigned int& m_off);
0048 void makeCalibrationMap(const std::string& m_calibrationPath,
0049 const TrackerGeometry& tkGeom,
0050 std::vector<std::vector<float>>& calibGains,
0051 const unsigned int& m_off);
0052
0053 using H3DD = PhysicsTools::Calibration::HistogramD3D;
0054 using ESGetTokenH3DDVariant = std::variant<edm::ESGetToken<H3DD, SiStripDeDxMip_3D_Rcd>,
0055 edm::ESGetToken<H3DD, SiStripDeDxPion_3D_Rcd>,
0056 edm::ESGetToken<H3DD, SiStripDeDxKaon_3D_Rcd>,
0057 edm::ESGetToken<H3DD, SiStripDeDxProton_3D_Rcd>,
0058 edm::ESGetToken<H3DD, SiStripDeDxElectron_3D_Rcd>>;
0059 ESGetTokenH3DDVariant esConsumes(std::string const& Record, edm::ConsumesCollector&);
0060 PhysicsTools::Calibration::HistogramD3D const& getHistogramD3D(edm::EventSetup const&, ESGetTokenH3DDVariant const&);
0061 void buildDiscrimMap(PhysicsTools::Calibration::HistogramD3D const&,
0062 std::string const& ProbabilityMode,
0063 TH3F*& Prob_ChargePath);
0064 bool isSpanningOver2APV(unsigned int FirstStrip, unsigned int ClusterSize);
0065 bool isFarFromBorder(const TrajectoryStateOnSurface& trajState, const GeomDetUnit* it);
0066 }
0067
0068 #endif