test
CMS 3D CMS Logo

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