17 #include <TProfile2D.h>
22 using namespace geant_units::operators;
35 static const uint32_t maxSet_ = 25, maxSet2_ = 9;
37 const double maxEta_, etaLow_, etaHigh_, etaLowMin_, etaLowMax_, etaMidMin_;
38 const double etaMidMax_, etaHighMin_, etaHighMax_,
etaMinP_, etaMaxP_;
41 TH1F *me400_[maxSet_], *me800_[maxSet_], *me1300_[maxSet2_];
42 TH2F *me1200_[maxSet_], *me1400_[maxSet2_];
43 TProfile *me100_[maxSet_], *me200_[maxSet_], *me300_[maxSet_];
44 TProfile *me500_[maxSet_], *me600_[maxSet_], *me700_[maxSet_];
45 TProfile *me1500_[maxSet2_];
46 TProfile *me1600_[maxSet_], *me1700_[maxSet_], *me1800_[maxSet_];
47 TProfile *me1900_[maxSet_], *me2000_[maxSet_], *me2100_[maxSet_];
48 TProfile *me2200_[maxSet_], *me2300_[maxSet_], *me2400_[maxSet_];
49 TProfile2D *me900_[maxSet_], *me1000_[maxSet_], *me1100_[maxSet_];
53 : binEta_(p.getParameter<int>(
"nBinEta")),
54 binPhi_(p.getParameter<int>(
"nBinPhi")),
55 maxEta_(p.getParameter<double>(
"maxEta")),
56 etaLow_(p.getParameter<double>(
"etaLow")),
57 etaHigh_(p.getParameter<double>(
"etaHigh")),
58 etaLowMin_(p.getParameter<double>(
"etaLowMin")),
59 etaLowMax_(p.getParameter<double>(
"etaLowMax")),
60 etaMidMin_(p.getParameter<double>(
"etaMidMin")),
61 etaMidMax_(p.getParameter<double>(
"etaMidMax")),
62 etaHighMin_(p.getParameter<double>(
"etaHighMin")),
63 etaHighMax_(p.getParameter<double>(
"etaHighMax")),
64 etaMinP_(p.getParameter<double>(
"etaMinP")),
65 etaMaxP_(p.getParameter<double>(
"etaMaxP")),
66 labelMBCalo_(p.getParameter<edm::
InputTag>(
"labelMBCaloLabel")),
79 desc.
add<
int>(
"nBinEta", 260);
80 desc.
add<
int>(
"nBinPhi", 180);
81 desc.
add<
double>(
"maxEta", 5.2);
82 desc.
add<
double>(
"etaLow", -5.2);
83 desc.
add<
double>(
"etaHigh", 5.2);
84 desc.
add<
double>(
"etaMinP", 5.2);
85 desc.
add<
double>(
"etaMaxP", 0.0);
86 desc.
add<
double>(
"etaLowMin", 0.783);
87 desc.
add<
double>(
"etaLowMax", 0.870);
88 desc.
add<
double>(
"etaMidMin", 2.650);
89 desc.
add<
double>(
"etaMidMax", 2.868);
90 desc.
add<
double>(
"etaHighMin", 2.868);
91 desc.
add<
double>(
"etaHighMax", 3.000);
93 descriptions.
add(
"materialBudgetHcalAnalysis", desc);
102 <<
"please add it to config file";
105 edm::LogVerbatim(
"MaterialBudgetFull") <<
"MaterialBudgetHcalAnalysis: Booking user histos === with " <<
binEta_
107 <<
" bins in phi from " << -maxPhi <<
" to " <<
maxPhi;
133 (
"MB(X0) prof Eta Phi in region " + iter).c_str(),
141 (
"MB(L0) prof Eta Phi in region " + iter).c_str(),
149 (
"MB(Step) prof Eta Phi in region " + iter).c_str(),
157 (
"Eta vs Phi in region " + iter).c_str(),
165 (
"MB(X0) prof Ph in region " + range0 + iter).c_str(),
170 (
"MB(L0) prof Ph in region " + range0 + iter).c_str(),
175 (
"MB(Step) prof Ph in region " + range0 + iter).c_str(),
180 (
"MB(X0) prof Ph in region " + range1 + iter).c_str(),
185 (
"MB(L0) prof Ph in region " + range1 + iter).c_str(),
190 (
"MB(Step) prof Ph in region " + range1 + iter).c_str(),
195 (
"MB(X0) prof Ph in region " + range2 + iter).c_str(),
200 (
"MB(L0) prof Ph in region " + range2 + iter).c_str(),
205 (
"MB(Step) prof Ph in region " + range2 + iter).c_str(),
213 (
"Events with layers Hit (0 all, 1 HB, ..) for " + iter).c_str(),
218 (
"Eta vs Phi for layers hit in " + iter).c_str(),
226 (
"Number of layers crossed (0 all, 1 HB, ..) for " + iter).c_str(),
232 edm::LogVerbatim(
"MaterialBudget") <<
"MaterialBudgetHcalAnalysis: Booking user histos done ===";
244 if (hcalMBColl.isValid()) {
245 auto hcalMB = hcalMBColl.product();
248 <<
"Finds HcalMaterialBudgetCollection with " << hcalMB->size() <<
" entries";
251 for (
auto itr = hcalMB->begin(); itr != hcalMB->end(); ++itr) {
252 for (uint32_t
ii = 0;
ii < itr->m_stepLen.size(); ++
ii) {
256 <<
"MaterialBudgetHcalAnalysis:FillHisto called with index " <<
ii <<
" integrated step "
257 << itr->m_stepLen[
ii] <<
" X0 " << itr->m_radLen[
ii] <<
" Lamda " << itr->m_intLen[
ii];
260 me100_[
ii]->Fill(itr->m_eta, itr->m_radLen[
ii]);
261 me200_[
ii]->Fill(itr->m_eta, itr->m_intLen[
ii]);
262 me300_[
ii]->Fill(itr->m_eta, itr->m_stepLen[
ii]);
266 me500_[
ii]->Fill(itr->m_phi, itr->m_radLen[
ii]);
267 me600_[
ii]->Fill(itr->m_phi, itr->m_intLen[
ii]);
268 me700_[
ii]->Fill(itr->m_phi, itr->m_stepLen[
ii]);
272 me900_[
ii]->Fill(itr->m_eta, itr->m_phi, itr->m_radLen[
ii]);
273 me1000_[
ii]->Fill(itr->m_eta, itr->m_phi, itr->m_intLen[
ii]);
274 me1100_[
ii]->Fill(itr->m_eta, itr->m_phi, itr->m_stepLen[
ii]);
275 me1200_[
ii]->Fill(itr->m_eta, itr->m_phi);
298 me1400_[0]->Fill(itr->m_eta, itr->m_phi);
299 if (itr->m_layers[0] > 0) {
301 me1400_[1]->Fill(itr->m_eta, itr->m_phi);
303 if (itr->m_layers[0] >= 16) {
305 me1400_[2]->Fill(itr->m_eta, itr->m_phi);
307 if (itr->m_layers[1] > 0) {
309 me1400_[3]->Fill(itr->m_eta, itr->m_phi);
311 if (itr->m_layers[1] >= 16) {
313 me1400_[4]->Fill(itr->m_eta, itr->m_phi);
315 if (itr->m_layers[2] > 0) {
317 me1400_[5]->Fill(itr->m_eta, itr->m_phi);
319 if (itr->m_layers[2] >= 2) {
321 me1400_[6]->Fill(itr->m_eta, itr->m_phi);
323 if (itr->m_layers[3] > 0) {
325 me1400_[7]->Fill(itr->m_eta, itr->m_phi);
327 if (itr->m_layers[0] > 0 || itr->m_layers[1] > 0 || (itr->m_layers[3] > 0 &&
std::abs(itr->m_eta) > 3.0)) {
329 me1400_[8]->Fill(itr->m_eta, itr->m_phi);
331 me1500_[0]->Fill(itr->m_eta, (
double)(itr->m_layers[0] + itr->m_layers[1] + itr->m_layers[2] + itr->m_layers[3]));
332 me1500_[1]->Fill(itr->m_eta, (
double)(itr->m_layers[0]));
333 me1500_[2]->Fill(itr->m_eta, (
double)(itr->m_layers[1]));
334 me1500_[4]->Fill(itr->m_eta, (
double)(itr->m_layers[3]));
static const std::string kSharedResource
Log< level::Info, true > LogVerbatim
EventNumber_t event() const
const edm::EDGetTokenT< MaterialAccountingCaloCollection > tokMBCalo_
TProfile * me2200_[maxSet_]
#define DEFINE_FWK_MODULE(type)
std::vector< MaterialAccountingCalo > MaterialAccountingCaloCollection
int bunchCrossing() const
TProfile * me700_[maxSet_]
void analyze(edm::Event const &, edm::EventSetup const &) override
edm::LuminosityBlockNumber_t luminosityBlock() const
std::string to_string(const V &value)
T * make(const Args &...args) const
make new ROOT object
TProfile * me1700_[maxSet_]
TProfile * me300_[maxSet_]
TProfile * me1900_[maxSet_]
TProfile2D * me1100_[maxSet_]
example_stream void analyze(const edm::Event &, const edm::EventSetup &) override
TProfile2D * me1000_[maxSet_]
MaterialBudgetHcalAnalysis(const edm::ParameterSet &p)
TProfile * me1800_[maxSet_]
Handle< PROD > getHandle(EDGetTokenT< PROD > token) const
TProfile * me2000_[maxSet_]
Abs< T >::type abs(const T &t)
TProfile * me2400_[maxSet_]
static const uint32_t maxSet2_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
TProfile * me100_[maxSet_]
TProfile * me2300_[maxSet_]
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
TProfile * me1500_[maxSet2_]
TProfile * me2100_[maxSet_]
TProfile * me1600_[maxSet_]
void add(std::string const &label, ParameterSetDescription const &psetDescription)
const edm::InputTag labelMBCalo_
static const uint32_t maxSet_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
TProfile * me600_[maxSet_]
TProfile * me200_[maxSet_]
TProfile2D * me900_[maxSet_]
TProfile * me500_[maxSet_]