From fdc3f3bfcf56044a598bf39af08e543de79dd6d2 Mon Sep 17 00:00:00 2001 From: "jihee.kim" <jihee.kim@anl.gov> Date: Mon, 27 Jul 2020 14:42:16 -0500 Subject: [PATCH] Added TStyle.h file, Included some setting for graphs, and Changed from lookupDetElement() to lookupDetector(). --- calorimeters/simple_info_plot_histograms.cxx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/calorimeters/simple_info_plot_histograms.cxx b/calorimeters/simple_info_plot_histograms.cxx index 8441c837..e705c724 100644 --- a/calorimeters/simple_info_plot_histograms.cxx +++ b/calorimeters/simple_info_plot_histograms.cxx @@ -1,4 +1,3 @@ -//R__LOAD_LIBRARY($HOME/stow/development/lib/libGenDetectors.so) R__LOAD_LIBRARY(libGenDetectors.so) R__LOAD_LIBRARY(libfmt.so) #include "fmt/core.h" @@ -34,9 +33,20 @@ R__LOAD_LIBRARY(libDDG4IO.so) #include "TChain.h" #include <random> #include <iostream> +#include "TStyle.h" void simple_info_plot_histograms(const char* fname = "sim_output/output_zdc_photons.root"){ + // Setting for graphs + gROOT->SetStyle("Plain"); + gStyle->SetOptFit(1); + gStyle->SetLineWidth(2); + gStyle->SetPadTickX(1); + gStyle->SetPadTickY(1); + gStyle->SetPadGridX(1); + gStyle->SetPadGridY(1); + gStyle->SetPadLeftMargin(0.14); + TChain* t = new TChain("EVENT"); t->Add(fname); @@ -64,7 +74,7 @@ void simple_info_plot_histograms(const char* fname = "sim_output/output_zdc_phot auto volID = [&] (const std::vector<dd4hep::sim::Geant4Calorimeter::Hit*>& hits) { std::vector<double> result; for(const auto& h: hits) { - auto detelement = volman.lookupDetElement(h->cellID); + auto detelement = volman.lookupDetector(h->cellID); result.push_back(detelement.volumeID()); } return result; -- GitLab