42 labelMBCalo_(
p.getParameter<
edm::
InputTag>(
"labelMBCalo")),
43 nList_(listNames_.
size()),
50 if (!
tfile.isAvailable())
52 <<
"please add it to config file";
55 for (
unsigned int i = 0;
i <=
nList_;
i++) {
57 sprintf(
name,
"RadL%d",
i);
58 sprintf(
title,
"MB(X0) for (%s)", named.c_str());
62 sprintf(
name,
"IntL%d",
i);
63 sprintf(
title,
"MB(L0) for (%s)", named.c_str());
67 sprintf(
name,
"StepL%d",
i);
68 sprintf(
title,
"MB(Step) for (%s)", named.c_str());
73 edm::LogVerbatim(
"HGCSim") <<
"HGCalTBMBAnalyzer: Booking user histos done ===";
78 std::vector<std::string>
names = {
"HGCalBeamWChamb",
86 "HGCalBeamHaloCounter",
87 "HGCalBeamMuonCounter",
91 desc.add<std::vector<std::string>>(
"detectorNames",
names);
93 descriptions.
add(
"hgcalTBMBAnalyzer",
desc);
99 <<
iEvent.luminosityBlock() <<
" Bunch " <<
iEvent.bunchCrossing();
104 if (hgcalMBColl.isValid()) {
105 auto hgcalMB = hgcalMBColl.product();
107 edm::LogVerbatim(
"HGCSim") <<
"Finds MaterialBudegetCollection with " << hgcalMB->size() <<
" entries";
110 for (
auto itr = hgcalMB->begin(); itr != hgcalMB->end(); ++itr) {
111 for (uint32_t
ii = 0;
ii < itr->m_stepLen.size(); ++
ii) {
113 edm::LogVerbatim(
"HGCSim") <<
"HGCalTBMBAnalyzer:index " <<
ii <<
" integrated step " << itr->m_stepLen[
ii]
114 <<
" X0 " << itr->m_radLen[
ii] <<
" Lamda " << itr->m_intLen[
ii];
Log< level::Info, true > LogVerbatim
const std::vector< std::string > listNames_
const unsigned int nList_
~HGCalTBMBAnalyzer() override=default
void analyze(edm::Event const &, edm::EventSetup const &) override
#define DEFINE_FWK_MODULE(type)
std::vector< MaterialAccountingCalo > MaterialAccountingCaloCollection
const edm::EDGetTokenT< MaterialAccountingCaloCollection > tokMBCalo_
HGCalTBMBAnalyzer(const edm::ParameterSet &)
const edm::InputTag labelMBCalo_
const std::string names[nVars_]
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::vector< TH1D * > me300_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::vector< TH1D * > me200_
std::vector< TH1D * > me100_