BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnSiProfLayer.h
Go to the documentation of this file.
1#ifndef BMNSiProfLAYER_H
2#define BMNSiProfLAYER_H
3
4#include "BmnMatch.h"
5#include "BmnStripData.h"
6#include "TMath.h"
7
8#include <iostream>
9#include <vector>
10
11using namespace TMath;
12using namespace std;
13
15{
16
17 public:
18 // Constructors -------------------------------------------------------------
20
21 BmnSiProfLayer(Int_t zone_number,
22 StripLayerType layer_type,
23 Double_t xsize,
24 Double_t ysize,
25 Double_t xorig,
26 Double_t yorig,
27 Double_t pitch,
28 Double_t adeg);
29 //--------------------------------------------------------------------------
30
31 // Destructor
32 virtual ~BmnSiProfLayer();
33
34 void InitializeLayer();
35 void ResetLayer(); // clear all data and rebuild the layer in accordance with new parameters
36
38
39 void SetVerbosity(Bool_t verb) { Verbosity = verb; }
40 void SetPitch(Double_t pitch);
41 void SetLayerSizes(Double_t xsize, Double_t ysize, Double_t xorig = 0.0, Double_t yorig = 0.0);
42 void SetAngleDeg(Double_t deg); // plus - clockwise from vertical
43
46 StripLayerType GetType() { return LayerType; }
47 Double_t GetPitch() { return Pitch; }
56
57 // Strip numbering methods --------------------------------------------------
59 Double_t y_left,
60 Double_t x_right,
61 Double_t y_right); // or method below
64
65 StripNumberingDirection GetStripNumberingOrder() { return StripOrder; }
70 //--------------------------------------------------------------------------
71
72 // Dead zones methods -------------------------------------------------------
73 Bool_t AddDeadZone(Int_t n_points, Double_t* x_points, Double_t* y_points);
77
78 vector<DeadZoneOfStripLayer> GetDeadZones() { return DeadZones; }
79 void ResetAllDeadZones() { DeadZones.clear(); }
80 //--------------------------------------------------------------------------
81
82 // Direct strip signal manipulation -----------------------------------------
83 Bool_t SetStripSignal(Int_t strip_num, Double_t signal); // replace signal
84 Bool_t AddStripSignal(Int_t strip_num, Double_t signal); // add signal
85
86 Double_t GetStripSignal(Int_t strip_num); // signal of strip_num-strip
87 //--------------------------------------------------------------------------
88
89 // Strip matches controls ---------------------------------------------------
90 Bool_t SetStripMatch(Int_t strip_num, BmnMatch strip_match);
91 Bool_t AddLinkToStripMatch(Int_t strip_num, Double_t weight, Int_t refID);
92
93 BmnMatch GetStripMatch(Int_t strip_num); // match of strip_num-strip
94 void ResetStripMatches();
95 //--------------------------------------------------------------------------
96
97 // Strip hits ---------------------------------------------------------------
98 Int_t GetNStripHits() { return StripHits.size(); } // number of hits at the layer
99 Double_t GetStripHitPos(Int_t num); // hit position
100 Double_t GetStripHitTotalSignal(Int_t num); // sum signal of the hit
101 Double_t GetStripHitError(Int_t num); // hit error
102 Int_t GetStripHitClusterSize(Int_t num); // number of strips in the cluster for the num-hit
103 void ResetStripHits();
104 //--------------------------------------------------------------------------
105
106 // Methods to convert point coordinates into strip system -------------------
109
111
113 //--------------------------------------------------------------------------
114
115 // Clustering and strip-hit finding methods ---------------------------------------
117 void MakeStripHit(StripCluster& cluster, vector<Double_t>& AnalyzableStrips, Int_t& curcnt);
118 void SmoothStripSignal(vector<Double_t>& AnalyzableStrips, Int_t NIterations, Int_t SmoothWindow, Double_t Weight);
119
122
123 vector<Double_t> GetSmoothStrips() { return SmoothStrips; } // for test
124 //--------------------------------------------------------------------------
125
126 private:
127 // BmnSiProfLayer(const BmnSiProfLayer&) = delete;
128 // BmnSiProfLayer& operator=(const BmnSiProfLayer&) = delete;
129
130 private:
132
133 Int_t LayerZoneNumber; // zone number of the strip layer
134 StripLayerType LayerType; // type of the strip layer: lower or upper
135
137 Double_t AngleDeg; // Angle between two sets of parallel strips: angle from vertical
139
144
145 vector<DeadZoneOfStripLayer> DeadZones;
146
147 // Strip arrangement
148 StripNumberingDirection StripOrder; // strip numbering order (LeftToRight or RightToLeft)
153
154 // Strip layer implementation
155 vector<Double_t> Strips;
156
157 // Strip matches
158 vector<BmnMatch> StripMatches; // ID-point matches for all strips
159
160 // Strip hits (It is filled after cluster finding and fitting) --------------
161 vector<Double_t> StripHits; // positions of strip hits
162 vector<Double_t> StripHitsTotalSignal;
163 vector<Double_t> StripHitsErrors;
164 vector<Int_t> StripHitsClusterSize; // cluster size (number of strips) for each strip hit
165 vector<Double_t> SmoothStrips; // smoothed signal strips (It is filled after smoothing algorithm)
166 Double_t ClusterFindingThreshold; // min. threshold cut
167 //--------------------------------------------------------------------------
168};
169//------------------------------------------------------------------------------
170
171#endif /* BMNSiProfLAYER_H */
bool Bool_t
int Int_t
double Double_t
StripBorderPoint
StripNumberingDirection
Double_t GetXMaxLayer()
Double_t GetYSize()
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 GetAngleRad()
vector< Double_t > GetSmoothStrips()
Double_t ConvertNormalPointToStripY(Double_t x, Double_t y)
Double_t GetStripHitPos(Int_t num)
StripLayerType GetType()
Double_t GetXLeftStripBorderPoint()
Double_t GetYLeftStripBorderPoint()
Bool_t SetStripMatch(Int_t strip_num, BmnMatch strip_match)
Bool_t GetVerbosity()
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
StripNumberingDirection GetStripNumberingOrder()
Int_t GetNStripHits()
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
Int_t GetZoneNumber()
Double_t GetClusterFindingThreshold()
Bool_t AddLinkToStripMatch(Int_t strip_num, Double_t weight, Int_t refID)
vector< DeadZoneOfStripLayer > GetDeadZones()
Bool_t IsPointInsideStripLayer(Double_t x, Double_t y)
Double_t GetYMaxLayer()
Double_t GetXRightStripBorderPoint()
Double_t ConvertPointToStripPosition(Double_t x, Double_t y)
Double_t GetXMinLayer()
void SetVerbosity(Bool_t verb)
Double_t XLeftPointOfStripNumbering
void SetClusterFindingThreshold(Double_t threshold)
StripNumberingDirection StripOrder
Double_t GetStripHitTotalSignal(Int_t num)
vector< Double_t > StripHitsTotalSignal
Bool_t AddStripSignal(Int_t strip_num, Double_t signal)
void ResetAllDeadZones()
Double_t GetYRightStripBorderPoint()
Double_t GetYMinLayer()
Double_t GetXSize()
Double_t YRightPointOfStripNumbering
Double_t ClusterFindingThreshold
Bool_t SetStripNumberingOrder(StripNumberingDirection strip_direction)
vector< Double_t > Strips
void SetAngleDeg(Double_t deg)
StripLayerType LayerType
Bool_t SetStripNumberingBorders(Double_t x_left, Double_t y_left, Double_t x_right, Double_t y_right)
Double_t GetPitch()
Double_t GetAngleDeg()
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)
Definition json.hpp:4446