37 StripLayerType layer_type,
81 Strips.resize(NStrips, 0.0);
105 if ((n_strips - (
Int_t)n_strips) < 1
E-10) {
106 return (
Int_t)n_strips;
108 return (
Int_t)(n_strips + 1);
131 if (
Abs(deg) <= 90.0) {
136 cerr <<
"WARNING: BmnCSCLayer::SetAngleDeg(): the strip angle is incorrect and has been set to zero\n";
146 if (x_right < x_left)
164 cerr <<
"WARNING: SetStripNumberingBorders: left strip border point is incorrect\n";
169 cerr <<
"WARNING: SetStripNumberingBorders: right strip border point is incorrect\n";
216 if (status ==
true) {
236 for (
size_t izone = 0; izone <
DeadZones.size(); ++izone) {
254 if (strip_num >= 0 && strip_num < (
Int_t)
Strips.size()) {
255 Strips[strip_num] = signal;
263 if (strip_num >= 0 && strip_num < (
Int_t)
Strips.size()) {
264 Strips[strip_num] += signal;
272 if (strip_num >= 0 && strip_num < (
Int_t)
Strips.size()) {
488 vector<Double_t> AnalyzableStrips =
Strips;
495 for (
Int_t is = 0; is < (
Int_t)AnalyzableStrips.size(); is++) {
496 if (AnalyzableStrips.at(is) <= threshold) {
497 if (descent || ascent) {
526 cluster.
AddStrip(is, AnalyzableStrips.at(is));
531 Int_t lastnum = AnalyzableStrips.size() - 1;
540 Double_t total_cluster_signal = 0.0;
547 if (AnalyzableStrips.at(curcnt) >= AnalyzableStrips.at(curcnt - 1)) {
549 AnalyzableStrips.at(curcnt - 1) *= 0.5;
554 for (
Int_t i = 0;
i < NStripsInCluster; ++
i) {
557 total_cluster_signal += signal;
558 mean_strip_position += (strip_num + 0.5) * signal;
560 mean_strip_position /= total_cluster_signal;
562 if (mean_strip_position < 0.0)
563 mean_strip_position = 0.0;
564 if (mean_strip_position >= AnalyzableStrips.size())
565 mean_strip_position = AnalyzableStrips.size() - 0.001;
585 Double_t sumW = total_cluster_signal;
588 if (NStripsInCluster > 1) {
589 for (
Int_t i = 0;
i < NStripsInCluster; ++
i) {
592 sumWX += strip_num * signal;
593 sumWX2 += strip_num * strip_num * signal;
595 cluster_rms = (sumWX2 - sumWX * sumWX / sumW) / sumW;
618 StripHits.push_back(mean_strip_position);
626 cluster.
Error = cluster_rms;
657 Int_t NStrips = AnalyzableStrips.size();
659 for (
Int_t iteration = 0; iteration < NIterations; ++iteration) {
661 for (
Int_t istrip = 0; istrip < NStrips; ++istrip) {
663 for (
Int_t iw = istrip - SmoothWindow; iw <= istrip + SmoothWindow; ++iw) {
664 if (iw >= 0 && iw < NStrips) {
666 mean_value += AnalyzableStrips[iw] * Weight;
668 mean_value += AnalyzableStrips[iw];
671 mean_value /= 2.0 * SmoothWindow + Weight;
vector< Double_t > SmoothStrips
Double_t CalculateStripEquationB(Double_t strip_pos)
Bool_t SetStripMatch(Int_t strip_num, BmnMatch strip_match)
Double_t XLeftPointOfStripNumbering
vector< BmnMatch > StripDigitNumberMatches
vector< Double_t > Strips
Double_t YLeftPointOfStripNumbering
Double_t GetStripHitPos(Int_t num)
void MakeStripHit(StripCluster &cluster, vector< Double_t > &AnalyzableStrips, Int_t &curcnt)
Bool_t SetStripDigitNumberMatch(Int_t strip_num, BmnMatch digit_num_match)
void SetAngleDeg(Double_t deg)
Double_t ConvertNormalPointToStripX(Double_t x, Double_t y)
vector< BmnMatch > StripMatches
BmnMatch GetStripDigitNumberMatch(Int_t strip_num)
void SmoothStripSignal(vector< Double_t > &AnalyzableStrips, Int_t NIterations, Int_t SmoothWindow, Double_t Weight)
void SetLayerSizes(Double_t xsize, Double_t ysize, Double_t xorig=0.0, Double_t yorig=0.0)
Bool_t AddStripSignal(Int_t strip_num, Double_t signal)
Double_t GetStripHitError(Int_t num)
Double_t YRightPointOfStripNumbering
vector< Double_t > StripHitsErrors
Double_t GetStripSignal(Int_t strip_num)
Double_t ConvertPointToStripPosition(Double_t x, Double_t y)
Double_t ConvertNormalPointToStripY(Double_t x, Double_t y)
Bool_t AddDeadZone(Int_t n_points, Double_t *x_points, Double_t *y_points)
Bool_t SetStripNumberingOrder(StripNumberingDirection strip_direction)
Bool_t AddLinkToStripMatch(Int_t strip_num, Double_t weight, Int_t refID)
Int_t GetStripHitClusterSize(Int_t num)
Bool_t SetStripNumberingBorders(Double_t x_left, Double_t y_left, Double_t x_right, Double_t y_right)
Bool_t IsPointInsideDeadZones(Double_t x, Double_t y)
vector< Double_t > StripHits
Bool_t IsPointInsideStripLayer(Double_t x, Double_t y)
BmnMatch GetStripMatch(Int_t strip_num)
Double_t XRightPointOfStripNumbering
StripNumberingDirection StripOrder
vector< Int_t > StripHitsClusterSize
void SetPitch(Double_t pitch)
Bool_t SetStripSignal(Int_t strip_num, Double_t signal)
void ResetStripDigitNumberMatches()
void FindClustersAndStripHits()
vector< DeadZoneOfStripLayer > DeadZones
Double_t GetStripHitTotalSignal(Int_t num)
vector< StripCluster > StripClusters
Bool_t AddLinkToStripDigitNumberMatch(Int_t strip_num, Double_t weight, Int_t digit_num)
Double_t ClusterFindingThreshold
vector< Double_t > StripHitsTotalSignal
Bool_t SetDeadZone(Int_t n_points, Double_t *xpoints, Double_t *ypoints)
void AddStrip(Int_t strip_num, Double_t strip_signal)
vector< Double_t > Signals
virtual void SetUniqueID(UInt_t uid)
Bool_t IsInside(T xp, T yp, Int_t np, T *x, T *y)
constexpr Double_t PiOver2()
Double_t Sqrt(Double_t x)