BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnCSCModule.h
Go to the documentation of this file.
1#ifndef BMNCSCMODULE_H
2#define BMNCSCMODULE_H
3
4#include "BmnCSCLayer.h"
5#include "BmnMatch.h"
6
7#include <iostream>
8#include <vector>
9
10using namespace TMath;
11using namespace std;
12
14{
15
16 public:
17 // Constructors -------------------------------------------------------------
19
20 BmnCSCModule(Double_t z_start_pos, Double_t module_thick);
21 //--------------------------------------------------------------------------
22
23 // Destructor
24 virtual ~BmnCSCModule();
25
26 void SetVerbosity(Bool_t verb) { Verbosity = verb; }
28
29 // Module parameters --------------------------------------------------------
34
37
38 void SetZStartModulePosition(Double_t zpos_module) { ZStartModulePosition = zpos_module; }
40
42 Double_t GetZPositionRegistered(); // position for all registered point (hits)
43 //--------------------------------------------------------------------------
44
45 // Strip layers controls ----------------------------------------------------
46 void AddStripLayer(BmnCSCLayer strip_layer);
47
48 Bool_t SetStripSignalInLayer(Int_t layer_num, Int_t strip_num, Double_t signal);
49 Bool_t AddStripSignalInLayer(Int_t layer_num, Int_t strip_num, Double_t signal);
51 Int_t strip_num,
52 BmnMatch mc_match); // set a MC-match for a strip in some layer
54 Int_t layer_num,
55 Int_t strip_num,
56 BmnMatch digit_num_match); // set a digit number match for a strip in some layer
57
58 Double_t GetStripSignalInLayer(Int_t layer_num, Int_t strip_num);
59 BmnMatch GetStripMatchInLayer(Int_t layer_num, Int_t strip_num); // get a MC-match for a strip in some layer
61 Int_t strip_num); // get a digit number match for a strip in some layer
62
63 Int_t GetNStripLayers() { return StripLayers.size(); }
64 BmnCSCLayer& GetStripLayer(Int_t num) { return StripLayers.at(num); }
65 vector<BmnCSCLayer>& GetStripLayers() { return StripLayers; }
66
67 void ResetModuleData(); // clear all data in the module and all layers (not delete layers!)
68 //--------------------------------------------------------------------------
69
70 // Point ownership of the module --------------------------------------------
71 Bool_t IsPointInsideModule(Double_t x, Double_t y); // plane ownership
72 Bool_t IsPointInsideModule(Double_t x, Double_t y, Double_t z); // volume ownership
74 Double_t z); // point with z-coord is between z_start and z_end of the module (inside module thickness)?
75 //--------------------------------------------------------------------------
76
77 // Methods to add a point to the module -------------------------------------
79 Double_t y,
80 Double_t z,
81 Double_t px,
82 Double_t py,
83 Double_t pz,
84 Double_t signal,
85 Int_t refID);
86
88 Double_t y,
89 Double_t z,
90 Double_t px,
91 Double_t py,
92 Double_t pz,
93 Double_t signal,
94 Int_t refID); // old
95
96 // make a strip cluster from a single point (with gauss smearing)
97 StripCluster MakeCluster(Int_t layer_num, Double_t xcoord, Double_t ycoord, Double_t signal, Double_t radius);
98
99 // Methods to calculate intersection points in the module -------------------
101
102 // need for a separated test (find x,y intersection coords from strip positions)
104 Double_t& y,
105 Double_t strip_pos_layerA,
106 Double_t strip_pos_layerB,
107 Int_t layerA_index,
108 Int_t layerB_index);
109 //--------------------------------------------------------------------------
110
111 // Added (real) points ------------------------------------------------------
112 Int_t GetNRealPoints() { return RealPointsX.size(); } // quantity of added points
113 Double_t GetRealPointX(Int_t indx) { return RealPointsX.at(indx); } // X-coord of i-added point
114 Double_t GetRealPointY(Int_t indx) { return RealPointsY.at(indx); } // Y-coord of i-added point
115 Double_t GetRealPointMC(Int_t indx) { return RealPointsMC.at(indx); } // MC-index of i-added point
116
118 {
119 RealPointsX.clear();
120 RealPointsY.clear();
121 RealPointsMC.clear();
122 }
123 //--------------------------------------------------------------------------
124
125 // Intersection points ------------------------------------------------------
126 Int_t GetNIntersectionPoints() { return IntersectionPointsX.size(); } // quantity of intersections
128 {
129 return IntersectionPointsX.at(indx);
130 } // X-coord of indx-intersection point
132 {
133 return IntersectionPointsY.at(indx);
134 } // Y-coord of indx-intersection point
136 {
137 return IntersectionPointsXErrors.at(indx);
138 } // X-coord error of indx-intersection point
140 {
141 return IntersectionPointsYErrors.at(indx);
142 } // Y-coord error of indx-intersection point
144 {
146 } // cluster size in the lower layer
148 {
150 } // cluster size in the upper layer
152 {
154 } // strip position in the lower layer
156 {
158 } // strip position in the upper layer
160 {
162 } // total signal in the lower layer
164 {
166 } // total signal in the upper layer
168 {
169 return IntersectionPointMatches.at(indx);
170 } // Intersection point MC-match
172 {
174 } // Intersection point digit number match
175
178
180 //--------------------------------------------------------------------------
181
182 // Pseudo intersections -----------------------------------------------------
213 {
214 return PseudoIntersectionMatches.at(indx);
215 } // Pseudo intersection MC-match
217 {
219 } // Pseudo intersection point digit number match
220
223
225 //--------------------------------------------------------------------------
226
227 private:
228 void DefineModuleBorders(); // calculate min-max coordinates of the module from layers` parameters
229
230 private:
231 BmnCSCModule(const BmnCSCModule&) = delete;
233
234 private:
236
241
243
245
246 vector<BmnCSCLayer> StripLayers;
247
248 vector<Double_t> RealPointsX;
249 vector<Double_t> RealPointsY;
250 vector<Double_t> RealPointsMC; // index of MC point
251
252 vector<Double_t> IntersectionPointsX;
253 vector<Double_t> IntersectionPointsY;
256
257 vector<Int_t> IntersectionPoints_LowerLayerClusterSize; // cluster size (number of strips) in the lower layer for
258 // each intersection point
259 vector<Int_t> IntersectionPoints_UpperLayerClusterSize; // cluster size (number of strips) in the upper layer for
260 // each intersection point
261
262 vector<Double_t>
263 IntersectionPoints_LowerLayerStripPosition; // strip position in the lower layer for each intersection point
264 vector<Double_t>
265 IntersectionPoints_UpperLayerStripPosition; // strip position in the upper layer for each intersection point
266
267 vector<Double_t>
268 IntersectionPoints_LowerLayerStripTotalSignal; // total signal in the lower layer for each intersection point
269 vector<Double_t>
270 IntersectionPoints_UpperLayerStripTotalSignal; // total signal in the upper layer for each intersection point
271
272 vector<BmnMatch> IntersectionPointMatches; // MC-matches
273 vector<BmnMatch> IntersectionPointDigitNumberMatches; // Digit number matches
274
275 vector<StripCluster> UpperClusters;
276 vector<StripCluster> LowerClusters;
277
278 // Pseudo intersections -----------------------------------------------------
279 vector<Double_t> PseudoIntersectionsX;
280 vector<Double_t> PseudoIntersectionsY;
283
286
289
292
293 vector<BmnMatch> PseudoIntersectionMatches; // MC-matches
294 vector<BmnMatch> PseudoIntersectionDigitNumberMatches; // Digit number matches
295
298 //--------------------------------------------------------------------------
299};
300//------------------------------------------------------------------------------
301
302#endif /* BMNCSCMODULE_H */
bool Bool_t
int Int_t
double Double_t
vector< Double_t > PseudoIntersections_UpperLayerStripTotalSignal
BmnMatch GetIntersectionPointMatch(Int_t indx)
Double_t GetPseudoIntersectionX(Int_t indx)
StripCluster GetLowerCluster(Int_t indx)
Int_t GetPseudoIntersection_UpperLayerClusterSize(Int_t indx)
StripCluster GetUpperCluster(Int_t indx)
vector< BmnMatch > PseudoIntersectionMatches
vector< BmnCSCLayer > & GetStripLayers()
vector< Double_t > RealPointsY
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)
Double_t GetXMinModule()
vector< Double_t > PseudoIntersectionsX
void DefineModuleBorders()
Bool_t SetStripDigitNumberMatchInLayer(Int_t layer_num, Int_t strip_num, BmnMatch digit_num_match)
vector< Double_t > PseudoIntersectionsY
virtual ~BmnCSCModule()
vector< BmnMatch > PseudoIntersectionDigitNumberMatches
Int_t GetNRealPoints()
Double_t GetXMaxModule()
void ResetRealPoints()
vector< StripCluster > LowerClusters_PseudoIntersections
Double_t GetYMinModule()
vector< Double_t > PseudoIntersectionsXErrors
Double_t GetStripSignalInLayer(Int_t layer_num, Int_t strip_num)
vector< BmnCSCLayer > StripLayers
vector< Double_t > IntersectionPoints_UpperLayerStripTotalSignal
vector< Int_t > IntersectionPoints_LowerLayerClusterSize
Double_t ModuleThickness
Bool_t GetVerbosity()
Double_t XMinModule
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)
Double_t GetIntersectionPoint_UpperLayerSripPosition(Int_t indx)
vector< Double_t > IntersectionPointsX
void ResetModuleData()
vector< Double_t > IntersectionPoints_LowerLayerStripTotalSignal
vector< Double_t > IntersectionPointsY
StripCluster GetUpperCluster_PseudoIntersections(Int_t indx)
Double_t GetIntersectionPointYError(Int_t indx)
Double_t ZStartModulePosition
vector< Int_t > PseudoIntersections_UpperLayerClusterSize
Double_t GetRealPointMC(Int_t indx)
Double_t GetRealPointX(Int_t indx)
Double_t GetIntersectionPoint_UpperLayerSripTotalSignal(Int_t indx)
Int_t GetIntersectionPoint_UpperLayerClusterSize(Int_t indx)
BmnMatch GetStripMatchInLayer(Int_t layer_num, Int_t strip_num)
vector< StripCluster > UpperClusters
Double_t GetYMaxModule()
BmnMatch GetIntersectionPointDigitNumberMatch(Int_t indx)
void CalculateStripHitIntersectionPoints()
Double_t GetZPositionRegistered()
BmnMatch GetStripDigitNumberMatchInLayer(Int_t layer_num, Int_t strip_num)
Double_t GetIntersectionPointY(Int_t indx)
BmnCSCModule & operator=(const BmnCSCModule &)=delete
StripCluster MakeCluster(Int_t layer_num, Double_t xcoord, Double_t ycoord, Double_t signal, Double_t radius)
Double_t GetPseudoIntersection_LowerLayerSripPosition(Int_t indx)
Double_t GetPseudoIntersection_LowerLayerSripTotalSignal(Int_t indx)
Double_t XMaxModule
Bool_t SetStripMatchInLayer(Int_t layer_num, Int_t strip_num, BmnMatch mc_match)
vector< Double_t > IntersectionPointsXErrors
Double_t GetModuleThickness()
Double_t YMaxModule
vector< BmnMatch > IntersectionPointDigitNumberMatches
Double_t GetIntersectionPointX(Int_t indx)
vector< Double_t > IntersectionPoints_LowerLayerStripPosition
vector< Double_t > PseudoIntersections_LowerLayerStripTotalSignal
void SetVerbosity(Bool_t verb)
Int_t GetNIntersectionPoints()
Bool_t AddStripSignalInLayer(Int_t layer_num, Int_t strip_num, Double_t signal)
Double_t GetPseudoIntersectionYError(Int_t indx)
vector< Double_t > PseudoIntersections_LowerLayerStripPosition
Bool_t IsPointInsideZThickness(Double_t z)
Bool_t IsPointInsideModule(Double_t x, Double_t y)
vector< Double_t > PseudoIntersections_UpperLayerStripPosition
Double_t GetPseudoIntersection_UpperLayerSripPosition(Int_t indx)
Double_t GetIntersectionPoint_LowerLayerSripTotalSignal(Int_t indx)
Int_t GetNStripLayers()
Double_t GetPseudoIntersection_UpperLayerSripTotalSignal(Int_t indx)
BmnMatch GetPseudoIntersectionMatch(Int_t indx)
void ResetIntersectionPoints()
Int_t GetIntersectionPoint_LowerLayerClusterSize(Int_t indx)
void ResetPseudoIntersections()
BmnMatch GetPseudoIntersectionDigitNumberMatch(Int_t indx)
Double_t GetXSize()
Bool_t SetStripSignalInLayer(Int_t layer_num, Int_t strip_num, Double_t signal)
void AddStripLayer(BmnCSCLayer strip_layer)
vector< Double_t > IntersectionPoints_UpperLayerStripPosition
vector< Int_t > PseudoIntersections_LowerLayerClusterSize
Double_t GetIntersectionPointXError(Int_t indx)
vector< Double_t > RealPointsX
BmnCSCModule(const BmnCSCModule &)=delete
Double_t YMinModule
vector< Double_t > IntersectionPointsYErrors
vector< Double_t > PseudoIntersectionsYErrors
Int_t GetPseudoIntersection_LowerLayerClusterSize(Int_t indx)
vector< StripCluster > UpperClusters_PseudoIntersections
Double_t GetIntersectionPoint_LowerLayerSripPosition(Int_t indx)
void SetZStartModulePosition(Double_t zpos_module)
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)
Double_t GetPseudoIntersectionY(Int_t indx)
Int_t GetNPseudoIntersections()
vector< StripCluster > LowerClusters
vector< Double_t > RealPointsMC
vector< Int_t > IntersectionPoints_UpperLayerClusterSize
Double_t GetRealPointY(Int_t indx)
StripCluster GetLowerCluster_PseudoIntersections(Int_t indx)
Double_t GetYSize()
Double_t GetZStartModulePosition()
Double_t GetPseudoIntersectionXError(Int_t indx)
BmnCSCLayer & GetStripLayer(Int_t num)
vector< BmnMatch > IntersectionPointMatches
Definition json.hpp:4446