CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
MaterialBudgetHistos.cc
Go to the documentation of this file.
3 
4 MaterialBudgetHistos::MaterialBudgetHistos(std::shared_ptr<MaterialBudgetData> data,
5  std::shared_ptr<TestHistoMgr> mgr,
6  const std::string& fileName)
7  : MaterialBudgetFormat(data), hmgr(mgr) {
9  book();
10 }
11 
13  edm::LogInfo("MaterialBudget") << " MaterialBudgetHistos: Booking Histos";
14  hmgr->addHistoProf1(new TProfile("10", "MB prof Eta ", 250, -5., 5.));
15  hmgr->addHisto1(new TH1F("11", "Eta ", 501, -5., 5.));
16  hmgr->addHistoProf1(new TProfile("20", "MB prof Phi ", 180, -3.1416, 3.1416));
17  hmgr->addHisto1(new TH1F("21", "Phi ", 360, -3.1416, 3.1416));
18  hmgr->addHistoProf2(new TProfile2D("30", "MB prof Eta Phi ", 250, -5., 5., 180, -3.1416, 3.1416));
19  hmgr->addHisto2(new TH2F("31", "Eta vs Phi ", 501, -5., 5., 180, -3.1416, 3.1416));
20 }
21 
23 
25 
27  hmgr->getHisto1(11)->Fill(theData->getEta());
28  hmgr->getHisto1(21)->Fill(theData->getPhi());
29  hmgr->getHisto2(31)->Fill(theData->getEta(), theData->getPhi());
30 
31  hmgr->getHistoProf1(10)->Fill(theData->getEta(), theData->getTotalMB());
32  hmgr->getHistoProf1(20)->Fill(theData->getPhi(), theData->getTotalMB());
33  hmgr->getHistoProf2(30)->Fill(theData->getEta(), theData->getPhi(), theData->getTotalMB());
34 }
35 
37  edm::LogInfo("MaterialBudget") << "MaterialBudgetHistos: Writing Histos ROOT file to" << theFileName;
38  hmgr->save(theFileName);
39 }
MaterialBudgetHistos(std::shared_ptr< MaterialBudgetData > data, std::shared_ptr< TestHistoMgr > mgr, const std::string &fileName)
void fillEndTrack() override
Log< level::Info, false > LogInfo
void fillStartTrack() override
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80
std::shared_ptr< TestHistoMgr > hmgr
std::shared_ptr< MaterialBudgetData > theData