CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
CSCSegAlgoST.h
Go to the documentation of this file.
1 #ifndef CSCSegment_CSCSegAlgoST_h
2 #define CSCSegment_CSCSegAlgoST_h
3 
28 #include <deque>
29 #include <vector>
30 
33 public:
35 
36  typedef std::vector<const CSCRecHit2D*> ChamberHitContainer;
37  typedef std::vector<std::vector<const CSCRecHit2D*> > Segments;
38  typedef std::deque<bool> BoolContainer;
39 
41  explicit CSCSegAlgoST(const edm::ParameterSet& ps);
42 
44  ~CSCSegAlgoST() override;
45 
50  std::vector<CSCSegment> buildSegments(const ChamberHitContainer& rechits);
51 
56  std::vector<CSCSegment> buildSegments2(const ChamberHitContainer& rechits);
57 
61  std::vector<CSCSegment> run(const CSCChamber* aChamber, const ChamberHitContainer& rechits) override;
62 
66  std::vector<std::vector<const CSCRecHit2D*> > clusterHits(const CSCChamber* aChamber,
68 
69  /* Build groups of rechits that are separated in strip numbers and Z to save time on the segment finding
70  */
71  std::vector<std::vector<const CSCRecHit2D*> > chainHits(const CSCChamber* aChamber,
73 
78  std::vector<CSCSegment> prune_bad_hits(const CSCChamber* aChamber, std::vector<CSCSegment>& segments);
79 
80 private:
81  // Retrieve pset
82  const edm::ParameterSet& pset(void) const { return ps_; }
83 
84  // Adjust covariance matrix?
85  bool adjustCovariance(void) { return adjustCovariance_; }
86 
88  double theWeight(
89  double coordinate_1, double coordinate_2, double coordinate_3, float layer_1, float layer_2, float layer_3);
90 
91  void ChooseSegments(void);
92 
93  // Return the segment with the smallest weight
94  void ChooseSegments2a(std::vector<ChamberHitContainer>& best_segments, int best_seg);
95  // Version of ChooseSegments for the case without fake hits
96  void ChooseSegments2(int best_seg);
97 
98  // Choose routine with reduce nr of loops
99  void ChooseSegments3(int best_seg);
100  void ChooseSegments3(std::vector<ChamberHitContainer>& best_segments, std::vector<float>& best_weight, int best_seg);
101  //
102 
103  // Find duplicates in ME1/1a, if it has ganged strips (i.e. pre-LS1)
104  void findDuplicates(std::vector<CSCSegment>& segments);
105 
106  bool isGoodToMerge(bool isME11a, ChamberHitContainer& newChain, ChamberHitContainer& oldChain);
107 
108  void dumpSegment(const CSCSegment& seg) const;
109  const CSCChamber* chamber() const { return theChamber; }
110 
111  // Member variables
115 
118 
121 
122  std::vector<ChamberHitContainer> Psegments;
123  std::vector<ChamberHitContainer> Psegments_noLx;
124  std::vector<ChamberHitContainer> Psegments_noL1;
125  std::vector<ChamberHitContainer> Psegments_noL2;
126  std::vector<ChamberHitContainer> Psegments_noL3;
127  std::vector<ChamberHitContainer> Psegments_noL4;
128  std::vector<ChamberHitContainer> Psegments_noL5;
129  std::vector<ChamberHitContainer> Psegments_noL6;
130  std::vector<ChamberHitContainer> chosen_Psegments;
131  std::vector<float> weight_A;
132  std::vector<float> weight_noLx_A;
133  std::vector<float> weight_noL1_A;
134  std::vector<float> weight_noL2_A;
135  std::vector<float> weight_noL3_A;
136  std::vector<float> weight_noL4_A;
137  std::vector<float> weight_noL5_A;
138  std::vector<float> weight_noL6_A;
139  std::vector<float> chosen_weight_A;
140  std::vector<float> curv_A;
141  std::vector<float> curv_noL1_A;
142  std::vector<float> curv_noL2_A;
143  std::vector<float> curv_noL3_A;
144  std::vector<float> curv_noL4_A;
145  std::vector<float> curv_noL5_A;
146  std::vector<float> curv_noL6_A;
147  std::vector<float> weight_B;
148  std::vector<float> weight_noL1_B;
149  std::vector<float> weight_noL2_B;
150  std::vector<float> weight_noL3_B;
151  std::vector<float> weight_noL4_B;
152  std::vector<float> weight_noL5_B;
153  std::vector<float> weight_noL6_B;
154 
156 
157  // input from .cfi file
158  bool debug;
159  // int minLayersApart;
160  // double nSigmaFromSegment;
162  // int muonsPerChamberMax;
163  // double chi2Max;
164  double dXclusBoxMax;
165  double dYclusBoxMax;
169  bool Pruning;
174 
178 
180 
183 
185  double curvePenalty;
186 
188 
190 
191  double chi2Norm_3D_;
192 
193  bool prePrun_;
194  double prePrunLimit_;
196 };
197 
198 #endif
double yweightPenaltyThreshold
Definition: CSCSegAlgoST.h:181
std::vector< float > curv_noL1_A
Definition: CSCSegAlgoST.h:141
std::vector< CSCSegment > run(const CSCChamber *aChamber, const ChamberHitContainer &rechits) override
Definition: CSCSegAlgoST.cc:84
std::vector< float > curv_noL4_A
Definition: CSCSegAlgoST.h:144
std::vector< std::vector< const CSCRecHit2D * > > Segments
Definition: CSCSegAlgoST.h:37
bool preClustering_useChaining
Definition: CSCSegAlgoST.h:168
std::vector< float > weight_noL1_B
Definition: CSCSegAlgoST.h:148
bool condpass1
Flag whether to &#39;improve&#39; covariance matrix.
Definition: CSCSegAlgoST.h:189
double dXclusBoxMax
Definition: CSCSegAlgoST.h:164
const CSCChamber * chamber() const
Definition: CSCSegAlgoST.h:109
void dumpSegment(const CSCSegment &seg) const
const CSCChamber * theChamber
Definition: CSCSegAlgoST.h:116
std::vector< float > weight_A
Definition: CSCSegAlgoST.h:131
std::vector< float > weight_noL5_B
Definition: CSCSegAlgoST.h:152
void ChooseSegments2(int best_seg)
void ChooseSegments3(int best_seg)
std::vector< ChamberHitContainer > Psegments_noL2
Definition: CSCSegAlgoST.h:125
const edm::ParameterSet & pset(void) const
Definition: CSCSegAlgoST.h:82
CSCSegAlgoST(const edm::ParameterSet &ps)
Constructor.
Definition: CSCSegAlgoST.cc:32
bool isGoodToMerge(bool isME11a, ChamberHitContainer &newChain, ChamberHitContainer &oldChain)
std::vector< CSCSegment > buildSegments2(const ChamberHitContainer &rechits)
std::vector< float > weight_noL6_B
Definition: CSCSegAlgoST.h:153
std::vector< ChamberHitContainer > Psegments_noL3
Definition: CSCSegAlgoST.h:126
ChamberHitContainer protoSegment
Definition: CSCSegAlgoST.h:155
std::vector< float > curv_noL2_A
Definition: CSCSegAlgoST.h:142
std::vector< float > weight_noL1_A
Definition: CSCSegAlgoST.h:133
std::vector< std::vector< const CSCRecHit2D * > > clusterHits(const CSCChamber *aChamber, const ChamberHitContainer &rechits)
std::vector< float > curv_noL5_A
Definition: CSCSegAlgoST.h:145
double hitDropLimit4Hits
Definition: CSCSegAlgoST.h:175
std::vector< float > weight_B
Definition: CSCSegAlgoST.h:147
bool adjustCovariance_
Definition: CSCSegAlgoST.h:187
CSCSegAlgoShowering * showering_
Definition: CSCSegAlgoST.h:114
std::vector< float > weight_noL3_B
Definition: CSCSegAlgoST.h:150
double BPMinImprovement
Definition: CSCSegAlgoST.h:171
std::vector< float > curv_noL6_A
Definition: CSCSegAlgoST.h:146
double curvePenaltyThreshold
Definition: CSCSegAlgoST.h:184
std::vector< std::vector< const CSCRecHit2D * > > chainHits(const CSCChamber *aChamber, const ChamberHitContainer &rechits)
double hitDropLimit6Hits
Definition: CSCSegAlgoST.h:177
std::vector< float > weight_noL3_A
Definition: CSCSegAlgoST.h:135
std::vector< float > chosen_weight_A
Definition: CSCSegAlgoST.h:139
std::vector< CSCSegment > buildSegments(const ChamberHitContainer &rechits)
~CSCSegAlgoST() override
Destructor.
Definition: CSCSegAlgoST.cc:82
std::vector< CSCSegment > prune_bad_hits(const CSCChamber *aChamber, std::vector< CSCSegment > &segments)
std::vector< float > weight_noL4_A
Definition: CSCSegAlgoST.h:136
std::vector< ChamberHitContainer > Psegments_noLx
Definition: CSCSegAlgoST.h:123
std::vector< const CSCRecHit2D * > ChamberHitContainer
Typedefs.
Definition: CSCSegAlgoST.h:36
bool onlyBestSegment
Definition: CSCSegAlgoST.h:172
std::vector< ChamberHitContainer > Psegments_noL6
Definition: CSCSegAlgoST.h:129
std::vector< float > weight_noL4_B
Definition: CSCSegAlgoST.h:151
Segments GoodSegments
Definition: CSCSegAlgoST.h:117
bool adjustCovariance(void)
Definition: CSCSegAlgoST.h:85
std::vector< float > curv_A
Definition: CSCSegAlgoST.h:140
int minHitsPerSegment
Definition: CSCSegAlgoST.h:161
std::vector< float > curv_noL3_A
Definition: CSCSegAlgoST.h:143
ChamberHitContainer Psegments_hits
Definition: CSCSegAlgoST.h:120
double dYclusBoxMax
Definition: CSCSegAlgoST.h:165
void findDuplicates(std::vector< CSCSegment > &segments)
std::vector< ChamberHitContainer > Psegments_noL5
Definition: CSCSegAlgoST.h:128
std::vector< ChamberHitContainer > Psegments
Definition: CSCSegAlgoST.h:122
double theWeight(double coordinate_1, double coordinate_2, double coordinate_3, float layer_1, float layer_2, float layer_3)
Utility functions.
std::vector< float > weight_noL5_A
Definition: CSCSegAlgoST.h:137
double curvePenalty
Definition: CSCSegAlgoST.h:185
std::deque< bool > BoolContainer
Definition: CSCSegAlgoST.h:38
std::vector< ChamberHitContainer > Psegments_noL1
Definition: CSCSegAlgoST.h:124
std::vector< float > weight_noL6_A
Definition: CSCSegAlgoST.h:138
bool prePrun_
Chi^2 normalization for the initial fit.
Definition: CSCSegAlgoST.h:193
void ChooseSegments(void)
bool preClustering
Definition: CSCSegAlgoST.h:167
double yweightPenalty
Definition: CSCSegAlgoST.h:182
float a_yweightPenaltyThreshold[5][5]
Definition: CSCSegAlgoST.h:179
void ChooseSegments2a(std::vector< ChamberHitContainer > &best_segments, int best_seg)
int maxRecHitsInCluster
Definition: CSCSegAlgoST.h:166
std::vector< ChamberHitContainer > Psegments_noL4
Definition: CSCSegAlgoST.h:127
double hitDropLimit5Hits
Definition: CSCSegAlgoST.h:176
const edm::ParameterSet ps_
Definition: CSCSegAlgoST.h:113
std::vector< float > weight_noL2_A
Definition: CSCSegAlgoST.h:134
std::vector< ChamberHitContainer > chosen_Psegments
Definition: CSCSegAlgoST.h:130
const std::string myName_
Definition: CSCSegAlgoST.h:112
std::vector< float > weight_noLx_A
Definition: CSCSegAlgoST.h:132
ChamberHitContainer PAhits_onLayer[6]
Definition: CSCSegAlgoST.h:119
double chi2Norm_3D_
Definition: CSCSegAlgoST.h:191
std::vector< float > weight_noL2_B
Definition: CSCSegAlgoST.h:149
double prePrunLimit_
Definition: CSCSegAlgoST.h:195