Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 11:59:46

0001 #ifndef SHALLOW_GAINCALIBRATION_PRODUCER
0002 #define SHALLOW_GAINCALIBRATION_PRODUCER
0003 
0004 #include "FWCore/Framework/interface/stream/EDProducer.h"
0005 #include "FWCore/Framework/interface/Frameworkfwd.h"
0006 
0007 #include "CalibTracker/SiStripCommon/interface/ShallowTools.h"
0008 
0009 #include "TrackingTools/PatternTools/interface/Trajectory.h"
0010 #include "TrackingTools/PatternTools/interface/TrajTrackAssociation.h"
0011 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2D.h"
0012 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2D.h"
0013 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHit.h"
0014 
0015 #include "MagneticField/Engine/interface/MagneticField.h"
0016 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0017 #include "CondFormats/SiStripObjects/interface/SiStripLorentzAngle.h"
0018 #include "CondFormats/DataRecord/interface/SiStripLorentzAngleRcd.h"
0019 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0020 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0021 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h"
0022 #include "Geometry/CommonTopologies/interface/StripTopology.h"
0023 #include "FWCore/Framework/interface/Event.h"
0024 
0025 #include "DataFormats/GeometrySurface/interface/TrapezoidalPlaneBounds.h"
0026 #include "DataFormats/GeometrySurface/interface/RectangularPlaneBounds.h"
0027 
0028 #include "Geometry/CommonDetUnit/interface/GeomDet.h"
0029 #include "Geometry/CommonDetUnit/interface/GeomDetType.h"
0030 #include "Geometry/CommonTopologies/interface/StripTopology.h"
0031 
0032 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0033 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0034 #include "Geometry/TrackerGeometryBuilder/interface/StripGeomDetUnit.h"
0035 #include "Geometry/CommonDetUnit/interface/PixelGeomDetUnit.h"
0036 #include "Geometry/TrackerNumberingBuilder/interface/GeometricDet.h"
0037 #include "Geometry/CommonDetUnit/interface/TrackingGeometry.h"
0038 
0039 #include "CalibFormats/SiStripObjects/interface/SiStripGain.h"
0040 #include "CalibTracker/Records/interface/SiStripGainRcd.h"
0041 
0042 #include "DataFormats/FEDRawData/interface/FEDNumbering.h"
0043 #include "DataFormats/TrackReco/interface/Track.h"
0044 #include "DataFormats/TrackReco/interface/TrackFwd.h"
0045 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit1D.h"
0046 #include "DataFormats/TrackerRecHit2D/interface/SiStripRecHit2D.h"
0047 #include "DataFormats/TrackerRecHit2D/interface/SiStripMatchedRecHit2D.h"
0048 #include "DataFormats/DetId/interface/DetId.h"
0049 #include "DataFormats/SiStripDetId/interface/StripSubdetector.h"
0050 
0051 class ShallowGainCalibration : public edm::stream::EDProducer<> {
0052 public:
0053   explicit ShallowGainCalibration(const edm::ParameterSet&);
0054 
0055 private:
0056   const edm::EDGetTokenT<edm::View<reco::Track> > tracks_token_;
0057   const edm::EDGetTokenT<TrajTrackAssociationCollection> association_token_;
0058 
0059   const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> trackerGeometry_token_;
0060   const edm::ESGetToken<SiStripGain, SiStripGainRcd> gain_token_;
0061   const edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> tkGeom_token_;
0062 
0063   std::string Suffix;
0064   std::string Prefix;
0065 
0066   void produce(edm::Event&, const edm::EventSetup&) override;
0067   bool isFarFromBorder(TrajectoryStateOnSurface* trajState, const uint32_t detid, const edm::EventSetup* iSetup);
0068   double thickness(DetId id);
0069 
0070   const TrackerGeometry* m_tracker;
0071   std::map<DetId, double> m_thicknessMap;
0072 };
0073 #endif