BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnSiProfModule.h
Go to the documentation of this file.
1#ifndef BMNSiProfMODULE_H
2#define BMNSiProfMODULE_H
3
4#include "BmnMatch.h"
5#include "BmnSiProfLayer.h"
6
7#include <iostream>
8#include <vector>
9
10using namespace TMath;
11using namespace std;
12
14{
15
16 public:
17 // Constructors -------------------------------------------------------------
19
20 BmnSiProfModule(Double_t z_start_pos, Double_t module_thick);
21 //--------------------------------------------------------------------------
22
23 // Destructor
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(BmnSiProfLayer 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);
50 Bool_t SetStripMatchInLayer(Int_t layer_num, Int_t strip_num, BmnMatch strip_match);
51
54
55 Int_t GetNStripLayers() { return StripLayers.size(); }
57 vector<BmnSiProfLayer>& GetStripLayers() { return StripLayers; }
58
59 void ResetModuleData(); // clear all data in the module and all layers (not delete layers!)
60 //--------------------------------------------------------------------------
61
62 // Point ownership of the module --------------------------------------------
63 Bool_t IsPointInsideModule(Double_t x, Double_t y); // plane ownership
64 Bool_t IsPointInsideModule(Double_t x, Double_t y, Double_t z); // volume ownership
66 Double_t z); // point with z-coord is between z_start and z_end of the module (inside module thickness)?
67 //--------------------------------------------------------------------------
68
69 // Methods to add a point to the module -------------------------------------
71 Double_t y,
72 Double_t z,
73 Double_t px,
74 Double_t py,
75 Double_t pz,
76 Double_t signal,
77 Int_t refID);
78
80 Double_t y,
81 Double_t z,
82 Double_t px,
83 Double_t py,
84 Double_t pz,
85 Double_t signal,
86 Int_t refID); // old
87
88 // make a strip cluster from a single point (with gauss smearing)
89 StripCluster MakeCluster(Int_t layer_num, Double_t xcoord, Double_t ycoord, Double_t signal, Double_t radius);
90
91 // Methods to calculate intersection points in the module -------------------
93
94 // need for a separated test (find x,y intersection coords from strip positions)
96 Double_t& y,
97 Double_t strip_pos_layerA,
98 Double_t strip_pos_layerB,
99 Int_t layerA_index,
100 Int_t layerB_index);
101 //--------------------------------------------------------------------------
102
103 // Added (real) points ------------------------------------------------------
104 Int_t GetNRealPoints() { return RealPointsX.size(); } // quantity of added points
105 Double_t GetRealPointX(Int_t indx) { return RealPointsX.at(indx); } // X-coord of i-added point
106 Double_t GetRealPointMC(Int_t indx) { return RealPointsMC.at(indx); } // MC-index of i-added point
107
109 {
110 RealPointsX.clear();
111 RealPointsY.clear();
112 RealPointsMC.clear();
113 }
114 //--------------------------------------------------------------------------
115
116 // Intersection points ------------------------------------------------------
117 Int_t GetNIntersectionPoints() { return IntersectionPointsX.size(); } // quantity of intersections
119 {
120 return IntersectionPointsX.at(indx);
121 } // X-coord of indx-intersection point
123 {
124 return IntersectionPointsY.at(indx);
125 } // Y-coord of indx-intersection point
127 {
128 return IntersectionPointsXErrors.at(indx);
129 } // X-coord error of indx-intersection point
131 {
132 return IntersectionPointsYErrors.at(indx);
133 } // Y-coord error of indx-intersection point
135 {
137 } // cluster size in the lower layer
139 {
141 } // cluster size in the upper layer
143 {
145 } // strip position in the lower layer
147 {
149 } // strip position in the upper layer
151 {
153 } // total signal in the lower layer
155 {
157 } // total signal in the upper layer
159 {
160 return IntersectionPointMatches.at(indx);
161 } // Intersection point match
162
164 //--------------------------------------------------------------------------
165
166 private:
167 void DefineModuleBorders(); // calculate min-max coordinates of the module from layers` parameters
168
169 private:
172
173 private:
175
180
182
184
185 vector<BmnSiProfLayer> StripLayers;
186
187 vector<Double_t> RealPointsX;
188 vector<Double_t> RealPointsY;
189 vector<Double_t> RealPointsMC; // index of MC point
190
191 vector<Double_t> IntersectionPointsX;
192 vector<Double_t> IntersectionPointsY;
193 vector<Double_t> IntersectionPointsXErrors;
194 vector<Double_t> IntersectionPointsYErrors;
195
196 vector<Int_t> IntersectionPoints_LowerLayerClusterSize; // cluster size (number of strips) in the lower layer for
197 // each intersection point
198 vector<Int_t> IntersectionPoints_UpperLayerClusterSize; // cluster size (number of strips) in the upper layer for
199 // each intersection point
200
201 vector<Double_t>
202 IntersectionPoints_LowerLayerStripPosition; // strip position in the lower layer for each intersection point
203 vector<Double_t>
204 IntersectionPoints_UpperLayerStripPosition; // strip position in the upper layer for each intersection point
205
206 vector<Double_t>
207 IntersectionPoints_LowerLayerStripTotalSignal; // total signal in the lower layer for each intersection point
208 vector<Double_t>
209 IntersectionPoints_UpperLayerStripTotalSignal; // total signal in the upper layer for each intersection point
210
211 vector<BmnMatch> IntersectionPointMatches;
212};
213//------------------------------------------------------------------------------
214
215#endif /* BMNSiProfMODULE_H */
bool Bool_t
int Int_t
double Double_t
Bool_t SetStripSignalInLayer(Int_t layer_num, Int_t strip_num, Double_t signal)
BmnSiProfModule(const BmnSiProfModule &)=delete
vector< BmnSiProfLayer > StripLayers
vector< BmnMatch > IntersectionPointMatches
vector< Double_t > IntersectionPoints_UpperLayerStripPosition
void ResetIntersectionPoints()
Bool_t IsPointInsideZThickness(Double_t z)
void SetZStartModulePosition(Double_t zpos_module)
BmnMatch GetStripMatchInLayer(Int_t layer_num, Int_t strip_num)
Double_t GetIntersectionPointY(Int_t indx)
Double_t GetIntersectionPoint_LowerLayerSripPosition(Int_t indx)
Double_t GetStripSignalInLayer(Int_t layer_num, Int_t strip_num)
Double_t GetIntersectionPointX(Int_t indx)
Double_t GetXSize()
Bool_t SetStripMatchInLayer(Int_t layer_num, Int_t strip_num, BmnMatch strip_match)
vector< Double_t > RealPointsY
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 GetModuleThickness()
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 > IntersectionPointsX
vector< Int_t > IntersectionPoints_UpperLayerClusterSize
Double_t GetIntersectionPointXError(Int_t indx)
BmnSiProfModule(Double_t z_start_pos, Double_t module_thick)
vector< BmnSiProfLayer > & GetStripLayers()
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)
Int_t GetNIntersectionPoints()
Bool_t IsPointInsideModule(Double_t x, Double_t y)
Double_t GetZStartModulePosition()
Double_t GetYMaxModule()
Bool_t AddStripSignalInLayer(Int_t layer_num, Int_t strip_num, Double_t signal)
Bool_t IsPointInsideModule(Double_t x, Double_t y, Double_t z)
void AddStripLayer(BmnSiProfLayer strip_layer)
Double_t ZStartModulePosition
StripCluster MakeCluster(Int_t layer_num, Double_t xcoord, Double_t ycoord, Double_t signal, Double_t radius)
vector< Double_t > RealPointsMC
BmnSiProfLayer & GetStripLayer(Int_t num)
vector< Double_t > IntersectionPoints_UpperLayerStripTotalSignal
vector< Int_t > IntersectionPoints_LowerLayerClusterSize
Double_t GetIntersectionPoint_UpperLayerSripTotalSignal(Int_t indx)
Double_t GetZPositionRegistered()
vector< Double_t > IntersectionPoints_LowerLayerStripPosition
Double_t GetXMaxModule()
BmnSiProfModule & operator=(const BmnSiProfModule &)=delete
Double_t GetIntersectionPointYError(Int_t indx)
Double_t GetRealPointMC(Int_t indx)
Int_t GetIntersectionPoint_UpperLayerClusterSize(Int_t indx)
virtual ~BmnSiProfModule()
Double_t GetYSize()
Double_t GetRealPointX(Int_t indx)
void CalculateStripHitIntersectionPoints()
void DefineModuleBorders()
Double_t GetXMinModule()
void ResetModuleData()
vector< Double_t > IntersectionPoints_LowerLayerStripTotalSignal
Double_t GetIntersectionPoint_LowerLayerSripTotalSignal(Int_t indx)
vector< Double_t > IntersectionPointsXErrors
Double_t GetIntersectionPoint_UpperLayerSripPosition(Int_t indx)
BmnMatch GetIntersectionPointMatch(Int_t indx)
vector< Double_t > IntersectionPointsY
vector< Double_t > IntersectionPointsYErrors
vector< Double_t > RealPointsX
void SetVerbosity(Bool_t verb)
Double_t GetYMinModule()
Int_t GetIntersectionPoint_LowerLayerClusterSize(Int_t indx)
Definition json.hpp:4446