CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
MaterialBudgetEcalHistos Class Reference

#include <MaterialBudgetEcalHistos.h>

Inheritance diagram for MaterialBudgetEcalHistos:
MaterialBudgetFormat

Public Member Functions

void endOfRun () override
 
void fillEndTrack () override
 
void fillPerStep () override
 
void fillStartTrack () override
 
 MaterialBudgetEcalHistos (std::shared_ptr< MaterialBudgetData > data, std::shared_ptr< TestHistoMgr > mgr, const std::string &fileName)
 
 ~MaterialBudgetEcalHistos () 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 9 of file MaterialBudgetEcalHistos.h.

Constructor & Destructor Documentation

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

Definition at line 6 of file MaterialBudgetEcalHistos.cc.

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

11  book();
12 }
std::shared_ptr< TestHistoMgr > hmgr
MaterialBudgetFormat(std::shared_ptr< MaterialBudgetData > data)
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
MaterialBudgetEcalHistos::~MaterialBudgetEcalHistos ( )
inlineoverride

Definition at line 14 of file MaterialBudgetEcalHistos.h.

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

14 {}

Member Function Documentation

void MaterialBudgetEcalHistos::book ( )
privatevirtual

Definition at line 14 of file MaterialBudgetEcalHistos.cc.

References hmgr.

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

