BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnSiBTLayer.h
Go to the documentation of this file.
1#ifndef BMNSiBTLAYER_H
2#define BMNSiBTLAYER_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
14class BmnSiBTLayer
15{
16
17 public:
18 // Constructors -------------------------------------------------------------
20
21 BmnSiBTLayer(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 ~BmnSiBTLayer();
33
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
44 // never called
45 int GetFirstStripNumber() { return 0; }
46 int GetLastStripNumber() { return 0; }
47
50 StripLayerType GetType() { return LayerType; }
51 Double_t GetPitch() { return Pitch; }
60
61 // Strip numbering methods --------------------------------------------------
63 Double_t y_left,
64 Double_t x_right,
65 Double_t y_right); // or method below
67 Bool_t SetStripNumberingOrder(StripNumberingDirection strip_direction);
68
69 StripNumberingDirection GetStripNumberingOrder() { return StripOrder; }
74 //--------------------------------------------------------------------------
75
76 // Dead zones methods -------------------------------------------------------
77 Bool_t AddDeadZone(Int_t n_points, Double_t* x_points, Double_t* y_points);
81
82 vector<DeadZoneOfStripLayer> GetDeadZones() { return DeadZones; }
83 void ResetAllDeadZones() { DeadZones.clear(); }
84 //--------------------------------------------------------------------------
85
86 // Direct strip signal manipulation -----------------------------------------
87 Bool_t SetStripSignal(Int_t strip_num, Double_t signal); // replace signal
88 Bool_t AddStripSignal(Int_t strip_num, Double_t signal); // add signal
89
90 Double_t GetStripSignal(Int_t strip_num); // signal of strip_num-strip
91 //--------------------------------------------------------------------------
92
93 // Strip matches controls ---------------------------------------------------
94 Bool_t SetStripMatch(Int_t strip_num, BmnMatch strip_match);
95 Bool_t AddLinkToStripMatch(Int_t strip_num, Double_t weight, Int_t refID);
96
97 BmnMatch GetStripMatch(Int_t strip_num); // match of strip_num-strip
99 //--------------------------------------------------------------------------
100
101 // Strip hits ---------------------------------------------------------------
102 Int_t GetNStripHits() { return StripHits.size(); } // number of hits at the layer
103 Double_t GetStripHitPos(Int_t num); // hit position
104 Double_t GetStripHitTotalSignal(Int_t num); // sum signal of the hit
105 Double_t GetStripHitError(Int_t num); // hit error
106 Int_t GetStripHitClusterSize(Int_t num); // number of strips in the cluster for the num-hit
108 //--------------------------------------------------------------------------
109
110 // Methods to convert point coordinates into strip system -------------------
113
115
117 //--------------------------------------------------------------------------
118
119 // Clustering and strip-hit finding methods ---------------------------------------
121 void MakeStripHit(StripCluster& cluster, vector<Double_t>& AnalyzableStrips, Int_t& curcnt);
122 void SmoothStripSignal(vector<Double_t>& AnalyzableStrips, Int_t NIterations, Int_t SmoothWindow, Double_t Weight);
123
126
127 vector<Double_t> GetSmoothStrips() { return SmoothStrips; } // for test
128 //--------------------------------------------------------------------------
129
130 private:
131 // BmnSiBTLayer(const BmnSiBTLayer&) = delete;
132 // BmnSiBTLayer& operator=(const BmnSiBTLayer&) = delete;
133
134 private:
136
137 Int_t LayerZoneNumber; // zone number of the strip layer
138 StripLayerType LayerType; // type of the strip layer: lower or upper
139
141 Double_t AngleDeg; // Angle between two sets of parallel strips: angle from vertical
143
148
149 vector<DeadZoneOfStripLayer> DeadZones;
150
151 // Strip arrangement
152 StripNumberingDirection StripOrder; // strip numbering order (LeftToRight or RightToLeft)
157
158 // Strip layer implementation
159 vector<Double_t> Strips;
160
161 // Strip matches
162 vector<BmnMatch> StripMatches; // ID-point matches for all strips
163
164 // Strip hits (It is filled after cluster finding and fitting) --------------
165 vector<Double_t> StripHits; // positions of strip hits
166 vector<Double_t> StripHitsTotalSignal;
167 vector<Double_t> StripHitsErrors;
168 vector<Int_t> StripHitsClusterSize; // cluster size (number of strips) for each strip hit
169 vector<Double_t> SmoothStrips; // smoothed signal strips (It is filled after smoothing algorithm)
170 Double_t ClusterFindingThreshold; // min. threshold cut
171 //--------------------------------------------------------------------------
172};
173//------------------------------------------------------------------------------
174
175#endif /* BMNSiBTLAYER_H */
bool Bool_t
int Int_t
double Double_t
StripBorderPoint
StripNumberingDirection
StripLayerType
Double_t GetStripHitTotalSignal(Int_t num)
Double_t XLeftPointOfStripNumbering
Double_t YMaxLayer
void InitializeLayer()
Double_t GetXSize()
void ResetStripHits()
void SetPitch(Double_t pitch)
vector< DeadZoneOfStripLayer > GetDeadZones()
Bool_t IsPointInsideStripLayer(Double_t x, Double_t y)
Int_t GetNStrips()
Double_t GetPitch()
Double_t ConvertNormalPointToStripX(Double_t x, Double_t y)
Double_t ConvertPointToStripPosition(Double_t x, Double_t y)
Double_t GetAngleRad()
vector< Double_t > Strips
vector< Double_t > StripHits
Double_t GetYLeftStripBorderPoint()
Double_t GetXMaxLayer()
int GetFirstStripNumber()
void SetAngleDeg(Double_t deg)
void SetClusterFindingThreshold(Double_t threshold)
Bool_t SetStripNumberingBorders(Double_t x_left, Double_t y_left, Double_t x_right, Double_t y_right)
Double_t GetYSize()
vector< Double_t > SmoothStrips
Double_t GetYMaxLayer()
virtual ~BmnSiBTLayer()
Double_t GetStripSignal(Int_t strip_num)
StripLayerType LayerType
void SmoothStripSignal(vector< Double_t > &AnalyzableStrips, Int_t NIterations, Int_t SmoothWindow, Double_t Weight)
Int_t GetStripHitClusterSize(Int_t num)
Double_t XMaxLayer
Bool_t SetStripMatch(Int_t strip_num, BmnMatch strip_match)
StripNumberingDirection StripOrder
Double_t AngleRad
vector< Double_t > StripHitsErrors
Double_t GetClusterFindingThreshold()
BmnSiBTLayer(Int_t zone_number, StripLayerType layer_type, Double_t xsize, Double_t ysize, Double_t xorig, Double_t yorig, Double_t pitch, Double_t adeg)
Double_t ClusterFindingThreshold
Double_t ConvertNormalPointToStripY(Double_t x, Double_t y)
Double_t GetAngleDeg()
void ResetAllDeadZones()
vector< BmnMatch > StripMatches
Int_t GetZoneNumber()
Double_t GetYRightStripBorderPoint()
void SetVerbosity(Bool_t verb)
Bool_t SetStripNumberingBorders(StripBorderPoint left, StripBorderPoint right)
Double_t XRightPointOfStripNumbering
void MakeStripHit(StripCluster &cluster, vector< Double_t > &AnalyzableStrips, Int_t &curcnt)
int GetLastStripNumber()
StripLayerType GetType()
Bool_t SetStripNumberingOrder(StripNumberingDirection strip_direction)
Double_t GetYMinLayer()
Double_t YLeftPointOfStripNumbering
Double_t YRightPointOfStripNumbering
Double_t GetXMinLayer()
Double_t XMinLayer
Bool_t SetStripSignal(Int_t strip_num, Double_t signal)
Int_t GetNStripHits()
Bool_t AddLinkToStripMatch(Int_t strip_num, Double_t weight, Int_t refID)
Double_t GetXLeftStripBorderPoint()
Double_t GetXRightStripBorderPoint()
void FindClustersAndStripHits()
vector< Int_t > StripHitsClusterSize
Bool_t GetVerbosity()
Bool_t AddDeadZone(DeadZoneOfStripLayer dead_zone)
Double_t Pitch
vector< Double_t > GetSmoothStrips()
BmnMatch GetStripMatch(Int_t strip_num)
Bool_t IsPointInsideDeadZones(Double_t x, Double_t y)
vector< Double_t > StripHitsTotalSignal
Bool_t AddDeadZone(Int_t n_points, Double_t *x_points, Double_t *y_points)
Double_t GetStripHitPos(Int_t num)
void ResetLayer()
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 YMinLayer
Double_t AngleDeg
vector< DeadZoneOfStripLayer > DeadZones
Int_t LayerZoneNumber
Double_t GetStripHitError(Int_t num)
void ResetStripMatches()
Double_t CalculateStripEquationB(Double_t strip_pos)
StripNumberingDirection GetStripNumberingOrder()
Definition json.hpp:4446