47 StripLayerType layer_type,
48 Int_t first_strip_number,
95 Strips.resize(NStrips, 0.0);
119 if ((n_strips - (
Int_t)n_strips) < 1
E-10) {
120 return (
Int_t)n_strips;
122 return (
Int_t)(n_strips + 1);
145 if (
Abs(deg) <= 90.0) {
150 cerr <<
"WARNING: BmnSiliconLayer::SetAngleDeg(): the strip angle is incorrect and has been set to zero\n";
160 if (x_right < x_left)
178 cerr <<
"WARNING: SetStripNumberingBorders: left strip border point is incorrect\n";
183 cerr <<
"WARNING: SetStripNumberingBorders: right strip border point is incorrect\n";
230 if (status ==
true) {
250 for (
size_t izone = 0; izone <
DeadZones.size(); ++izone)
501 vector<Double_t> AnalyzableStrips =
Strips;
508 for (
Int_t is = 0; is < (
Int_t)AnalyzableStrips.size(); is++) {
509 if (AnalyzableStrips.at(is) <= threshold) {
510 if (descent || ascent) {
539 cluster.
AddStrip(is, AnalyzableStrips.at(is));
544 Int_t lastnum = AnalyzableStrips.size() - 1;
553 Double_t total_cluster_signal = 0.0;
560 if (AnalyzableStrips.at(curcnt) >= AnalyzableStrips.at(curcnt - 1)) {
562 AnalyzableStrips.at(curcnt - 1) *= 0.5;
567 for (
Int_t i = 0;
i < NStripsInCluster; ++
i) {
570 total_cluster_signal += signal;
571 mean_strip_position += (strip_num + 0.5) * signal;
573 mean_strip_position /= total_cluster_signal;
578 mean_strip_position = AnalyzableStrips.size() - 0.001;
598 Double_t sumW = total_cluster_signal;
601 if (NStripsInCluster > 1) {
602 for (
Int_t i = 0;
i < NStripsInCluster; ++
i) {
605 sumWX += strip_num * signal;
606 sumWX2 += strip_num * strip_num * signal;
608 cluster_rms = (sumWX2 - sumWX * sumWX / sumW) / sumW;
618 StripHits.push_back(mean_strip_position);
626 cluster.
Error = cluster_rms;
638 for (
Int_t i = 0;
i < NStripsInCluster; ++
i) {
664 Int_t NStrips = AnalyzableStrips.size();
666 for (
Int_t iteration = 0; iteration < NIterations; ++iteration) {
668 for (
Int_t istrip = 0; istrip < NStrips; ++istrip) {
670 for (
Int_t iw = istrip - SmoothWindow; iw <= istrip + SmoothWindow; ++iw) {
671 if (iw >= 0 && iw < NStrips) {
673 mean_value += AnalyzableStrips[iw] * Weight;
675 mean_value += AnalyzableStrips[iw];
678 mean_value /= 2.0 * SmoothWindow + Weight;
Bool_t AddDeadZone(Int_t n_points, Double_t *x_points, Double_t *y_points)
Double_t CalculateStripEquationB(Double_t strip_pos)
Bool_t IsPointInsideStripLayer(Double_t x, Double_t y)
Double_t GetStripSignal(Int_t strip_num)
Bool_t SetStripDigitNumberMatch(Int_t strip_num, BmnMatch digit_num_match)
vector< Double_t > SmoothStrips
void MakeStripHit(StripCluster &cluster, vector< Double_t > &AnalyzableStrips, Int_t &curcnt)
Double_t ClusterFindingThreshold
BmnMatch GetStripMatch(Int_t strip_num)
StripNumberingDirection StripOrder
vector< Double_t > StripHitsErrors
Bool_t SetStripMatch(Int_t strip_num, BmnMatch mc_match)
void SmoothStripSignal(vector< Double_t > &AnalyzableStrips, Int_t NIterations, Int_t SmoothWindow, Double_t Weight)
Bool_t AddStripSignal(Int_t strip_num, Double_t signal)
Bool_t SetStripSignal(Int_t strip_num, Double_t signal)
vector< Int_t > StripHitsClusterSize
void SetAngleDeg(Double_t deg)
Double_t XRightPointOfStripNumbering
Bool_t IsPointInsideDeadZones(Double_t x, Double_t y)
Bool_t AddLinkToStripMatch(Int_t strip_num, Double_t weight, Int_t mc_num)
void ResetStripDigitNumberMatches()
Bool_t SetStripNumberingBorders(Double_t x_left, Double_t y_left, Double_t x_right, Double_t y_right)
BmnMatch GetStripDigitNumberMatch(Int_t strip_num)
Double_t GetStripHitPos(Int_t num)
vector< Double_t > StripHitsTotalSignal
Double_t XLeftPointOfStripNumbering
Bool_t SetStripNumberingOrder(StripNumberingDirection strip_direction)
Double_t ConvertNormalPointToStripY(Double_t x, Double_t y)
vector< StripCluster > StripClusters
Double_t GetStripHitError(Int_t num)
Int_t GetStripHitClusterSize(Int_t num)
void SetPitch(Double_t pitch)
Bool_t AddLinkToStripDigitNumberMatch(Int_t strip_num, Double_t weight, Int_t digit_num)
vector< Double_t > Strips
vector< Double_t > StripHits
vector< BmnMatch > StripMatches
void SetLayerSizes(Double_t xsize, Double_t ysize, Double_t xorig=0.0, Double_t yorig=0.0)
Double_t ConvertNormalPointToStripX(Double_t x, Double_t y)
void FindClustersAndStripHits()
Double_t ConvertPointToStripPosition(Double_t x, Double_t y)
Double_t GetStripHitTotalSignal(Int_t num)
Double_t YRightPointOfStripNumbering
vector< BmnMatch > StripDigitNumberMatches
vector< DeadZoneOfStripLayer > DeadZones
virtual ~BmnSiliconLayer()
Double_t YLeftPointOfStripNumbering
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)