CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
MaterialBudgetHistos Class Reference

#include <MaterialBudgetHistos.h>

Inheritance diagram for MaterialBudgetHistos:
MaterialBudgetFormat

Public Member Functions

virtual void fillEndTrack ()
 
virtual void fillPerStep ()
 
virtual void fillStartTrack ()
 
 MaterialBudgetHistos (MaterialBudgetData *data, TestHistoMgr *mgr, const std::string &fileName)
 
virtual ~MaterialBudgetHistos ()
 
- Public Member Functions inherited from MaterialBudgetFormat
 MaterialBudgetFormat (MaterialBudgetData *data)
 
virtual ~MaterialBudgetFormat ()
 

Private Member Functions

virtual void book ()
 
virtual void hend ()
 

Private Attributes

TestHistoMgrhmgr
 
int MAXNUMBERSTEPS
 
double * theDmb
 
double * theMateId
 
double * theVoluId
 
double * theX
 
double * theY
 
double * theZ
 

Additional Inherited Members

- Protected Attributes inherited from MaterialBudgetFormat
MaterialBudgetDatatheData
 
std::string theFileName
 

Detailed Description

Definition at line 7 of file MaterialBudgetHistos.h.

Constructor & Destructor Documentation

MaterialBudgetHistos::MaterialBudgetHistos ( MaterialBudgetData data,
TestHistoMgr mgr,
const std::string &  fileName 
)

Definition at line 5 of file MaterialBudgetHistos.cc.

References book(), MillePedeFileConverter_cfg::fileName, and MaterialBudgetFormat::theFileName.

7  : MaterialBudgetFormat( data ), hmgr(mgr)
8 {
10  book();
11 
12 }
MaterialBudgetFormat(MaterialBudgetData *data)
virtual MaterialBudgetHistos::~MaterialBudgetHistos ( )
inlinevirtual

Definition at line 14 of file MaterialBudgetHistos.h.

References hend().

14 { hend(); }

Member Function Documentation

void MaterialBudgetHistos::book ( )
privatevirtual

Definition at line 15 of file MaterialBudgetHistos.cc.

References TestHistoMgr::addHisto1(), TestHistoMgr::addHisto2(), TestHistoMgr::addHistoProf1(), TestHistoMgr::addHistoProf2(), gather_cfg::cout, and hmgr.

Referenced by MaterialBudgetHistos().

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 }
bool addHistoProf2(TProfile2D *ih)
bool addHisto1(TH1F *ih)
bool addHistoProf1(TProfile *ih)
tuple cout
Definition: gather_cfg.py:121
bool addHisto2(TH2F *ih)
void MaterialBudgetHistos::fillEndTrack ( )
virtual

Implements MaterialBudgetFormat.

Definition at line 42 of file MaterialBudgetHistos.cc.

References MaterialBudgetData::getEta(), TestHistoMgr::getHisto1(), TestHistoMgr::getHisto2(), TestHistoMgr::getHistoProf1(), TestHistoMgr::getHistoProf2(), MaterialBudgetData::getPhi(), MaterialBudgetData::getTotalMB(), hmgr, and MaterialBudgetFormat::theData.

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 }
float getTotalMB() const
TProfile2D * getHistoProf2(int ih)
TProfile * getHistoProf1(int ih)
MaterialBudgetData * theData
float getEta() const
TH2F * getHisto2(int ih)
float getPhi() const
TH1F * getHisto1(int ih)
void MaterialBudgetHistos::fillPerStep ( )
virtual

Implements MaterialBudgetFormat.

Definition at line 36 of file MaterialBudgetHistos.cc.

37 {
38 
39 }
void MaterialBudgetHistos::fillStartTrack ( )
virtual

Implements MaterialBudgetFormat.

Definition at line 30 of file MaterialBudgetHistos.cc.

31 {
32 
33 }
void MaterialBudgetHistos::hend ( )
privatevirtual

Definition at line 55 of file MaterialBudgetHistos.cc.

References gather_cfg::cout, hmgr, TestHistoMgr::save(), and MaterialBudgetFormat::theFileName.

Referenced by ~MaterialBudgetHistos().

56 {
57  std::cout << "=== save user histos ===" << std::endl;
58  hmgr->save( theFileName );
59 
60 }
void save(const std::string &name)
Definition: TestHistoMgr.cc:50
tuple cout
Definition: gather_cfg.py:121

Member Data Documentation

TestHistoMgr* MaterialBudgetHistos::hmgr
private

Definition at line 35 of file MaterialBudgetHistos.h.

Referenced by book(), fillEndTrack(), and hend().

int MaterialBudgetHistos::MAXNUMBERSTEPS
private

Definition at line 27 of file MaterialBudgetHistos.h.

double* MaterialBudgetHistos::theDmb
private

Definition at line 28 of file MaterialBudgetHistos.h.

double* MaterialBudgetHistos::theMateId
private

Definition at line 33 of file MaterialBudgetHistos.h.

double* MaterialBudgetHistos::theVoluId
private

Definition at line 32 of file MaterialBudgetHistos.h.

double* MaterialBudgetHistos::theX
private

Definition at line 29 of file MaterialBudgetHistos.h.

double* MaterialBudgetHistos::theY
private

Definition at line 30 of file MaterialBudgetHistos.h.

double* MaterialBudgetHistos::theZ
private

Definition at line 31 of file MaterialBudgetHistos.h.