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();
195 cout <<
" XModuleSize = " << XModuleSize <<
"\n";
196 cout <<
" YModuleSize = " << YModuleSize <<
"\n";
197 cout <<
" XMinModule = " << XMinModule <<
"\n";
198 cout <<
" XMaxModule = " << XMaxModule <<
"\n";
199 cout <<
" YMinModule = " << YMinModule <<
"\n";
200 cout <<
" YMaxModule = " << YMaxModule <<
"\n";
203 cout <<
" driftDirection = forward\n";
206 cout <<
" driftDirection = backward\n";
210 Int_t NLayers =
module->GetNStripLayers();
211 for (
Int_t iLayer = 0; iLayer < NLayers; ++iLayer) {
229 cout <<
" Layer[" << iLayer <<
"]:\n";
230 cout <<
" stripAngleDeg = " << stripAngleDeg <<
"\n";
231 cout <<
" pitch = " << pitch <<
"\n";
233 cout <<
" XLayerSize = " << XLayerSize <<
"\n";
234 cout <<
" YLayerSize = " << YLayerSize <<
"\n";
236 cout <<
" XMinLayer = " << XMinLayer <<
"\n";
237 cout <<
" XMaxLayer = " << XMaxLayer <<
"\n";
238 cout <<
" YMinLayer = " << YMinLayer <<
"\n";
239 cout <<
" YMaxLayer = " << YMaxLayer <<
"\n";
242 cout <<
" layerType = " <<
"lower" <<
"\n";
245 cout <<
" layerType = " <<
"upper" <<
"\n";
248 cout <<
" xLeftBorderLayer = " << xLeftBorderLayer <<
"\n";
249 cout <<
" xRightBorderLayer = " << xRightBorderLayer <<
"\n";
250 cout <<
" yLeftBorderLayer = " << yLeftBorderLayer <<
"\n";
251 cout <<
" yRightBorderLayer = " << yRightBorderLayer <<
"\n";
253 cout <<
" stripDirection = " <<
"LeftToRight" <<
"\n";
256 cout <<
" stripDirection = " <<
"RightToLeft" <<
"\n";
260 vector<DeadZoneOfStripLayer> deadZones = layer.
GetDeadZones();
262 for (
Int_t idead = 0; idead < deadZones.size(); ++idead) {
263 cout <<
" DeadZone[" << idead <<
"]:\n";
265 Int_t NDeadPoints = deadZones[idead].GetNPoints();
267 for (
Int_t ip = 0; ip < NDeadPoints; ++ip) {
268 cout <<
" (x,y) = ( " << deadZones[idead].GetXPoint(ip) <<
", "
269 << deadZones[idead].GetYPoint(ip) <<
" )\n";
275 cout <<
"-----------------------------------------------------------\n";
279 for (
Int_t imod = 0; imod < NModules; imod++) {
280 Modules[imod] = station->
GetModule(imod);
292 Double_t xmin = XMinStation - XSize * 0.3;
293 Double_t xmax = XMaxStation + XSize * 0.3;
294 Double_t ymin = YMinStation - YSize * 0.3;
295 Double_t ymax = YMaxStation + YSize * 0.3;
299 TH2F* station_front_2dhist =
new TH2F(
"station_front_2dhist", description_text, 100, xmin, xmax, 100, ymin, ymax);
302 station_front_canv->
cd();
303 station_front_2dhist->
Draw();
305 TBox** modules_box =
new TBox*[NModules];
307 for (
Int_t im = 0; im < NModules; im++) {
315 modules_box[im] =
new TBox(x_min_module, y_min_module, x_max_module, y_max_module);
323 station_front_canv->
cd();
325 modules_box[im]->
Draw(
"l");
331 for (
Int_t ilayer = 0; ilayer < NLayers; ++ilayer) {
334 description_text =
"";
335 description_text +=
"FRONT: station ";
337 description_text +=
", module = ";
338 description_text += im;
339 description_text +=
", layer = ";
340 description_text += ilayer;
348 xmin, xmax, 100, ymin, ymax);
352 layer_2dhist->
Draw();
362 TBox* layer_box =
new TBox(x_min_layer, y_min_layer, x_max_layer, y_max_layer);
371 station_front_canv->
cd();
373 layer_box->
Draw(
"fl");
376 layer_box->
Draw(
"fl");
379 vector<DeadZoneOfStripLayer> DeadZones = layer.
GetDeadZones();
380 Int_t NDeadZones = DeadZones.size();
384 for (
Int_t izone = 0; izone < NDeadZones; ++izone) {
401 station_front_canv->
cd();
402 dead_zones_polylines[izone].
Draw(
"f");
403 dead_zones_polylines[izone].
Draw(
"");
406 dead_zones_polylines[izone].
Draw(
"f");
407 dead_zones_polylines[izone].
Draw(
"");
420 Double_t x_shift_up_left =
Tan(strip_angle_deg *
DegToRad()) * (y_max_layer - y_left_border);
421 Double_t x_shift_down_left =
Tan(strip_angle_deg *
DegToRad()) * (y_left_border - y_min_layer);
422 Double_t x_shift_up_right =
Tan(strip_angle_deg *
DegToRad()) * (y_max_layer - y_right_border);
423 Double_t x_shift_down_right =
Tan(strip_angle_deg *
DegToRad()) * (y_right_border - y_min_layer);
426 left_strip_line->
SetX1(x_left_border - x_shift_down_left);
427 left_strip_line->
SetX2(x_left_border + x_shift_up_left);
428 left_strip_line->
SetY1(y_min_layer);
429 left_strip_line->
SetY2(y_max_layer);
431 left_strip_line->
Draw();
434 right_strip_line->
SetX1(x_right_border - x_shift_down_right);
435 right_strip_line->
SetX2(x_right_border + x_shift_up_right);
436 right_strip_line->
SetY1(y_min_layer);
437 right_strip_line->
SetY2(y_max_layer);
439 right_strip_line->
Draw();
441 TMarker* left_border_marker =
new TMarker(x_left_border, y_left_border, 20);
444 left_border_marker->
Draw();
446 TMarker* right_border_marker =
new TMarker(x_right_border, y_right_border, 20);
449 right_border_marker->
Draw();
453 strip_direction_arrow->
SetX1(x_left_border);
454 strip_direction_arrow->
SetX2(x_right_border);
456 strip_direction_arrow->
SetX1(x_right_border);
457 strip_direction_arrow->
SetX2(x_left_border);
459 strip_direction_arrow->
SetY1(y_max_layer);
460 strip_direction_arrow->
SetY2(y_max_layer);
465 strip_direction_arrow->
Draw(
"|>");
471 TLine* x_center_layer_line =
472 new TLine(x_center_layer, layer_box->
GetY1(), x_center_layer, layer_box->
GetY2());
473 TLine* y_center_layer_line =
474 new TLine(layer_box->
GetX1(), y_center_layer, layer_box->
GetX2(), y_center_layer);
479 x_center_layer_line->
Draw();
480 y_center_layer_line->
Draw();
487 Double_t hor_leg = vert_leg *
Tan(strip_angle_rad);
488 Double_t x_edge_layer = x_center_layer + hor_leg;
490 TLine* strip_slope_layer_line =
new TLine(x_center_layer, y_center_layer, x_edge_layer, y_edge_layer);
494 strip_slope_layer_line->
Draw();
500 for (
int ip = 0; ip < points.size(); ip++) {
501 mark_point_front[ip].
SetX(points.at(ip).X());
502 mark_point_front[ip].
SetY(points.at(ip).Y());
508 cout <<
"mark_point_front[ip].GetX() = " << mark_point_front[ip].
GetX() <<
"\n";
509 mark_point_front[ip].
Draw();
519 for (
int ip = 0; ip < points.size(); ip++) {
520 mark_point_front[ip].
SetX(points.at(ip).X());
521 mark_point_front[ip].
SetY(points.at(ip).Y());
526 station_front_canv->
cd();
527 mark_point_front[ip].
Draw();
534 station_front_canv->
AddExec(
"ex",
"RecognizeModuleNumFromPointAndDrawIt(station_front_canv)");
556 cout <<
"\n-------------------------------------------------------------\n";
558 if (module_num != -1) {
560 cout <<
" point ( " << x <<
" : " << y <<
" ) is in:\n";
561 cout <<
" module = " << module_num <<
"\n";
564 Int_t NLayers =
module->GetNStripLayers();
566 for (
Int_t ilayer = 0; ilayer < NLayers; ++ilayer) {
571 cout <<
" layer[" << ilayer <<
"] : ";
573 cout <<
"LowerStripLayer";
575 cout <<
"UpperStripLayer";
577 cout <<
", pitch = " << layer.
GetPitch();
579 cout <<
", sizes = (" << layer.
GetXSize() <<
" x " << layer.
GetYSize() <<
")";
586 cout <<
" point ( " << x <<
" : " << y <<
" ) is out any modules!!!\n";
595 station_front_canv->
cd();
602 for (
Int_t ie = 0; ie < nentries; ++ie) {
606 point_marker->
Draw();
612 if (module_num != -1) {
627 cout <<
"\n Number of intersection points:\n";
629 for (
Int_t im = 0; im < NModules; ++im) {
631 Int_t NHits =
module->GetNIntersectionPoints();
635 cout <<
" in module[" << im <<
"] : " << NHits <<
"\n";
645 Int_t hit_marker_cnt = 0;
648 cout <<
" Intersection points:\n";
650 for (
Int_t im = 0; im < NModules; ++im) {
653 cout <<
" module[" << im <<
"]:\n";
657 Int_t NHits =
module->GetNIntersectionPoints();
659 for (
Int_t ihit = 0; ihit < NHits; ++ihit) {
661 Double_t x_hit =
module->GetIntersectionPointX(ihit);
662 Double_t y_hit =
module->GetIntersectionPointY(ihit);
663 Double_t z_hit =
module->GetZPositionRegistered();
666 cout <<
" hit[" << ihit <<
"] = ( " << x_hit <<
" : " << y_hit <<
" : " << z_hit <<
" ) "
670 Int_t NLayers =
module->GetNStripLayers();
671 for (
Int_t ilayer = 0; ilayer < NLayers; ++ilayer) {
675 cout <<
" layer[" << ilayer <<
"] : ";
677 cout <<
"LowerStripLayer";
679 cout <<
"UpperStripLayer";
681 cout <<
", pitch = " << layer.
GetPitch();
683 cout <<
", sizes = (" << layer.
GetXSize() <<
" x " << layer.
GetYSize() <<
")";
698 station_front_canv->
cd();
705 for (
Int_t ie = 0; ie < nentries; ++ie) {
709 Int_t NLayers =
module->GetNStripLayers();
711 for (
Int_t ilayer = 0; ilayer < NLayers; ++ilayer) {
736 cout <<
"-------------------------------------------------------------\n";
740 cout <<
"key button was pressed\n";
741 cout <<
"px = " << eventX <<
"\n";
742 cout <<
"py = " << (char)eventY <<
"\n";
744 if (eventX == (
int)
'c') {
759 station_front_canv->
Update();
765 for (
Int_t ie = 0; ie < nentries; ++ie) {
787 description_text +=
"TOP: station ";
789 description_text +=
", xpos = ";
791 description_text +=
", ypos = ";
793 description_text +=
", zpos = ";
795 TCanvas* station_top_canv =
new TCanvas(
"station_top_canv", description_text, 10, 10, 1000, 1200);
819 for (
Int_t iModule = 0; iModule < NModules; ++iModule) {
824 if (
fabs(XShiftsOfModules[iModule]) > maxXShift)
825 maxXShift =
fabs(XShiftsOfModules[iModule]);
826 if (
fabs(YShiftsOfModules[iModule]) > maxYShift)
827 maxYShift =
fabs(YShiftsOfModules[iModule]);
828 if (
fabs(ZShiftsOfModules[iModule]) > maxZShift)
829 maxZShift =
fabs(ZShiftsOfModules[iModule]);
833 for (
Int_t imod = 0; imod < NModules; imod++) {
834 Modules[imod] = station->
GetModule(imod);
840 Double_t xmin = XMinStation - XSize * 0.3;
841 Double_t xmax = XMaxStation + XSize * 0.3;
842 Double_t zmin = ZMinStation - ZSize * 5.0;
843 Double_t zmax = ZMaxStation + ZSize * 5.0;
847 TH2F* station_top_2dhist =
new TH2F(
"station_top_2dhist", description_text, 100, xmin, xmax, 100, zmin, zmax);
850 station_top_2dhist->
Draw();
852 TBox** modules_box =
new TBox*[NModules];
854 for (
Int_t im = 0; im < NModules; im++) {
862 modules_box[im] =
new TBox(x_min_module, z_min_module, x_max_module, z_max_module);
870 station_top_canv->
cd();
872 modules_box[im]->
Draw(
"l");
875 Double_t x_center_module = (modules_box[im]->
GetX1() + modules_box[im]->GetX2()) * 0.5;
876 TLine* x_center_module_line =
877 new TLine(x_center_module, modules_box[im]->GetY1(), x_center_module, modules_box[im]->GetY2());
879 x_center_module_line->
Draw();
885 edrift_direction_arrow->
SetX1(x_center_module);
886 edrift_direction_arrow->
SetX2(x_center_module);
889 edrift_direction_arrow->
SetY1(modules_box[im]->GetY1());
890 edrift_direction_arrow->
SetY2(modules_box[im]->GetY2());
892 edrift_direction_arrow->
SetY1(modules_box[im]->GetY2());
893 edrift_direction_arrow->
SetY2(modules_box[im]->GetY1());
900 edrift_direction_arrow->
Draw(
"|>");
905 for (
int ip = 0; ip < points.size(); ip++) {
906 mark_point_top[ip].
SetX(points.at(ip).X());
907 mark_point_top[ip].
SetY(points.at(ip).Z());
911 mark_point_top[ip].
Draw();