15 #include "CLHEP/Vector/LorentzVector.h"
68 , m_ntupleFileName(
"MMHitAnalysis/ntuple/")
69 ,
m_path(
"/MMHitAnalysis/histos/")
70 , m_thistSvc(
"THistSvc",
name)
87 m_h_S1_xy_A =
new TH2D(
"h_mm_S1_xy_A",
"S1_xy_A", 1200,-6000., 6000., 1200, -6000., 6000.);
91 m_h_S1_rz_A =
new TH2D(
"h_mm_S1_rz_A",
"S1_rz_A", 1000,7000., 8000., 5000, 0., 5000.);
95 m_h_S1_r_A =
new TH1D(
"h_mm_S1_r_A",
"S1_r_A", 1000,0., 14000.);
99 m_h_S1_xy_C =
new TH2D(
"h_mm_S1_xy_C",
"S1_xy_C", 1200,-6000., 6000., 1200, -6000., 6000.);
103 m_h_S1_rz_C =
new TH2D(
"h_mm_S1_rz_C",
"S1_rz_C", 1000,-8000., -7000., 5000, 0., 5000.);
107 m_h_S1_r_C =
new TH1D(
"h_mm_S1_r_C",
"S1_r_C", 1000,0., 14000.);
113 m_h_S2_xy_A =
new TH2D(
"h_mm_S2_xy_A",
"S2_xy_A", 1200,-6000., 6000., 1200, -6000., 6000.);
117 m_h_S2_rz_A =
new TH2D(
"h_mm_S2_rz_A",
"S2_rz_A", 1000,7000., 8000., 5000, 0., 5000.);
121 m_h_S2_r_A =
new TH1D(
"h_mm_S2_r_A",
"S2_r_A", 1000,0., 14000.);
125 m_h_S2_xy_C =
new TH2D(
"h_mm_S2_xy_C",
"S2_xy_C", 1200,-6000., 6000., 1200, -6000., 6000.);
129 m_h_S2_rz_C =
new TH2D(
"h_mm_S2_rz_C",
"S2_rz_C", 1000,-8000., -7000., 5000, 0., 5000.);
133 m_h_S2_r_C =
new TH1D(
"h_mm_S2_r_C",
"S2_r_C", 1000,0., 14000.);
139 m_h_S_xy_A =
new TH2D(
"h_mm_S_xy_A",
"S_xy_A", 1200,-6000., 6000., 1200, -6000., 6000.);
143 m_h_S_xy_C =
new TH2D(
"h_mm_S_xy_C",
"S_xy_C", 1200,-6000., 6000., 1200, -6000., 6000.);
147 m_h_S_rz_A =
new TH2D(
"h_mm_S_rz_A",
"S_rz_A", 1000,7000., 8000., 5000, 0., 5000.);
151 m_h_S_rz_C =
new TH2D(
"h_mm_S_rz_C",
"S_rz_C", 1000,-8000., -7000., 5000, 0., 5000.);
157 m_h_xy_A =
new TH2D(
"h_mm_xy_A",
"xy_A", 1200,-6000., 6000., 1200, -6000., 6000.);
161 m_h_xy_C =
new TH2D(
"h_mm_xy_C",
"xy_C", 1200,-6000., 6000., 1200, -6000., 6000.);
165 m_h_rz_A =
new TH2D(
"h_mm_rz_A",
"rz_A", 1000,7000., 8000., 5000, 0., 5000.);
169 m_h_rz_C =
new TH2D(
"h_mm_rz_C",
"rz_C", 1000,-8000., -7000., 5000, 0., 5000.);
175 m_h_L1_xy_A =
new TH2D(
"h_mm_L1_xy_A",
"L1_xy_A", 1200,-6000., 6000., 1200, -6000., 6000.);
179 m_h_L1_rz_A =
new TH2D(
"h_mm_L1_rz_A",
"L1_rz_A", 1000,7000., 8000., 5000, 0., 5000.);
183 m_h_L1_r_A =
new TH1D(
"h_mm_L1_r_A",
"L1_r_A", 1000,0., 14000.);
187 m_h_L1_xy_C =
new TH2D(
"h_mm_L1_xy_C",
"L1_xy_C", 1200,-6000., 6000., 1200, -6000., 6000.);
191 m_h_L1_rz_C =
new TH2D(
"h_mm_L1_rz_C",
"L1_rz_C", 1000,-8000., -7000., 5000, 0., 5000.);
195 m_h_L1_r_C =
new TH1D(
"h_mm_L1_r_C",
"L1_r_C", 1000,0., 14000.);
201 m_h_L2_xy_A =
new TH2D(
"h_mm_L2_xy_A",
"L2_xy_A", 1200,-6000., 6000., 1200, -6000., 6000.);
205 m_h_L2_rz_A =
new TH2D(
"h_mm_L2_rz_A",
"L2_rz_A", 1000,7000., 8000., 5000, 0., 5000.);
209 m_h_L2_r_A =
new TH1D(
"h_mm_L2_r_A",
"L2_r_A", 1000,0., 14000.);
213 m_h_L2_xy_C =
new TH2D(
"h_mm_L2_xy_C",
"L2_xy_C", 1200,-6000., 6000., 1200, -6000., 6000.);
217 m_h_L2_rz_C =
new TH2D(
"h_mm_L2_rz_C",
"L2_rz_C", 1000,-8000., -7000., 5000, 0., 5000.);
221 m_h_L2_r_C =
new TH1D(
"h_mm_L2_r_C",
"L2_r_C", 1000,0., 14000.);
227 m_h_L_xy_A =
new TH2D(
"h_mm_L_xy_A",
"L_xy_A", 1200,-6000., 6000., 1200, -6000., 6000.);
231 m_h_L_rz_A =
new TH2D(
"h_mm_L_rz_A",
"L_rz_A", 1000,7000., 8000., 5000, 0., 5000.);
235 m_h_L_xy_C =
new TH2D(
"h_mm_L_xy_C",
"L_xy_C", 1200,-6000., 6000., 1200, -6000., 6000.);
239 m_h_L_rz_C =
new TH2D(
"h_mm_L_rz_C",
"L_rz_C", 1000,-8000., -7000., 5000, 0., 5000.);
244 m_tree=
new TTree(
"NtupleMMHitAnalysis",
"MMHitAna");
258 return StatusCode::SUCCESS;
273 int simId = (*i_hit).MMId();
275 int sim_side = hitHelper->
GetSide(simId);
277 static const std::string s_m1s1(
"M1S1");
278 static const std::string s_m2s1(
"M2S1");
279 static const std::string s_m1s2(
"M1S2");
280 static const std::string s_m2s2(
"M2S2");
281 static const std::string s_m1l1(
"M1L1");
282 static const std::string s_m2l1(
"M2L1");
283 static const std::string s_m1l2(
"M1L2");
284 static const std::string s_m2l2(
"M2L2");
291 if ((sim_stationName==s_m1s1 || sim_stationName==s_m2s1) && sim_side==1){
292 double r_S1_A = sqrt(
p.x()*
p.x()+
p.y()*
p.y());
299 if ((sim_stationName==s_m1s1 || sim_stationName==s_m2s1) && sim_side==-1){
300 double r_S1_C = sqrt(
p.x()*
p.x()+
p.y()*
p.y());
310 if ((sim_stationName==s_m1s2 || sim_stationName==s_m2s2) && sim_side==1){
311 double r_S2_A = sqrt(
p.x()*
p.x()+
p.y()*
p.y());
318 if ((sim_stationName==s_m1s2 || sim_stationName==s_m2s2) && sim_side==-1){
319 double r_S2_C = sqrt(
p.x()*
p.x()+
p.y()*
p.y());
329 if ((sim_stationName==s_m1s2 || sim_stationName==s_m2s2 || sim_stationName==s_m1s1 || sim_stationName==s_m2s1) && sim_side==1){
330 double r_S_A = sqrt(
p.x()*
p.x()+
p.y()*
p.y());
336 if ((sim_stationName==s_m1s2 || sim_stationName==s_m2s2 || sim_stationName==s_m1s1 || sim_stationName==s_m2s1) && sim_side==-1){
337 double r_S_C = sqrt(
p.x()*
p.x()+
p.y()*
p.y());
347 double r_A = sqrt(
p.x()*
p.x()+
p.y()*
p.y());
354 double r_C = sqrt(
p.x()*
p.x()+
p.y()*
p.y());
365 if ((sim_stationName==s_m1l1 || sim_stationName==s_m2l1) && sim_side==1){
366 double r_L1_A = sqrt(
p.x()*
p.x()+
p.y()*
p.y());
373 if ((sim_stationName==s_m1l1 || sim_stationName==s_m2l1) && sim_side==-1){
374 double r_L1_C = sqrt(
p.x()*
p.x()+
p.y()*
p.y());
386 if ((sim_stationName==s_m1l2 || sim_stationName==s_m2l2) && sim_side==1){
387 double r_L2_A = sqrt(
p.x()*
p.x()+
p.y()*
p.y());
394 if ((sim_stationName==s_m1l2 || sim_stationName==s_m2l2) && sim_side==-1){
395 double r_L2_C = sqrt(
p.x()*
p.x()+
p.y()*
p.y());
405 if ((sim_stationName==s_m1l2 || sim_stationName==s_m2l2 || sim_stationName==s_m1l1 || sim_stationName==s_m2l1) && sim_side==1){
406 double r_L_A = sqrt(
p.x()*
p.x()+
p.y()*
p.y());
412 if ((sim_stationName==s_m1l2 || sim_stationName==s_m2l2 || sim_stationName==s_m1l1 || sim_stationName==s_m2l1) && sim_side==-1){
413 double r_L_C = sqrt(
p.x()*
p.x()+
p.y()*
p.y());
425 return StatusCode::SUCCESS;