34 StripLayerType layer_type,
78 Strips.resize(NStrips, 0.0);
98 if ((n_strips - (
Int_t)n_strips) < 1
E-10) {
99 return (
Int_t)n_strips;
101 return (
Int_t)(n_strips + 1);
124 if (
Abs(deg) <= 90.0) {
129 cerr <<
"WARNING: BmnSiProfLayer::SetAngleDeg(): the strip angle is incorrect and has been set to zero\n";
139 if (x_right < x_left)
157 cerr <<
"WARNING: SetStripNumberingBorders: left strip border point is incorrect\n";
162 cerr <<
"WARNING: SetStripNumberingBorders: right strip border point is incorrect\n";
209 if (status ==
true) {
229 for (
size_t izone = 0; izone <
DeadZones.size(); ++izone) {
247 if (strip_num >= 0 && strip_num < (
Int_t)
Strips.size()) {
248 Strips[strip_num] = signal;
256 if (strip_num >= 0 && strip_num < (
Int_t)
Strips.size()) {
257 Strips[strip_num] += signal;
265 if (strip_num >= 0 && strip_num < (
Int_t)
Strips.size()) {
446 vector<Double_t> AnalyzableStrips =
Strips;
453 for (
Int_t is = 0; is < (
Int_t)AnalyzableStrips.size(); is++) {
454 if (AnalyzableStrips.at(is) <= threshold) {
455 if (descent || ascent) {
484 cluster.
AddStrip(is, AnalyzableStrips.at(is));
489 Int_t lastnum = AnalyzableStrips.size() - 1;
498 Double_t total_cluster_signal = 0.0;
505 if (AnalyzableStrips.at(curcnt) >= AnalyzableStrips.at(curcnt - 1)) {
507 AnalyzableStrips.at(curcnt - 1) *= 0.5;
512 for (
Int_t i = 0;
i < NStripsInCluster; ++
i) {
515 total_cluster_signal += signal;
516 mean_strip_position += (strip_num + 0.5) * signal;
518 mean_strip_position /= total_cluster_signal;
520 if (mean_strip_position < 0.0)
521 mean_strip_position = 0.0;
522 if (mean_strip_position >= AnalyzableStrips.size())
523 mean_strip_position = AnalyzableStrips.size() - 0.001;
543 Double_t sumW = total_cluster_signal;
546 if (NStripsInCluster > 1) {
547 for (
Int_t i = 0;
i < NStripsInCluster; ++
i) {
550 sumWX += strip_num * signal;
551 sumWX2 += strip_num * strip_num * signal;
553 cluster_rms = (sumWX2 - sumWX * sumWX / sumW) / sumW;
576 StripHits.push_back(mean_strip_position);
601 Int_t NStrips = AnalyzableStrips.size();
603 for (
Int_t iteration = 0; iteration < NIterations; ++iteration) {
605 for (
Int_t istrip = 0; istrip < NStrips; ++istrip) {
607 for (
Int_t iw = istrip - SmoothWindow; iw <= istrip + SmoothWindow; ++iw) {
608 if (iw >= 0 && iw < NStrips) {
610 mean_value += AnalyzableStrips[iw] * Weight;
612 mean_value += AnalyzableStrips[iw];
615 mean_value /= 2.0 * SmoothWindow + Weight;
Double_t ConvertNormalPointToStripX(Double_t x, Double_t y)
Double_t GetStripSignal(Int_t strip_num)
Bool_t IsPointInsideDeadZones(Double_t x, Double_t y)
Bool_t SetStripSignal(Int_t strip_num, Double_t signal)
Double_t GetStripHitError(Int_t num)
Double_t ConvertNormalPointToStripY(Double_t x, Double_t y)
Double_t GetStripHitPos(Int_t num)
Bool_t SetStripMatch(Int_t strip_num, BmnMatch strip_match)
void SetLayerSizes(Double_t xsize, Double_t ysize, Double_t xorig=0.0, Double_t yorig=0.0)
void MakeStripHit(StripCluster &cluster, vector< Double_t > &AnalyzableStrips, Int_t &curcnt)
vector< Int_t > StripHitsClusterSize
Double_t CalculateStripEquationB(Double_t strip_pos)
Double_t XRightPointOfStripNumbering
vector< Double_t > StripHitsErrors
Bool_t AddDeadZone(Int_t n_points, Double_t *x_points, Double_t *y_points)
vector< Double_t > SmoothStrips
Double_t YLeftPointOfStripNumbering
Bool_t AddLinkToStripMatch(Int_t strip_num, Double_t weight, Int_t refID)
Bool_t IsPointInsideStripLayer(Double_t x, Double_t y)
Double_t ConvertPointToStripPosition(Double_t x, Double_t y)
Double_t XLeftPointOfStripNumbering
StripNumberingDirection StripOrder
Double_t GetStripHitTotalSignal(Int_t num)
vector< Double_t > StripHitsTotalSignal
Bool_t AddStripSignal(Int_t strip_num, Double_t signal)
Double_t YRightPointOfStripNumbering
Double_t ClusterFindingThreshold
Bool_t SetStripNumberingOrder(StripNumberingDirection strip_direction)
vector< Double_t > Strips
void SetAngleDeg(Double_t deg)
Bool_t SetStripNumberingBorders(Double_t x_left, Double_t y_left, Double_t x_right, Double_t y_right)
vector< DeadZoneOfStripLayer > DeadZones
vector< BmnMatch > StripMatches
Int_t GetStripHitClusterSize(Int_t num)
virtual ~BmnSiProfLayer()
void SetPitch(Double_t pitch)
BmnMatch GetStripMatch(Int_t strip_num)
void FindClustersAndStripHits()
vector< Double_t > StripHits
void SmoothStripSignal(vector< Double_t > &AnalyzableStrips, Int_t NIterations, Int_t SmoothWindow, Double_t Weight)
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
Bool_t IsInside(T xp, T yp, Int_t np, T *x, T *y)
constexpr Double_t PiOver2()
Double_t Sqrt(Double_t x)