CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MaterialBudgetHistos.cc
Go to the documentation of this file.
3 
4 
6  TestHistoMgr* mgr,
7  const std::string& fileName ): MaterialBudgetFormat( data ), hmgr(mgr)
8 {
10  book();
11 
12 }
13 
14 
16 {
17  std::cout << "=== booking user histos ===" << std::endl;
18  hmgr->addHistoProf1( new TProfile("10", "MB prof Eta ", 250, -5., 5. ) );
19  hmgr->addHisto1( new TH1F("11", "Eta " , 501, -5., 5. ) );
20  hmgr->addHistoProf1( new TProfile("20", "MB prof Phi ", 180, -3.1416, 3.1416 ) );
21  hmgr->addHisto1( new TH1F("21", "Phi " , 360, -3.1416, 3.1416 ) );
22  hmgr->addHistoProf2( new TProfile2D("30", "MB prof Eta Phi ", 250, -5., 5., 180, -3.1416, 3.1416 ) );
23  hmgr->addHisto2( new TH2F("31", "Eta vs Phi " , 501, -5., 5., 180, -3.1416, 3.1416 ) );
24 
25  std::cout << "=== booking user histos done ===" << std::endl;
26 
27 }
28 
29 
31 {
32 
33 }
34 
35 
37 {
38 
39 }
40 
41 
43 {
44  hmgr->getHisto1(11)->Fill(theData->getEta());
45  hmgr->getHisto1(21)->Fill(theData->getPhi());
46  hmgr->getHisto2(31)->Fill(theData->getEta(),theData->getPhi());
47 
51 
52 }
53 
54 
56 {
57  std::cout << "=== save user histos ===" << std::endl;
58  hmgr->save( theFileName );
59 
60 }
61 
float getTotalMB() const
TProfile2D * getHistoProf2(int ih)
bool addHistoProf2(TProfile2D *ih)
bool addHisto1(TH1F *ih)
TProfile * getHistoProf1(int ih)
MaterialBudgetData * theData
float getEta() const
TH2F * getHisto2(int ih)
MaterialBudgetHistos(MaterialBudgetData *data, TestHistoMgr *mgr, const std::string &fileName)
void save(const std::string &name)
Definition: TestHistoMgr.cc:50
float getPhi() const
bool addHistoProf1(TProfile *ih)
TH1F * getHisto1(int ih)
tuple cout
Definition: gather_cfg.py:145
bool addHisto2(TH2F *ih)