14  {
15  edm::LogInfo("MaterialBudget") << "MaterialBudgetEcalHistos: Booking user histos";
16 
17  // total X0
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 ", 180, -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  // Support
26  hmgr->addHistoProf1(new TProfile("110", "MB prof Eta [Support]", 250, -5.0, 5.0));
27  hmgr->addHisto1(new TH1F("111", "Eta [Support]", 501, -5., 5.));
28  hmgr->addHistoProf1(new TProfile("120", "MB prof Phi [Support]", 180, -3.1416, 3.1416));
29  hmgr->addHisto1(new TH1F("121", "Phi [Support]", 180, -3.1416, 3.1416));
30  hmgr->addHistoProf2(new TProfile2D("130", "MB prof Eta Phi [Support]", 250, -5., 5., 180, -3.1416, 3.1416));
31  hmgr->addHisto2(new TH2F("131", "Eta vs Phi [Support]", 501, -5., 5., 180, -3.1416, 3.1416));
32 
33  // Sensitive
34  hmgr->addHistoProf1(new TProfile("210", "MB prof Eta [Sensitive]", 250, -5.0, 5.0));
35  hmgr->addHisto1(new TH1F("211", "Eta [Sensitive]", 501, -5., 5.));
36  hmgr->addHistoProf1(new TProfile("220", "MB prof Phi [Sensitive]", 180, -3.1416, 3.1416));
37  hmgr->addHisto1(new TH1F("221", "Phi [Sensitive]", 180, -3.1416, 3.1416));
38  hmgr->addHistoProf2(new TProfile2D("230", "MB prof Eta Phi [Sensitive]", 250, -5., 5., 180, -3.1416, 3.1416));
39  hmgr->addHisto2(new TH2F("231", "Eta vs Phi [Sensitive]", 501, -5., 5., 180, -3.1416, 3.1416));
40 
41  // Cables
42  hmgr->addHistoProf1(new TProfile("310", "MB prof Eta [Cables]", 250, -5.0, 5.0));
43  hmgr->addHisto1(new TH1F("311", "Eta [Cables]", 501, -5., 5.));
44  hmgr->addHistoProf1(new TProfile("320", "MB prof Phi [Cables]", 180, -3.1416, 3.1416));
45  hmgr->addHisto1(new TH1F("321", "Phi [Cables]", 180, -3.1416, 3.1416));
46  hmgr->addHistoProf2(new TProfile2D("330", "MB prof Eta Phi [Cables]", 250, -5., 5., 180, -3.1416, 3.1416));
47  hmgr->addHisto2(new TH2F("331", "Eta vs Phi [Cables]", 501, -5., 5., 180, -3.1416, 3.1416));
48 
49  // Cooling
50  hmgr->addHistoProf1(new TProfile("410", "MB prof Eta [Cooling]", 250, -5.0, 5.0));
51  hmgr->addHisto1(new TH1F("411", "Eta [Cooling]", 501, -5., 5.));
52  hmgr->addHistoProf1(new TProfile("420", "MB prof Phi [Cooling]", 180, -3.1416, 3.1416));
53  hmgr->addHisto1(new TH1F("421", "Phi [Cooling]", 180, -3.1416, 3.1416));
54  hmgr->addHistoProf2(new TProfile2D("430", "MB prof Eta Phi [Cooling]", 250, -5., 5., 180, -3.1416, 3.1416));
55  hmgr->addHisto2(new TH2F("431", "Eta vs Phi [Cooling]", 501, -5., 5., 180, -3.1416, 3.1416));
56 
57  // Electronics
58  hmgr->addHistoProf1(new TProfile("510", "MB prof Eta [Electronics]", 250, -5.0, 5.0));
59  hmgr->addHisto1(new TH1F("511", "Eta [Electronics]", 501, -5., 5.));
60  hmgr->addHistoProf1(new TProfile("520", "MB prof Phi [Electronics]", 180, -3.1416, 3.1416));
61  hmgr->addHisto1(new TH1F("521", "Phi [Electronics]", 180, -3.1416, 3.1416));
62  hmgr->addHistoProf2(new TProfile2D("530", "MB prof Eta Phi [Electronics]", 250, -5., 5., 180, -3.1416, 3.1416));
63  hmgr->addHisto2(new TH2F("531", "Eta vs Phi [Electronics]", 501, -5., 5., 180, -3.1416, 3.1416));
64 
65  // Other
66  hmgr->addHistoProf1(new TProfile("610", "MB prof Eta [Other]", 250, -5.0, 5.0));
67  hmgr->addHisto1(new TH1F("611", "Eta [Other]", 501, -5., 5.));
68  hmgr->addHistoProf1(new TProfile("620", "MB prof Phi [Other]", 180, -3.1416, 3.1416));
69  hmgr->addHisto1(new TH1F("621", "Phi [Other]", 180, -3.1416, 3.1416));
70  hmgr->addHistoProf2(new TProfile2D("630", "MB prof Eta Phi [Other]", 250, -5., 5., 180, -3.1416, 3.1416));
71  hmgr->addHisto2(new TH2F("631", "Eta vs Phi [Other]", 501, -5., 5., 180, -3.1416, 3.1416));
72 
73  // Air
74  hmgr->addHistoProf1(new TProfile("710", "MB prof Eta [Air]", 250, -5.0, 5.0));
75  hmgr->addHisto1(new TH1F("711", "Eta [Air]", 501, -5., 5.));
76  hmgr->addHistoProf1(new TProfile("720", "MB prof Phi [Air]", 180, -3.1416, 3.1416));
77  hmgr->addHisto1(new TH1F("721", "Phi [Air]", 180, -3.1416, 3.1416));
78  hmgr->addHistoProf2(new TProfile2D("730", "MB prof Eta Phi [Air]", 250, -5., 5., 180, -3.1416, 3.1416));
79  hmgr->addHisto2(new TH2F("731", "Eta vs Phi [Air]", 501, -5., 5., 180, -3.1416, 3.1416));
80 
81  // ECAL specific
82  hmgr->addHistoProf1(new TProfile("1001", "MB prof Eta ECAL Barrel", 340, -1.5, 1.5));
83  hmgr->addHistoProf1(new TProfile("1002", "MB prof Phi ECAL Barrel", 180, -3.1416, 3.1416));
84  hmgr->addHistoProf1(new TProfile("1003", "MB prof Phi ECAL Barrel SM", 20, 0., 20.));
85  hmgr->addHistoProf1(new TProfile("2003", "MB prof Phi ECAL Barrel SM", 10, 0., 20.));
86  hmgr->addHistoProf1(new TProfile("1004", "MB prof Phi ECAL Barrel SM module 1", 20, 0., 20.));
87  hmgr->addHistoProf1(new TProfile("1005", "MB prof Phi ECAL Barrel SM module 2", 20, 0., 20.));
88  hmgr->addHistoProf1(new TProfile("1006", "MB prof Phi ECAL Barrel SM module 3", 20, 0., 20.));
89  hmgr->addHistoProf1(new TProfile("1007", "MB prof Phi ECAL Barrel SM module 4", 20, 0., 20.));
90 
91  hmgr->addHistoProf1(new TProfile("1011", "MB prof Eta ECAL Preshower +", 100, 1.65, 2.6));
92  hmgr->addHistoProf1(new TProfile("1012", "MB prof Phi ECAL Preshower +", 180, -3.1416, 3.1416));
93 
94  hmgr->addHistoProf1(new TProfile("1013", "MB prof Eta ECAL Preshower -", 100, -2.6, -1.65));
95  hmgr->addHistoProf1(new TProfile("1014", "MB prof Phi ECAL Preshower -", 180, -3.1416, 3.1416));
96 
97  edm::LogInfo("MaterialBudget") << "MaterialBudgetEcalHistos: booking user histos done";
98 }
std::shared_ptr< TestHistoMgr > hmgr
void MaterialBudgetEcalHistos::endOfRun ( )
overridevirtual

Reimplemented from MaterialBudgetFormat.

Definition at line 148 of file MaterialBudgetEcalHistos.cc.

References hmgr, and MaterialBudgetFormat::theFileName.

Referenced by ~MaterialBudgetEcalHistos().

