BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnCSCLayer.h
Go to the documentation of this file.
1#ifndef BMNCSCLAYER_H
2#define BMNCSCLAYER_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 BmnCSCLayer(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 ~BmnCSCLayer();
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 strip_match);
95 Bool_t AddLinkToStripMatch(Int_t strip_num, Double_t weight, Int_t refID);
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
142 vector<Double_t> GetSmoothStrips() { return SmoothStrips; } // for test
143 //--------------------------------------------------------------------------
144
145 private:
146 // BmnCSCLayer(const BmnCSCLayer&) = delete;
147 // BmnCSCLayer& operator=(const BmnCSCLayer&) = delete;
148
149 private:
151
152 Int_t LayerZoneNumber; // zone number of the strip layer
153 StripLayerType LayerType; // type of the strip layer: lower or upper
154
156 Double_t AngleDeg; // Angle between two sets of parellel strips: angle from vertical
158
163
164 vector<DeadZoneOfStripLayer> DeadZones;
165
166 // Strip arrangement
167 StripNumberingDirection StripOrder; // strip numbering order (LeftToRight or RightToLeft)
172
173 // Strip layer implementation
174 vector<Double_t> Strips;
175
176 // Strip matches
177 vector<BmnMatch> StripMatches; // ID-point matches for all strips
178 vector<BmnMatch> StripDigitNumberMatches; // Digit number matches for all strips
179
180 // Strip hits (It is filled after cluster finding and fitting) --------------
181 vector<Double_t> StripHits; // positions of strip hits
182 vector<Double_t> StripHitsTotalSignal;
183 vector<Double_t> StripHitsErrors;
184 vector<Int_t> StripHitsClusterSize; // cluster size (number of strips) for each strip hit
185 vector<Double_t> SmoothStrips; // smoothed signal strips (It is filled after smoothing algorithm)
186 Double_t ClusterFindingThreshold; // min. threshold cut
187 //--------------------------------------------------------------------------
188
189 // Strip Clusters -----------------------------------------------------------
190 vector<StripCluster> StripClusters;
191
194 //--------------------------------------------------------------------------
195};
196//------------------------------------------------------------------------------
197
198#endif /* BMNCSCLAYER_H */
bool Bool_t
int Int_t
double Double_t
StripBorderPoint
StripNumberingDirection
Double_t AngleDeg
vector< Double_t > SmoothStrips
Double_t CalculateStripEquationB(Double_t strip_pos)
Bool_t SetStripMatch(Int_t strip_num, BmnMatch strip_match)
Double_t XLeftPointOfStripNumbering
StripLayerType GetType()
Definition BmnCSCLayer.h:50
Int_t GetZoneNumber()
Definition BmnCSCLayer.h:49
vector< BmnMatch > StripDigitNumberMatches
vector< Double_t > Strips
Int_t GetNStrips()
Double_t YLeftPointOfStripNumbering
Double_t GetStripHitPos(Int_t num)
Double_t Pitch
void MakeStripHit(StripCluster &cluster, vector< Double_t > &AnalyzableStrips, Int_t &curcnt)
void InitializeLayer()
Bool_t SetStripDigitNumberMatch(Int_t strip_num, BmnMatch digit_num_match)
void SetAngleDeg(Double_t deg)
Double_t YMaxLayer
int GetFirstStripNumber()
Definition BmnCSCLayer.h:45
Double_t ConvertNormalPointToStripX(Double_t x, Double_t y)
Double_t GetYRightStripBorderPoint()
Definition BmnCSCLayer.h:73
vector< BmnMatch > StripMatches
BmnMatch GetStripDigitNumberMatch(Int_t strip_num)
static void SetLowerUniqueID(Int_t id)
void SmoothStripSignal(vector< Double_t > &AnalyzableStrips, Int_t NIterations, Int_t SmoothWindow, Double_t Weight)
void SetLayerSizes(Double_t xsize, Double_t ysize, Double_t xorig=0.0, Double_t yorig=0.0)
Double_t GetXSize()
Definition BmnCSCLayer.h:54
int GetLastStripNumber()
Definition BmnCSCLayer.h:46
static Int_t fUniqueIdU
Bool_t AddStripSignal(Int_t strip_num, Double_t signal)
Double_t GetStripHitError(Int_t num)
Double_t GetXRightStripBorderPoint()
Definition BmnCSCLayer.h:72
Double_t YRightPointOfStripNumbering
Double_t XMinLayer
vector< Double_t > StripHitsErrors
Double_t GetStripSignal(Int_t strip_num)
void ResetAllDeadZones()
Definition BmnCSCLayer.h:83
Double_t GetAngleRad()
Definition BmnCSCLayer.h:53
Double_t GetYMaxLayer()
Definition BmnCSCLayer.h:59
Double_t ConvertPointToStripPosition(Double_t x, Double_t y)
void ResetLayer()
Double_t ConvertNormalPointToStripY(Double_t x, Double_t y)
Double_t GetAngleDeg()
Definition BmnCSCLayer.h:52
Bool_t AddDeadZone(Int_t n_points, Double_t *x_points, Double_t *y_points)
static Int_t fUniqueIdL
Bool_t SetStripNumberingOrder(StripNumberingDirection strip_direction)
Double_t GetYMinLayer()
Definition BmnCSCLayer.h:58
Bool_t AddLinkToStripMatch(Int_t strip_num, Double_t weight, Int_t refID)
Int_t GetStripHitClusterSize(Int_t num)
Bool_t SetStripNumberingBorders(Double_t x_left, Double_t y_left, Double_t x_right, Double_t y_right)
Bool_t IsPointInsideDeadZones(Double_t x, Double_t y)
vector< Double_t > StripHits
Double_t AngleRad
Bool_t IsPointInsideStripLayer(Double_t x, Double_t y)
Bool_t Verbosity
BmnMatch GetStripMatch(Int_t strip_num)
Double_t XRightPointOfStripNumbering
Double_t XMaxLayer
StripNumberingDirection StripOrder
static void SetUpperUniqueID(Int_t id)
void SetVerbosity(Bool_t verb)
Definition BmnCSCLayer.h:39
StripNumberingDirection GetStripNumberingOrder()
Definition BmnCSCLayer.h:69
Double_t GetClusterFindingThreshold()
Double_t GetXMinLayer()
Definition BmnCSCLayer.h:56
vector< StripCluster > GetStripClusters()
Double_t GetYLeftStripBorderPoint()
Definition BmnCSCLayer.h:71
Int_t GetNStripHits()
Double_t GetXMaxLayer()
Definition BmnCSCLayer.h:57
vector< DeadZoneOfStripLayer > GetDeadZones()
Definition BmnCSCLayer.h:82
Bool_t GetVerbosity()
Definition BmnCSCLayer.h:48
vector< Double_t > GetSmoothStrips()
Int_t LayerZoneNumber
vector< Int_t > StripHitsClusterSize
Double_t YMinLayer
void SetPitch(Double_t pitch)
void SetClusterFindingThreshold(Double_t threshold)
Bool_t SetStripSignal(Int_t strip_num, Double_t signal)
void ResetStripDigitNumberMatches()
void FindClustersAndStripHits()
Double_t GetXLeftStripBorderPoint()
Definition BmnCSCLayer.h:70
vector< DeadZoneOfStripLayer > DeadZones
Double_t GetStripHitTotalSignal(Int_t num)
void ResetStripHits()
vector< StripCluster > StripClusters
Double_t GetPitch()
Definition BmnCSCLayer.h:51
Double_t GetYSize()
Definition BmnCSCLayer.h:55
Bool_t AddLinkToStripDigitNumberMatch(Int_t strip_num, Double_t weight, Int_t digit_num)
void ResetStripMatches()
virtual ~BmnCSCLayer()
Double_t ClusterFindingThreshold
vector< Double_t > StripHitsTotalSignal
StripLayerType LayerType
Definition json.hpp:4446