BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnVSPModule.h
Go to the documentation of this file.
1#ifndef BMNVSPMODULE_H
2#define BMNVSPMODULE_H
3
4#include "BmnMatch.h"
5#include "BmnVSPLayer.h"
6#include "Rtypes.h"
7
8class BmnVSPModule
9{
10
11 public:
12 // Constructors -------------------------------------------------------------
14
15 BmnVSPModule(Double_t z_start_pos);
16 //--------------------------------------------------------------------------
17
18 // Destructor
19 virtual ~BmnVSPModule();
20
21 void SetVerbosity(Bool_t verb) { Verbosity = verb; }
23
24 // Module parameters --------------------------------------------------------
29
32
33 void SetZStartModulePosition(Double_t zpos_module) { ZStartModulePosition = zpos_module; }
35
37 Double_t GetZPositionRegistered(); // position for all registered point (hits)
38 //--------------------------------------------------------------------------
39
40 // Strip layers controls ----------------------------------------------------
41 void AddStripLayer(BmnVSPLayer strip_layer);
42
43 Bool_t SetStripSignalInLayer(Int_t layer_num, Int_t strip_num, Double_t signal);
44 Bool_t AddStripSignalInLayer(Int_t layer_num, Int_t strip_num, Double_t signal);
45
47 Int_t strip_num,
48 BmnMatch mc_match); // set a MC-match for a strip in some layer
50 Int_t layer_num,
51 Int_t strip_num,
52 BmnMatch digit_num_match); // set a digit number match for a strip in some layer
53
56
58 Bool_t AddStripMatchInLayerByZoneId(Int_t zone_id, Int_t strip_num, Double_t weight, Int_t mc_num);
59
62
64
65 BmnMatch GetStripMatchInLayer(Int_t layer_num, Int_t strip_num); // get a MC-match for a strip in some layer
67 Int_t strip_num); // get a digit number match for a strip in some layer
68
71
73
76
77 Int_t GetNStripLayers() { return StripLayers.size(); }
78 BmnVSPLayer& GetStripLayer(Int_t num) { return StripLayers.at(num); }
79 vector<BmnVSPLayer>& GetStripLayers() { return StripLayers; }
80
81 void ResetModuleData(); // clear all data in the module and all layers (not delete layers!)
82 //--------------------------------------------------------------------------
83
84 // Point ownership of the module --------------------------------------------
85 Bool_t IsPointInsideModule(Double_t x, Double_t y); // plane ownership
86 Bool_t IsPointInsideModule(Double_t x, Double_t y, Double_t z); // volume ownership
88 Double_t z); // point with z-coord is between z_start and z_end of the module (inside module thickness)?
89 //--------------------------------------------------------------------------
90
91 // Methods to add a point to the module -------------------------------------
93 Double_t y,
94 Double_t z,
95 Double_t px,
96 Double_t py,
97 Double_t pz,
98 Double_t signal,
99 Int_t refID);
100
102 Double_t y,
103 Double_t z,
104 Double_t px,
105 Double_t py,
106 Double_t pz,
107 Double_t signal,
108 Int_t refID);
109
111 Double_t y,
112 Double_t z,
113 Double_t px,
114 Double_t py,
115 Double_t pz,
116 Double_t signal,
117 Int_t refID);
118
120 Double_t y,
121 Double_t z,
122 Double_t px,
123 Double_t py,
124 Double_t pz,
125 Double_t signal,
126 Int_t refID);
127
128 // make a strip cluster from a single point (with gauss smearing)
129 StripCluster MakeCluster(Int_t layer_num, Double_t xcoord, Double_t ycoord, Double_t signal, Double_t radius);
130 //--------------------------------------------------------------------------
131
132 // Methods to calculate intersection points in the module -------------------
134
135 // need for a separated test (find x,y intersection coords from strip positions)
137 Double_t& y,
138 Double_t strip_pos_layerA,
139 Double_t strip_pos_layerB,
140 Int_t layerA_index,
141 Int_t layerB_index);
142 //--------------------------------------------------------------------------
143
144 // Added (real) points ------------------------------------------------------
145 Int_t GetNRealPoints() { return RealPointsX.size(); } // quantity of added points
146 Double_t GetRealPointX(Int_t indx) { return RealPointsX.at(indx); } // X-coord of i-added point
147 Double_t GetRealPointY(Int_t indx) { return RealPointsY.at(indx); } // Y-coord of i-added point
148 Double_t GetRealPointMC(Int_t indx) { return RealPointsMC.at(indx); } // MC-index of i-added point
149
151 {
152 RealPointsX.clear();
153 RealPointsY.clear();
154 RealPointsMC.clear();
155 }
156 //--------------------------------------------------------------------------
157
158 // Intersection points ------------------------------------------------------
159 Int_t GetNIntersectionPoints() { return IntersectionPointsX.size(); } // quantity of intersections
161 {
162 return IntersectionPointsX.at(indx);
163 } // X-coord of indx-intersection point
165 {
166 return IntersectionPointsY.at(indx);
167 } // Y-coord of indx-intersection point
169 {
170 return IntersectionPointsXErrors.at(indx);
171 } // X-coord error of indx-intersection point
173 {
174 return IntersectionPointsYErrors.at(indx);
175 } // Y-coord error of indx-intersection point
177 {
179 } // cluster size in the lower layer
181 {
183 } // cluster size in the upper layer
185 {
187 } // strip position in the lower layer
189 {
191 } // strip position in the upper layer
193 {
195 } // total signal in the lower layer
197 {
199 } // total signal in the upper layer
201 {
202 return IntersectionPointMatches.at(indx);
203 } // Intersection point MC-match
205 {
207 } // Intersection point digit number match
208
211
213 //--------------------------------------------------------------------------
214
215 // Pseudo intersections -----------------------------------------------------
246 {
247 return PseudoIntersectionMatches.at(indx);
248 } // Pseudo intersection MC-match
250 {
252 } // Pseudo ntersection point digit number match
253
256
258 //--------------------------------------------------------------------------
259
260 private:
261 void DefineModuleBorders(); // calculate min-max coordinates of the module from layers` parameters
262
263 private:
264 BmnVSPModule(const BmnVSPModule&) = delete;
266
267 private:
269
274
277
278 vector<BmnVSPLayer> StripLayers;
279
280 vector<Double_t> RealPointsX;
281 vector<Double_t> RealPointsY;
282 vector<Double_t> RealPointsMC; // index of MC point
283
284 vector<Double_t> IntersectionPointsX;
285 vector<Double_t> IntersectionPointsY;
286 vector<Double_t> IntersectionPointsXErrors;
287 vector<Double_t> IntersectionPointsYErrors;
288
289 vector<Int_t> IntersectionPoints_LowerLayerClusterSize; // cluster size (number of strips) in the lower layer for
290 // each intersection point
291 vector<Int_t> IntersectionPoints_UpperLayerClusterSize; // cluster size (number of strips) in the upper layer for
292 // each intersection point
293
294 vector<Double_t>
295 IntersectionPoints_LowerLayerStripPosition; // strip position in the lower layer for each intersection point
296 vector<Double_t>
297 IntersectionPoints_UpperLayerStripPosition; // strip position in the upper layer for each intersection point
298
299 vector<Double_t>
300 IntersectionPoints_LowerLayerStripTotalSignal; // total signal in the lower layer for each intersection point
301 vector<Double_t>
302 IntersectionPoints_UpperLayerStripTotalSignal; // total signal in the upper layer for each intersection point
303
304 vector<BmnMatch> IntersectionPointMatches; // MC-matches
305 vector<BmnMatch> IntersectionPointDigitNumberMatches; // Digit number matches
306
307 vector<StripCluster> UpperClusters;
308 vector<StripCluster> LowerClusters;
309
310 // Pseudo intersections -----------------------------------------------------
311 vector<Double_t> PseudoIntersectionsX;
312 vector<Double_t> PseudoIntersectionsY;
313 vector<Double_t> PseudoIntersectionsXErrors;
314 vector<Double_t> PseudoIntersectionsYErrors;
315
318
321
324
325 vector<BmnMatch> PseudoIntersectionMatches; // MC-matches
326 vector<BmnMatch> PseudoIntersectionDigitNumberMatches; // Digit number matches
327
328 vector<StripCluster> UpperClusters_PseudoIntersections;
329 vector<StripCluster> LowerClusters_PseudoIntersections;
330 //--------------------------------------------------------------------------
331
332 private:
333 // Struct: a collision point position (an ionizing cluster position) --------
334 struct CollPoint
335 {
337 : x(_x)
338 , y(_y)
339 , z(_z)
340 {}
341 Double_t x;
342 Double_t y;
343 Double_t z;
344 };
345};
346//------------------------------------------------------------------------------
347
348#endif /* BMNVSPMODULE_H */
bool Bool_t
int Int_t
double Double_t
Bool_t AddStripSignalInLayer(Int_t layer_num, Int_t strip_num, Double_t signal)
Double_t GetYMinModule()
vector< StripCluster > LowerClusters_PseudoIntersections
Bool_t AddRealPointFullOne_WithIncline(Double_t x, Double_t y, Double_t z, Double_t px, Double_t py, Double_t pz, Double_t signal, Int_t refID)
Double_t ModuleThickness
BmnMatch GetIntersectionPointDigitNumberMatch(Int_t indx)
vector< BmnMatch > PseudoIntersectionDigitNumberMatches
vector< Int_t > PseudoIntersections_UpperLayerClusterSize
Bool_t SetStripSignalInLayerByZoneId(Int_t zone_id, Int_t strip_num, Double_t signal)
vector< BmnMatch > IntersectionPointDigitNumberMatches
vector< Int_t > IntersectionPoints_UpperLayerClusterSize
BmnMatch GetPseudoIntersectionMatch(Int_t indx)
Double_t GetIntersectionPointX(Int_t indx)
vector< BmnVSPLayer > & GetStripLayers()
vector< Double_t > PseudoIntersectionsYErrors
Bool_t SetStripMatchInLayerByZoneId(Int_t zone_id, Int_t strip_num, BmnMatch mc_match)
Bool_t AddRealPointSimple(Double_t x, Double_t y, Double_t z, Double_t px, Double_t py, Double_t pz, Double_t signal, Int_t refID)
vector< Double_t > IntersectionPoints_UpperLayerStripPosition
Bool_t GetVerbosity()
vector< BmnMatch > IntersectionPointMatches
BmnMatch GetStripDigitNumberMatchInLayer(Int_t layer_num, Int_t strip_num)
void ResetPseudoIntersections()
Double_t GetYSize()
vector< Int_t > PseudoIntersections_LowerLayerClusterSize
BmnMatch GetPseudoIntersectionDigitNumberMatch(Int_t indx)
vector< Double_t > PseudoIntersections_UpperLayerStripTotalSignal
Bool_t SetStripMatchInLayer(Int_t layer_num, Int_t strip_num, BmnMatch mc_match)
BmnMatch GetStripDigitNumberMatchInZone(Int_t zone_id, Int_t strip_num)
vector< BmnVSPLayer > StripLayers
BmnMatch GetStripMatchInLayer(Int_t layer_num, Int_t strip_num)
StripCluster GetUpperCluster(Int_t indx)
Bool_t AddRealPointFullOne(Double_t x, Double_t y, Double_t z, Double_t px, Double_t py, Double_t pz, Double_t signal, Int_t refID)
void ResetIntersectionPoints()
vector< Double_t > RealPointsX
BmnVSPModule & operator=(const BmnVSPModule &)=delete
Bool_t IsPointInsideZThickness(Double_t z)
vector< Double_t > PseudoIntersections_LowerLayerStripTotalSignal
StripCluster GetLowerCluster_PseudoIntersections(Int_t indx)
Double_t YMaxModule
Int_t GetLastStripInZone(Int_t zone_id)
Double_t YMinModule
Double_t GetIntersectionPointXError(Int_t indx)
Double_t GetPseudoIntersectionXError(Int_t indx)
Int_t GetPseudoIntersection_UpperLayerClusterSize(Int_t indx)
Bool_t IsPointInsideModule(Double_t x, Double_t y)
virtual ~BmnVSPModule()
vector< Int_t > IntersectionPoints_LowerLayerClusterSize
Double_t GetRealPointX(Int_t indx)
Double_t GetXSize()
Bool_t AddRealPointFull(Double_t x, Double_t y, Double_t z, Double_t px, Double_t py, Double_t pz, Double_t signal, Int_t refID)
StripCluster GetUpperCluster_PseudoIntersections(Int_t indx)
Double_t GetPseudoIntersection_UpperLayerSripPosition(Int_t indx)
Double_t GetPseudoIntersectionX(Int_t indx)
Int_t GetNIntersectionPoints()
Double_t GetIntersectionPoint_LowerLayerSripTotalSignal(Int_t indx)
Bool_t SetStripSignalInLayer(Int_t layer_num, Int_t strip_num, Double_t signal)
vector< StripCluster > LowerClusters
BmnVSPModule(Double_t z_start_pos)
vector< Double_t > RealPointsY
Bool_t AddStripDigitNumberMatchInLayerByZoneId(Int_t zone_id, Int_t strip_num, Double_t weight, Int_t digit_num)
Double_t GetPseudoIntersectionYError(Int_t indx)
BmnMatch GetIntersectionPointMatch(Int_t indx)
Double_t ZStartModulePosition
StripCluster GetLowerCluster(Int_t indx)
vector< Double_t > PseudoIntersectionsX
vector< Double_t > IntersectionPoints_LowerLayerStripTotalSignal
Double_t GetIntersectionPoint_UpperLayerSripTotalSignal(Int_t indx)
Int_t GetPseudoIntersection_LowerLayerClusterSize(Int_t indx)
vector< Double_t > PseudoIntersections_UpperLayerStripPosition
BmnMatch GetStripMatchInZone(Int_t zone_id, Int_t strip_num)
Bool_t IsPointInsideModule(Double_t x, Double_t y, Double_t z)
Double_t GetZPositionRegistered()
Double_t GetStripSignalInZone(Int_t zone_id, Int_t strip_num)
vector< Double_t > IntersectionPointsY
Int_t GetIntersectionPoint_LowerLayerClusterSize(Int_t indx)
vector< Double_t > PseudoIntersectionsY
vector< Double_t > RealPointsMC
Bool_t SetStripDigitNumberMatchInLayer(Int_t layer_num, Int_t strip_num, BmnMatch digit_num_match)
Double_t GetRealPointMC(Int_t indx)
StripCluster MakeCluster(Int_t layer_num, Double_t xcoord, Double_t ycoord, Double_t signal, Double_t radius)
BmnVSPModule(const BmnVSPModule &)=delete
vector< BmnMatch > PseudoIntersectionMatches
Double_t XMaxModule
Bool_t SetStripDigitNumberMatchInLayerByZoneId(Int_t zone_id, Int_t strip_num, BmnMatch digit_num_match)
void CalculateStripHitIntersectionPoints()
vector< Double_t > IntersectionPointsX
Double_t GetIntersectionPoint_LowerLayerSripPosition(Int_t indx)
vector< Double_t > IntersectionPointsXErrors
Double_t GetIntersectionPointY(Int_t indx)
vector< Double_t > PseudoIntersectionsXErrors
void DefineModuleBorders()
void ResetModuleData()
Double_t GetPseudoIntersection_LowerLayerSripPosition(Int_t indx)
vector< Double_t > IntersectionPoints_UpperLayerStripTotalSignal
Double_t GetRealPointY(Int_t indx)
void SetVerbosity(Bool_t verb)
Double_t GetXMinModule()
void SetZStartModulePosition(Double_t zpos_module)
Double_t GetPseudoIntersectionY(Int_t indx)
vector< Double_t > IntersectionPoints_LowerLayerStripPosition
Bool_t AddStripMatchInLayerByZoneId(Int_t zone_id, Int_t strip_num, Double_t weight, Int_t mc_num)
vector< StripCluster > UpperClusters
Double_t GetYMaxModule()
Int_t GetNStripLayers()
Double_t GetPseudoIntersection_UpperLayerSripTotalSignal(Int_t indx)
BmnVSPLayer & GetStripLayer(Int_t num)
Bool_t SearchIntersectionPoint(Double_t &x, Double_t &y, Double_t strip_pos_layerA, Double_t strip_pos_layerB, Int_t layerA_index, Int_t layerB_index)
Int_t GetFirstStripInZone(Int_t zone_id)
Double_t GetModuleThickness()
Double_t GetIntersectionPointYError(Int_t indx)
Double_t GetZStartModulePosition()
Bool_t AddStripSignalInLayerByZoneId(Int_t zone_id, Int_t strip_num, Double_t signal)
Int_t GetIntersectionPoint_UpperLayerClusterSize(Int_t indx)
vector< StripCluster > UpperClusters_PseudoIntersections
Double_t GetXMaxModule()
Double_t XMinModule
Double_t GetIntersectionPoint_UpperLayerSripPosition(Int_t indx)
vector< Double_t > IntersectionPointsYErrors
Double_t GetPseudoIntersection_LowerLayerSripTotalSignal(Int_t indx)
Double_t GetStripSignalInLayer(Int_t layer_num, Int_t strip_num)
Int_t GetNRealPoints()
void AddStripLayer(BmnVSPLayer strip_layer)
void ResetRealPoints()
vector< Double_t > PseudoIntersections_LowerLayerStripPosition
Int_t GetNPseudoIntersections()
CollPoint(Double_t _x, Double_t _y, Double_t _z)