File indexing completed on 2023-03-17 11:19:08
0001 #ifndef CSCSegment_CSCSegAlgoSK_h
0002 #define CSCSegment_CSCSegAlgoSK_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #include <RecoLocalMuon/CSCSegment/src/CSCSegmentAlgorithm.h>
0028 #include <DataFormats/CSCRecHit/interface/CSCRecHit2D.h>
0029
0030 #include <deque>
0031 #include <vector>
0032
0033 class CSCSegFit;
0034
0035 class CSCSegAlgoSK : public CSCSegmentAlgorithm {
0036 public:
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047 typedef std::vector<int> LayerIndex;
0048 typedef std::vector<const CSCRecHit2D*> ChamberHitContainer;
0049 typedef std::vector<const CSCRecHit2D*>::const_iterator ChamberHitContainerCIt;
0050
0051
0052
0053
0054
0055
0056 typedef std::deque<bool> BoolContainer;
0057
0058
0059 explicit CSCSegAlgoSK(const edm::ParameterSet& ps);
0060
0061 ~CSCSegAlgoSK() override{};
0062
0063
0064
0065
0066
0067 std::vector<CSCSegment> buildSegments(const ChamberHitContainer& rechits);
0068
0069
0070
0071
0072 std::vector<CSCSegment> run(const CSCChamber* aChamber, const ChamberHitContainer& rechits) override;
0073
0074 private:
0075
0076
0077
0078 bool areHitsCloseInLocalX(const CSCRecHit2D* h1, const CSCRecHit2D* h2) const;
0079 bool areHitsCloseInGlobalPhi(const CSCRecHit2D* h1, const CSCRecHit2D* h2) const;
0080 bool isHitNearSegment(const CSCRecHit2D* h) const;
0081
0082
0083
0084
0085 void dumpHits(const ChamberHitContainer& rechits) const;
0086
0087
0088
0089
0090 void tryAddingHitsToSegment(const ChamberHitContainer& rechitsInChamber,
0091 const BoolContainer& used,
0092 const LayerIndex& layerIndex,
0093 const ChamberHitContainerCIt i1,
0094 const ChamberHitContainerCIt i2);
0095
0096
0097
0098
0099
0100 bool isSegmentGood(const ChamberHitContainer& rechitsInChamber) const;
0101
0102
0103
0104
0105 void flagHitsAsUsed(const ChamberHitContainer& rechitsInChamber, BoolContainer& used) const;
0106
0107
0108 bool addHit(const CSCRecHit2D* hit, int layer);
0109 void updateParameters(void);
0110 float phiAtZ(float z) const;
0111 bool hasHitOnLayer(int layer) const;
0112 bool replaceHit(const CSCRecHit2D* h, int layer);
0113 void compareProtoSegment(const CSCRecHit2D* h, int layer);
0114 void increaseProtoSegment(const CSCRecHit2D* h, int layer);
0115 void dumpSegment(const CSCSegment& seg) const;
0116
0117
0118
0119
0120 const CSCChamber* theChamber;
0121 ChamberHitContainer proto_segment;
0122 const std::string myName;
0123
0124 float windowScale;
0125 float dRPhiMax;
0126 float dPhiMax;
0127 float dRPhiFineMax;
0128 float dPhiFineMax;
0129 float chi2Max;
0130 float wideSeg;
0131 int minLayersApart;
0132 bool debugInfo;
0133
0134 CSCSegFit* sfit_;
0135 };
0136
0137 #endif