CMS 3D CMS Logo

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 }
MaterialBudgetFormat::theData
std::shared_ptr< MaterialBudgetData > theData
Definition: MaterialBudgetFormat.h:20
MaterialBudgetHistos::fillPerStep
void fillPerStep() override
Definition: MaterialBudgetHistos.cc:24
MaterialBudgetHistos::book
virtual void book()
Definition: MaterialBudgetHistos.cc:12
MaterialBudgetHistos::fillEndTrack
void fillEndTrack() override
Definition: MaterialBudgetHistos.cc:26
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
MillePedeFileConverter_cfg.fileName
fileName
Definition: MillePedeFileConverter_cfg.py:32
MaterialBudgetFormat::theFileName
std::string theFileName
Definition: MaterialBudgetFormat.h:21
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
MaterialBudgetHistos::endOfRun
void endOfRun() override
Definition: MaterialBudgetHistos.cc:36
MaterialBudgetHistos.h
MaterialBudgetData.h
MaterialBudgetHistos::hmgr
std::shared_ptr< TestHistoMgr > hmgr
Definition: MaterialBudgetHistos.h:29
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
MaterialBudgetHistos::fillStartTrack
void fillStartTrack() override
Definition: MaterialBudgetHistos.cc:22
MaterialBudgetHistos::MaterialBudgetHistos
MaterialBudgetHistos(std::shared_ptr< MaterialBudgetData > data, std::shared_ptr< TestHistoMgr > mgr, const std::string &fileName)
Definition: MaterialBudgetHistos.cc:4
MaterialBudgetFormat
Definition: MaterialBudgetFormat.h:9