BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnGemStripLayer.h
Go to the documentation of this file.
1#ifndef BMNGEMSTRIPLAYER_H
2#define BMNGEMSTRIPLAYER_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 BmnGemStripLayer(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 ~BmnGemStripLayer();
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
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
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 mc_match); // set a MC-match for a strip
95 Bool_t AddLinkToStripMatch(Int_t strip_num, Double_t weight, Int_t mc_num); // add a mc-number to a MC-match
96
98 BmnMatch digit_num_match); // set a digit number match for a strip
100 Double_t weight,
101 Int_t digit_num); // add a digit number match for a strip
102
103 BmnMatch GetStripMatch(Int_t strip_num); // mc-match for a strip
104 BmnMatch GetStripDigitNumberMatch(Int_t strip_num); // digit number match for a strip
105
106 void ResetStripMatches();
108 //--------------------------------------------------------------------------
109
110 // Strip hits ---------------------------------------------------------------
111 Int_t GetNStripHits() { return StripHits.size(); } // number of hits at the layer
112 Double_t GetStripHitPos(Int_t num); // hit position
113 Double_t GetStripHitTotalSignal(Int_t num); // sum signal of the hit
114 Double_t GetStripHitError(Int_t num); // hit error
115 Int_t GetStripHitClusterSize(Int_t num); // number of strips in the cluster for the num-hit
116 void ResetStripHits();
117 //--------------------------------------------------------------------------
118
119 // Strip Clusters -----------------------------------------------------------
120 vector<StripCluster> GetStripClusters() { return StripClusters; };
121 static void SetLowerUniqueID(Int_t id) { fUniqueIdL = id; }
122 static void SetUpperUniqueID(Int_t id) { fUniqueIdU = id; }
123 //--------------------------------------------------------------------------
124
125 // Methods to convert point coordinates into strip system -------------------
128
130
132 //--------------------------------------------------------------------------
133
134 // Clustering and strip-hit finding methods ---------------------------------------
136 void MakeStripHit(StripCluster& cluster, vector<Double_t>& AnalyzableStrips, Int_t& curcnt);
137 void SmoothStripSignal(vector<Double_t>& AnalyzableStrips, Int_t NIterations, Int_t SmoothWindow, Double_t Weight);
138
141
143
144 vector<Double_t> GetSmoothStrips() { return SmoothStrips; } // for test
145 //--------------------------------------------------------------------------
146
147 private:
148 // BmnGemStripLayer(const BmnGemStripLayer&) = delete;
149 // BmnGemStripLayer& operator=(const BmnGemStripLayer&) = delete;
150
151 private:
153
154 Int_t LayerZoneNumber; // zone number of the strip layer
155 StripLayerType LayerType; // type of the strip layer: lower or upper
156
158 Double_t AngleDeg; // Angle between two sets of parellel strips: angle from vertical
160
165
166 vector<DeadZoneOfStripLayer> DeadZones;
167
168 // Strip arrangement
169 StripNumberingDirection StripOrder; // strip numbering order (LeftToRight or RightToLeft)
174
175 // Strip layer implementation
176 vector<Double_t> Strips;
177
178 // Strip matches
179 vector<BmnMatch> StripMatches; // MC-point matches for all strips
180 vector<BmnMatch> StripDigitNumberMatches; // Digit number matches for all strips
181
182 // Strip hits (It is filled after cluster finding and fitting) --------------
183 vector<Double_t> StripHits; // positions of strip hits
184 vector<Double_t> StripHitsTotalSignal;
185 vector<Double_t> StripHitsErrors;
186 vector<Int_t> StripHitsClusterSize; // cluster size (number of strips) for each strip hit
187 vector<Double_t> SmoothStrips; // smoothed signal strips (It is filled after smoothing algorithm)
188 Double_t ClusterFindingThreshold; // min. threshold cut for strip to be included in cluster
189 Double_t TotalClusterThreshold; // min. threshold cut for total cluster signal to be written into TClonesArray
190 //--------------------------------------------------------------------------
191
192 // Strip Clusters -----------------------------------------------------------
193 vector<StripCluster> StripClusters;
194
197 //--------------------------------------------------------------------------
198};
199//------------------------------------------------------------------------------
200
201#endif /* BMNGEMSTRIPLAYER_H */
bool Bool_t
int Int_t
double Double_t
StripBorderPoint
StripNumberingDirection
Double_t TotalClusterThreshold
Double_t GetStripHitError(Int_t num)
void SmoothStripSignal(vector< Double_t > &AnalyzableStrips, Int_t NIterations, Int_t SmoothWindow, Double_t Weight)
Double_t ConvertPointToStripPosition(Double_t x, Double_t y)
static Int_t fUniqueIdL
vector< DeadZoneOfStripLayer > DeadZones
Double_t GetYMinLayer()
Double_t GetYRightStripBorderPoint()
Double_t GetYMaxLayer()
Double_t GetXMinLayer()
static Int_t fUniqueIdU
vector< DeadZoneOfStripLayer > GetDeadZones()
Bool_t SetStripNumberingOrder(StripNumberingDirection strip_direction)
Double_t XLeftPointOfStripNumbering
BmnMatch GetStripDigitNumberMatch(Int_t strip_num)
Bool_t SetStripMatch(Int_t strip_num, BmnMatch mc_match)
Bool_t IsPointInsideStripLayer(Double_t x, Double_t y)
vector< BmnMatch > StripDigitNumberMatches
vector< Int_t > StripHitsClusterSize
static void SetUpperUniqueID(Int_t id)
void MakeStripHit(StripCluster &cluster, vector< Double_t > &AnalyzableStrips, Int_t &curcnt)
Double_t ConvertNormalPointToStripY(Double_t x, Double_t y)
Double_t YLeftPointOfStripNumbering
Double_t YRightPointOfStripNumbering
Double_t GetXRightStripBorderPoint()
StripNumberingDirection StripOrder
void SetLayerSizes(Double_t xsize, Double_t ysize, Double_t xorig=0.0, Double_t yorig=0.0)
Double_t GetYLeftStripBorderPoint()
Bool_t SetStripSignal(Int_t strip_num, Double_t signal)
vector< Double_t > GetSmoothStrips()
Double_t GetXLeftStripBorderPoint()
Bool_t IsPointInsideDeadZones(Double_t x, Double_t y)
Double_t CalculateStripEquationB(Double_t strip_pos)
Bool_t AddStripSignal(Int_t strip_num, Double_t signal)
vector< StripCluster > GetStripClusters()
Int_t GetStripHitClusterSize(Int_t num)
void SetPitch(Double_t pitch)
Double_t GetXMaxLayer()
vector< Double_t > StripHitsTotalSignal
Double_t ClusterFindingThreshold
vector< Double_t > Strips
Double_t GetClusterFindingThreshold()
StripLayerType GetType()
StripLayerType LayerType
void SetVerbosity(Bool_t verb)
StripNumberingDirection GetStripNumberingOrder()
Bool_t SetStripDigitNumberMatch(Int_t strip_num, BmnMatch digit_num_match)
BmnMatch GetStripMatch(Int_t strip_num)
Double_t GetStripHitPos(Int_t num)
void SetClusterFindingThreshold(Double_t threshold)
Double_t GetStripHitTotalSignal(Int_t num)
Double_t GetStripSignal(Int_t strip_num)
Bool_t AddLinkToStripMatch(Int_t strip_num, Double_t weight, Int_t mc_num)
vector< Double_t > SmoothStrips
Bool_t AddLinkToStripDigitNumberMatch(Int_t strip_num, Double_t weight, Int_t digit_num)
Bool_t AddDeadZone(Int_t n_points, Double_t *x_points, Double_t *y_points)
Double_t XRightPointOfStripNumbering
vector< BmnMatch > StripMatches
vector< StripCluster > StripClusters
static void SetLowerUniqueID(Int_t id)
vector< Double_t > StripHits
void SetAngleDeg(Double_t deg)
Bool_t SetStripNumberingBorders(Double_t x_left, Double_t y_left, Double_t x_right, Double_t y_right)
void SetTotalClusterThreshold(Double_t th)
Double_t ConvertNormalPointToStripX(Double_t x, Double_t y)
vector< Double_t > StripHitsErrors
Definition json.hpp:4446