CMS 3D CMS Logo

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

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

Private Member Functions

virtual void book ()
 
virtual void hend ()
 

Private Attributes

std::shared_ptr< TestHistoMgrhmgr
 
int MAXNUMBERSTEPS
 
double * theDmb
 
double * theMateId
 
double * theVoluId
 
double * theX
 
double * theY
 
double * theZ
 

Additional Inherited Members

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

Detailed Description

Definition at line 7 of file MaterialBudgetHistos.h.

Constructor & Destructor Documentation

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

Definition at line 5 of file MaterialBudgetHistos.cc.

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

9  hmgr(mgr)
10 {
12  book();
13 }
MaterialBudgetFormat(std::shared_ptr< MaterialBudgetData > data)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
std::shared_ptr< TestHistoMgr > hmgr
MaterialBudgetHistos::~MaterialBudgetHistos ( )
inlineoverride

Definition at line 14 of file MaterialBudgetHistos.h.

References book(), fillEndTrack(), fillPerStep(), fillStartTrack(), and hend().

14 { hend(); }

Member Function Documentation

void MaterialBudgetHistos::book ( )
privatevirtual

Definition at line 16 of file MaterialBudgetHistos.cc.

References gather_cfg::cout, and hmgr.

Referenced by MaterialBudgetHistos(), and ~MaterialBudgetHistos().

17 {
18  std::cout << "=== booking user histos ===" << std::endl;
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  std::cout << "=== booking user histos done ===" << std::endl;
27 
28 }
std::shared_ptr< TestHistoMgr > hmgr
void MaterialBudgetHistos::fillEndTrack ( )
overridevirtual

Implements MaterialBudgetFormat.

Definition at line 43 of file MaterialBudgetHistos.cc.

References hmgr, and MaterialBudgetFormat::theData.

Referenced by ~MaterialBudgetHistos().

44 {
45  hmgr->getHisto1(11)->Fill(theData->getEta());
46  hmgr->getHisto1(21)->Fill(theData->getPhi());
47  hmgr->getHisto2(31)->Fill(theData->getEta(),theData->getPhi());
48 
49  hmgr->getHistoProf1(10)->Fill(theData->getEta(),theData->getTotalMB());
50  hmgr->getHistoProf1(20)->Fill(theData->getPhi(),theData->getTotalMB());
51  hmgr->getHistoProf2(30)->Fill(theData->getEta(),theData->getPhi(),theData->getTotalMB());
52 
53 }
std::shared_ptr< TestHistoMgr > hmgr
std::shared_ptr< MaterialBudgetData > theData
void MaterialBudgetHistos::fillPerStep ( )
overridevirtual

Implements MaterialBudgetFormat.

Definition at line 37 of file MaterialBudgetHistos.cc.

Referenced by ~MaterialBudgetHistos().

38 {
39 
40 }
void MaterialBudgetHistos::fillStartTrack ( )
overridevirtual

Implements MaterialBudgetFormat.

Definition at line 31 of file MaterialBudgetHistos.cc.

Referenced by ~MaterialBudgetHistos().

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

Definition at line 56 of file MaterialBudgetHistos.cc.

References gather_cfg::cout, hmgr, and MaterialBudgetFormat::theFileName.

Referenced by ~MaterialBudgetHistos().

57 {
58  std::cout << "=== save user histos ===" << std::endl;
59  hmgr->save( theFileName );
60 
61 }
std::shared_ptr< TestHistoMgr > hmgr

Member Data Documentation

std::shared_ptr<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.