14 #include "CLHEP/Vector/LorentzVector.h"
35 m_h_S1_xy_A =
new TH2D(
"h_mm_S1_xy_A",
"S1_xy_A", 1200,-6000., 6000., 1200, -6000., 6000.);
36 m_h_S1_xy_A->StatOverflows();
39 m_h_S1_rz_A =
new TH2D(
"h_mm_S1_rz_A",
"S1_rz_A", 1000,7000., 8000., 5000, 0., 5000.);
40 m_h_S1_rz_A->StatOverflows();
43 m_h_S1_r_A =
new TH1D(
"h_mm_S1_r_A",
"S1_r_A", 1000,0., 14000.);
44 m_h_S1_r_A->StatOverflows();
47 m_h_S1_xy_C =
new TH2D(
"h_mm_S1_xy_C",
"S1_xy_C", 1200,-6000., 6000., 1200, -6000., 6000.);
48 m_h_S1_xy_C->StatOverflows();
51 m_h_S1_rz_C =
new TH2D(
"h_mm_S1_rz_C",
"S1_rz_C", 1000,-8000., -7000., 5000, 0., 5000.);
52 m_h_S1_rz_C->StatOverflows();
55 m_h_S1_r_C =
new TH1D(
"h_mm_S1_r_C",
"S1_r_C", 1000,0., 14000.);
56 m_h_S1_r_C->StatOverflows();
61 m_h_S2_xy_A =
new TH2D(
"h_mm_S2_xy_A",
"S2_xy_A", 1200,-6000., 6000., 1200, -6000., 6000.);
62 m_h_S2_xy_A->StatOverflows();
65 m_h_S2_rz_A =
new TH2D(
"h_mm_S2_rz_A",
"S2_rz_A", 1000,7000., 8000., 5000, 0., 5000.);
66 m_h_S2_rz_A->StatOverflows();
69 m_h_S2_r_A =
new TH1D(
"h_mm_S2_r_A",
"S2_r_A", 1000,0., 14000.);
70 m_h_S2_r_A->StatOverflows();
73 m_h_S2_xy_C =
new TH2D(
"h_mm_S2_xy_C",
"S2_xy_C", 1200,-6000., 6000., 1200, -6000., 6000.);
74 m_h_S2_xy_C->StatOverflows();
77 m_h_S2_rz_C =
new TH2D(
"h_mm_S2_rz_C",
"S2_rz_C", 1000,-8000., -7000., 5000, 0., 5000.);
78 m_h_S2_rz_C->StatOverflows();
81 m_h_S2_r_C =
new TH1D(
"h_mm_S2_r_C",
"S2_r_C", 1000,0., 14000.);
82 m_h_S2_r_C->StatOverflows();
87 m_h_S_xy_A =
new TH2D(
"h_mm_S_xy_A",
"S_xy_A", 1200,-6000., 6000., 1200, -6000., 6000.);
88 m_h_S_xy_A->StatOverflows();
91 m_h_S_xy_C =
new TH2D(
"h_mm_S_xy_C",
"S_xy_C", 1200,-6000., 6000., 1200, -6000., 6000.);
92 m_h_S_xy_C->StatOverflows();
95 m_h_S_rz_A =
new TH2D(
"h_mm_S_rz_A",
"S_rz_A", 1000,7000., 8000., 5000, 0., 5000.);
96 m_h_S_rz_A->StatOverflows();
99 m_h_S_rz_C =
new TH2D(
"h_mm_S_rz_C",
"S_rz_C", 1000,-8000., -7000., 5000, 0., 5000.);
100 m_h_S_rz_C->StatOverflows();
105 m_h_xy_A =
new TH2D(
"h_mm_xy_A",
"xy_A", 1200,-6000., 6000., 1200, -6000., 6000.);
106 m_h_xy_A->StatOverflows();
109 m_h_xy_C =
new TH2D(
"h_mm_xy_C",
"xy_C", 1200,-6000., 6000., 1200, -6000., 6000.);
110 m_h_xy_C->StatOverflows();
113 m_h_rz_A =
new TH2D(
"h_mm_rz_A",
"rz_A", 1000,7000., 8000., 5000, 0., 5000.);
114 m_h_rz_A->StatOverflows();
117 m_h_rz_C =
new TH2D(
"h_mm_rz_C",
"rz_C", 1000,-8000., -7000., 5000, 0., 5000.);
118 m_h_rz_C->StatOverflows();
123 m_h_L1_xy_A =
new TH2D(
"h_mm_L1_xy_A",
"L1_xy_A", 1200,-6000., 6000., 1200, -6000., 6000.);
124 m_h_L1_xy_A->StatOverflows();
127 m_h_L1_rz_A =
new TH2D(
"h_mm_L1_rz_A",
"L1_rz_A", 1000,7000., 8000., 5000, 0., 5000.);
128 m_h_L1_rz_A->StatOverflows();
131 m_h_L1_r_A =
new TH1D(
"h_mm_L1_r_A",
"L1_r_A", 1000,0., 14000.);
132 m_h_L1_r_A->StatOverflows();
135 m_h_L1_xy_C =
new TH2D(
"h_mm_L1_xy_C",
"L1_xy_C", 1200,-6000., 6000., 1200, -6000., 6000.);
136 m_h_L1_xy_C->StatOverflows();
139 m_h_L1_rz_C =
new TH2D(
"h_mm_L1_rz_C",
"L1_rz_C", 1000,-8000., -7000., 5000, 0., 5000.);
140 m_h_L1_rz_C->StatOverflows();
143 m_h_L1_r_C =
new TH1D(
"h_mm_L1_r_C",
"L1_r_C", 1000,0., 14000.);
144 m_h_L1_r_C->StatOverflows();
149 m_h_L2_xy_A =
new TH2D(
"h_mm_L2_xy_A",
"L2_xy_A", 1200,-6000., 6000., 1200, -6000., 6000.);
150 m_h_L2_xy_A->StatOverflows();
153 m_h_L2_rz_A =
new TH2D(
"h_mm_L2_rz_A",
"L2_rz_A", 1000,7000., 8000., 5000, 0., 5000.);
154 m_h_L2_rz_A->StatOverflows();
157 m_h_L2_r_A =
new TH1D(
"h_mm_L2_r_A",
"L2_r_A", 1000,0., 14000.);
158 m_h_L2_r_A->StatOverflows();
161 m_h_L2_xy_C =
new TH2D(
"h_mm_L2_xy_C",
"L2_xy_C", 1200,-6000., 6000., 1200, -6000., 6000.);
162 m_h_L2_xy_C->StatOverflows();
165 m_h_L2_rz_C =
new TH2D(
"h_mm_L2_rz_C",
"L2_rz_C", 1000,-8000., -7000., 5000, 0., 5000.);
166 m_h_L2_rz_C->StatOverflows();
169 m_h_L2_r_C =
new TH1D(
"h_mm_L2_r_C",
"L2_r_C", 1000,0., 14000.);
170 m_h_L2_r_C->StatOverflows();
175 m_h_L_xy_A =
new TH2D(
"h_mm_L_xy_A",
"L_xy_A", 1200,-6000., 6000., 1200, -6000., 6000.);
176 m_h_L_xy_A->StatOverflows();
179 m_h_L_rz_A =
new TH2D(
"h_mm_L_rz_A",
"L_rz_A", 1000,7000., 8000., 5000, 0., 5000.);
180 m_h_L_rz_A->StatOverflows();
183 m_h_L_xy_C =
new TH2D(
"h_mm_L_xy_C",
"L_xy_C", 1200,-6000., 6000., 1200, -6000., 6000.);
184 m_h_L_xy_C->StatOverflows();
187 m_h_L_rz_C =
new TH2D(
"h_mm_L_rz_C",
"L_rz_C", 1000,-8000., -7000., 5000, 0., 5000.);
188 m_h_L_rz_C->StatOverflows();
193 return StatusCode::SUCCESS;
200 const EventContext& ctx{Gaudi::Hive::currentContext()};
208 int simId = (*i_hit).MMId();
210 int sim_side = hitHelper->
GetSide(simId);
212 static const std::string s_m1s1(
"M1S1");
213 static const std::string s_m2s1(
"M2S1");
214 static const std::string s_m1s2(
"M1S2");
215 static const std::string s_m2s2(
"M2S2");
216 static const std::string s_m1l1(
"M1L1");
217 static const std::string s_m2l1(
"M2L1");
218 static const std::string s_m1l2(
"M1L2");
219 static const std::string s_m2l2(
"M2L2");
226 if ((sim_stationName==s_m1s1 || sim_stationName==s_m2s1) && sim_side==1){
227 double r_S1_A = std::sqrt(
p.x()*
p.x()+
p.y()*
p.y());
228 m_h_S1_xy_A->Fill(
p.x(),
p.y());
229 m_h_S1_rz_A->Fill(
p.z(), r_S1_A);
230 m_h_S1_r_A->Fill(r_S1_A);
234 if ((sim_stationName==s_m1s1 || sim_stationName==s_m2s1) && sim_side==-1){
235 double r_S1_C = std::sqrt(
p.x()*
p.x()+
p.y()*
p.y());
236 m_h_S1_xy_C->Fill(
p.x(),
p.y());
237 m_h_S1_rz_C->Fill(
p.z(), r_S1_C);
238 m_h_S1_r_C->Fill(r_S1_C);
245 if ((sim_stationName==s_m1s2 || sim_stationName==s_m2s2) && sim_side==1){
246 double r_S2_A = std::sqrt(
p.x()*
p.x()+
p.y()*
p.y());
247 m_h_S2_xy_A->Fill(
p.x(),
p.y());
248 m_h_S2_rz_A->Fill(
p.z(), r_S2_A);
249 m_h_S2_r_A->Fill(r_S2_A);
253 if ((sim_stationName==s_m1s2 || sim_stationName==s_m2s2) && sim_side==-1){
254 double r_S2_C = std::sqrt(
p.x()*
p.x()+
p.y()*
p.y());
255 m_h_S2_xy_C->Fill(
p.x(),
p.y());
256 m_h_S2_rz_C->Fill(
p.z(), r_S2_C);
257 m_h_S2_r_C->Fill(r_S2_C);
264 if ((sim_stationName==s_m1s2 || sim_stationName==s_m2s2 || sim_stationName==s_m1s1 || sim_stationName==s_m2s1) && sim_side==1){
265 double r_S_A = std::sqrt(
p.x()*
p.x()+
p.y()*
p.y());
266 m_h_S_xy_A->Fill(
p.x(),
p.y());
267 m_h_S_rz_A->Fill(
p.z(), r_S_A);
271 if ((sim_stationName==s_m1s2 || sim_stationName==s_m2s2 || sim_stationName==s_m1s1 || sim_stationName==s_m2s1) && sim_side==-1){
272 double r_S_C = std::sqrt(
p.x()*
p.x()+
p.y()*
p.y());
273 m_h_S_xy_C->Fill(
p.x(),
p.y());
274 m_h_S_rz_C->Fill(
p.z(), r_S_C);
282 double r_A = std::sqrt(
p.x()*
p.x()+
p.y()*
p.y());
283 m_h_xy_A->Fill(
p.x(),
p.y());
284 m_h_rz_A->Fill(
p.z(), r_A);
289 double r_C = std::sqrt(
p.x()*
p.x()+
p.y()*
p.y());
290 m_h_xy_C->Fill(
p.x(),
p.y());
291 m_h_rz_C->Fill(
p.z(), r_C);
300 if ((sim_stationName==s_m1l1 || sim_stationName==s_m2l1) && sim_side==1){
301 double r_L1_A = std::sqrt(
p.x()*
p.x()+
p.y()*
p.y());
302 m_h_L1_xy_A->Fill(
p.x(),
p.y());
303 m_h_L1_rz_A->Fill(
p.z(), r_L1_A);
304 m_h_L1_r_A->Fill(r_L1_A);
308 if ((sim_stationName==s_m1l1 || sim_stationName==s_m2l1) && sim_side==-1){
309 double r_L1_C = std::sqrt(
p.x()*
p.x()+
p.y()*
p.y());
310 m_h_L1_xy_C->Fill(
p.x(),
p.y());
311 m_h_L1_rz_C->Fill(
p.z(), r_L1_C);
312 m_h_L1_r_C->Fill(r_L1_C);
321 if ((sim_stationName==s_m1l2 || sim_stationName==s_m2l2) && sim_side==1){
322 double r_L2_A = std::sqrt(
p.x()*
p.x()+
p.y()*
p.y());
323 m_h_L2_xy_A->Fill(
p.x(),
p.y());
324 m_h_L2_rz_A->Fill(
p.z(), r_L2_A);
325 m_h_L2_r_A->Fill(r_L2_A);
329 if ((sim_stationName==s_m1l2 || sim_stationName==s_m2l2) && sim_side==-1){
330 double r_L2_C = std::sqrt(
p.x()*
p.x()+
p.y()*
p.y());
331 m_h_L2_xy_C->Fill(
p.x(),
p.y());
332 m_h_L2_rz_C->Fill(
p.z(), r_L2_C);
333 m_h_L2_r_C->Fill(r_L2_C);
340 if ((sim_stationName==s_m1l2 || sim_stationName==s_m2l2 || sim_stationName==s_m1l1 || sim_stationName==s_m2l1) && sim_side==1){
341 double r_L_A = std::sqrt(
p.x()*
p.x()+
p.y()*
p.y());
342 m_h_L_xy_A->Fill(
p.x(),
p.y());
343 m_h_L_rz_A->Fill(
p.z(), r_L_A);
347 if ((sim_stationName==s_m1l2 || sim_stationName==s_m2l2 || sim_stationName==s_m1l1 || sim_stationName==s_m2l1) && sim_side==-1){
348 double r_L_C = std::sqrt(
p.x()*
p.x()+
p.y()*
p.y());
349 m_h_L_xy_C->Fill(
p.x(),
p.y());
350 m_h_L_rz_C->Fill(
p.z(), r_L_C);
355 return StatusCode::SUCCESS;