23 std::string detName(
"Pixel");
24 std::string ntupName(
"SiPixel");
32 ntupName =
"SiITkPixel";
44 ntupName =
"SiITkStrip";
60 return StatusCode::FAILURE;
64 float bin_down = -600;
66 float radius_up = 600;
67 float radius_down = 200;
69 if (detName ==
"Pixel") {
74 }
else if (detName ==
"ITkPixel") {
80 }
else if (detName ==
"ITkStrip") {
86 }
else if (detName ==
"HGTD") {
92 }
else if (detName ==
"PLR") {
99 m_h_hits_x =
new TH1D((
"h_"+detName+
"_x").c_str(),(
"h_"+detName+
"_x").c_str(), 100,bin_down, bin_up);
102 m_h_hits_y =
new TH1D((
"h_"+detName+
"_y").c_str(), (
"h_"+detName+
"_y").c_str(), 100,bin_down,bin_up);
105 m_h_hits_z =
new TH1D((
"h_"+detName+
"_z").c_str(), (
"h_"+detName+
"_z").c_str(), 200,-z_max,z_max);
108 m_h_hits_r =
new TH1D((
"h_"+detName+
"_r").c_str(), (
"h_"+detName+
"_r").c_str(), 100,radius_down,radius_up);
111 m_h_xy =
new TH2D((
"h_"+detName+
"_xy").c_str(), (
"h_"+detName+
"_xy").c_str(), 100,bin_down,bin_up,100, bin_down, bin_up);
114 m_h_zr =
new TH2D((
"h_"+detName+
"_zr").c_str(), (
"h_"+detName+
"_zr").c_str(), 100,-z_max, z_max, 100, radius_down, radius_up);
117 m_h_hits_time =
new TH1D((
"h_"+detName+
"_time").c_str(), (
"h_"+detName+
"_time").c_str(), 100,0,500);
120 m_h_hits_eloss =
new TH1D((
"h_"+detName+
"_eloss").c_str(), (
"h_"+detName+
"_eloss").c_str(), 100,0,50);
123 m_h_hits_step =
new TH1D((
"h_"+detName+
"_step").c_str(), (
"h_"+detName+
"_step").c_str(), 100,0,50);
126 m_h_hits_barcode =
new TH1D((
"h_"+detName+
"_barcode").c_str(), (
"h_"+detName+
"_barcode").c_str(), 200,0,250000);
129 m_h_time_eloss =
new TH2D((
"h_"+detName+
"_time_eloss").c_str(), (
"h_"+detName+
" Eloss vs. time").c_str(),100, 0,500,100,0,50);
132 m_h_z_eloss =
new TH2D((
"h_"+detName+
"_z_eloss").c_str(), (
"h_"+detName+
" Eloss vs. z").c_str(),100, -z_max,z_max,100,0,50);
135 m_h_r_eloss =
new TH2D((
"h_"+detName+
"_r_eloss").c_str(), (
"h_"+detName+
" Eloss vs. r").c_str(),100, radius_down,radius_down,100,0,50);
138 m_h_barrel_endcap =
new TH1D((
"h_"+detName+
"_barrel_endcap").c_str(), (
"h_"+detName+
" barrel/endcap").c_str(), 10, -5, 5);
141 m_h_layer_disk =
new TH1D((
"h_"+detName+
"_layer_disk").c_str(), (
"h_"+detName+
" layer/disk").c_str(), 10, 0, 10);
144 m_h_module_eta =
new TH1D((
"h_"+detName+
"_module_eta").c_str(), (
"h_"+detName+
" module in #eta").c_str(), 100, 0, 100);
147 m_h_module_phi =
new TH1D((
"h_"+detName+
"_module_phi").c_str(), (
"h_"+detName+
" module in #phi").c_str(), 100, 0, 100);
174 if (detName.find(
"ITk") != std::string::npos) {
175 std::string xy_name =
"h_ITk_xy";
176 auto xy = std::make_unique<TH2D>(xy_name.c_str(), xy_name.c_str(), 2200, -1100, 1100, 2200, -1100, 1100);
180 std::string zr_name =
"h_ITk_zr";
181 auto zr = std::make_unique<TH2D>(zr_name.c_str(), zr_name.c_str(), 6800, -3400, 3400, 1100, 0, 1100);
187 m_tree =
new TTree(ntupName.c_str(), ntupName.c_str());
188 std::string fullNtupleName =
"/" +
m_ntuplePath +
"/" + detName;
222 return StatusCode::SUCCESS;
253 const EventContext&ctx {Gaudi::Hive::currentContext()};
257 for (
const SiHit &hit : *hitCollection) {
264 m_h_xy->Fill(p.x(), p.y());
265 m_h_zr->Fill(p.z(), p.perp());
274 double step_length = (hit.localStartPosition() - hit.localEndPosition()).mag();
280 if (hit.getBarrelEndcap() == 0) {
302 const auto& HMPL = hit.particleLink();
303 if (HMPL.isValid()) {
304 auto part = HMPL.cptr();
306 m_hits_pT->push_back(part->momentum().perp());
307 m_hits_eta->push_back(part->momentum().eta());
308 m_hits_phi->push_back(part->momentum().phi());
332 return StatusCode::SUCCESS;