56 return StripLayers[layer_num].SetStripSignal(strip_num, signal);
64 return StripLayers[layer_num].AddStripSignal(strip_num, signal);
72 return StripLayers[layer_num].SetStripMatch(strip_num, mc_match);
80 return StripLayers[layer_num].SetStripDigitNumberMatch(strip_num, digit_num_match);
87 Int_t n_layers_the_same_id = 0;
88 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
90 if (
StripLayers[ilayer].SetStripSignal(strip_num, signal))
91 n_layers_the_same_id++;
94 return (
Bool_t)n_layers_the_same_id;
99 Int_t n_layers_the_same_id = 0;
100 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
101 if ((
StripLayers[ilayer].GetZoneID() == zone_id)) {
102 if (
StripLayers[ilayer].AddStripSignal(strip_num, signal))
103 n_layers_the_same_id++;
106 return (
Bool_t)n_layers_the_same_id;
111 Int_t n_layers_the_same_id = 0;
112 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
113 if ((
StripLayers[ilayer].GetZoneID() == zone_id)) {
114 if (
StripLayers[ilayer].SetStripMatch(strip_num, mc_match))
115 n_layers_the_same_id++;
118 return (
Bool_t)n_layers_the_same_id;
123 Int_t n_layers_the_same_id = 0;
124 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
125 if ((
StripLayers[ilayer].GetZoneID() == zone_id)) {
126 if (
StripLayers[ilayer].AddLinkToStripMatch(strip_num, weight, mc_num))
127 n_layers_the_same_id++;
130 return (
Bool_t)n_layers_the_same_id;
135 Int_t n_layers_the_same_id = 0;
136 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
137 if ((
StripLayers[ilayer].GetZoneID() == zone_id)) {
138 if (
StripLayers[ilayer].SetStripDigitNumberMatch(strip_num, digit_num_match))
139 n_layers_the_same_id++;
142 return (
Bool_t)n_layers_the_same_id;
150 Int_t n_layers_the_same_id = 0;
151 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
152 if ((
StripLayers[ilayer].GetZoneID() == zone_id)) {
153 if (
StripLayers[ilayer].AddLinkToStripDigitNumberMatch(strip_num, weight, digit_num))
154 n_layers_the_same_id++;
157 return (
Bool_t)n_layers_the_same_id;
163 return StripLayers[layer_num].GetStripSignal(strip_num);
171 return StripLayers[layer_num].GetStripMatch(strip_num);
179 return StripLayers[layer_num].GetStripDigitNumberMatch(strip_num);
186 Int_t first_strip = 1E6;
188 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
189 if ((
StripLayers[ilayer].GetZoneID() == zone_id)) {
191 if (first_strip > first_strip_curr_layer)
192 first_strip = first_strip_curr_layer;
200 Int_t last_strip = 0;
202 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
203 if ((
StripLayers[ilayer].GetZoneID() == zone_id)) {
205 if (last_strip < last_strip_curr_layer)
206 last_strip = last_strip_curr_layer;
214 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
215 if ((
StripLayers[ilayer].GetZoneID() == zone_id)) {
216 if (strip_num >=
StripLayers[ilayer].GetFirstStripNumber()
217 && strip_num <=
StripLayers[ilayer].GetLastStripNumber())
219 return StripLayers[ilayer].GetStripSignal(strip_num);
228 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
229 if ((
StripLayers[ilayer].GetZoneID() == zone_id)) {
230 if (strip_num >=
StripLayers[ilayer].GetFirstStripNumber()
231 && strip_num <=
StripLayers[ilayer].GetLastStripNumber())
233 return StripLayers[ilayer].GetStripMatch(strip_num);
242 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
243 if ((
StripLayers[ilayer].GetZoneID() == zone_id)) {
244 if (strip_num >=
StripLayers[ilayer].GetFirstStripNumber()
245 && strip_num <=
StripLayers[ilayer].GetLastStripNumber())
247 return StripLayers[ilayer].GetStripDigitNumberMatch(strip_num);
256 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer)
269 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
270 if (
StripLayers[ilayer].IsPointInsideStripLayer(x, y))
318 Double_t x_vec_from_in_to_mid = vector_coeff_mid * px;
319 Double_t y_vec_from_in_to_mid = vector_coeff_mid * py;
323 Double_t x_mid = x + x_vec_from_in_to_mid;
324 Double_t y_mid = y + y_vec_from_in_to_mid;
333 for (
size_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
334 if (!
StripLayers[ilayer].IsPointInsideStripLayer(x_mid, y_mid))
354 cerr <<
"WARNING: BmnVSPModule::AddRealPointSimple(): Point (" << x <<
" : " << y
355 <<
") is out of the readout plane or inside a dead zone\n";
386 radius =
gRandom->Gaus(AvalancheRadius, 0.005);
387 if (radius > AvalancheRadius / 2.0 && radius < AvalancheRadius * 2.0 && radius > 0.0)
392 radius = AvalancheRadius;
399 vector<StripCluster> cluster_layers(n_strip_layers,
StripCluster());
401 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
402 if (!
StripLayers[ilayer].IsPointInsideStripLayer(x, y))
404 cluster_layers[ilayer] =
MakeCluster(ilayer, x, y, signal, radius);
409 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
410 for (
size_t ielement = 0; ielement < cluster_layers[ilayer].Strips.size(); ++ielement) {
411 Int_t strip_num = cluster_layers[ilayer].Strips.at(ielement);
412 Double_t strip_signal = cluster_layers[ilayer].Signals.at(ielement);
420 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
421 for (
size_t ielement = 0; ielement < cluster_layers[ilayer].Strips.size(); ++ielement) {
422 Int_t strip_num = cluster_layers[ilayer].Strips.at(ielement);
423 Double_t strip_signal = cluster_layers[ilayer].Signals.at(ielement);
437 cerr <<
"WARNING: BmnVSPModule::AddRealPointFullOne(): Point (" << x <<
" : " << y <<
" : " << z
438 <<
") is out of the readout plane or inside a dead zone\n";
460 Double_t x_vec_from_in_to_mid = vector_coeff_mid * px;
461 Double_t y_vec_from_in_to_mid = vector_coeff_mid * py;
465 Double_t x_mid = x + x_vec_from_in_to_mid;
466 Double_t y_mid = y + y_vec_from_in_to_mid;
485 radius =
gRandom->Gaus(AvalancheRadius, 0.005);
486 if (radius > AvalancheRadius / 2.0 && radius < AvalancheRadius * 2.0 && radius > 0.0)
491 radius = AvalancheRadius;
498 vector<StripCluster> cluster_layers(n_strip_layers,
StripCluster());
500 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
501 if (!
StripLayers[ilayer].IsPointInsideStripLayer(x_mid, y_mid))
503 cluster_layers[ilayer] =
MakeCluster(ilayer, x_mid, y_mid, signal, radius);
508 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
509 for (
size_t ielement = 0; ielement < cluster_layers[ilayer].Strips.size(); ++ielement) {
510 Int_t strip_num = cluster_layers[ilayer].Strips.at(ielement);
511 Double_t strip_signal = cluster_layers[ilayer].Signals.at(ielement);
519 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
520 for (
size_t ielement = 0; ielement < cluster_layers[ilayer].Strips.size(); ++ielement) {
521 Int_t strip_num = cluster_layers[ilayer].Strips.at(ielement);
522 Double_t strip_signal = cluster_layers[ilayer].Signals.at(ielement);
536 cerr <<
"WARNING: BmnVSPModule::AddRealPointFullOne(): Point (" << x <<
" : " << y <<
" : " << z
537 <<
") is out of the readout plane or inside a dead zone\n";
573 if (z_distance_from_in_to_out <= 0.0) {
575 cerr <<
"WARNING: BmnVSPModule::AddRealPointFull(): Point (" << x <<
" : " << y <<
" : " << z
576 <<
") has a track with an incorrect length\n";
581 Double_t vector_coeff =
fabs(z_distance_from_in_to_out / pz);
584 Double_t x_vec_from_in_to_out = vector_coeff * px;
585 Double_t y_vec_from_in_to_out = vector_coeff * py;
586 Double_t z_vec_from_in_to_out = vector_coeff * pz;
589 Double_t x_out = x + x_vec_from_in_to_out;
590 Double_t y_out = y + y_vec_from_in_to_out;
595 if (x_out < XMinModule || x_out >
XMaxModule) {
601 x_vec_from_in_to_out = x_out - x;
602 vector_coeff = x_vec_from_in_to_out / px;
604 y_vec_from_in_to_out = vector_coeff * py;
605 z_vec_from_in_to_out = vector_coeff * pz;
607 y_out = y + y_vec_from_in_to_out;
611 if (y_out < YMinModule || y_out >
YMaxModule) {
617 y_vec_from_in_to_out = y_out - y;
618 vector_coeff = y_vec_from_in_to_out / py;
620 x_vec_from_in_to_out = vector_coeff * px;
621 z_vec_from_in_to_out = vector_coeff * pz;
623 x_out = x + x_vec_from_in_to_out;
630 std::sqrt((x_vec_from_in_to_out) * (x_vec_from_in_to_out) + (y_vec_from_in_to_out) * (y_vec_from_in_to_out)
631 + (z_vec_from_in_to_out) * (z_vec_from_in_to_out));
634 Double_t current_length_ratio = 0.0;
636 Int_t collisions_cnt = 0;
640 std::vector<CollPoint> collision_points;
642 while (current_length < track_length) {
646 current_length += current_step;
648 if (current_length > track_length)
651 current_length_ratio = current_length / track_length;
653 Double_t current_x = x + current_length_ratio * x_vec_from_in_to_out;
654 Double_t current_y = y + current_length_ratio * y_vec_from_in_to_out;
655 Double_t current_z = z + current_length_ratio * z_vec_from_in_to_out;
657 collision_points.push_back(
CollPoint(current_x, current_y, current_z));
665 Int_t n_collisions = collision_points.size();
666 Double_t signal_per_step = signal / n_collisions;
668 for (
Int_t icollpoint = 0; icollpoint < n_collisions; ++icollpoint) {
671 Double_t current_radius = chargedCarrierCloudRadius;
672 if (chargedCarrierCloudRadius <= 0.0) {
674 cerr <<
"WARNING: BmnVSPModule::AddRealPointFull(): incorrect chargedCarrierCloudRadius!\n";
678 Double_t current_x = collision_points[icollpoint].x;
679 Double_t current_y = collision_points[icollpoint].y;
683 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
684 if (!
StripLayers[ilayer].IsPointInsideStripLayer(current_x, current_y))
688 Double_t radius_in_strips = current_radius / pitch;
694 Double_t central_strip_pos =
StripLayers[ilayer].ConvertPointToStripPosition(current_x, current_y);
695 Double_t left_strip_pos = central_strip_pos - radius_in_strips;
696 Double_t right_strip_pos = central_strip_pos + radius_in_strips;
703 Double_t central_strip_signal = signal_per_step;
707 Double_t central_strip_fraction = 1.0;
709 Double_t right_strip_fraction = 0.0;
712 if ((
Int_t)left_strip_pos != (
Int_t)central_strip_pos) {
713 if (left_strip_pos >= first_strip_in_layer) {
714 left_strip_fraction = (
Int_t)central_strip_pos - left_strip_pos;
715 if (left_strip_fraction > 1.0)
716 left_strip_fraction = 1.0;
720 if ((
Int_t)right_strip_pos != (
Int_t)central_strip_pos) {
721 if (right_strip_pos < (last_strip_in_layer + 1)) {
722 right_strip_fraction = right_strip_pos - (
Int_t)(central_strip_pos + 1);
723 if (right_strip_fraction > 1.0)
724 right_strip_fraction = 1.0;
729 central_strip_signal = signal_per_step * central_strip_fraction
730 / (central_strip_fraction + left_strip_fraction + right_strip_fraction);
731 left_strip_signal = signal_per_step * left_strip_fraction
732 / (central_strip_fraction + left_strip_fraction + right_strip_fraction);
733 right_strip_signal = signal_per_step * right_strip_fraction
734 / (central_strip_fraction + left_strip_fraction + right_strip_fraction);
737 if (left_strip_signal > 0.0)
739 if (right_strip_signal > 0.0)
744 if (left_strip_signal > 0.0)
746 if (right_strip_signal > 0.0)
758 cerr <<
"WARNING: BmnVSPModule::AddRealPointFull(): Point (" << x <<
" : " << y <<
" : " << z
759 <<
") is out of the readout plane or inside a dead zone\n";
782 Double_t RadiusInZones = radius / Pitch;
793 Double_t var_level = ClusterDistortion;
799 if (NStripsInLayer == 0)
802 Double_t CenterZonePos =
StripLayers[layer_num].ConvertPointToStripPosition(xcoord, ycoord);
804 if (CenterZonePos < FirstStripInLayer || CenterZonePos >= LastStripInLayer + 1)
810 Double_t LeftZonePos = CenterZonePos - RadiusInZones;
811 Double_t RightZonePos = CenterZonePos + RadiusInZones;
815 if (LeftZonePos < FirstStripInLayer) {
816 OutLeftBorder = LeftZonePos;
817 LeftZonePos = FirstStripInLayer;
819 if (RightZonePos < FirstStripInLayer) {
820 OutRightBorder = RightZonePos;
821 RightZonePos = FirstStripInLayer;
823 if (LeftZonePos >= LastStripInLayer + 1) {
824 OutLeftBorder = LeftZonePos;
825 LeftZonePos = LastStripInLayer + 1 - 0.001;
827 if (RightZonePos >= LastStripInLayer + 1) {
828 OutRightBorder = RightZonePos;
829 RightZonePos = LastStripInLayer + 1 - 0.001;
836 if ((
Int_t)LeftZonePos == (
Int_t)RightZonePos) {
840 h = RightZonePos - LeftZonePos;
846 Double_t Energy = (signal * Gain) * (S / SCluster);
847 Energy += rand.
Gaus(0.0, var_level * Energy);
851 if (NumCurrentZone >= FirstStripInLayer && NumCurrentZone < LastStripInLayer + 1 && Energy > 0.0) {
852 cluster.
AddStrip(NumCurrentZone, Energy);
853 total_signal += Energy;
862 h = ((
Int_t)LeftZonePos + 1) - LeftZonePos;
868 Double_t Energy = (signal * Gain) * (S / SCluster);
869 Energy += rand.
Gaus(0.0, var_level * Energy);
873 if (NumCurrentZone >= FirstStripInLayer && NumCurrentZone < LastStripInLayer + 1 && Energy > 0.0) {
874 cluster.
AddStrip(NumCurrentZone, Energy);
875 total_signal += Energy;
887 xp = LeftZonePos +
dist;
889 Energy = (signal * Gain) * (S / SCluster);
890 Energy += rand.
Gaus(0.0, var_level * Energy);
894 if (NumCurrentZone >= FirstStripInLayer && NumCurrentZone < LastStripInLayer + 1 && Energy > 0.0) {
895 cluster.
AddStrip(NumCurrentZone, Energy);
896 total_signal += Energy;
902 NumCurrentZone = (
Int_t)RightZonePos;
904 h = RightZonePos - (
Int_t)RightZonePos;
908 xp = LeftZonePos +
dist;
910 Energy = (signal * Gain) * (S / SCluster);
911 Energy += rand.
Gaus(0.0, var_level * Energy);
915 if (NumCurrentZone >= FirstStripInLayer && NumCurrentZone < LastStripInLayer + 1 && Energy > 0.0) {
916 cluster.
AddStrip(NumCurrentZone, Energy);
917 total_signal += Energy;
930 Int_t NOutLeftBins = 0;
931 Int_t NOutRightBins = 0;
932 if (OutLeftBorder != 0.0) {
933 NOutLeftBins = (
Int_t)(
fabs(OutLeftBorder)) + 1;
935 if (OutRightBorder != 0.0) {
936 NOutRightBins = (
Int_t)(OutRightBorder - RightZonePos) + 1;
941 Int_t nstrips = last_strip_num - begin_strip_num + 1;
943 TH1F hist(
"hist_for_fit",
"hist_for_fit", nstrips + NOutLeftBins + NOutRightBins, begin_strip_num - NOutLeftBins,
944 last_strip_num + 1 + NOutRightBins);
945 Int_t hist_index = 0;
954 if (NOutLeftBins > 0.0) {
958 Double_t Energy = (signal * Gain) * (S / SCluster);
959 Energy += rand.
Gaus(0.0, var_level * Energy);
966 for (
Int_t i = 1;
i < NOutLeftBins; ++
i) {
971 Energy = (signal * Gain) * (S / SCluster);
972 Energy += rand.
Gaus(0.0, var_level * Energy);
982 if (NOutRightBins > 0.0) {
984 for (
Int_t i = hist_index;
i < hist_index + NOutRightBins - 1; ++
i) {
989 Double_t Energy = (signal * Gain) * (S / SCluster);
990 Energy += rand.
Gaus(0.0, var_level * Energy);
999 Double_t last = first + (OutRightBorder - (
Int_t)OutRightBorder);
1001 Double_t Energy = (signal * Gain) * (S / SCluster);
1002 Energy += rand.
Gaus(0.0, var_level * Energy);
1009 TF1* gausFitFunction = 0;
1012#ifdef DRAW_REAL_CLUSTER_HISTOGRAMS
1017 hist.
Fit(
"gaus", fit_params);
1019 if (gausFitFunction) {
1022 mean_fit_pos = hist.
GetMean();
1025 mean_fit_pos = hist.
GetMean();
1046 for (
size_t ilayer = 0; ilayer < n_strip_layers; ++ilayer)
1049 map<Int_t, Bool_t> UsageStatus_LowerClusters;
1050 map<Int_t, Bool_t> UsageStatus_UpperClusters;
1053 for (
size_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
1054 for (
Int_t i_strip_hit = 0; i_strip_hit <
StripLayers[ilayer].GetNStripHits(); ++i_strip_hit) {
1057 UsageStatus_LowerClusters[cluster.
GetUniqueID()] =
false;
1059 UsageStatus_UpperClusters[cluster.
GetUniqueID()] =
false;
1063 for (
size_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
1064 for (
size_t jlayer = ilayer + 1; jlayer < n_strip_layers; ++jlayer) {
1073 if (
Abs(iAngleRad - jAngleRad) < 0.01)
1079 for (
Int_t i_strip_hit = 0; i_strip_hit <
StripLayers[ilayer].GetNStripHits(); ++i_strip_hit) {
1080 for (
Int_t j_strip_hit = 0; j_strip_hit <
StripLayers[jlayer].GetNStripHits(); ++j_strip_hit) {
1091 if (
Abs(iAngleRad) >= 0.01 &&
Abs(jAngleRad) >= 0.01) {
1096 xcoord = (jB - iB) / (
Tan(i_PiOver2MinusAngleRad) -
Tan(j_PiOver2MinusAngleRad));
1097 ycoord =
Tan(i_PiOver2MinusAngleRad) * xcoord + iB;
1099 if (
Abs(iAngleRad) < 0.01) {
1102 xcoord =
StripLayers[ilayer].GetXLeftStripBorderPoint()
1103 + (iStripHitPos -
StripLayers[ilayer].GetFirstStripNumber())
1106 xcoord =
StripLayers[ilayer].GetXRightStripBorderPoint()
1107 - (iStripHitPos -
StripLayers[ilayer].GetFirstStripNumber())
1112 ycoord =
Tan(j_PiOver2MinusAngleRad) * xcoord + jB;
1115 if (
Abs(jAngleRad) < 0.01) {
1118 xcoord =
StripLayers[jlayer].GetXLeftStripBorderPoint()
1119 + (jStripHitPos -
StripLayers[jlayer].GetFirstStripNumber())
1122 xcoord =
StripLayers[jlayer].GetXRightStripBorderPoint()
1123 - (jStripHitPos -
StripLayers[jlayer].GetFirstStripNumber())
1128 ycoord =
Tan(i_PiOver2MinusAngleRad) * xcoord + iB;
1133 if (
StripLayers[ilayer].IsPointInsideStripLayer(xcoord, ycoord)
1134 &&
StripLayers[jlayer].IsPointInsideStripLayer(xcoord, ycoord))
1141 Double_t AngleIntersecRad =
Abs(iAngleRad - jAngleRad);
1150 Double_t xcoord_err = xerr1 + xerr2;
1155 Double_t ycoord_err = yerr1 + yerr2;
1166 intersection_match.
AddLink(iStripMatch);
1167 intersection_match.
AddLink(jStripMatch);
1178 BmnMatch intersection_digit_num_match;
1179 intersection_digit_num_match.
AddLink(iStripDigitNumberMatch);
1180 intersection_digit_num_match.
AddLink(jStripDigitNumberMatch);
1187 Int_t iLayerClusterSize =
StripLayers[ilayer].GetStripHitClusterSize(i_strip_hit);
1188 Int_t jLayerClusterSize =
StripLayers[jlayer].GetStripHitClusterSize(j_strip_hit);
1191 Double_t iLayerStripPosition =
StripLayers[ilayer].ConvertPointToStripPosition(xcoord, ycoord);
1192 Double_t jLayerStripPosition =
StripLayers[jlayer].ConvertPointToStripPosition(xcoord, ycoord);
1200 StripLayers[ilayer].GetStripHitTotalSignal(i_strip_hit));
1202 StripLayers[jlayer].GetStripHitTotalSignal(j_strip_hit));
1205 UsageStatus_LowerClusters
1206 [
StripLayers[ilayer].GetStripClusters()[i_strip_hit].GetUniqueID()] =
true;
1207 UsageStatus_UpperClusters
1208 [
StripLayers[jlayer].GetStripClusters()[j_strip_hit].GetUniqueID()] =
true;
1215 StripLayers[jlayer].GetStripHitTotalSignal(j_strip_hit));
1217 StripLayers[ilayer].GetStripHitTotalSignal(i_strip_hit));
1220 UsageStatus_LowerClusters
1221 [
StripLayers[jlayer].GetStripClusters()[j_strip_hit].GetUniqueID()] =
true;
1222 UsageStatus_UpperClusters
1223 [
StripLayers[ilayer].GetStripClusters()[i_strip_hit].GetUniqueID()] =
true;
1236 for (
auto it : UsageStatus_LowerClusters) {
1239 if (it.second ==
false) {
1241 for (
size_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
1245 for (
size_t icluster = 0; icluster <
StripLayers[ilayer].GetStripClusters().size(); ++icluster) {
1255 xcoord =
StripLayers[ilayer].GetXLeftStripBorderPoint()
1258 xcoord =
StripLayers[ilayer].GetXRightStripBorderPoint()
1286 StripLayers[ilayer].ConvertPointToStripPosition(xcoord, ycoord));
1315 Int_t ilayer = layerA_index;
1316 Int_t jlayer = layerB_index;
1324 if (
Abs(iAngleRad - jAngleRad) < 0.01)
1330 Double_t iStripHitPos = strip_pos_layerA;
1331 Double_t jStripHitPos = strip_pos_layerB;
1336 if (
Abs(iAngleRad) >= 0.01 &&
Abs(jAngleRad) >= 0.01) {
1341 xcoord = (jB - iB) / (
Tan(i_PiOver2MinusAngleRad) -
Tan(j_PiOver2MinusAngleRad));
1342 ycoord =
Tan(i_PiOver2MinusAngleRad) * xcoord + iB;
1345 if (
Abs(iAngleRad) < 0.01) {
1348 xcoord =
StripLayers[ilayer].GetXLeftStripBorderPoint()
1351 xcoord =
StripLayers[ilayer].GetXRightStripBorderPoint()
1356 ycoord =
Tan(j_PiOver2MinusAngleRad) * xcoord + jB;
1359 if (
Abs(jAngleRad) < 0.01) {
1362 xcoord =
StripLayers[jlayer].GetXLeftStripBorderPoint()
1365 xcoord =
StripLayers[jlayer].GetXRightStripBorderPoint()
1370 ycoord =
Tan(i_PiOver2MinusAngleRad) * xcoord + iB;
1375 if (
StripLayers[ilayer].IsPointInsideStripLayer(xcoord, ycoord)
1376 &&
StripLayers[jlayer].IsPointInsideStripLayer(xcoord, ycoord))
1431 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
vector< Double_t > dist(vector< Double_t > qp, Double_t mu)
friend F32vec4 fabs(const F32vec4 &a)
R__EXTERN TRandom * gRandom
void AddLink(const BmnMatch &match)
Bool_t AddStripSignalInLayer(Int_t layer_num, Int_t strip_num, Double_t signal)
vector< Double_t > RealPointsMC
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)
vector< Double_t > PseudoIntersections_LowerLayerStripPosition
Bool_t SetStripSignalInLayerByZoneId(Int_t zone_id, Int_t strip_num, Double_t signal)
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)
BmnMatch GetStripDigitNumberMatchInLayer(Int_t layer_num, Int_t strip_num)
void ResetPseudoIntersections()
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< Double_t > PseudoIntersectionsX
BmnMatch GetStripMatchInLayer(Int_t layer_num, Int_t strip_num)
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< Int_t > IntersectionPoints_LowerLayerClusterSize
vector< Double_t > PseudoIntersections_UpperLayerStripTotalSignal
Bool_t IsPointInsideZThickness(Double_t z)
vector< Double_t > IntersectionPoints_UpperLayerStripPosition
vector< Double_t > RealPointsX
vector< StripCluster > LowerClusters
vector< Double_t > IntersectionPointsY
Int_t GetLastStripInZone(Int_t zone_id)
vector< Double_t > IntersectionPointsX
Bool_t IsPointInsideModule(Double_t x, Double_t y)
vector< StripCluster > UpperClusters
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)
vector< BmnMatch > IntersectionPointMatches
Bool_t SetStripSignalInLayer(Int_t layer_num, Int_t strip_num, Double_t signal)
Bool_t AddStripDigitNumberMatchInLayerByZoneId(Int_t zone_id, Int_t strip_num, Double_t weight, Int_t digit_num)
vector< Int_t > PseudoIntersections_UpperLayerClusterSize
Double_t ZStartModulePosition
vector< Double_t > IntersectionPoints_UpperLayerStripTotalSignal
vector< Int_t > IntersectionPoints_UpperLayerClusterSize
vector< BmnMatch > PseudoIntersectionMatches
BmnMatch GetStripMatchInZone(Int_t zone_id, Int_t strip_num)
Double_t GetZPositionRegistered()
Double_t GetStripSignalInZone(Int_t zone_id, Int_t strip_num)
vector< Double_t > IntersectionPointsYErrors
vector< Double_t > PseudoIntersectionsY
vector< Double_t > IntersectionPointsXErrors
vector< Double_t > PseudoIntersectionsXErrors
vector< Double_t > RealPointsY
Bool_t SetStripDigitNumberMatchInLayer(Int_t layer_num, Int_t strip_num, BmnMatch digit_num_match)
StripCluster MakeCluster(Int_t layer_num, Double_t xcoord, Double_t ycoord, Double_t signal, Double_t radius)
Bool_t SetStripDigitNumberMatchInLayerByZoneId(Int_t zone_id, Int_t strip_num, BmnMatch digit_num_match)
void CalculateStripHitIntersectionPoints()
vector< BmnVSPLayer > StripLayers
void DefineModuleBorders()
vector< StripCluster > UpperClusters_PseudoIntersections
vector< BmnMatch > PseudoIntersectionDigitNumberMatches
vector< StripCluster > LowerClusters_PseudoIntersections
Bool_t AddStripMatchInLayerByZoneId(Int_t zone_id, Int_t strip_num, Double_t weight, Int_t mc_num)
vector< Double_t > PseudoIntersectionsYErrors
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)
Bool_t AddStripSignalInLayerByZoneId(Int_t zone_id, Int_t strip_num, Double_t signal)
vector< Double_t > IntersectionPoints_LowerLayerStripTotalSignal
vector< BmnMatch > IntersectionPointDigitNumberMatches
vector< Double_t > IntersectionPoints_LowerLayerStripPosition
vector< Int_t > PseudoIntersections_LowerLayerClusterSize
vector< Double_t > PseudoIntersections_UpperLayerStripPosition
vector< Double_t > PseudoIntersections_LowerLayerStripTotalSignal
Double_t GetStripSignalInLayer(Int_t layer_num, Int_t strip_num)
void AddStripLayer(BmnVSPLayer strip_layer)
void AddStrip(Int_t strip_num, Double_t strip_signal)
Double_t PositionResidual
vector< Double_t > Signals
virtual Double_t GetParameter(const TString &name) const
virtual Double_t Integral(Double_t a, Double_t b, Double_t epsrel=1.e-12)
virtual void SetParameter(const TString &name, Double_t value)
virtual Double_t GetMean(Int_t axis=1) const
virtual TFitResultPtr Fit(const char *formula, Option_t *option="", Option_t *goption="", Double_t xmin=0, Double_t xmax=0)
virtual void SetBinContent(Int_t bin, Double_t content)
virtual TF1 * GetFunction(const char *name) const
virtual UInt_t GetUniqueID() const
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
constexpr Double_t PiOver2()
constexpr Double_t Sigma()