File indexing completed on 2024-04-06 12:26:01
0001 #ifndef CSCSegment_CSCSegAlgoST_h
0002 #define CSCSegment_CSCSegAlgoST_h
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #include <RecoLocalMuon/CSCSegment/src/CSCSegmentAlgorithm.h>
0026 #include <DataFormats/CSCRecHit/interface/CSCRecHit2D.h>
0027 #include <FWCore/ParameterSet/interface/ParameterSet.h>
0028 #include <deque>
0029 #include <vector>
0030
0031 class CSCSegAlgoShowering;
0032 class CSCSegAlgoST : public CSCSegmentAlgorithm {
0033 public:
0034
0035
0036 typedef std::vector<const CSCRecHit2D*> ChamberHitContainer;
0037 typedef std::vector<std::vector<const CSCRecHit2D*> > Segments;
0038 typedef std::deque<bool> BoolContainer;
0039
0040
0041 explicit CSCSegAlgoST(const edm::ParameterSet& ps);
0042
0043
0044 ~CSCSegAlgoST() override;
0045
0046
0047
0048
0049
0050 std::vector<CSCSegment> buildSegments(const ChamberHitContainer& rechits);
0051
0052
0053
0054
0055
0056 std::vector<CSCSegment> buildSegments2(const ChamberHitContainer& rechits);
0057
0058
0059
0060
0061 std::vector<CSCSegment> run(const CSCChamber* aChamber, const ChamberHitContainer& rechits) override;
0062
0063
0064
0065
0066 std::vector<std::vector<const CSCRecHit2D*> > clusterHits(const CSCChamber* aChamber,
0067 const ChamberHitContainer& rechits);
0068
0069
0070
0071 std::vector<std::vector<const CSCRecHit2D*> > chainHits(const CSCChamber* aChamber,
0072 const ChamberHitContainer& rechits);
0073
0074
0075
0076
0077
0078 std::vector<CSCSegment> prune_bad_hits(const CSCChamber* aChamber, std::vector<CSCSegment>& segments);
0079
0080 private:
0081
0082 const edm::ParameterSet& pset(void) const { return ps_; }
0083
0084
0085 bool adjustCovariance(void) { return adjustCovariance_; }
0086
0087
0088 double theWeight(
0089 double coordinate_1, double coordinate_2, double coordinate_3, float layer_1, float layer_2, float layer_3);
0090
0091 void ChooseSegments(void);
0092
0093
0094 void ChooseSegments2a(std::vector<ChamberHitContainer>& best_segments, int best_seg);
0095
0096 void ChooseSegments2(int best_seg);
0097
0098
0099 void ChooseSegments3(int best_seg);
0100 void ChooseSegments3(std::vector<ChamberHitContainer>& best_segments, std::vector<float>& best_weight, int best_seg);
0101
0102
0103
0104 void findDuplicates(std::vector<CSCSegment>& segments);
0105
0106 bool isGoodToMerge(bool isME11a, ChamberHitContainer& newChain, ChamberHitContainer& oldChain);
0107
0108 void dumpSegment(const CSCSegment& seg) const;
0109 const CSCChamber* chamber() const { return theChamber; }
0110
0111
0112 const std::string myName_;
0113 const edm::ParameterSet ps_;
0114 CSCSegAlgoShowering* showering_;
0115
0116 const CSCChamber* theChamber;
0117 Segments GoodSegments;
0118
0119 ChamberHitContainer PAhits_onLayer[6];
0120 ChamberHitContainer Psegments_hits;
0121
0122 std::vector<ChamberHitContainer> Psegments;
0123 std::vector<ChamberHitContainer> Psegments_noLx;
0124 std::vector<ChamberHitContainer> Psegments_noL1;
0125 std::vector<ChamberHitContainer> Psegments_noL2;
0126 std::vector<ChamberHitContainer> Psegments_noL3;
0127 std::vector<ChamberHitContainer> Psegments_noL4;
0128 std::vector<ChamberHitContainer> Psegments_noL5;
0129 std::vector<ChamberHitContainer> Psegments_noL6;
0130 std::vector<ChamberHitContainer> chosen_Psegments;
0131 std::vector<float> weight_A;
0132 std::vector<float> weight_noLx_A;
0133 std::vector<float> weight_noL1_A;
0134 std::vector<float> weight_noL2_A;
0135 std::vector<float> weight_noL3_A;
0136 std::vector<float> weight_noL4_A;
0137 std::vector<float> weight_noL5_A;
0138 std::vector<float> weight_noL6_A;
0139 std::vector<float> chosen_weight_A;
0140 std::vector<float> curv_A;
0141 std::vector<float> curv_noL1_A;
0142 std::vector<float> curv_noL2_A;
0143 std::vector<float> curv_noL3_A;
0144 std::vector<float> curv_noL4_A;
0145 std::vector<float> curv_noL5_A;
0146 std::vector<float> curv_noL6_A;
0147 std::vector<float> weight_B;
0148 std::vector<float> weight_noL1_B;
0149 std::vector<float> weight_noL2_B;
0150 std::vector<float> weight_noL3_B;
0151 std::vector<float> weight_noL4_B;
0152 std::vector<float> weight_noL5_B;
0153 std::vector<float> weight_noL6_B;
0154
0155 ChamberHitContainer protoSegment;
0156
0157
0158 bool debug;
0159
0160
0161 int minHitsPerSegment;
0162
0163
0164 double dXclusBoxMax;
0165 double dYclusBoxMax;
0166 int maxRecHitsInCluster;
0167 bool preClustering;
0168 bool preClustering_useChaining;
0169 bool Pruning;
0170 bool BrutePruning;
0171 double BPMinImprovement;
0172 bool onlyBestSegment;
0173 bool useShowering;
0174
0175 double hitDropLimit4Hits;
0176 double hitDropLimit5Hits;
0177 double hitDropLimit6Hits;
0178
0179 float a_yweightPenaltyThreshold[5][5];
0180
0181 double yweightPenaltyThreshold;
0182 double yweightPenalty;
0183
0184 double curvePenaltyThreshold;
0185 double curvePenalty;
0186
0187 bool adjustCovariance_;
0188
0189 bool condpass1, condpass2;
0190
0191 double chi2Norm_3D_;
0192
0193 bool prePrun_;
0194
0195 double prePrunLimit_;
0196 };
0197
0198 #endif