12#include "Framework/Configure/Parameters.h"
29 std::vector<double> ecalSensLayersZ = {
30 7.850, 13.300, 26.400, 33.500, 47.950, 56.550, 72.250,
31 81.350, 97.050, 106.150, 121.850, 130.950, 146.650, 155.750,
32 171.450, 180.550, 196.250, 205.350, 221.050, 230.150, 245.850,
33 254.950, 270.650, 279.750, 298.950, 311.550, 330.750, 343.350,
34 362.550, 375.150, 394.350, 406.950, 426.150, 438.750};
53 auto polyMap = geometry.getCellPolyMap();
55 TCanvas* c =
new TCanvas(
"c",
"c", 900, 900);
56 c->SetMargin(0.15, 0.05, 0.1, 0.1);
57 gStyle->SetOptStat(0);
59 "Local Cell ID to Local Cell Position Map;"
60 "P Position Relative to Module [mm];"
61 "Q Position Relative to Module [mm]");
62 polyMap->GetXaxis()->SetTickLength(0.);
63 polyMap->GetYaxis()->SetTickLength(0.);
64 polyMap->Draw(
"TEXT");
66 double hexCornerRadius = 85.0 * (2 / sqrt(3));
67 std::vector<std::pair<double, double> > hexCorners = {
68 std::make_pair(+1. * hexCornerRadius, 0.),
69 std::make_pair(+1. * hexCornerRadius * cos(M_PI / 3),
70 +1. * hexCornerRadius * sin(M_PI / 3)),
71 std::make_pair(-1. * hexCornerRadius * cos(M_PI / 3),
72 +1. * hexCornerRadius * sin(M_PI / 3)),
73 std::make_pair(-1. * hexCornerRadius, 0.),
74 std::make_pair(-1. * hexCornerRadius * cos(M_PI / 3),
75 -1. * hexCornerRadius * sin(M_PI / 3)),
76 std::make_pair(+1. * hexCornerRadius * cos(M_PI / 3),
77 -1. * hexCornerRadius * sin(M_PI / 3)),
78 std::make_pair(+1. * hexCornerRadius, 0.)};
79 TLine moduleHexBorder{0., 0., 0., 0.};
80 moduleHexBorder.SetLineColorAlpha(kRed, 0.5);
81 moduleHexBorder.SetLineWidth(2);
82 for (
int i = 1; i < hexCorners.size(); i++) {
83 moduleHexBorder.DrawLine(hexCorners.at(i - 1).first,
84 hexCorners.at(i - 1).second,
85 hexCorners.at(i).first, hexCorners.at(i).second);
89 c->SaveAs(
"Cell_ID_Cell_Position_Map.pdf");
92 "Local Cell U,V to Local Cell Position Map;X Position Relative to Module "
93 "[mm];Y Position Relative to Module [mm]");
94 polyMap->GetXaxis()->SetTickLength(0.);
95 polyMap->GetYaxis()->SetTickLength(0.);
96 polyMap->SetMaximum(1000);
97 polyMap->SetMinimum(500);
98 polyMap->Draw(
"hist");
100 for (
int icell = 0; icell < 432; icell++) {
102 std::pair<double, double> pt = geometry.getPositionInModule(icell);
104 std::pair<unsigned int, unsigned int> uv =
id.getCellUV();
105 sprintf(text,
"(%d,%d)", uv.first, uv.second);
106 TText* tt =
new TText(pt.first, pt.second, text);
107 tt->SetTextAlign(22);
108 tt->SetTextSize(0.012);
113 c->SaveAs(
"Cell_UV_Cell_Position_Map.pdf");
118 "Trigger Cell Summing Map;"
119 "P Position Relative to Module [mm];"
120 "Q Position Relative to Module [mm]");
121 polyMap->GetXaxis()->SetTickLength(0.);
122 polyMap->GetYaxis()->SetTickLength(0.);
123 polyMap->SetMaximum(4);
124 polyMap->SetMinimum(0);
126 for (
int icell = 0; icell < 432; icell++) {
130 std::cout <<
id <<
"->" << tid << std::endl;
198 polyMap->SetBinContent(icell + 1, ival);
201 polyMap->Draw(
"COL");
203 for (
int tcell = 0; tcell < 48; tcell++) {
205 std::pair<double, double> pt = trigG.localPosition(tid);
208 sprintf(text,
"(%d)", tcell);
209 TText* tt =
new TText(pt.first, pt.second, text);
210 tt->SetTextAlign(22);
211 tt->SetTextSize(0.012);
216 c->SaveAs(
"TriggerCell_Position_Map.pdf");
Class that translates raw positions of ECal module hits into cells in a hexagonal readout.
Class that defines an ECal detector ID with a cell number.
Class that defines the relationship between precision cells and trigger cells and provides geometry i...
Class that defines an ECal trigger cell detector ID.
defines the relationship between precision cells and trigger cells and provides geometry information ...
Class encapsulating parameters for configuring a processor.
void addParameter(const std::string &name, const T &value)
Add a parameter to the parameter list.
Translation between real-space positions and cell IDs within the ECal.
Extension of DetectorID providing access to ECal layers and cell numbers in a hex grid.
Extension of DetectorID providing access to ECal trigger cell information.
int triggercell() const
Get the value of the trigger cell field from the ID.