CMS 3D CMS Logo

MaterialBudgetHistos.cc
Go to the documentation of this file.
3 
4 
5 MaterialBudgetHistos::MaterialBudgetHistos(std::shared_ptr<MaterialBudgetData> data,
6  std::shared_ptr<TestHistoMgr> mgr,
7  const std::string& fileName )
8  : MaterialBudgetFormat( data ),
9  hmgr(mgr)
10 {
12  book();
13 }
14 
15 
17 {
18  edm::LogInfo("MaterialBudget") << " MaterialBudgetHistos: Booking Histos";
19  hmgr->addHistoProf1( new TProfile("10", "MB prof Eta ", 250, -5., 5. ) );
20  hmgr->addHisto1( new TH1F("11", "Eta " , 501, -5., 5. ) );
21  hmgr->addHistoProf1( new TProfile("20", "MB prof Phi ", 180, -3.1416, 3.1416 ) );
22  hmgr->addHisto1( new TH1F("21", "Phi " , 360, -3.1416, 3.1416 ) );
23  hmgr->addHistoProf2( new TProfile2D("30", "MB prof Eta Phi ", 250, -5., 5., 180, -3.1416, 3.1416 ) );
24  hmgr->addHisto2( new TH2F("31", "Eta vs Phi " , 501, -5., 5., 180, -3.1416, 3.1416 ) );
25 }
26 
27 
29 {
30 
31 }
32 
33 
35 {
36 
37 }
38 
39 
41 {
42  hmgr->getHisto1(11)->Fill(theData->getEta());
43  hmgr->getHisto1(21)->Fill(theData->getPhi());
44  hmgr->getHisto2(31)->Fill(theData->getEta(),theData->getPhi());
45 
46  hmgr->getHistoProf1(10)->Fill(theData->getEta(),theData->getTotalMB());
47  hmgr->getHistoProf1(20)->Fill(theData->getPhi(),theData->getTotalMB());
48  hmgr->getHistoProf2(30)->Fill(theData->getEta(),theData->getPhi(),theData->getTotalMB());
49 
50 }
51 
52 
54 {
55  edm::LogInfo("MaterialBudget") << "MaterialBudgetHistos: Writing Histos ROOT file to" << theFileName;
56  hmgr->save( theFileName );
57 }
58 
MaterialBudgetHistos(std::shared_ptr< MaterialBudgetData > data, std::shared_ptr< TestHistoMgr > mgr, const std::string &fileName)
void fillEndTrack() override
void fillStartTrack() override
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
std::shared_ptr< TestHistoMgr > hmgr
std::shared_ptr< MaterialBudgetData > theData