148  {
149  edm::LogInfo("MaterialBudget") << "MaterialBudgetEcalHistos: Writing histos ROOT file to:" << theFileName;
150  hmgr->save(theFileName);
151 }
std::shared_ptr< TestHistoMgr > hmgr
void MaterialBudgetEcalHistos::fillEndTrack ( )
overridevirtual

Reimplemented from MaterialBudgetFormat.

Definition at line 104 of file MaterialBudgetEcalHistos.cc.

References hmgr, M_PI, phi, and MaterialBudgetFormat::theData.

Referenced by ~MaterialBudgetEcalHistos().

104  {
105  // Total X0
106  hmgr->getHisto1(11)->Fill(theData->getEta());
107  hmgr->getHisto1(21)->Fill(theData->getPhi());
108  hmgr->getHisto2(31)->Fill(theData->getEta(), theData->getPhi());
109 
110  hmgr->getHistoProf1(10)->Fill(theData->getEta(), theData->getTotalMB());
111  hmgr->getHistoProf1(20)->Fill(theData->getPhi(), theData->getTotalMB());
112  hmgr->getHistoProf2(30)->Fill(theData->getEta(), theData->getPhi(), theData->getTotalMB());
113 
114  // ECAL specific
115  if (fabs(theData->getEta()) <= 1.479) {
116  static const double twenty(20. * degree);
117  const double phi(theData->getPhi() + M_PI);
118  const double phiModTwenty((phi - floor(phi / twenty) * twenty) / degree);
119  hmgr->getHistoProf1(1001)->Fill(theData->getEta(), theData->getTotalMB());
120  hmgr->getHistoProf1(1002)->Fill(theData->getPhi(), theData->getTotalMB());
121  hmgr->getHistoProf1(1003)->Fill(phiModTwenty, theData->getTotalMB());
122  hmgr->getHistoProf1(2003)->Fill(phiModTwenty, theData->getTotalMB());
123  if (fabs(theData->getEta()) >= 0. && fabs(theData->getEta()) < 0.435) {
124  hmgr->getHistoProf1(1004)->Fill(phiModTwenty, theData->getTotalMB());
125  }
126  if (fabs(theData->getEta()) >= 0.435 && fabs(theData->getEta()) < 0.783) {
127  hmgr->getHistoProf1(1005)->Fill(phiModTwenty, theData->getTotalMB());
128  }
129  if (fabs(theData->getEta()) > 0.783 && fabs(theData->getEta()) <= 1.131) {
130  hmgr->getHistoProf1(1006)->Fill(phiModTwenty, theData->getTotalMB());
131  }
132  if (fabs(theData->getEta()) > 1.131 && fabs(theData->getEta()) <= 1.479) {
133  hmgr->getHistoProf1(1007)->Fill(phiModTwenty, theData->getTotalMB());
134  }
135  }
136 
137  if (theData->getEta() >= 1.653 && theData->getEta() <= 2.6) {
138  hmgr->getHistoProf1(1011)->Fill(theData->getEta(), theData->getTotalMB());
139  hmgr->getHistoProf1(1012)->Fill(theData->getPhi(), theData->getTotalMB());
140  }
141 
142  if (theData->getEta() >= -2.6 && theData->getEta() <= -1.653) {
143  hmgr->getHistoProf1(1013)->Fill(theData->getEta(), theData->getTotalMB());
144  hmgr->getHistoProf1(1014)->Fill(theData->getPhi(), theData->getTotalMB());
145  }
146 }
std::shared_ptr< TestHistoMgr > hmgr
#define M_PI
std::shared_ptr< MaterialBudgetData > theData
void MaterialBudgetEcalHistos::fillPerStep ( )
overridevirtual

Reimplemented from MaterialBudgetFormat.

Definition at line 102 of file MaterialBudgetEcalHistos.cc.

Referenced by ~MaterialBudgetEcalHistos().

102 {}
void MaterialBudgetEcalHistos::fillStartTrack ( )
overridevirtual

Reimplemented from MaterialBudgetFormat.

Definition at line 100 of file MaterialBudgetEcalHistos.cc.

Referenced by ~MaterialBudgetEcalHistos().

100 {}

Member Data Documentation

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

Definition at line 29 of file MaterialBudgetEcalHistos.h.

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

double* MaterialBudgetEcalHistos::theDmb
private

Definition at line 22 of file MaterialBudgetEcalHistos.h.

double* MaterialBudgetEcalHistos::theMateId
private

Definition at line 27 of file MaterialBudgetEcalHistos.h.

double* MaterialBudgetEcalHistos::theVoluId
private

Definition at line 26 of file MaterialBudgetEcalHistos.h.

double* MaterialBudgetEcalHistos::theX
private

Definition at line 23 of file MaterialBudgetEcalHistos.h.

double* MaterialBudgetEcalHistos::theY
private

Definition at line 24 of file MaterialBudgetEcalHistos.h.

double* MaterialBudgetEcalHistos::theZ
private

Definition at line 25 of file MaterialBudgetEcalHistos.h.