File indexing completed on 2024-04-06 12:25:20
0001 #ifndef HIPixelClusterVtxProducer_H
0002 #define HIPixelClusterVtxProducer_H
0003
0004 #include "FWCore/Framework/interface/stream/EDProducer.h"
0005 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0006
0007 #include "DataFormats/TrackerRecHit2D/interface/SiPixelRecHitCollection.h"
0008 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h"
0009 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h"
0010
0011 namespace edm {
0012 class Run;
0013 class Event;
0014 class EventSetup;
0015 }
0016
0017 class TrackerGeometry;
0018
0019 class HIPixelClusterVtxProducer : public edm::stream::EDProducer<> {
0020 public:
0021 explicit HIPixelClusterVtxProducer(const edm::ParameterSet& ps);
0022 ~HIPixelClusterVtxProducer() override;
0023
0024 private:
0025 struct VertexHit {
0026 float z;
0027 float r;
0028 float w;
0029 };
0030
0031 void produce(edm::Event& ev, const edm::EventSetup& es) override;
0032 int getContainedHits(const std::vector<VertexHit>& hits, double z0, double& chi);
0033
0034 std::string srcPixelsString_;
0035 edm::EDGetTokenT<SiPixelRecHitCollection> srcPixels_;
0036 edm::ESGetToken<TrackerGeometry, TrackerDigiGeometryRecord> trackerToken_;
0037
0038 double minZ_;
0039 double maxZ_;
0040 double zStep_;
0041 };
0042 #endif