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 endOfRun () override
 
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 ()
 

Private Attributes

std::shared_ptr< TestHistoMgrhmgr
 
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(), endOfRun(), fillEndTrack(), fillPerStep(), and fillStartTrack().

14 { }

Member Function Documentation

void MaterialBudgetHistos::book ( )
privatevirtual

Definition at line 16 of file MaterialBudgetHistos.cc.

References hmgr.

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

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 }
std::shared_ptr< TestHistoMgr > hmgr
void MaterialBudgetHistos::endOfRun ( )
overridevirtual

Reimplemented from MaterialBudgetFormat.

Definition at line 53 of file MaterialBudgetHistos.cc.

References hmgr, and MaterialBudgetFormat::theFileName.

Referenced by ~MaterialBudgetHistos().

54 {
55  edm::LogInfo("MaterialBudget") << "MaterialBudgetHistos: Writing Histos ROOT file to" << theFileName;
56  hmgr->save( theFileName );
57 }
std::shared_ptr< TestHistoMgr > hmgr
void MaterialBudgetHistos::fillEndTrack ( )
overridevirtual

Reimplemented from MaterialBudgetFormat.

Definition at line 40 of file MaterialBudgetHistos.cc.

References hmgr, and MaterialBudgetFormat::theData.

Referenced by ~MaterialBudgetHistos().

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 }
std::shared_ptr< TestHistoMgr > hmgr
std::shared_ptr< MaterialBudgetData > theData
void MaterialBudgetHistos::fillPerStep ( )
overridevirtual

Reimplemented from MaterialBudgetFormat.

Definition at line 34 of file MaterialBudgetHistos.cc.

Referenced by ~MaterialBudgetHistos().

35 {
36 
37 }
void MaterialBudgetHistos::fillStartTrack ( )
overridevirtual

Reimplemented from MaterialBudgetFormat.

Definition at line 28 of file MaterialBudgetHistos.cc.

Referenced by ~MaterialBudgetHistos().

29 {
30 
31 }

Member Data Documentation

std::shared_ptr<TestHistoMgr> MaterialBudgetHistos::hmgr
private

Definition at line 32 of file MaterialBudgetHistos.h.

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

double* MaterialBudgetHistos::theDmb
private

Definition at line 25 of file MaterialBudgetHistos.h.

double* MaterialBudgetHistos::theMateId
private

Definition at line 30 of file MaterialBudgetHistos.h.

double* MaterialBudgetHistos::theVoluId
private

Definition at line 29 of file MaterialBudgetHistos.h.

double* MaterialBudgetHistos::theX
private

Definition at line 26 of file MaterialBudgetHistos.h.

double* MaterialBudgetHistos::theY
private

Definition at line 27 of file MaterialBudgetHistos.h.

double* MaterialBudgetHistos::theZ
private

Definition at line 28 of file MaterialBudgetHistos.h.