File indexing completed on 2024-04-06 12:26:13
0001 #ifndef GEMRecHit_GEMSegmentAlgorithm_h
0002 #define GEMRecHit_GEMSegmentAlgorithm_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0017 #include "RecoLocalMuon/GEMSegment/plugins/GEMSegmentAlgorithmBase.h"
0018 #include "DataFormats/GEMRecHit/interface/GEMRecHit.h"
0019 #include "FWCore/Utilities/interface/Exception.h"
0020 #include <deque>
0021 #include <vector>
0022
0023 class MuonSegFit;
0024
0025 class GEMSegmentAlgorithm : public GEMSegmentAlgorithmBase {
0026 public:
0027
0028 typedef std::vector<const GEMRecHit*> EnsembleHitContainer;
0029 typedef std::vector<EnsembleHitContainer> ProtoSegments;
0030
0031
0032 explicit GEMSegmentAlgorithm(const edm::ParameterSet& ps);
0033
0034 ~GEMSegmentAlgorithm() override;
0035
0036
0037
0038
0039 std::vector<GEMSegment> run(const GEMEnsemble& ensemble, const EnsembleHitContainer& rechits) override;
0040
0041 private:
0042
0043
0044
0045 ProtoSegments clusterHits(const GEMEnsemble& ensemble, const EnsembleHitContainer& rechits);
0046
0047
0048 ProtoSegments chainHits(const GEMEnsemble& ensemble, const EnsembleHitContainer& rechits);
0049
0050 bool isGoodToMerge(const GEMEnsemble& ensemble,
0051 const EnsembleHitContainer& newChain,
0052 const EnsembleHitContainer& oldChain);
0053
0054
0055 void buildSegments(const GEMEnsemble& ensemble,
0056 const EnsembleHitContainer& rechits,
0057 std::vector<GEMSegment>& gemsegs);
0058
0059
0060 const std::string myName;
0061
0062
0063 bool debug;
0064 unsigned int minHitsPerSegment;
0065 bool preClustering;
0066 double dXclusBoxMax;
0067 double dYclusBoxMax;
0068 bool preClustering_useChaining;
0069 double dPhiChainBoxMax;
0070 double dEtaChainBoxMax;
0071 int maxRecHitsInCluster;
0072 bool clusterOnlySameBXRecHits;
0073
0074 EnsembleHitContainer proto_segment;
0075 GEMDetId theChamberId;
0076
0077 static constexpr float running_max = std::numeric_limits<float>::max();
0078 std::unique_ptr<MuonSegFit> sfit_;
0079 };
0080
0081 #endif