117 description_text +=
"FRONT: station ";
119 description_text +=
", xpos = ";
121 description_text +=
", ypos = ";
123 description_text +=
", zpos = ";
125 TCanvas* station_front_canv =
new TCanvas(
"station_front_canv", description_text, 10, 10, 1000, 1000);
149 for (
Int_t iModule = 0; iModule < NModules; ++iModule) {
154 if (
fabs(XShiftsOfModules[iModule]) > maxXShift)
155 maxXShift =
fabs(XShiftsOfModules[iModule]);
156 if (
fabs(YShiftsOfModules[iModule]) > maxYShift)
157 maxYShift =
fabs(YShiftsOfModules[iModule]);
158 if (
fabs(ZShiftsOfModules[iModule]) > maxZShift)
159 maxZShift =
fabs(ZShiftsOfModules[iModule]);
163 cout <<
"StationNumber = " << StationNumber <<
"\n";
164 cout <<
" XSize = " << XSize <<
"\n";
165 cout <<
" YSize = " << YSize <<
"\n";
166 cout <<
" ZSize = " << ZSize <<
"\n";
168 cout <<
" XMinStation = " << XMinStation <<
"\n";
169 cout <<
" XMaxStation = " << XMaxStation <<
"\n";
170 cout <<
" YMinStation = " << YMinStation <<
"\n";
171 cout <<
" YMaxStation = " << YMaxStation <<
"\n";
172 cout <<
" ZMinStation = " << ZMinStation <<
"\n";
173 cout <<
" ZMaxStation = " << ZMaxStation <<
"\n";
175 cout <<
" XPosition = " << XPosition <<
"\n";
176 cout <<
" YPosition = " << YPosition <<
"\n";
177 cout <<
" ZPosition = " << ZPosition <<
"\n";
179 cout <<
" NModules = " << NModules <<
"\n";
180 for (
Int_t iModule = 0; iModule < NModules; ++iModule) {
181 cout <<
" XShiftsOfModules[" << iModule <<
"] = " << XShiftsOfModules[iModule] <<
"\n";
182 cout <<
" YShiftsOfModules[" << iModule <<
"] = " << YShiftsOfModules[iModule] <<
"\n";
183 cout <<
" ZShiftsOfModules[" << iModule <<
"] = " << ZShiftsOfModules[iModule] <<
"\n";
187 Double_t XModuleSize =
module->GetXSize();
188 Double_t YModuleSize =
module->GetYSize();
189 Double_t XMinModule =
module->GetXMinModule();
190 Double_t XMaxModule =
module->GetXMaxModule();
191 Double_t YMinModule =
module->GetYMinModule();
192 Double_t YMaxModule =
module->GetYMaxModule();
194 cout <<
" XModuleSize = " << XModuleSize <<
"\n";
195 cout <<
" YModuleSize = " << YModuleSize <<
"\n";
196 cout <<
" XMinModule = " << XMinModule <<
"\n";
197 cout <<
" XMaxModule = " << XMaxModule <<
"\n";
198 cout <<
" YMinModule = " << YMinModule <<
"\n";
199 cout <<
" YMaxModule = " << YMaxModule <<
"\n";
202 Int_t NLayers =
module->GetNStripLayers();
203 for (
Int_t iLayer = 0; iLayer < NLayers; ++iLayer) {
221 cout <<
" Layer[" << iLayer <<
"]:\n";
222 cout <<
" stripAngleDeg = " << stripAngleDeg <<
"\n";
223 cout <<
" pitch = " << pitch <<
"\n";
225 cout <<
" XLayerSize = " << XLayerSize <<
"\n";
226 cout <<
" YLayerSize = " << YLayerSize <<
"\n";
228 cout <<
" XMinLayer = " << XMinLayer <<
"\n";
229 cout <<
" XMaxLayer = " << XMaxLayer <<
"\n";
230 cout <<
" YMinLayer = " << YMinLayer <<
"\n";
231 cout <<
" YMaxLayer = " << YMaxLayer <<
"\n";
234 cout <<
" layerType = " <<
"lower" <<
"\n";
237 cout <<
" layerType = " <<
"upper" <<
"\n";
240 cout <<
" xLeftBorderLayer = " << xLeftBorderLayer <<
"\n";
241 cout <<
" xRightBorderLayer = " << xRightBorderLayer <<
"\n";
242 cout <<
" yLeftBorderLayer = " << yLeftBorderLayer <<
"\n";
243 cout <<
" yRightBorderLayer = " << yRightBorderLayer <<
"\n";
245 cout <<
" stripDirection = " <<
"LeftToRight" <<
"\n";
248 cout <<
" stripDirection = " <<
"RightToLeft" <<
"\n";
252 vector<DeadZoneOfStripLayer> deadZones = layer.
GetDeadZones();
254 for (
Int_t idead = 0; idead < deadZones.size(); ++idead) {
255 cout <<
" DeadZone[" << idead <<
"]:\n";
257 Int_t NDeadPoints = deadZones[idead].GetNPoints();
259 for (
Int_t ip = 0; ip < NDeadPoints; ++ip) {
260 cout <<
" (x,y) = ( " << deadZones[idead].GetXPoint(ip) <<
", "
261 << deadZones[idead].GetYPoint(ip) <<
" )\n";
267 cout <<
"-----------------------------------------------------------\n";
271 for (
Int_t imod = 0; imod < NModules; imod++) {
272 Modules[imod] = station->
GetModule(imod);
284 Double_t xmin = XMinStation - XSize * 0.3;
285 Double_t xmax = XMaxStation + XSize * 0.3;
286 Double_t ymin = YMinStation - YSize * 0.3;
287 Double_t ymax = YMaxStation + YSize * 0.3;
291 TH2F* station_front_2dhist =
new TH2F(
"station_front_2dhist", description_text, 100, xmin, xmax, 100, ymin, ymax);
294 station_front_canv->
cd();
295 station_front_2dhist->
Draw();
297 TBox** modules_box =
new TBox*[NModules];
299 for (
Int_t im = 0; im < NModules; im++) {
307 modules_box[im] =
new TBox(x_min_module, y_min_module, x_max_module, y_max_module);
315 station_front_canv->
cd();
317 modules_box[im]->
Draw(
"l");
323 for (
Int_t ilayer = 0; ilayer < NLayers; ++ilayer) {
326 description_text =
"";
327 description_text +=
"FRONT: station ";
329 description_text +=
", module = ";
330 description_text += im;
331 description_text +=
", layer = ";
332 description_text += ilayer;
340 xmin, xmax, 100, ymin, ymax);
344 layer_2dhist->
Draw();
354 TBox* layer_box =
new TBox(x_min_layer, y_min_layer, x_max_layer, y_max_layer);
363 station_front_canv->
cd();
365 layer_box->
Draw(
"fl");
368 layer_box->
Draw(
"fl");
371 vector<DeadZoneOfStripLayer> DeadZones = layer.
GetDeadZones();
372 Int_t NDeadZones = DeadZones.size();
376 for (
Int_t izone = 0; izone < NDeadZones; ++izone) {
393 station_front_canv->
cd();
394 dead_zones_polylines[izone].
Draw(
"f");
395 dead_zones_polylines[izone].
Draw(
"");
398 dead_zones_polylines[izone].
Draw(
"f");
399 dead_zones_polylines[izone].
Draw(
"");
412 Double_t x_shift_up_left =
Tan(strip_angle_deg *
DegToRad()) * (y_max_layer - y_left_border);
413 Double_t x_shift_down_left =
Tan(strip_angle_deg *
DegToRad()) * (y_left_border - y_min_layer);
414 Double_t x_shift_up_right =
Tan(strip_angle_deg *
DegToRad()) * (y_max_layer - y_right_border);
415 Double_t x_shift_down_right =
Tan(strip_angle_deg *
DegToRad()) * (y_right_border - y_min_layer);
418 left_strip_line->
SetX1(x_left_border - x_shift_down_left);
419 left_strip_line->
SetX2(x_left_border + x_shift_up_left);
420 left_strip_line->
SetY1(y_min_layer);
421 left_strip_line->
SetY2(y_max_layer);
423 left_strip_line->
Draw();
426 right_strip_line->
SetX1(x_right_border - x_shift_down_right);
427 right_strip_line->
SetX2(x_right_border + x_shift_up_right);
428 right_strip_line->
SetY1(y_min_layer);
429 right_strip_line->
SetY2(y_max_layer);
431 right_strip_line->
Draw();
433 TMarker* left_border_marker =
new TMarker(x_left_border, y_left_border, 20);
436 left_border_marker->
Draw();
438 TMarker* right_border_marker =
new TMarker(x_right_border, y_right_border, 20);
441 right_border_marker->
Draw();
445 strip_direction_arrow->
SetX1(x_left_border);
446 strip_direction_arrow->
SetX2(x_right_border);
448 strip_direction_arrow->
SetX1(x_right_border);
449 strip_direction_arrow->
SetX2(x_left_border);
451 strip_direction_arrow->
SetY1(y_max_layer);
452 strip_direction_arrow->
SetY2(y_max_layer);
457 strip_direction_arrow->
Draw(
"|>");
463 TLine* x_center_layer_line =
464 new TLine(x_center_layer, layer_box->
GetY1(), x_center_layer, layer_box->
GetY2());
465 TLine* y_center_layer_line =
466 new TLine(layer_box->
GetX1(), y_center_layer, layer_box->
GetX2(), y_center_layer);
471 x_center_layer_line->
Draw();
472 y_center_layer_line->
Draw();
479 Double_t hor_leg = vert_leg *
Tan(strip_angle_rad);
480 Double_t x_edge_layer = x_center_layer + hor_leg;
482 TLine* strip_slope_layer_line =
new TLine(x_center_layer, y_center_layer, x_edge_layer, y_edge_layer);
486 strip_slope_layer_line->
Draw();
492 for (
int ip = 0; ip < points.size(); ip++) {
493 mark_point_front[ip].
SetX(points.at(ip).X());
494 mark_point_front[ip].
SetY(points.at(ip).Y());
500 cout <<
"mark_point_front[ip].GetX() = " << mark_point_front[ip].
GetX() <<
"\n";
501 mark_point_front[ip].
Draw();
511 for (
int ip = 0; ip < points.size(); ip++) {
512 mark_point_front[ip].
SetX(points.at(ip).X());
513 mark_point_front[ip].
SetY(points.at(ip).Y());
518 station_front_canv->
cd();
519 mark_point_front[ip].
Draw();
526 station_front_canv->
AddExec(
"ex",
"RecognizeModuleNumFromPointAndDrawIt(station_front_canv)");
549 cout <<
"\n-------------------------------------------------------------\n";
551 if (module_num != -1) {
553 cout <<
" point ( " << x <<
" : " << y <<
" ) is in:\n";
554 cout <<
" module = " << module_num <<
"\n";
557 Int_t NLayers =
module->GetNStripLayers();
559 for (
Int_t ilayer = 0; ilayer < NLayers; ++ilayer) {
564 cout <<
" layer[" << ilayer <<
"] : ";
566 cout <<
"LowerStripLayer";
568 cout <<
"UpperStripLayer";
570 cout <<
", pitch = " << layer.
GetPitch();
572 cout <<
", sizes = (" << layer.
GetXSize() <<
" x " << layer.
GetYSize() <<
")";
579 cout <<
" point ( " << x <<
" : " << y <<
" ) is out any modules!!!\n";
588 station_front_canv->
cd();
595 for (
Int_t ie = 0; ie < nentries; ++ie) {
599 point_marker->
Draw();
605 if (module_num != -1) {
620 cout <<
"\n Number of intersection points:\n";
622 for (
Int_t im = 0; im < NModules; ++im) {
624 Int_t NHits =
module->GetNIntersectionPoints();
628 cout <<
" in module[" << im <<
"] : " << NHits <<
"\n";
638 Int_t hit_marker_cnt = 0;
641 cout <<
" Intersection points:\n";
643 for (
Int_t im = 0; im < NModules; ++im) {
646 cout <<
" module[" << im <<
"]:\n";
650 Int_t NHits =
module->GetNIntersectionPoints();
652 for (
Int_t ihit = 0; ihit < NHits; ++ihit) {
654 Double_t x_hit =
module->GetIntersectionPointX(ihit);
655 Double_t y_hit =
module->GetIntersectionPointY(ihit);
656 Double_t z_hit =
module->GetZPositionRegistered();
659 cout <<
" hit[" << ihit <<
"] = ( " << x_hit <<
" : " << y_hit <<
" : " << z_hit <<
" ) "
663 Int_t NLayers =
module->GetNStripLayers();
664 for (
Int_t ilayer = 0; ilayer < NLayers; ++ilayer) {
668 cout <<
" layer[" << ilayer <<
"] : ";
670 cout <<
"LowerStripLayer";
672 cout <<
"UpperStripLayer";
674 cout <<
", pitch = " << layer.
GetPitch();
676 cout <<
", sizes = (" << layer.
GetXSize() <<
" x " << layer.
GetYSize() <<
")";
691 station_front_canv->
cd();
698 for (
Int_t ie = 0; ie < nentries; ++ie) {
702 Int_t NLayers =
module->GetNStripLayers();
704 for (
Int_t ilayer = 0; ilayer < NLayers; ++ilayer) {
729 cout <<
"-------------------------------------------------------------\n";
733 cout <<
"key button was pressed\n";
734 cout <<
"px = " << eventX <<
"\n";
735 cout <<
"py = " << (char)eventY <<
"\n";
737 if (eventX == (
int)
'c') {
752 station_front_canv->
Update();
758 for (
Int_t ie = 0; ie < nentries; ++ie) {
780 description_text +=
"TOP: station ";
782 description_text +=
", xpos = ";
784 description_text +=
", ypos = ";
786 description_text +=
", zpos = ";
788 TCanvas* station_top_canv =
new TCanvas(
"station_top_canv", description_text, 10, 10, 1000, 1200);
812 for (
Int_t iModule = 0; iModule < NModules; ++iModule) {
817 if (
fabs(XShiftsOfModules[iModule]) > maxXShift)
818 maxXShift =
fabs(XShiftsOfModules[iModule]);
819 if (
fabs(YShiftsOfModules[iModule]) > maxYShift)
820 maxYShift =
fabs(YShiftsOfModules[iModule]);
821 if (
fabs(ZShiftsOfModules[iModule]) > maxZShift)
822 maxZShift =
fabs(ZShiftsOfModules[iModule]);
826 for (
Int_t imod = 0; imod < NModules; imod++) {
827 Modules[imod] = station->
GetModule(imod);
833 Double_t xmin = XMinStation - XSize * 0.3;
834 Double_t xmax = XMaxStation + XSize * 0.3;
835 Double_t zmin = ZMinStation - ZSize * 5.0;
836 Double_t zmax = ZMaxStation + ZSize * 5.0;
840 TH2F* station_top_2dhist =
new TH2F(
"station_top_2dhist", description_text, 100, xmin, xmax, 100, zmin, zmax);
843 station_top_2dhist->
Draw();
845 TBox** modules_box =
new TBox*[NModules];
847 for (
Int_t im = 0; im < NModules; im++) {
855 modules_box[im] =
new TBox(x_min_module, z_min_module, x_max_module, z_max_module);
863 station_top_canv->
cd();
865 modules_box[im]->
Draw(
"l");
868 Double_t x_center_module = (modules_box[im]->
GetX1() + modules_box[im]->GetX2()) * 0.5;
869 TLine* x_center_module_line =
870 new TLine(x_center_module, modules_box[im]->GetY1(), x_center_module, modules_box[im]->GetY2());
872 x_center_module_line->
Draw();
876 for (
int ip = 0; ip < points.size(); ip++) {
877 mark_point_top[ip].
SetX(points.at(ip).X());
878 mark_point_top[ip].
SetY(points.at(ip).Z());
882 mark_point_top[ip].
Draw();