File indexing completed on 2024-04-06 12:26:07
0001 #ifndef DTCLUSTERER_H
0002 #define DTCLUSTERER_H
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #include "FWCore/Framework/interface/global/EDProducer.h"
0018
0019 namespace edm {
0020 class ParameterSet;
0021 class Event;
0022 class EventSetup;
0023 }
0024
0025
0026 #include "FWCore/Utilities/interface/InputTag.h"
0027 #include "DataFormats/DTRecHit/interface/DTSLRecCluster.h"
0028 #include "DataFormats/DTRecHit/interface/DTRecHit1DPair.h"
0029 #include "DataFormats/DTRecHit/interface/DTRecHitCollection.h"
0030 #include "Geometry/DTGeometry/interface/DTGeometry.h"
0031 #include "Geometry/Records/interface/MuonGeometryRecord.h"
0032 class DTSuperLayer;
0033
0034
0035 #include <vector>
0036 #include <utility>
0037
0038
0039
0040
0041
0042 class DTClusterer : public edm::global::EDProducer<> {
0043 public:
0044
0045 DTClusterer(const edm::ParameterSet&);
0046
0047
0048 ~DTClusterer() override;
0049
0050
0051 void produce(edm::StreamID, edm::Event& event, const edm::EventSetup& setup) const override;
0052
0053 private:
0054
0055 std::vector<DTSLRecCluster> buildClusters(const DTSuperLayer* sl, std::vector<DTRecHit1DPair>& pairs) const;
0056
0057 std::vector<std::pair<float, DTRecHit1DPair> > initHits(const DTSuperLayer* sl,
0058 std::vector<DTRecHit1DPair>& pairs) const;
0059
0060 unsigned int differentLayers(std::vector<DTRecHit1DPair>& hits) const;
0061
0062 private:
0063
0064 struct sortClusterByX {
0065 bool operator()(const std::pair<float, DTRecHit1DPair>& lhs, const std::pair<float, DTRecHit1DPair>& rhs) const {
0066 return lhs.first < rhs.first;
0067 }
0068 };
0069
0070 private:
0071
0072 bool debug;
0073
0074 unsigned int theMinHits;
0075 unsigned int theMinLayers;
0076 edm::EDGetTokenT<DTRecHitCollection> recHits1DToken_;
0077 edm::ESGetToken<DTGeometry, MuonGeometryRecord> dtGeomToken_;
0078
0079 protected:
0080 };
0081 #endif