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;
137 Int_t n_layers_the_same_id = 0;
138 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
139 if ((
StripLayers[ilayer].GetZoneID() == zone_id)) {
140 if (
StripLayers[ilayer].SetStripDigitNumberMatch(strip_num, digit_num_match))
141 n_layers_the_same_id++;
144 return (
Bool_t)n_layers_the_same_id;
152 Int_t n_layers_the_same_id = 0;
153 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
154 if ((
StripLayers[ilayer].GetZoneID() == zone_id)) {
155 if (
StripLayers[ilayer].AddLinkToStripDigitNumberMatch(strip_num, weight, digit_num))
156 n_layers_the_same_id++;
159 return (
Bool_t)n_layers_the_same_id;
165 return StripLayers[layer_num].GetStripSignal(strip_num);
173 return StripLayers[layer_num].GetStripMatch(strip_num);
181 return StripLayers[layer_num].GetStripDigitNumberMatch(strip_num);
188 Int_t first_strip = 1E6;
190 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
191 if ((
StripLayers[ilayer].GetZoneID() == zone_id)) {
193 if (first_strip > first_strip_curr_layer)
194 first_strip = first_strip_curr_layer;
202 Int_t last_strip = 0;
204 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
205 if ((
StripLayers[ilayer].GetZoneID() == zone_id)) {
207 if (last_strip < last_strip_curr_layer)
208 last_strip = last_strip_curr_layer;
216 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
217 if ((
StripLayers[ilayer].GetZoneID() == zone_id)) {
218 if (strip_num >=
StripLayers[ilayer].GetFirstStripNumber()
219 && strip_num <=
StripLayers[ilayer].GetLastStripNumber())
221 return StripLayers[ilayer].GetStripSignal(strip_num);
230 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
231 if ((
StripLayers[ilayer].GetZoneID() == zone_id)) {
232 if (strip_num >=
StripLayers[ilayer].GetFirstStripNumber()
233 && strip_num <=
StripLayers[ilayer].GetLastStripNumber())
235 return StripLayers[ilayer].GetStripMatch(strip_num);
244 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer) {
245 if ((
StripLayers[ilayer].GetZoneID() == zone_id)) {
246 if (strip_num >=
StripLayers[ilayer].GetFirstStripNumber()
247 && strip_num <=
StripLayers[ilayer].GetLastStripNumber())
249 return StripLayers[ilayer].GetStripDigitNumberMatch(strip_num);
258 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer)
271 for (
size_t ilayer = 0; ilayer <
StripLayers.size(); ++ilayer)
272 if (
StripLayers[ilayer].IsPointInsideStripLayer(x, y))
320 Double_t x_vec_from_in_to_mid = vector_coeff_mid * px;
321 Double_t y_vec_from_in_to_mid = vector_coeff_mid * py;
325 Double_t x_mid = x + x_vec_from_in_to_mid;
326 Double_t y_mid = y + y_vec_from_in_to_mid;
335 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
336 if (!
StripLayers[ilayer].IsPointInsideStripLayer(x_mid, y_mid))
356 cerr <<
"WARNING: BmnSiliconModule::AddRealPointSimple(): Point (" << x <<
" : " << y
357 <<
") is out of the readout plane or inside a dead zone\n";
388 radius =
gRandom->Gaus(AvalancheRadius, 0.005);
389 if (radius > AvalancheRadius / 2.0 && radius < AvalancheRadius * 2.0 && radius > 0.0)
394 radius = AvalancheRadius;
401 vector<StripCluster> cluster_layers(n_strip_layers,
StripCluster());
403 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
404 if (!
StripLayers[ilayer].IsPointInsideStripLayer(x, y))
406 cluster_layers[ilayer] =
MakeCluster(ilayer, x, y, signal, radius);
411 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
412 for (
size_t ielement = 0; ielement < cluster_layers[ilayer].Strips.size(); ++ielement) {
413 Int_t strip_num = cluster_layers[ilayer].Strips.at(ielement);
414 Double_t strip_signal = cluster_layers[ilayer].Signals.at(ielement);
422 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
423 for (
size_t ielement = 0; ielement < cluster_layers[ilayer].Strips.size(); ++ielement) {
424 Int_t strip_num = cluster_layers[ilayer].Strips.at(ielement);
425 Double_t strip_signal = cluster_layers[ilayer].Signals.at(ielement);
439 cerr <<
"WARNING: BmnSiliconModule::AddRealPointFullOne(): Point (" << x <<
" : " << y <<
" : " << z
440 <<
") is out of the readout plane or inside a dead zone\n";
462 Double_t x_vec_from_in_to_mid = vector_coeff_mid * px;
463 Double_t y_vec_from_in_to_mid = vector_coeff_mid * py;
467 Double_t x_mid = x + x_vec_from_in_to_mid;
468 Double_t y_mid = y + y_vec_from_in_to_mid;
487 radius =
gRandom->Gaus(AvalancheRadius, 0.005);
488 if (radius > AvalancheRadius / 2.0 && radius < AvalancheRadius * 2.0 && radius > 0.0)
493 radius = AvalancheRadius;
500 vector<StripCluster> cluster_layers(n_strip_layers,
StripCluster());
502 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
503 if (!
StripLayers[ilayer].IsPointInsideStripLayer(x_mid, y_mid))
505 cluster_layers[ilayer] =
MakeCluster(ilayer, x_mid, y_mid, signal, radius);
510 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
511 for (
size_t ielement = 0; ielement < cluster_layers[ilayer].Strips.size(); ++ielement) {
512 Int_t strip_num = cluster_layers[ilayer].Strips.at(ielement);
513 Double_t strip_signal = cluster_layers[ilayer].Signals.at(ielement);
521 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
522 for (
size_t ielement = 0; ielement < cluster_layers[ilayer].Strips.size(); ++ielement) {
523 Int_t strip_num = cluster_layers[ilayer].Strips.at(ielement);
524 Double_t strip_signal = cluster_layers[ilayer].Signals.at(ielement);
538 cerr <<
"WARNING: BmnSiliconModule::AddRealPointFullOne(): Point (" << x <<
" : " << y <<
" : " << z
539 <<
") is out of the readout plane or inside a dead zone\n";
575 if (z_distance_from_in_to_out <= 0.0) {
577 cerr <<
"WARNING: BmnSiliconModule::AddRealPointFull(): Point (" << x <<
" : " << y <<
" : " << z
578 <<
") has a track with an incorrect length\n";
583 Double_t vector_coeff =
fabs(z_distance_from_in_to_out / pz);
586 Double_t x_vec_from_in_to_out = vector_coeff * px;
587 Double_t y_vec_from_in_to_out = vector_coeff * py;
588 Double_t z_vec_from_in_to_out = vector_coeff * pz;
591 Double_t x_out = x + x_vec_from_in_to_out;
592 Double_t y_out = y + y_vec_from_in_to_out;
597 if (x_out < XMinModule || x_out >
XMaxModule) {
603 x_vec_from_in_to_out = x_out - x;
604 vector_coeff = x_vec_from_in_to_out / px;
606 y_vec_from_in_to_out = vector_coeff * py;
607 z_vec_from_in_to_out = vector_coeff * pz;
609 y_out = y + y_vec_from_in_to_out;
613 if (y_out < YMinModule || y_out >
YMaxModule) {
619 y_vec_from_in_to_out = y_out - y;
620 vector_coeff = y_vec_from_in_to_out / py;
622 x_vec_from_in_to_out = vector_coeff * px;
623 z_vec_from_in_to_out = vector_coeff * pz;
625 x_out = x + x_vec_from_in_to_out;
632 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)
633 + (z_vec_from_in_to_out) * (z_vec_from_in_to_out));
636 Double_t current_length_ratio = 0.0;
638 Int_t collisions_cnt = 0;
642 std::vector<CollPoint> collision_points;
644 while (current_length < track_length) {
648 current_length += current_step;
650 if (current_length > track_length)
653 current_length_ratio = current_length / track_length;
655 Double_t current_x = x + current_length_ratio * x_vec_from_in_to_out;
656 Double_t current_y = y + current_length_ratio * y_vec_from_in_to_out;
657 Double_t current_z = z + current_length_ratio * z_vec_from_in_to_out;
659 collision_points.push_back(
CollPoint(current_x, current_y, current_z));
667 Int_t n_collisions = collision_points.size();
668 Double_t signal_per_step = signal / n_collisions;
670 for (
Int_t icollpoint = 0; icollpoint < n_collisions; ++icollpoint) {
673 Double_t current_radius = chargedCarrierCloudRadius;
674 if (chargedCarrierCloudRadius <= 0.0) {
676 cerr <<
"WARNING: BmnSiliconModule::AddRealPointFull(): incorrect chargedCarrierCloudRadius!\n";
680 Double_t current_x = collision_points[icollpoint].x;
681 Double_t current_y = collision_points[icollpoint].y;
685 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
686 if (!
StripLayers[ilayer].IsPointInsideStripLayer(current_x, current_y))
690 Double_t radius_in_strips = current_radius / pitch;
696 Double_t central_strip_pos =
StripLayers[ilayer].ConvertPointToStripPosition(current_x, current_y);
697 Double_t left_strip_pos = central_strip_pos - radius_in_strips;
698 Double_t right_strip_pos = central_strip_pos + radius_in_strips;
705 Double_t central_strip_signal = signal_per_step;
709 Double_t central_strip_fraction = 1.0;
711 Double_t right_strip_fraction = 0.0;
714 if ((
Int_t)left_strip_pos != (
Int_t)central_strip_pos) {
715 if (left_strip_pos >= first_strip_in_layer) {
716 left_strip_fraction = (
Int_t)central_strip_pos - left_strip_pos;
717 if (left_strip_fraction > 1.0)
718 left_strip_fraction = 1.0;
722 if ((
Int_t)right_strip_pos != (
Int_t)central_strip_pos) {
723 if (right_strip_pos < (last_strip_in_layer + 1)) {
724 right_strip_fraction = right_strip_pos - (
Int_t)(central_strip_pos + 1);
725 if (right_strip_fraction > 1.0)
726 right_strip_fraction = 1.0;
731 central_strip_signal = signal_per_step * central_strip_fraction
732 / (central_strip_fraction + left_strip_fraction + right_strip_fraction);
733 left_strip_signal = signal_per_step * left_strip_fraction
734 / (central_strip_fraction + left_strip_fraction + right_strip_fraction);
735 right_strip_signal = signal_per_step * right_strip_fraction
736 / (central_strip_fraction + left_strip_fraction + right_strip_fraction);
739 if (left_strip_signal > 0.0)
741 if (right_strip_signal > 0.0)
746 if (left_strip_signal > 0.0)
748 if (right_strip_signal > 0.0)
760 cerr <<
"WARNING: BmnSiliconModule::AddRealPointFull(): Point (" << x <<
" : " << y <<
" : " << z
761 <<
") is out of the readout plane or inside a dead zone\n";
784 Double_t RadiusInZones = radius / Pitch;
795 Double_t var_level = ClusterDistortion;
801 if (NStripsInLayer == 0)
804 Double_t CenterZonePos =
StripLayers[layer_num].ConvertPointToStripPosition(xcoord, ycoord);
806 if (CenterZonePos < FirstStripInLayer || CenterZonePos >= LastStripInLayer + 1)
812 Double_t LeftZonePos = CenterZonePos - RadiusInZones;
813 Double_t RightZonePos = CenterZonePos + RadiusInZones;
817 if (LeftZonePos < FirstStripInLayer) {
818 OutLeftBorder = LeftZonePos;
819 LeftZonePos = FirstStripInLayer;
821 if (RightZonePos < FirstStripInLayer) {
822 OutRightBorder = RightZonePos;
823 RightZonePos = FirstStripInLayer;
825 if (LeftZonePos >= LastStripInLayer + 1) {
826 OutLeftBorder = LeftZonePos;
827 LeftZonePos = LastStripInLayer + 1 - 0.001;
829 if (RightZonePos >= LastStripInLayer + 1) {
830 OutRightBorder = RightZonePos;
831 RightZonePos = LastStripInLayer + 1 - 0.001;
838 if ((
Int_t)LeftZonePos == (
Int_t)RightZonePos) {
842 h = RightZonePos - LeftZonePos;
848 Double_t Energy = (signal * Gain) * (S / SCluster);
849 Energy += rand.
Gaus(0.0, var_level * Energy);
853 if (NumCurrentZone >= FirstStripInLayer && NumCurrentZone < LastStripInLayer + 1 && Energy > 0.0) {
854 cluster.
AddStrip(NumCurrentZone, Energy);
855 total_signal += Energy;
864 h = ((
Int_t)LeftZonePos + 1) - LeftZonePos;
870 Double_t Energy = (signal * Gain) * (S / SCluster);
871 Energy += rand.
Gaus(0.0, var_level * Energy);
875 if (NumCurrentZone >= FirstStripInLayer && NumCurrentZone < LastStripInLayer + 1 && Energy > 0.0) {
876 cluster.
AddStrip(NumCurrentZone, Energy);
877 total_signal += Energy;
889 xp = LeftZonePos +
dist;
891 Energy = (signal * Gain) * (S / SCluster);
892 Energy += rand.
Gaus(0.0, var_level * Energy);
896 if (NumCurrentZone >= FirstStripInLayer && NumCurrentZone < LastStripInLayer + 1 && Energy > 0.0) {
897 cluster.
AddStrip(NumCurrentZone, Energy);
898 total_signal += Energy;
904 NumCurrentZone = (
Int_t)RightZonePos;
906 h = RightZonePos - (
Int_t)RightZonePos;
910 xp = LeftZonePos +
dist;
912 Energy = (signal * Gain) * (S / SCluster);
913 Energy += rand.
Gaus(0.0, var_level * Energy);
917 if (NumCurrentZone >= FirstStripInLayer && NumCurrentZone < LastStripInLayer + 1 && Energy > 0.0) {
918 cluster.
AddStrip(NumCurrentZone, Energy);
919 total_signal += Energy;
932 Int_t NOutLeftBins = 0;
933 Int_t NOutRightBins = 0;
934 if (OutLeftBorder != 0.0) {
935 NOutLeftBins = (
Int_t)(
fabs(OutLeftBorder)) + 1;
937 if (OutRightBorder != 0.0) {
938 NOutRightBins = (
Int_t)(OutRightBorder - RightZonePos) + 1;
943 Int_t nstrips = last_strip_num - begin_strip_num + 1;
945 TH1F hist(
"hist_for_fit",
"hist_for_fit", nstrips + NOutLeftBins + NOutRightBins, begin_strip_num - NOutLeftBins,
946 last_strip_num + 1 + NOutRightBins);
947 Int_t hist_index = 0;
956 if (NOutLeftBins > 0.0) {
960 Double_t Energy = (signal * Gain) * (S / SCluster);
961 Energy += rand.
Gaus(0.0, var_level * Energy);
968 for (
Int_t i = 1;
i < NOutLeftBins; ++
i) {
973 Energy = (signal * Gain) * (S / SCluster);
974 Energy += rand.
Gaus(0.0, var_level * Energy);
984 if (NOutRightBins > 0.0) {
986 for (
Int_t i = hist_index;
i < hist_index + NOutRightBins - 1; ++
i) {
991 Double_t Energy = (signal * Gain) * (S / SCluster);
992 Energy += rand.
Gaus(0.0, var_level * Energy);
1001 Double_t last = first + (OutRightBorder - (
Int_t)OutRightBorder);
1003 Double_t Energy = (signal * Gain) * (S / SCluster);
1004 Energy += rand.
Gaus(0.0, var_level * Energy);
1011 TF1* gausFitFunction = 0;
1014#ifdef DRAW_REAL_CLUSTER_HISTOGRAMS
1019 hist.
Fit(
"gaus", fit_params);
1021 if (gausFitFunction) {
1024 mean_fit_pos = hist.
GetMean();
1027 mean_fit_pos = hist.
GetMean();
1048 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
1053 map<Int_t, Bool_t> UsageStatus_LowerClusters;
1054 map<Int_t, Bool_t> UsageStatus_UpperClusters;
1057 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
1058 for (
Int_t i_strip_hit = 0; i_strip_hit <
StripLayers[ilayer].GetNStripHits(); ++i_strip_hit) {
1061 UsageStatus_LowerClusters[cluster.
GetUniqueID()] =
false;
1064 UsageStatus_UpperClusters[cluster.
GetUniqueID()] =
false;
1069 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
1070 for (
Int_t jlayer = ilayer + 1; jlayer < n_strip_layers; ++jlayer) {
1079 if (
Abs(iAngleRad - jAngleRad) < 0.01)
1085 for (
Int_t i_strip_hit = 0; i_strip_hit <
StripLayers[ilayer].GetNStripHits(); ++i_strip_hit) {
1086 for (
Int_t j_strip_hit = 0; j_strip_hit <
StripLayers[jlayer].GetNStripHits(); ++j_strip_hit) {
1097 if (
Abs(iAngleRad) >= 0.01 &&
Abs(jAngleRad) >= 0.01) {
1102 xcoord = (jB - iB) / (
Tan(i_PiOver2MinusAngleRad) -
Tan(j_PiOver2MinusAngleRad));
1103 ycoord =
Tan(i_PiOver2MinusAngleRad) * xcoord + iB;
1106 if (
Abs(iAngleRad) < 0.01) {
1109 xcoord =
StripLayers[ilayer].GetXLeftStripBorderPoint()
1110 + (iStripHitPos -
StripLayers[ilayer].GetFirstStripNumber())
1113 xcoord =
StripLayers[ilayer].GetXRightStripBorderPoint()
1114 - (iStripHitPos -
StripLayers[ilayer].GetFirstStripNumber())
1119 ycoord =
Tan(j_PiOver2MinusAngleRad) * xcoord + jB;
1122 if (
Abs(jAngleRad) < 0.01) {
1125 xcoord =
StripLayers[jlayer].GetXLeftStripBorderPoint()
1126 + (jStripHitPos -
StripLayers[jlayer].GetFirstStripNumber())
1129 xcoord =
StripLayers[jlayer].GetXRightStripBorderPoint()
1130 - (jStripHitPos -
StripLayers[jlayer].GetFirstStripNumber())
1135 ycoord =
Tan(i_PiOver2MinusAngleRad) * xcoord + iB;
1140 if (
StripLayers[ilayer].IsPointInsideStripLayer(xcoord, ycoord)
1141 &&
StripLayers[jlayer].IsPointInsideStripLayer(xcoord, ycoord))
1148 Double_t AngleIntersecRad =
Abs(iAngleRad - jAngleRad);
1157 Double_t xcoord_err = xerr1 + xerr2;
1162 Double_t ycoord_err = yerr1 + yerr2;
1173 intersection_match.
AddLink(iStripMatch);
1174 intersection_match.
AddLink(jStripMatch);
1185 BmnMatch intersection_digit_num_match;
1186 intersection_digit_num_match.
AddLink(iStripDigitNumberMatch);
1187 intersection_digit_num_match.
AddLink(jStripDigitNumberMatch);
1194 Int_t iLayerClusterSize =
StripLayers[ilayer].GetStripHitClusterSize(i_strip_hit);
1195 Int_t jLayerClusterSize =
StripLayers[jlayer].GetStripHitClusterSize(j_strip_hit);
1198 Double_t iLayerStripPosition =
StripLayers[ilayer].ConvertPointToStripPosition(xcoord, ycoord);
1199 Double_t jLayerStripPosition =
StripLayers[jlayer].ConvertPointToStripPosition(xcoord, ycoord);
1207 StripLayers[ilayer].GetStripHitTotalSignal(i_strip_hit));
1209 StripLayers[jlayer].GetStripHitTotalSignal(j_strip_hit));
1212 UsageStatus_LowerClusters
1213 [
StripLayers[ilayer].GetStripClusters()[i_strip_hit].GetUniqueID()] =
true;
1214 UsageStatus_UpperClusters
1215 [
StripLayers[jlayer].GetStripClusters()[j_strip_hit].GetUniqueID()] =
true;
1222 StripLayers[jlayer].GetStripHitTotalSignal(j_strip_hit));
1224 StripLayers[ilayer].GetStripHitTotalSignal(i_strip_hit));
1227 UsageStatus_LowerClusters
1228 [
StripLayers[jlayer].GetStripClusters()[j_strip_hit].GetUniqueID()] =
true;
1229 UsageStatus_UpperClusters
1230 [
StripLayers[ilayer].GetStripClusters()[i_strip_hit].GetUniqueID()] =
true;
1243 for (
auto it : UsageStatus_LowerClusters) {
1245 if (it.second ==
false) {
1246 for (
Int_t ilayer = 0; ilayer < n_strip_layers; ++ilayer) {
1250 for (
size_t icluster = 0; icluster <
StripLayers[ilayer].GetStripClusters().size(); ++icluster) {
1260 xcoord =
StripLayers[ilayer].GetXLeftStripBorderPoint()
1263 xcoord =
StripLayers[ilayer].GetXRightStripBorderPoint()
1291 StripLayers[ilayer].ConvertPointToStripPosition(xcoord, ycoord));
1320 Int_t ilayer = layerA_index;
1321 Int_t jlayer = layerB_index;
1329 if (
Abs(iAngleRad - jAngleRad) < 0.01)
1335 Double_t iStripHitPos = strip_pos_layerA;
1336 Double_t jStripHitPos = strip_pos_layerB;
1341 if (
Abs(iAngleRad) >= 0.01 &&
Abs(jAngleRad) >= 0.01) {
1346 xcoord = (jB - iB) / (
Tan(i_PiOver2MinusAngleRad) -
Tan(j_PiOver2MinusAngleRad));
1347 ycoord =
Tan(i_PiOver2MinusAngleRad) * xcoord + iB;
1350 if (
Abs(iAngleRad) < 0.01) {
1353 xcoord =
StripLayers[ilayer].GetXLeftStripBorderPoint()
1356 xcoord =
StripLayers[ilayer].GetXRightStripBorderPoint()
1361 ycoord =
Tan(j_PiOver2MinusAngleRad) * xcoord + jB;
1364 if (
Abs(jAngleRad) < 0.01) {
1367 xcoord =
StripLayers[jlayer].GetXLeftStripBorderPoint()
1370 xcoord =
StripLayers[jlayer].GetXRightStripBorderPoint()
1375 ycoord =
Tan(i_PiOver2MinusAngleRad) * xcoord + iB;
1380 if (
StripLayers[ilayer].IsPointInsideStripLayer(xcoord, ycoord)
1381 &&
StripLayers[jlayer].IsPointInsideStripLayer(xcoord, ycoord))
1436 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 SetStripMatchInLayerByZoneId(Int_t zone_id, Int_t strip_num, BmnMatch mc_match)
BmnMatch GetStripMatchInLayer(Int_t layer_num, Int_t strip_num)
vector< Double_t > IntersectionPointsXErrors
vector< Double_t > PseudoIntersections_UpperLayerStripPosition
vector< Int_t > IntersectionPoints_UpperLayerClusterSize
Double_t ZStartModulePosition
Bool_t IsPointInsideZThickness(Double_t z)
Bool_t SetStripDigitNumberMatchInLayerByZoneId(Int_t zone_id, Int_t strip_num, BmnMatch digit_num_match)
Double_t GetStripSignalInZone(Int_t zone_id, Int_t strip_num)
vector< Double_t > IntersectionPointsY
vector< Double_t > PseudoIntersectionsYErrors
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< Double_t > PseudoIntersectionsX
Int_t GetLastStripInZone(Int_t zone_id)
Bool_t SetStripMatchInLayer(Int_t layer_num, Int_t strip_num, BmnMatch mc_match)
void AddStripLayer(BmnSiliconLayer strip_layer)
Bool_t IsPointInsideModule(Double_t x, Double_t y)
vector< StripCluster > LowerClusters
vector< Double_t > IntersectionPoints_UpperLayerStripPosition
vector< StripCluster > LowerClusters_PseudoIntersections
BmnMatch GetStripDigitNumberMatchInZone(Int_t zone_id, Int_t strip_num)
void ResetPseudoIntersections()
vector< Double_t > IntersectionPoints_UpperLayerStripTotalSignal
vector< BmnMatch > IntersectionPointDigitNumberMatches
vector< Int_t > PseudoIntersections_UpperLayerClusterSize
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 GetZPositionRegistered()
BmnMatch GetStripMatchInZone(Int_t zone_id, Int_t strip_num)
Bool_t AddStripMatchInLayerByZoneId(Int_t zone_id, Int_t strip_num, Double_t weight, Int_t mc_num)
Double_t GetStripSignalInLayer(Int_t layer_num, Int_t strip_num)
vector< Double_t > PseudoIntersections_UpperLayerStripTotalSignal
Bool_t SetStripSignalInLayer(Int_t layer_num, Int_t strip_num, Double_t signal)
vector< Double_t > RealPointsY
vector< Double_t > IntersectionPoints_LowerLayerStripTotalSignal
Bool_t SetStripDigitNumberMatchInLayer(Int_t layer_num, Int_t strip_num, BmnMatch digit_num_match)
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)
void DefineModuleBorders()
vector< Int_t > PseudoIntersections_LowerLayerClusterSize
Bool_t AddStripDigitNumberMatchInLayerByZoneId(Int_t zone_id, Int_t strip_num, Double_t weight, Int_t digit_num)
vector< Double_t > IntersectionPointsYErrors
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)
vector< StripCluster > UpperClusters_PseudoIntersections
Bool_t AddStripSignalInLayerByZoneId(Int_t zone_id, Int_t strip_num, Double_t signal)
vector< Double_t > IntersectionPoints_LowerLayerStripPosition
vector< Double_t > PseudoIntersectionsY
StripCluster MakeCluster(Int_t layer_num, Double_t xcoord, Double_t ycoord, Double_t signal, Double_t radius)
BmnMatch GetStripDigitNumberMatchInLayer(Int_t layer_num, Int_t strip_num)
void CalculateStripHitIntersectionPoints()
Bool_t SetStripSignalInLayerByZoneId(Int_t zone_id, Int_t strip_num, Double_t signal)
vector< Double_t > PseudoIntersections_LowerLayerStripPosition
vector< BmnSiliconLayer > StripLayers
vector< Double_t > PseudoIntersections_LowerLayerStripTotalSignal
vector< BmnMatch > PseudoIntersectionDigitNumberMatches
vector< BmnMatch > IntersectionPointMatches
virtual ~BmnSiliconModule()
vector< Double_t > RealPointsMC
vector< Double_t > PseudoIntersectionsXErrors
void ResetIntersectionPoints()
vector< Double_t > IntersectionPointsX
Int_t GetFirstStripInZone(Int_t zone_id)
vector< StripCluster > UpperClusters
Bool_t AddStripSignalInLayer(Int_t layer_num, Int_t strip_num, Double_t signal)
vector< Double_t > RealPointsX
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)
vector< BmnMatch > PseudoIntersectionMatches
vector< Int_t > IntersectionPoints_LowerLayerClusterSize
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()