|
|
Go to the documentation of this file.
12 #include <DD4hep/DD4hepUnits.h>
35 bool firstChild = fv.firstChild();
39 for (
const auto&
j : fv.specpars()) {
40 for (
const auto&
k :
j.second->paths) {
42 std::vector<std::vector<cms::Node*>>
children = fv.children(
k);
48 <<
"MaterialAccountingGroup:\t"
49 <<
"Adding element at (r,z) " <<
gp.perp() <<
"," <<
gp.z() << std::endl;
62 <<
"MaterialAccountingGroup:\t"
66 m_dedx_spectrum = std::make_shared<TH1F>((
m_name +
"_dedx_spectrum").c_str(),
"Energy loss spectrum", 1000, 0., 1.);
68 std::make_shared<TH1F>((
m_name +
"_radlen_spectrum").c_str(),
"Radiation lengths spectrum", 1000, 0., 1.);
69 m_dedx_vs_eta = std::make_shared<TProfile>((
m_name +
"_dedx_vs_eta").c_str(),
"Energy loss vs. eta", 600, -3., 3.);
70 m_dedx_vs_z = std::make_shared<TProfile>((
m_name +
"_dedx_vs_z").c_str(),
"Energy loss vs. Z", 6000, -300., 300.);
71 m_dedx_vs_r = std::make_shared<TProfile>((
m_name +
"_dedx_vs_r").c_str(),
"Energy loss vs. R", 1200, 0., 120.);
73 std::make_shared<TProfile>((
m_name +
"_radlen_vs_eta").c_str(),
"Radiation lengths vs. eta", 600, -3., 3.);
75 std::make_shared<TProfile>((
m_name +
"_radlen_vs_z").c_str(),
"Radiation lengths vs. Z", 6000, -300., 300.);
77 std::make_shared<TProfile>((
m_name +
"_radlen_vs_r").c_str(),
"Radiation lengths vs. R", 1200, 0., 120.);
152 m_file = std::make_unique<TFile>((
m_name +
".root").c_str(),
"RECREATE");
167 plot->SetFillColor(15);
168 plot->SetLineColor(1);
170 canvas.GetFrame()->SetFillColor(kWhite);
177 std::unique_ptr<TH1F>
line = std::make_unique<TH1F>(
178 (
name +
"_par").c_str(),
"Parametrization", 1,
plot->GetXaxis()->GetXmin(),
plot->GetXaxis()->GetXmax());
183 plot->SetFillColor(15);
184 plot->SetLineColor(1);
185 plot->SetLineWidth(2);
187 line->SetLineColor(2);
188 line->SetLineWidth(2);
190 canvas.GetFrame()->SetFillColor(kWhite);
199 std::stringstream
out;
std::vector< GlobalPoint > m_elements
MaterialAccountingStep m_buffer
bool addDetector(const MaterialAccountingDetector &detector)
std::shared_ptr< TProfile > m_radlen_vs_eta
double sigmaRadiationLengths(void) const
DD4hep_MaterialAccountingGroup(const DD4hep_MaterialAccountingGroup &layer)=delete
const GlobalPoint & in(void) const
T perp() const
Magnitude of transverse component.
double sigmaLength(void) const
bool isInside(const MaterialAccountingDetector &detector) const
static constexpr double s_tolerance
std::string info(void) const
Global3DPoint GlobalPoint
MaterialAccountingStep m_accounting
double averageLength(void) const
const GlobalPoint & out(void) const
BoundingBox m_boundingbox
double sigmaEnergyLoss(void) const
std::pair< double, double > range_r() const
static int position[264][3]
std::pair< double, double > range_z() const
std::shared_ptr< TH1F > m_radlen_spectrum
std::shared_ptr< TProfile > m_radlen_vs_r
MaterialAccountingStep average(void) const
double averageEnergyLoss(void) const
std::shared_ptr< TProfile > m_dedx_vs_z
T mag() const
The vector magnitude. Equivalent to sqrt(vec.mag2())
void grow(const double &r, const double &z)
std::shared_ptr< TProfile > m_radlen_vs_z
std::shared_ptr< TH1F > m_dedx_spectrum
double energyLoss(void) const
double radiationLengths(void) const
double length(void) const
Log< level::Info, true > LogVerbatim
bool inside(const double &r, const double &z) const
double averageRadiationLengths(void) const
std::shared_ptr< TProfile > m_dedx_vs_r
std::shared_ptr< TProfile > m_dedx_vs_eta
std::unique_ptr< TFile > m_file
const std::string & name(void) const
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > Translation
void savePlot(std::shared_ptr< TH1F > &plot, const std::string &name)
MaterialAccountingStep m_errors