CMS 3D CMS Logo

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
CSCSegAlgoST::weight_noL1_B
std::vector< float > weight_noL1_B
Definition: CSCSegAlgoST.h:148
CSCSegAlgoST::ChooseSegments2
void ChooseSegments2(int best_seg)
Definition: CSCSegAlgoST.cc:1690
CSCSegmentAlgorithm
Definition: CSCSegmentAlgorithm.h:23
CSCSegAlgoST::curv_noL5_A
std::vector< float > curv_noL5_A
Definition: CSCSegAlgoST.h:145
CSCSegAlgoST::protoSegment
ChamberHitContainer protoSegment
Definition: CSCSegAlgoST.h:155
CSCSegAlgoST::a_yweightPenaltyThreshold
float a_yweightPenaltyThreshold[5][5]
Definition: CSCSegAlgoST.h:179
CSCSegAlgoST::weight_noL2_A
std::vector< float > weight_noL2_A
Definition: CSCSegAlgoST.h:134
CSCSegAlgoST::Segments
std::vector< std::vector< const CSCRecHit2D * > > Segments
Definition: CSCSegAlgoST.h:37
CSCSegAlgoST::PAhits_onLayer
ChamberHitContainer PAhits_onLayer[6]
Definition: CSCSegAlgoST.h:119
CSCSegAlgoST::ps_
const edm::ParameterSet ps_
Definition: CSCSegAlgoST.h:113
CSCSegAlgoST::showering_
CSCSegAlgoShowering * showering_
Definition: CSCSegAlgoST.h:114
CSCSegAlgoST::preClustering_useChaining
bool preClustering_useChaining
Definition: CSCSegAlgoST.h:168
CSCSegAlgoST::weight_noL1_A
std::vector< float > weight_noL1_A
Definition: CSCSegAlgoST.h:133
CSCSegAlgoST::adjustCovariance_
bool adjustCovariance_
Definition: CSCSegAlgoST.h:187
CSCSegAlgoST::curv_noL6_A
std::vector< float > curv_noL6_A
Definition: CSCSegAlgoST.h:146
CSCSegAlgoST::curv_noL1_A
std::vector< float > curv_noL1_A
Definition: CSCSegAlgoST.h:141
CSCSegAlgoShowering
Definition: CSCSegAlgoShowering.h:26
CSCSegAlgoST::weight_B
std::vector< float > weight_B
Definition: CSCSegAlgoST.h:147
CSCSegAlgoST::~CSCSegAlgoST
~CSCSegAlgoST() override
Destructor.
Definition: CSCSegAlgoST.cc:82
CSCSegAlgoST::Psegments_noLx
std::vector< ChamberHitContainer > Psegments_noLx
Definition: CSCSegAlgoST.h:123
CSCSegAlgoST::theChamber
const CSCChamber * theChamber
Definition: CSCSegAlgoST.h:116
CSCSegAlgoST::curvePenaltyThreshold
double curvePenaltyThreshold
Definition: CSCSegAlgoST.h:184
CSCSegAlgoST::prune_bad_hits
std::vector< CSCSegment > prune_bad_hits(const CSCChamber *aChamber, std::vector< CSCSegment > &segments)
Definition: CSCSegAlgoST.cc:177
CSCSegAlgoST::Psegments_noL2
std::vector< ChamberHitContainer > Psegments_noL2
Definition: CSCSegAlgoST.h:125
CSCSegAlgoST::chamber
const CSCChamber * chamber() const
Definition: CSCSegAlgoST.h:109
CSCSegAlgoST::debug
bool debug
Definition: CSCSegAlgoST.h:158
CSCSegAlgoST::curv_noL2_A
std::vector< float > curv_noL2_A
Definition: CSCSegAlgoST.h:142
CSCSegAlgoST::minHitsPerSegment
int minHitsPerSegment
Definition: CSCSegAlgoST.h:161
CSCSegAlgoST::Psegments_noL3
std::vector< ChamberHitContainer > Psegments_noL3
Definition: CSCSegAlgoST.h:126
CSCSegAlgoST::buildSegments
std::vector< CSCSegment > buildSegments(const ChamberHitContainer &rechits)
Definition: CSCSegAlgoST.cc:656
CSCSegAlgoST::weight_noL5_B
std::vector< float > weight_noL5_B
Definition: CSCSegAlgoST.h:152
CSCChamber
Definition: CSCChamber.h:22
HI_PhotonSkim_cff.rechits
rechits
Definition: HI_PhotonSkim_cff.py:76
CSCSegAlgoST::Psegments_hits
ChamberHitContainer Psegments_hits
Definition: CSCSegAlgoST.h:120
CSCSegAlgoST::dYclusBoxMax
double dYclusBoxMax
Definition: CSCSegAlgoST.h:165
CSCSegAlgoST::Psegments_noL6
std::vector< ChamberHitContainer > Psegments_noL6
Definition: CSCSegAlgoST.h:129
CSCSegment
Definition: CSCSegment.h:21
CSCSegAlgoST::theWeight
double theWeight(double coordinate_1, double coordinate_2, double coordinate_3, float layer_1, float layer_2, float layer_3)
Utility functions.
Definition: CSCSegAlgoST.cc:644
CSCSegAlgoST::findDuplicates
void findDuplicates(std::vector< CSCSegment > &segments)
Definition: CSCSegAlgoST.cc:1740
CSCSegAlgoST::GoodSegments
Segments GoodSegments
Definition: CSCSegAlgoST.h:117
CSCSegAlgoST::Psegments
std::vector< ChamberHitContainer > Psegments
Definition: CSCSegAlgoST.h:122
CSCSegAlgoST::CSCSegAlgoST
CSCSegAlgoST(const edm::ParameterSet &ps)
Constructor.
Definition: CSCSegAlgoST.cc:32
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
CSCSegAlgoST::BoolContainer
std::deque< bool > BoolContainer
Definition: CSCSegAlgoST.h:38
CSCSegAlgoST::weight_noL4_B
std::vector< float > weight_noL4_B
Definition: CSCSegAlgoST.h:151
CSCSegAlgoST::clusterHits
std::vector< std::vector< const CSCRecHit2D * > > clusterHits(const CSCChamber *aChamber, const ChamberHitContainer &rechits)
Definition: CSCSegAlgoST.cc:380
edm::ParameterSet
Definition: ParameterSet.h:47
CSCSegAlgoST::curv_A
std::vector< float > curv_A
Definition: CSCSegAlgoST.h:140
CSCSegAlgoST::yweightPenalty
double yweightPenalty
Definition: CSCSegAlgoST.h:182
CSCSegAlgoST::weight_noL3_B
std::vector< float > weight_noL3_B
Definition: CSCSegAlgoST.h:150
CSCSegAlgoST::weight_noL6_A
std::vector< float > weight_noL6_A
Definition: CSCSegAlgoST.h:138
CSCSegAlgoST::chainHits
std::vector< std::vector< const CSCRecHit2D * > > chainHits(const CSCChamber *aChamber, const ChamberHitContainer &rechits)
Definition: CSCSegAlgoST.cc:504
CSCSegAlgoST::hitDropLimit6Hits
double hitDropLimit6Hits
Definition: CSCSegAlgoST.h:177
CSCSegAlgoST::BPMinImprovement
double BPMinImprovement
Definition: CSCSegAlgoST.h:171
CSCSegAlgoST::hitDropLimit4Hits
double hitDropLimit4Hits
Definition: CSCSegAlgoST.h:175
CSCSegAlgoST::condpass2
bool condpass2
Definition: CSCSegAlgoST.h:189
CSCSegAlgoST::curvePenalty
double curvePenalty
Definition: CSCSegAlgoST.h:185
CSCSegAlgoST::weight_noL3_A
std::vector< float > weight_noL3_A
Definition: CSCSegAlgoST.h:135
CSCSegAlgoST::BrutePruning
bool BrutePruning
Definition: CSCSegAlgoST.h:170
CSCSegAlgoST::maxRecHitsInCluster
int maxRecHitsInCluster
Definition: CSCSegAlgoST.h:166
CSCSegAlgoST::myName_
const std::string myName_
Definition: CSCSegAlgoST.h:112
CSCSegAlgoST::chosen_weight_A
std::vector< float > chosen_weight_A
Definition: CSCSegAlgoST.h:139
CSCSegAlgoST::Psegments_noL1
std::vector< ChamberHitContainer > Psegments_noL1
Definition: CSCSegAlgoST.h:124
CSCSegAlgoST::Psegments_noL4
std::vector< ChamberHitContainer > Psegments_noL4
Definition: CSCSegAlgoST.h:127
CSCSegAlgoST::weight_noLx_A
std::vector< float > weight_noLx_A
Definition: CSCSegAlgoST.h:132
CSCSegAlgoST::hitDropLimit5Hits
double hitDropLimit5Hits
Definition: CSCSegAlgoST.h:176
CSCSegAlgoST::prePrun_
bool prePrun_
Chi^2 normalization for the initial fit.
Definition: CSCSegAlgoST.h:193
CSCSegAlgoST::ChooseSegments
void ChooseSegments(void)
CSCSegAlgoST
Definition: CSCSegAlgoST.h:32
CSCSegAlgoST::weight_noL4_A
std::vector< float > weight_noL4_A
Definition: CSCSegAlgoST.h:136
CSCSegAlgoST::curv_noL3_A
std::vector< float > curv_noL3_A
Definition: CSCSegAlgoST.h:143
CSCSegAlgoST::ChamberHitContainer
std::vector< const CSCRecHit2D * > ChamberHitContainer
Typedefs.
Definition: CSCSegAlgoST.h:36
CSCSegAlgoST::run
std::vector< CSCSegment > run(const CSCChamber *aChamber, const ChamberHitContainer &rechits) override
Definition: CSCSegAlgoST.cc:84
CSCSegAlgoST::curv_noL4_A
std::vector< float > curv_noL4_A
Definition: CSCSegAlgoST.h:144
CSCSegAlgoST::weight_noL2_B
std::vector< float > weight_noL2_B
Definition: CSCSegAlgoST.h:149
CSCSegAlgoST::yweightPenaltyThreshold
double yweightPenaltyThreshold
Definition: CSCSegAlgoST.h:181
CSCSegmentAlgorithm.h
CSCSegAlgoST::adjustCovariance
bool adjustCovariance(void)
Definition: CSCSegAlgoST.h:85
CSCSegAlgoST::chosen_Psegments
std::vector< ChamberHitContainer > chosen_Psegments
Definition: CSCSegAlgoST.h:130
CSCSegAlgoST::Pruning
bool Pruning
Definition: CSCSegAlgoST.h:169
CSCSegAlgoST::onlyBestSegment
bool onlyBestSegment
Definition: CSCSegAlgoST.h:172
CSCSegAlgoST::chi2Norm_3D_
double chi2Norm_3D_
Definition: CSCSegAlgoST.h:191
CSCSegAlgoST::prePrunLimit_
double prePrunLimit_
Definition: CSCSegAlgoST.h:195
CSCSegAlgoST::weight_noL5_A
std::vector< float > weight_noL5_A
Definition: CSCSegAlgoST.h:137
CSCSegAlgoST::dXclusBoxMax
double dXclusBoxMax
Definition: CSCSegAlgoST.h:164
CSCRecHit2D.h
ParameterSet.h
CSCSegAlgoST::ChooseSegments2a
void ChooseSegments2a(std::vector< ChamberHitContainer > &best_segments, int best_seg)
Definition: CSCSegAlgoST.cc:1630
CSCSegAlgoST::Psegments_noL5
std::vector< ChamberHitContainer > Psegments_noL5
Definition: CSCSegAlgoST.h:128
CSCSegAlgoST::weight_A
std::vector< float > weight_A
Definition: CSCSegAlgoST.h:131
CSCSegAlgoST::useShowering
bool useShowering
Definition: CSCSegAlgoST.h:173
CSCSegAlgoST::pset
const edm::ParameterSet & pset(void) const
Definition: CSCSegAlgoST.h:82
CSCSegAlgoST::condpass1
bool condpass1
Flag whether to 'improve' covariance matrix.
Definition: CSCSegAlgoST.h:189
CSCSegAlgoST::preClustering
bool preClustering
Definition: CSCSegAlgoST.h:167
CSCSegAlgoST::isGoodToMerge
bool isGoodToMerge(bool isME11a, ChamberHitContainer &newChain, ChamberHitContainer &oldChain)
Definition: CSCSegAlgoST.cc:579
CSCSegAlgoST::buildSegments2
std::vector< CSCSegment > buildSegments2(const ChamberHitContainer &rechits)
CSCSegAlgoST::weight_noL6_B
std::vector< float > weight_noL6_B
Definition: CSCSegAlgoST.h:153
CSCSegAlgoST::ChooseSegments3
void ChooseSegments3(int best_seg)
CSCSegAlgoST::dumpSegment
void dumpSegment(const CSCSegment &seg) const
Definition: CSCSegAlgoST.cc:1765