BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnSiliconLayer.h
Go to the documentation of this file.
1#ifndef BMNSILICONLAYER_H
2#define BMNSILICONLAYER_H
3
4#include "BmnMatch.h"
5#include "BmnStripData.h"
6#include "Rtypes.h"
7
8#include <vector>
9
10using namespace std;
11
13{
14
15 public:
16 // Constructors -------------------------------------------------------------
18
20 StripLayerType layer_type,
21 Int_t first_strip_number,
22 Double_t xsize,
23 Double_t ysize,
24 Double_t xorig,
25 Double_t yorig,
26 Double_t pitch,
27 Double_t adeg);
28 //--------------------------------------------------------------------------
29
30 // Destructor
32
34 void ResetLayer(); // clear all data and rebuild the layer in accordance with new parameters
35
37
38 void SetVerbosity(Bool_t verb) { Verbosity = verb; }
39 void SetZoneID(Int_t zone_id) { ZoneID = zone_id; }
40 void SetFirstStripNumber(Int_t first_strip_number) { FirstStripNumber = first_strip_number; }
41 void SetPitch(Double_t pitch);
42 void SetLayerSizes(Double_t xsize, Double_t ysize, Double_t xorig = 0.0, Double_t yorig = 0.0);
43 void SetAngleDeg(Double_t deg); // plus - clockwise from vertical
44
46 Int_t GetZoneID() { return ZoneID; }
49 StripLayerType GetType() { return LayerType; }
50 Double_t GetPitch() { return Pitch; }
59
60 // Strip numbering methods --------------------------------------------------
62 Double_t y_left,
63 Double_t x_right,
64 Double_t y_right); // or method below
66 Bool_t SetStripNumberingOrder(StripNumberingDirection strip_direction);
67
68 StripNumberingDirection GetStripNumberingOrder() { return StripOrder; }
73 //--------------------------------------------------------------------------
74
75 // Dead zones methods -------------------------------------------------------
76 Bool_t AddDeadZone(Int_t n_points, Double_t* x_points, Double_t* y_points);
80
81 vector<DeadZoneOfStripLayer> GetDeadZones() { return DeadZones; }
82 void ResetAllDeadZones() { DeadZones.clear(); }
83 //--------------------------------------------------------------------------
84
85 // Direct strip signal manipulation -----------------------------------------
86 Bool_t SetStripSignal(Int_t strip_num, Double_t signal); // replace signal
87 Bool_t AddStripSignal(Int_t strip_num, Double_t signal); // add signal
88
89 Double_t GetStripSignal(Int_t strip_num); // signal of strip_num-strip
90 //--------------------------------------------------------------------------
91
92 // Strip matches controls ---------------------------------------------------
93 Bool_t SetStripMatch(Int_t strip_num, BmnMatch mc_match); // set a MC-match for a strip
94 Bool_t AddLinkToStripMatch(Int_t strip_num, Double_t weight, Int_t mc_num); // add a mc-number to a MC-match
95
97 BmnMatch digit_num_match); // set a digit number match for a strip
99 Double_t weight,
100 Int_t digit_num); // add a digit number match for a strip
101
102 BmnMatch GetStripMatch(Int_t strip_num); // mc-match for a strip
103 BmnMatch GetStripDigitNumberMatch(Int_t strip_num); // digit number match for a strip
104
107 //--------------------------------------------------------------------------
108
109 // Strip hits ---------------------------------------------------------------
110 Int_t GetNStripHits() { return StripHits.size(); } // number of hits at the layer
111 Double_t GetStripHitPos(Int_t num); // hit position
112 Double_t GetStripHitTotalSignal(Int_t num); // sum signal of the hit
113 Double_t GetStripHitError(Int_t num); // hit error
114 Int_t GetStripHitClusterSize(Int_t num); // number of strips in the cluster for the num-hit
116 //--------------------------------------------------------------------------
117
118 // Strip Clusters -----------------------------------------------------------
119 vector<StripCluster> GetStripClusters() { return StripClusters; };
120 static void SetLowerUniqueID(Int_t id) { fUniqueIdL = id; }
121 static void SetUpperUniqueID(Int_t id) { fUniqueIdU = id; }
122 //--------------------------------------------------------------------------
123
124 // Methods to convert point coordinates into strip system -------------------
127
129
131 //--------------------------------------------------------------------------
132
133 // Clustering and strip-hit finding methods ---------------------------------------
135 void MakeStripHit(StripCluster& cluster, vector<Double_t>& AnalyzableStrips, Int_t& curcnt);
136 void SmoothStripSignal(vector<Double_t>& AnalyzableStrips, Int_t NIterations, Int_t SmoothWindow, Double_t Weight);
137
140
141 vector<Double_t> GetSmoothStrips()
142 {
143 return SmoothStrips;
144 } // for test (don't forget about FirstStripNumber when you use it)
145 //--------------------------------------------------------------------------
146
147 private:
148 // BmnSiliconLayer(const BmnSiliconLayer&) = delete;
149 // BmnSiliconLayer& operator=(const BmnSiliconLayer&) = delete;
150
151 private:
153
154 Int_t ZoneID; // zone id-number to recognize the layers linked together
155 Int_t FirstStripNumber; // the number that numbered strips start with
156 StripLayerType LayerType; // type of the strip layer: lower or upper
157
158 Double_t Pitch; // as a perpendicular to a strip
159 Double_t AngleDeg; // Angle between two sets of parellel strips: angle from vertical
161
166
167 vector<DeadZoneOfStripLayer> DeadZones;
168
169 // Strip arrangement
170 StripNumberingDirection StripOrder; // strip numbering order (LeftToRight or RightToLeft)
175
176 // Strip layer implementation
177 vector<Double_t> Strips;
178
179 // Strip matches
180 vector<BmnMatch> StripMatches; // MC-point matches for all strips
181 vector<BmnMatch> StripDigitNumberMatches; // Digit number matches for all strips
182
183 // Strip hits (It is filled after cluster finding and fitting) --------------
184 vector<Double_t> StripHits; // positions of strip hits
185 vector<Double_t> StripHitsTotalSignal;
186 vector<Double_t> StripHitsErrors;
187 vector<Int_t> StripHitsClusterSize; // cluster size (number of strips) for each strip hit
188 vector<Double_t> SmoothStrips; // smoothed signal strips (It is filled after smoothing algorithm)
189 Double_t ClusterFindingThreshold; // min. threshold cut
190 //--------------------------------------------------------------------------
191
192 // Strip Clusters -----------------------------------------------------------
193 vector<StripCluster> StripClusters;
194
195 static Int_t fUniqueIdU;
196 static Int_t fUniqueIdL;
197 //--------------------------------------------------------------------------
198
200};
201
202//------------------------------------------------------------------------------
203
204#endif /* BMNSILICONLAYER_H */
bool Bool_t
int Int_t
double Double_t
#define ClassDef(name, id)
StripBorderPoint
StripNumberingDirection
StripLayerType
Double_t GetAngleDeg()
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)
StripLayerType GetType()
Double_t GetStripSignal(Int_t strip_num)
void SetZoneID(Int_t zone_id)
Double_t GetXMaxLayer()
Double_t GetXLeftStripBorderPoint()
Bool_t SetStripDigitNumberMatch(Int_t strip_num, BmnMatch digit_num_match)
vector< Double_t > SmoothStrips
Bool_t SetStripNumberingBorders(StripBorderPoint left, StripBorderPoint right)
Int_t GetFirstStripNumber()
static void SetLowerUniqueID(Int_t id)
void SetFirstStripNumber(Int_t first_strip_number)
void MakeStripHit(StripCluster &cluster, vector< Double_t > &AnalyzableStrips, Int_t &curcnt)
Double_t ClusterFindingThreshold
BmnMatch GetStripMatch(Int_t strip_num)
Double_t GetYRightStripBorderPoint()
Double_t GetYMinLayer()
StripNumberingDirection StripOrder
vector< Double_t > StripHitsErrors
Bool_t SetStripMatch(Int_t strip_num, BmnMatch mc_match)
vector< StripCluster > GetStripClusters()
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)
Double_t GetPitch()
Bool_t AddLinkToStripMatch(Int_t strip_num, Double_t weight, Int_t mc_num)
void ResetStripDigitNumberMatches()
static Int_t fUniqueIdL
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)
Bool_t AddDeadZone(DeadZoneOfStripLayer dead_zone)
Double_t ConvertNormalPointToStripY(Double_t x, Double_t y)
vector< StripCluster > StripClusters
Double_t GetYMaxLayer()
void ResetStripMatches()
StripNumberingDirection GetStripNumberingOrder()
Double_t GetStripHitError(Int_t num)
Int_t GetStripHitClusterSize(Int_t num)
static void SetUpperUniqueID(Int_t id)
Double_t GetYLeftStripBorderPoint()
Int_t GetNStrips()
void SetPitch(Double_t pitch)
Bool_t AddLinkToStripDigitNumberMatch(Int_t strip_num, Double_t weight, Int_t digit_num)
void ResetStripHits()
Double_t GetClusterFindingThreshold()
Int_t GetLastStripNumber()
void SetVerbosity(Bool_t verb)
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)
virtual ~BmnSiliconLayer()
void FindClustersAndStripHits()
Double_t GetAngleRad()
Double_t ConvertPointToStripPosition(Double_t x, Double_t y)
Double_t GetYSize()
Double_t GetXSize()
Double_t GetStripHitTotalSignal(Int_t num)
vector< DeadZoneOfStripLayer > GetDeadZones()
Double_t YRightPointOfStripNumbering
vector< BmnMatch > StripDigitNumberMatches
Double_t GetXRightStripBorderPoint()
BmnSiliconLayer(Int_t zone_id, StripLayerType layer_type, Int_t first_strip_number, Double_t xsize, Double_t ysize, Double_t xorig, Double_t yorig, Double_t pitch, Double_t adeg)
Double_t GetXMinLayer()
vector< Double_t > GetSmoothStrips()
StripLayerType LayerType
vector< DeadZoneOfStripLayer > DeadZones
Double_t YLeftPointOfStripNumbering
void SetClusterFindingThreshold(Double_t threshold)
static Int_t fUniqueIdU
void InitializeLayer()
Definition json.hpp:4446