47 StripLayerType layer_type,
48 Int_t first_strip_number,
95 Strips.resize(NStrips, 0.0);
127 return (
Int_t)n_strips;
149 if (
Abs(deg) <= 90.0) {
154 cerr <<
"WARNING: BmnVSPLayer::SetAngleDeg(): the strip angle is incorrect and has been set to zero\n";
164 if (x_right < x_left)
182 cerr <<
"WARNING: SetStripNumberingBorders: left strip border point is incorrect\n";
187 cerr <<
"WARNING: SetStripNumberingBorders: right strip border point is incorrect\n";
234 if (status ==
true) {
254 for (
size_t izone = 0; izone <
DeadZones.size(); ++izone) {
506 vector<Double_t> AnalyzableStrips =
Strips;
513 for (
Int_t is = 0; is < (
Int_t)AnalyzableStrips.size(); is++) {
514 if (AnalyzableStrips.at(is) <= threshold) {
515 if (descent || ascent) {
544 cluster.
AddStrip(is, AnalyzableStrips.at(is));
549 Int_t lastnum = AnalyzableStrips.size() - 1;
558 Double_t total_cluster_signal = 0.0;
565 if (AnalyzableStrips.at(curcnt) >= AnalyzableStrips.at(curcnt - 1)) {
567 AnalyzableStrips.at(curcnt - 1) *= 0.5;
572 for (
Int_t i = 0;
i < NStripsInCluster; ++
i) {
575 total_cluster_signal += signal;
576 mean_strip_position += (strip_num + 0.5) * signal;
578 mean_strip_position /= total_cluster_signal;
583 mean_strip_position = AnalyzableStrips.size() - 0.001;
603 Double_t sumW = total_cluster_signal;
606 if (NStripsInCluster > 1) {
607 for (
Int_t i = 0;
i < NStripsInCluster; ++
i) {
610 sumWX += strip_num * signal;
611 sumWX2 += strip_num * strip_num * signal;
613 cluster_rms = (sumWX2 - sumWX * sumWX / sumW) / sumW;
623 StripHits.push_back(mean_strip_position);
631 cluster.
Error = cluster_rms;
643 for (
Int_t i = 0;
i < NStripsInCluster; ++
i) {
669 size_t NStrips = AnalyzableStrips.size();
671 for (
Int_t iteration = 0; iteration < NIterations; ++iteration) {
673 for (
size_t istrip = 0; istrip < NStrips; ++istrip) {
675 for (
size_t iw = istrip - SmoothWindow; iw <= (size_t)istrip + SmoothWindow; ++iw) {
676 if (iw >= 0 && iw < NStrips) {
678 mean_value += AnalyzableStrips[iw] * Weight;
680 mean_value += AnalyzableStrips[iw];
683 mean_value /= 2.0 * SmoothWindow + Weight;
Bool_t AddStripSignal(Int_t strip_num, Double_t signal)
Double_t GetStripHitError(Int_t num)
StripNumberingDirection StripOrder
vector< Double_t > Strips
Double_t ConvertNormalPointToStripY(Double_t x, Double_t y)
vector< Double_t > StripHitsErrors
vector< BmnMatch > StripMatches
Double_t XRightPointOfStripNumbering
vector< Double_t > StripHits
Double_t YRightPointOfStripNumbering
Double_t CalculateStripEquationB(Double_t strip_pos)
Double_t ConvertNormalPointToStripX(Double_t x, Double_t y)
void MakeStripHit(StripCluster &cluster, vector< Double_t > &AnalyzableStrips, Int_t &curcnt)
Bool_t SetStripNumberingOrder(StripNumberingDirection strip_direction)
vector< Double_t > StripHitsTotalSignal
vector< Int_t > StripHitsClusterSize
Double_t GetStripHitPos(Int_t num)
Double_t ClusterFindingThreshold
Bool_t SetStripMatch(Int_t strip_num, BmnMatch mc_match)
BmnMatch GetStripMatch(Int_t strip_num)
Bool_t SetStripSignal(Int_t strip_num, Double_t signal)
Double_t ConvertPointToStripPosition(Double_t x, Double_t y)
vector< BmnMatch > StripDigitNumberMatches
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)
void ResetStripDigitNumberMatches()
Bool_t AddLinkToStripDigitNumberMatch(Int_t strip_num, Double_t weight, Int_t digit_num)
BmnMatch GetStripDigitNumberMatch(Int_t strip_num)
void FindClustersAndStripHits()
vector< StripCluster > StripClusters
Int_t GetStripHitClusterSize(Int_t num)
void SmoothStripSignal(vector< Double_t > &AnalyzableStrips, Int_t NIterations, Int_t SmoothWindow, Double_t Weight)
Bool_t SetStripDigitNumberMatch(Int_t strip_num, BmnMatch digit_num_match)
vector< Double_t > SmoothStrips
Double_t GetStripSignal(Int_t strip_num)
Double_t GetStripHitTotalSignal(Int_t num)
void SetLayerSizes(Double_t xsize, Double_t ysize, Double_t xorig=0.0, Double_t yorig=0.0)
void SetPitch(Double_t pitch)
void SetAngleDeg(Double_t deg)
Double_t YLeftPointOfStripNumbering
Double_t XLeftPointOfStripNumbering
Bool_t AddLinkToStripMatch(Int_t strip_num, Double_t weight, Int_t mc_num)
Bool_t IsPointInsideStripLayer(Double_t x, Double_t y)
vector< DeadZoneOfStripLayer > DeadZones
Bool_t AddDeadZone(Int_t n_points, Double_t *x_points, Double_t *y_points)
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)