CMS 3D CMS Logo

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

#include <MaterialBudgetTrackerHistos.h>

Inheritance diagram for MaterialBudgetTrackerHistos:
MaterialBudgetFormat

Public Member Functions

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

Constructor & Destructor Documentation

◆ MaterialBudgetTrackerHistos()

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

Definition at line 9 of file MaterialBudgetTrackerHistos.cc.

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

12  : MaterialBudgetFormat(data), hmgr(mgr) {
14  book();
15 }
MaterialBudgetFormat(std::shared_ptr< MaterialBudgetData > data)
std::shared_ptr< TestHistoMgr > hmgr
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:80

◆ ~MaterialBudgetTrackerHistos()

MaterialBudgetTrackerHistos::~MaterialBudgetTrackerHistos ( )
inlineoverride

Definition at line 12 of file MaterialBudgetTrackerHistos.h.

12 {}

Member Function Documentation

◆ book()

void MaterialBudgetTrackerHistos::book ( )
privatevirtual

Definition at line 17 of file MaterialBudgetTrackerHistos.cc.

References hmgr, photonAnalyzer_cfi::rMax, photonAnalyzer_cfi::rMin, photonAnalyzer_cfi::zMax, and photonAnalyzer_cfi::zMin.

Referenced by MaterialBudgetTrackerHistos().

17  {
18  edm::LogInfo("MaterialBudget") << " MaterialBudgetTrackerHistos: Booking Histos";
19 
20  // Parameters for 2D histograms
21  int nzbin = 1200;
22  float zMax = 3000.;
23  float zMin = -3000.;
24  int nrbin = 290;
25  float rMin = -50.;
26  float rMax = 1400.;
27 
28  // total X0
29  hmgr->addHistoProf1(new TProfile("10", "MB prof Eta [Total];#eta;x/X_{0} ", 250, -5., 5.));
30  hmgr->addHisto1(new TH1F("11", "Eta ", 501, -5., 5.));
31  hmgr->addHistoProf1(new TProfile("20", "MB prof Phi [Total];#varphi [rad];x/X_{0} ", 180, -3.1416, 3.1416));
32  hmgr->addHisto1(new TH1F("21", "Phi ", 180, -3.1416, 3.1416));
33  hmgr->addHistoProf2(
34  new TProfile2D("30", "MB prof Eta Phi [Total];#eta;#varphi;x/X_{0} ", 250, -5., 5., 180, -3.1416, 3.1416));
35  hmgr->addHisto2(new TH2F("31", "Eta vs Phi ", 501, -5., 5., 180, -3.1416, 3.1416));
36  hmgr->addHistoProf1(new TProfile("40", "MB prof R [Total];R [mm];x/X_{0} ", 200, 0., 2000.));
37  hmgr->addHisto1(new TH1F("41", "R ", 200, 0., 2000.));
38  hmgr->addHistoProf2(
39  new TProfile2D("50", "MB prof sum R z [Total];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
40  hmgr->addHisto2(new TH2F("999", "Tot track length for MB", nzbin, zMin, zMax, nrbin, rMin, rMax));
41  hmgr->addHisto2(new TH2F("51", "R vs z ", nzbin, zMin, zMax, nrbin, rMin, rMax));
42  hmgr->addHisto2(new TH2F("60", "MB prof local R z;z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
43  hmgr->addHisto2(new TH2F("61", "R vs z ", nzbin, zMin, zMax, nrbin, rMin, rMax));
44 
45  // Support
46  hmgr->addHistoProf1(new TProfile("110", "MB prof Eta [Support];#eta;x/X_{0}", 250, -5.0, 5.0));
47  hmgr->addHisto1(new TH1F("111", "Eta [Support]", 501, -5., 5.));
48  hmgr->addHistoProf1(new TProfile("120", "MB prof Phi [Support];#varphi [rad];x/X_{0}", 180, -3.1416, 3.1416));
49  hmgr->addHisto1(new TH1F("121", "Phi [Support]", 180, -3.1416, 3.1416));
50  hmgr->addHistoProf2(
51  new TProfile2D("130", "MB prof Eta Phi [Support];#eta;#varphi;x/X_{0}", 250, -5., 5., 180, -3.1416, 3.1416));
52  hmgr->addHisto2(new TH2F("131", "Eta vs Phi [Support]", 501, -5., 5., 180, -3.1416, 3.1416));
53  hmgr->addHistoProf1(new TProfile("140", "MB prof R [Support];R [mm];x/X_{0}", 200, 0., 2000.));
54  hmgr->addHisto1(new TH1F("141", "R [Support]", 200, 0., 2000.));
55  hmgr->addHistoProf2(
56  new TProfile2D("150", "MB prof sum R z [Support];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
57  hmgr->addHisto2(new TH2F("151", "R vs z [Support]", nzbin, zMin, zMax, nrbin, rMin, rMax));
58  hmgr->addHisto2(
59  new TH2F("160", "MB prof local R z [Support];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
60  hmgr->addHisto2(new TH2F("161", "R vs z [Support]", nzbin, zMin, zMax, nrbin, rMin, rMax));
61 
62  // Sensitive
63  hmgr->addHistoProf1(new TProfile("210", "MB prof Eta [Sensitive];#eta;x/X_{0}", 250, -5.0, 5.0));
64  hmgr->addHisto1(new TH1F("211", "Eta [Sensitive]", 501, -5., 5.));
65  hmgr->addHistoProf1(new TProfile("220", "MB prof Phi [Sensitive];#varphi [rad];x/X_{0}", 180, -3.1416, 3.1416));
66  hmgr->addHisto1(new TH1F("221", "Phi [Sensitive]", 180, -3.1416, 3.1416));
67  hmgr->addHistoProf2(
68  new TProfile2D("230", "MB prof Eta Phi [Sensitive];#eta;#varphi;x/X_{0}", 250, -5., 5., 180, -3.1416, 3.1416));
69  hmgr->addHisto2(new TH2F("231", "Eta vs Phi [Sensitive]", 501, -5., 5., 180, -3.1416, 3.1416));
70  hmgr->addHistoProf1(new TProfile("240", "MB prof R [Sensitive];R [mm];x/X_{0}", 200, 0., 2000.));
71  hmgr->addHisto1(new TH1F("241", "R [Sensitive]", 200, 0., 2000.));
72  hmgr->addHistoProf2(new TProfile2D(
73  "250", "MB prof sum R z [Sensitive];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
74  hmgr->addHisto2(new TH2F("251", "R vs z [Sensitive]", nzbin, zMin, zMax, nrbin, rMin, rMax));
75  hmgr->addHisto2(
76  new TH2F("260", "MB prof local R z [Sensitive];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
77  hmgr->addHisto2(new TH2F("261", "R vs z [Sensitive]", nzbin, zMin, zMax, nrbin, rMin, rMax));
78  // Cables
79  hmgr->addHistoProf1(new TProfile("310", "MB prof Eta [Cables];#eta;x/X_{0}", 250, -5.0, 5.0));
80  hmgr->addHisto1(new TH1F("311", "Eta [Cables]", 501, -5., 5.));
81  hmgr->addHistoProf1(new TProfile("320", "MB prof Phi [Cables];#varphi [rad];x/X_{0}", 180, -3.1416, 3.1416));
82  hmgr->addHisto1(new TH1F("321", "Phi [Cables]", 180, -3.1416, 3.1416));
83  hmgr->addHistoProf2(
84  new TProfile2D("330", "MB prof Eta Phi [Cables];#eta;#varphi;x/X_{0}", 250, -5., 5., 180, -3.1416, 3.1416));
85  hmgr->addHisto2(new TH2F("331", "Eta vs Phi [Cables]", 501, -5., 5., 180, -3.1416, 3.1416));
86  hmgr->addHistoProf1(new TProfile("340", "MB prof R [Cables];R [mm];x/X_{0}", 200, 0., 2000.));
87  hmgr->addHisto1(new TH1F("341", "R [Cables]", 200, 0., 2000.));
88  hmgr->addHistoProf2(
89  new TProfile2D("350", "MB prof sum R z [Cables];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
90  hmgr->addHisto2(new TH2F("351", "R vs z [Cables]", nzbin, zMin, zMax, nrbin, rMin, rMax));
91  hmgr->addHisto2(
92  new TH2F("360", "MB prof local R z [Cables];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
93  hmgr->addHisto2(new TH2F("361", "R vs z [Cables]", nzbin, zMin, zMax, nrbin, rMin, rMax));
94  // Cooling
95  hmgr->addHistoProf1(new TProfile("410", "MB prof Eta [Cooling];#eta;x/X_{0}", 250, -5.0, 5.0));
96  hmgr->addHisto1(new TH1F("411", "Eta [Cooling]", 501, -5., 5.));
97  hmgr->addHistoProf1(new TProfile("420", "MB prof Phi [Cooling];#varphi [rad];x/X_{0}", 180, -3.1416, 3.1416));
98  hmgr->addHisto1(new TH1F("421", "Phi [Cooling]", 180, -3.1416, 3.1416));
99  hmgr->addHistoProf2(
100  new TProfile2D("430", "MB prof Eta Phi [Cooling];#eta;#varphi;x/X_{0}", 250, -5., 5., 180, -3.1416, 3.1416));
101  hmgr->addHisto2(new TH2F("431", "Eta vs Phi [Cooling]", 501, -5., 5., 180, -3.1416, 3.1416));
102  hmgr->addHistoProf1(new TProfile("440", "MB prof R [Cooling];R [mm];x/X_{0}", 200, 0., 2000.));
103  hmgr->addHisto1(new TH1F("441", "R [Cooling]", 200, 0., 2000.));
104  hmgr->addHistoProf2(
105  new TProfile2D("450", "MB prof sum R z [Cooling];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
106  hmgr->addHisto2(new TH2F("451", "R vs z [Cooling]", nzbin, zMin, zMax, nrbin, rMin, rMax));
107  hmgr->addHisto2(
108  new TH2F("460", "MB prof local R z [Cooling];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
109  hmgr->addHisto2(new TH2F("461", "R vs z [Cooling]", nzbin, zMin, zMax, nrbin, rMin, rMax));
110  // Electronics
111  hmgr->addHistoProf1(new TProfile("510", "MB prof Eta [Electronics];#eta;x/X_{0}", 250, -5.0, 5.0));
112  hmgr->addHisto1(new TH1F("511", "Eta [Electronics]", 501, -5., 5.));
113  hmgr->addHistoProf1(new TProfile("520", "MB prof Phi [Electronics];#varphi [rad];x/X_{0}", 180, -3.1416, 3.1416));
114  hmgr->addHisto1(new TH1F("521", "Phi [Electronics]", 180, -3.1416, 3.1416));
115  hmgr->addHistoProf2(
116  new TProfile2D("530", "MB prof Eta Phi [Electronics];#eta;#varphi;x/X_{0}", 250, -5., 5., 180, -3.1416, 3.1416));
117  hmgr->addHisto2(new TH2F("531", "Eta vs Phi [Electronics]", 501, -5., 5., 180, -3.1416, 3.1416));
118  hmgr->addHistoProf1(new TProfile("540", "MB prof R [Electronics];R [mm];x/X_{0}", 200, 0., 2000.));
119  hmgr->addHisto1(new TH1F("541", "R [Electronics]", 200, 0., 2000.));
120  hmgr->addHistoProf2(new TProfile2D(
121  "550", "MB prof sum R z [Electronics];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
122  hmgr->addHisto2(new TH2F("551", "R vs z [Electronics]", nzbin, zMin, zMax, nrbin, rMin, rMax));
123  hmgr->addHisto2(
124  new TH2F("560", "MB prof local R z [Electronics];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
125  hmgr->addHisto2(new TH2F("561", "R vs z [Electronics]", nzbin, zMin, zMax, nrbin, rMin, rMax));
126  // Other
127  hmgr->addHistoProf1(new TProfile("610", "MB prof Eta [Other];#eta;x/X_{0}", 250, -5.0, 5.0));
128  hmgr->addHisto1(new TH1F("611", "Eta [Other]", 501, -5., 5.));
129  hmgr->addHistoProf1(new TProfile("620", "MB prof Phi [Other];#varphi [rad];x/X_{0}", 180, -3.1416, 3.1416));
130  hmgr->addHisto1(new TH1F("621", "Phi [Other]", 180, -3.1416, 3.1416));
131  hmgr->addHistoProf2(
132  new TProfile2D("630", "MB prof Eta Phi [Other];#eta;#varphi;x/X_{0}", 250, -5., 5., 180, -3.1416, 3.1416));
133  hmgr->addHisto2(new TH2F("631", "Eta vs Phi [Other]", 501, -5., 5., 180, -3.1416, 3.1416));
134  hmgr->addHistoProf1(new TProfile("640", "MB prof R [Other];R [mm];x/X_{0}", 200, 0., 2000.));
135  hmgr->addHisto1(new TH1F("641", "R [Other]", 200, 0., 2000.));
136  hmgr->addHistoProf2(
137  new TProfile2D("650", "MB prof sum R z [Other];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
138  hmgr->addHisto2(new TH2F("651", "R vs z [Other]", nzbin, zMin, zMax, nrbin, rMin, rMax));
139  hmgr->addHisto2(
140  new TH2F("660", "MB prof local R z [Other];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
141  hmgr->addHisto2(new TH2F("661", "R vs z [Other]", nzbin, zMin, zMax, nrbin, rMin, rMax));
142  // Air
143  hmgr->addHistoProf1(new TProfile("710", "MB prof Eta [Air];#eta;x/X_{0}", 250, -5.0, 5.0));
144  hmgr->addHisto1(new TH1F("711", "Eta [Air]", 501, -5., 5.));
145  hmgr->addHistoProf1(new TProfile("720", "MB prof Phi [Air];#varphi [rad];x/X_{0}", 180, -3.1416, 3.1416));
146  hmgr->addHisto1(new TH1F("721", "Phi [Air]", 180, -3.1416, 3.1416));
147  hmgr->addHistoProf2(
148  new TProfile2D("730", "MB prof Eta Phi [Air];#eta;#varphi;x/X_{0}", 250, -5., 5., 180, -3.1416, 3.1416));
149  hmgr->addHisto2(new TH2F("731", "Eta vs Phi [Air]", 501, -5., 5., 180, -3.1416, 3.1416));
150  hmgr->addHistoProf1(new TProfile("740", "MB prof R [Air];R [mm];x/X_{0}", 200, 0., 2000.));
151  hmgr->addHisto1(new TH1F("741", "R [Air]", 200, 0., 2000.));
152  hmgr->addHistoProf2(
153  new TProfile2D("750", "MB prof sum R z [Air];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
154  hmgr->addHisto2(new TH2F("751", "R vs z [Air]", nzbin, zMin, zMax, nrbin, rMin, rMax));
155  hmgr->addHisto2(
156  new TH2F("760", "MB prof local R z [Air];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
157  hmgr->addHisto2(new TH2F("761", "R vs z [Air]", nzbin, zMin, zMax, nrbin, rMin, rMax));
158  //
159 
160  // total Lambda0
161  hmgr->addHistoProf1(new TProfile("1010", "MB prof Eta [Total];#eta;#lambda/#lambda_{0} ", 250, -5., 5.));
162  hmgr->addHisto1(new TH1F("1011", "Eta ", 501, -5., 5.));
163  hmgr->addHistoProf1(
164  new TProfile("1020", "MB prof Phi [Total];#varphi [rad];#lambda/#lambda_{0} ", 180, -3.1416, 3.1416));
165  hmgr->addHisto1(new TH1F("1021", "Phi ", 180, -3.1416, 3.1416));
166  hmgr->addHistoProf2(new TProfile2D(
167  "1030", "MB prof Eta Phi [Total];#eta;#varphi;#lambda/#lambda_{0} ", 250, -5., 5., 180, -3.1416, 3.1416));
168  hmgr->addHisto2(new TH2F("1031", "Eta vs Phi ", 501, -5., 5., 180, -3.1416, 3.1416));
169 
170  // rr
171  hmgr->addHistoProf1(new TProfile("1040", "MB prof R [Total];R [mm];#lambda/#lambda_{0} ", 200, 0., 2000.));
172  hmgr->addHisto1(new TH1F("1041", "R ", 200, 0., 2000.));
173  hmgr->addHistoProf2(
174  new TProfile2D("1050", "MB prof sum R z [Total];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
175  hmgr->addHisto2(new TH2F("1999", "Tot track length for l0", nzbin, zMin, zMax, nrbin, rMin, rMax));
176  hmgr->addHisto2(new TH2F("1051", "R vs z ", nzbin, zMin, zMax, nrbin, rMin, rMax));
177  hmgr->addHisto2(new TH2F("1060", "MB prof local R z;z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
178  hmgr->addHisto2(new TH2F("1061", "R vs z ", nzbin, zMin, zMax, nrbin, rMin, rMax));
179 
180  // Support
181  hmgr->addHistoProf1(new TProfile("1110", "MB prof Eta [Support];#eta;#lambda/#lambda_{0}", 250, -5.0, 5.0));
182  hmgr->addHisto1(new TH1F("1111", "Eta [Support]", 501, -5., 5.));
183  hmgr->addHistoProf1(
184  new TProfile("1120", "MB prof Phi [Support];#varphi [rad];#lambda/#lambda_{0}", 180, -3.1416, 3.1416));
185  hmgr->addHisto1(new TH1F("1121", "Phi [Support]", 180, -3.1416, 3.1416));
186  hmgr->addHistoProf2(new TProfile2D(
187  "1130", "MB prof Eta Phi [Support];#eta;#varphi;#lambda/#lambda_{0}", 250, -5., 5., 180, -3.1416, 3.1416));
188  hmgr->addHisto2(new TH2F("1131", "Eta vs Phi [Support]", 501, -5., 5., 180, -3.1416, 3.1416));
189  hmgr->addHistoProf1(new TProfile("1140", "MB prof R [Support];R [mm];#lambda/#lambda_{0}", 200, 0., 2000.));
190  hmgr->addHisto1(new TH1F("1141", "R [Support]", 200, 0., 2000.));
191  hmgr->addHistoProf2(new TProfile2D(
192  "1150", "MB prof sum R z [Support];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
193  hmgr->addHisto2(new TH2F("1151", "R vs z [Support]", nzbin, zMin, zMax, nrbin, rMin, rMax));
194  hmgr->addHisto2(
195  new TH2F("1160", "MB prof local R z [Support];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
196  hmgr->addHisto2(new TH2F("1161", "R vs z [Support]", nzbin, zMin, zMax, nrbin, rMin, rMax));
197  // Sensitive
198  hmgr->addHistoProf1(new TProfile("1210", "MB prof Eta [Sensitive];#eta;#lambda/#lambda_{0}", 250, -5.0, 5.0));
199  hmgr->addHisto1(new TH1F("1211", "Eta [Sensitive]", 501, -5., 5.));
200  hmgr->addHistoProf1(
201  new TProfile("1220", "MB prof Phi [Sensitive];#varphi [rad];#lambda/#lambda_{0}", 180, -3.1416, 3.1416));
202  hmgr->addHisto1(new TH1F("1221", "Phi [Sensitive]", 180, -3.1416, 3.1416));
203  hmgr->addHistoProf2(new TProfile2D(
204  "1230", "MB prof Eta Phi [Sensitive];#eta;#varphi;#lambda/#lambda_{0}", 250, -5., 5., 180, -3.1416, 3.1416));
205  hmgr->addHisto2(new TH2F("1231", "Eta vs Phi [Sensitive]", 501, -5., 5., 180, -3.1416, 3.1416));
206  hmgr->addHistoProf1(new TProfile("1240", "MB prof R [Sensitive];R [mm];#lambda/#lambda_{0}", 200, 0., 2000.));
207  hmgr->addHisto1(new TH1F("1241", "R [Sensitive]", 200, 0., 2000.));
208  hmgr->addHistoProf2(new TProfile2D(
209  "1250", "MB prof sum R z [Sensitive];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
210  hmgr->addHisto2(new TH2F("1251", "R vs z [Sensitive]", nzbin, zMin, zMax, nrbin, rMin, rMax));
211  hmgr->addHisto2(
212  new TH2F("1260", "MB prof local R z [Sensitive];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
213  hmgr->addHisto2(new TH2F("1261", "R vs z [Sensitive]", nzbin, zMin, zMax, nrbin, rMin, rMax));
214  // Cables
215  hmgr->addHistoProf1(new TProfile("1310", "MB prof Eta [Cables];#eta;#lambda/#lambda_{0}", 250, -5.0, 5.0));
216  hmgr->addHisto1(new TH1F("1311", "Eta [Cables]", 501, -5., 5.));
217  hmgr->addHistoProf1(
218  new TProfile("1320", "MB prof Phi [Cables];#varphi [rad];#lambda/#lambda_{0}", 180, -3.1416, 3.1416));
219  hmgr->addHisto1(new TH1F("1321", "Phi [Cables]", 180, -3.1416, 3.1416));
220  hmgr->addHistoProf2(new TProfile2D(
221  "1330", "MB prof Eta Phi [Cables];#eta;#varphi;#lambda/#lambda_{0}", 250, -5., 5., 180, -3.1416, 3.1416));
222  hmgr->addHisto2(new TH2F("1331", "Eta vs Phi [Cables]", 501, -5., 5., 180, -3.1416, 3.1416));
223  hmgr->addHistoProf1(new TProfile("1340", "MB prof R [Cables];R [mm];#lambda/#lambda_{0}", 200, 0., 2000.));
224  hmgr->addHisto1(new TH1F("1341", "R [Cables]", 200, 0., 2000.));
225  hmgr->addHistoProf2(
226  new TProfile2D("1350", "MB prof sum R z [Cables];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
227  hmgr->addHisto2(new TH2F("1351", "R vs z [Cables]", nzbin, zMin, zMax, nrbin, rMin, rMax));
228  hmgr->addHisto2(
229  new TH2F("1360", "MB prof local R z [Cables];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
230  hmgr->addHisto2(new TH2F("1361", "R vs z [Cables]", nzbin, zMin, zMax, nrbin, rMin, rMax));
231  // Cooling
232  hmgr->addHistoProf1(new TProfile("1410", "MB prof Eta [Cooling];#eta;#lambda/#lambda_{0}", 250, -5.0, 5.0));
233  hmgr->addHisto1(new TH1F("1411", "Eta [Cooling]", 501, -5., 5.));
234  hmgr->addHistoProf1(
235  new TProfile("1420", "MB prof Phi [Cooling];#varphi [rad];#lambda/#lambda_{0}", 180, -3.1416, 3.1416));
236  hmgr->addHisto1(new TH1F("1421", "Phi [Cooling]", 180, -3.1416, 3.1416));
237  hmgr->addHistoProf2(new TProfile2D(
238  "1430", "MB prof Eta Phi [Cooling];#eta;#varphi;#lambda/#lambda_{0}", 250, -5., 5., 180, -3.1416, 3.1416));
239  hmgr->addHisto2(new TH2F("1431", "Eta vs Phi [Cooling]", 501, -5., 5., 180, -3.1416, 3.1416));
240  hmgr->addHistoProf1(new TProfile("1440", "MB prof R [Cooling];R [mm];#lambda/#lambda_{0}", 200, 0., 2000.));
241  hmgr->addHisto1(new TH1F("1441", "R [Cooling]", 200, 0., 2000.));
242  hmgr->addHistoProf2(new TProfile2D(
243  "1450", "MB prof sum R z [Cooling];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
244  hmgr->addHisto2(new TH2F("1451", "R vs z [Cooling]", nzbin, zMin, zMax, nrbin, rMin, rMax));
245  hmgr->addHisto2(
246  new TH2F("1460", "MB prof local R z [Cooling];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
247  hmgr->addHisto2(new TH2F("1461", "R vs z [Cooling]", nzbin, zMin, zMax, nrbin, rMin, rMax));
248  // Electronics
249  hmgr->addHistoProf1(new TProfile("1510", "MB prof Eta [Electronics];#eta;#lambda/#lambda_{0}", 250, -5.0, 5.0));
250  hmgr->addHisto1(new TH1F("1511", "Eta [Electronics]", 501, -5., 5.));
251  hmgr->addHistoProf1(
252  new TProfile("1520", "MB prof Phi [Electronics];#varphi [rad];#lambda/#lambda_{0}", 180, -3.1416, 3.1416));
253  hmgr->addHisto1(new TH1F("1521", "Phi [Electronics]", 180, -3.1416, 3.1416));
254  hmgr->addHistoProf2(new TProfile2D(
255  "1530", "MB prof Eta Phi [Electronics];#eta;#varphi;#lambda/#lambda_{0}", 250, -5., 5., 180, -3.1416, 3.1416));
256  hmgr->addHisto2(new TH2F("1531", "Eta vs Phi [Electronics]", 501, -5., 5., 180, -3.1416, 3.1416));
257  hmgr->addHistoProf1(new TProfile("1540", "MB prof R [Electronics];R [mm];#lambda/#lambda_{0}", 200, 0., 2000.));
258  hmgr->addHisto1(new TH1F("1541", "R [Electronics]", 200, 0., 2000.));
259  hmgr->addHistoProf2(new TProfile2D(
260  "1550", "MB prof sum R z [Electronics];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
261  hmgr->addHisto2(new TH2F("1551", "R vs z [Electronics]", nzbin, zMin, zMax, nrbin, rMin, rMax));
262  hmgr->addHisto2(new TH2F(
263  "1560", "MB prof local R z [Electronics];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
264  hmgr->addHisto2(new TH2F("1561", "R vs z [Electronics]", nzbin, zMin, zMax, nrbin, rMin, rMax));
265  // Other
266  hmgr->addHistoProf1(new TProfile("1610", "MB prof Eta [Other];#eta;#lambda/#lambda_{0}", 250, -5.0, 5.0));
267  hmgr->addHisto1(new TH1F("1611", "Eta [Other]", 501, -5., 5.));
268  hmgr->addHistoProf1(
269  new TProfile("1620", "MB prof Phi [Other];#varphi [rad];#lambda/#lambda_{0}", 180, -3.1416, 3.1416));
270  hmgr->addHisto1(new TH1F("1621", "Phi [Other]", 180, -3.1416, 3.1416));
271  hmgr->addHistoProf2(new TProfile2D(
272  "1630", "MB prof Eta Phi [Other];#eta;#varphi;#lambda/#lambda_{0}", 250, -5., 5., 180, -3.1416, 3.1416));
273  hmgr->addHisto2(new TH2F("1631", "Eta vs Phi [Other]", 501, -5., 5., 180, -3.1416, 3.1416));
274  hmgr->addHistoProf1(new TProfile("1640", "MB prof R [Other];R [mm];#lambda/#lambda_{0}", 200, 0., 2000.));
275  hmgr->addHisto1(new TH1F("1641", "R [Other]", 200, 0., 2000.));
276  hmgr->addHistoProf2(
277  new TProfile2D("1650", "MB prof sum R z [Other];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
278  hmgr->addHisto2(new TH2F("1651", "R vs z [Other]", nzbin, zMin, zMax, nrbin, rMin, rMax));
279  hmgr->addHisto2(
280  new TH2F("1660", "MB prof local R z [Other];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
281  hmgr->addHisto2(new TH2F("1661", "R vs z [Other]", nzbin, zMin, zMax, nrbin, rMin, rMax));
282  // Air
283  hmgr->addHistoProf1(new TProfile("1710", "MB prof Eta [Air];#eta;#lambda/#lambda_{0}", 250, -5.0, 5.0));
284  hmgr->addHisto1(new TH1F("1711", "Eta [Air]", 501, -5., 5.));
285  hmgr->addHistoProf1(
286  new TProfile("1720", "MB prof Phi [Air];#varphi [rad];#lambda/#lambda_{0}", 180, -3.1416, 3.1416));
287  hmgr->addHisto1(new TH1F("1721", "Phi [Air]", 180, -3.1416, 3.1416));
288  hmgr->addHistoProf2(new TProfile2D(
289  "1730", "MB prof Eta Phi [Air];#eta;#varphi;#lambda/#lambda_{0}", 250, -5., 5., 180, -3.1416, 3.1416));
290  hmgr->addHisto2(new TH2F("1731", "Eta vs Phi [Air]", 501, -5., 5., 180, -3.1416, 3.1416));
291  hmgr->addHistoProf1(new TProfile("1740", "MB prof R [Air];R [mm];#lambda/#lambda_{0}", 200, 0., 2000.));
292  hmgr->addHisto1(new TH1F("1741", "R [Air]", 200, 0., 2000.));
293  hmgr->addHistoProf2(
294  new TProfile2D("1750", "MB prof sum R z [Air];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
295  hmgr->addHisto2(new TH2F("1751", "R vs z [Air]", nzbin, zMin, zMax, nrbin, rMin, rMax));
296  hmgr->addHisto2(
297  new TH2F("1760", "MB prof local R z [Air];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax));
298  hmgr->addHisto2(new TH2F("1761", "R vs z [Air]", nzbin, zMin, zMax, nrbin, rMin, rMax));
299 }
std::shared_ptr< TestHistoMgr > hmgr
Log< level::Info, false > LogInfo

◆ endOfRun()

void MaterialBudgetTrackerHistos::endOfRun ( )
overridevirtual

Reimplemented from MaterialBudgetFormat.

Definition at line 745 of file MaterialBudgetTrackerHistos.cc.

References hmgr, and MaterialBudgetFormat::theFileName.

745  {
746  // Prefered method to include any instruction
747  // once all the tracks are done
748 
749  hmgr->getHisto2(60)->Divide(hmgr->getHisto2(999));
750  hmgr->getHisto2(160)->Divide(hmgr->getHisto2(999));
751  hmgr->getHisto2(260)->Divide(hmgr->getHisto2(999));
752  hmgr->getHisto2(360)->Divide(hmgr->getHisto2(999));
753  hmgr->getHisto2(460)->Divide(hmgr->getHisto2(999));
754  hmgr->getHisto2(560)->Divide(hmgr->getHisto2(999));
755  hmgr->getHisto2(660)->Divide(hmgr->getHisto2(999));
756  hmgr->getHisto2(760)->Divide(hmgr->getHisto2(999));
757 
758  hmgr->getHisto2(160)->Divide(hmgr->getHisto2(1999));
759  hmgr->getHisto2(1160)->Divide(hmgr->getHisto2(1999));
760  hmgr->getHisto2(1260)->Divide(hmgr->getHisto2(1999));
761  hmgr->getHisto2(1360)->Divide(hmgr->getHisto2(1999));
762  hmgr->getHisto2(1460)->Divide(hmgr->getHisto2(1999));
763  hmgr->getHisto2(1560)->Divide(hmgr->getHisto2(1999));
764  hmgr->getHisto2(1660)->Divide(hmgr->getHisto2(1999));
765  hmgr->getHisto2(1760)->Divide(hmgr->getHisto2(1999));
766 
767  edm::LogInfo("MaterialBudget") << "MaterialBudgetTrackerHistos: Saving Histograms to: " << theFileName;
768  hmgr->save(theFileName);
769 }
std::shared_ptr< TestHistoMgr > hmgr
Log< level::Info, false > LogInfo

◆ fillEndTrack()

void MaterialBudgetTrackerHistos::fillEndTrack ( )
overridevirtual

Reimplemented from MaterialBudgetFormat.

Definition at line 305 of file MaterialBudgetTrackerHistos.cc.

References reco::ceil(), hmgr, max(), funct::pow(), mathSSE::sqrt(), MaterialBudgetFormat::theData, and z.

305  {
306  //
307  // fill histograms and profiles only if the material has been crossed
308  //
309 
310  if (theData->getNumberOfSteps() != 0) {
311  // Total X0
312  hmgr->getHisto1(11)->Fill(theData->getEta());
313  hmgr->getHisto1(21)->Fill(theData->getPhi());
314  hmgr->getHisto2(31)->Fill(theData->getEta(), theData->getPhi());
315 
316  hmgr->getHistoProf1(10)->Fill(theData->getEta(), theData->getTotalMB());
317  hmgr->getHistoProf1(20)->Fill(theData->getPhi(), theData->getTotalMB());
318  hmgr->getHistoProf2(30)->Fill(theData->getEta(), theData->getPhi(), theData->getTotalMB());
319 
320  // rr
321 
322  // Support
323  hmgr->getHisto1(111)->Fill(theData->getEta());
324  hmgr->getHisto1(121)->Fill(theData->getPhi());
325  hmgr->getHisto2(131)->Fill(theData->getEta(), theData->getPhi());
326 
327  hmgr->getHistoProf1(110)->Fill(theData->getEta(), theData->getSupportMB());
328  hmgr->getHistoProf1(120)->Fill(theData->getPhi(), theData->getSupportMB());
329  hmgr->getHistoProf2(130)->Fill(theData->getEta(), theData->getPhi(), theData->getSupportMB());
330 
331  // Sensitive
332  hmgr->getHisto1(211)->Fill(theData->getEta());
333  hmgr->getHisto1(221)->Fill(theData->getPhi());
334  hmgr->getHisto2(231)->Fill(theData->getEta(), theData->getPhi());
335 
336  hmgr->getHistoProf1(210)->Fill(theData->getEta(), theData->getSensitiveMB());
337  hmgr->getHistoProf1(220)->Fill(theData->getPhi(), theData->getSensitiveMB());
338  hmgr->getHistoProf2(230)->Fill(theData->getEta(), theData->getPhi(), theData->getSensitiveMB());
339 
340  // Cables
341  hmgr->getHisto1(311)->Fill(theData->getEta());
342  hmgr->getHisto1(321)->Fill(theData->getPhi());
343  hmgr->getHisto2(331)->Fill(theData->getEta(), theData->getPhi());
344 
345  hmgr->getHistoProf1(310)->Fill(theData->getEta(), theData->getCablesMB());
346  hmgr->getHistoProf1(320)->Fill(theData->getPhi(), theData->getCablesMB());
347  hmgr->getHistoProf2(330)->Fill(theData->getEta(), theData->getPhi(), theData->getCablesMB());
348 
349  // Cooling
350  hmgr->getHisto1(411)->Fill(theData->getEta());
351  hmgr->getHisto1(421)->Fill(theData->getPhi());
352  hmgr->getHisto2(431)->Fill(theData->getEta(), theData->getPhi());
353 
354  hmgr->getHistoProf1(410)->Fill(theData->getEta(), theData->getCoolingMB());
355  hmgr->getHistoProf1(420)->Fill(theData->getPhi(), theData->getCoolingMB());
356  hmgr->getHistoProf2(430)->Fill(theData->getEta(), theData->getPhi(), theData->getCoolingMB());
357 
358  // Electronics
359  hmgr->getHisto1(511)->Fill(theData->getEta());
360  hmgr->getHisto1(521)->Fill(theData->getPhi());
361  hmgr->getHisto2(531)->Fill(theData->getEta(), theData->getPhi());
362 
363  hmgr->getHistoProf1(510)->Fill(theData->getEta(), theData->getElectronicsMB());
364  hmgr->getHistoProf1(520)->Fill(theData->getPhi(), theData->getElectronicsMB());
365  hmgr->getHistoProf2(530)->Fill(theData->getEta(), theData->getPhi(), theData->getElectronicsMB());
366 
367  // Other
368  hmgr->getHisto1(611)->Fill(theData->getEta());
369  hmgr->getHisto1(621)->Fill(theData->getPhi());
370  hmgr->getHisto2(631)->Fill(theData->getEta(), theData->getPhi());
371 
372  hmgr->getHistoProf1(610)->Fill(theData->getEta(), theData->getOtherMB());
373  hmgr->getHistoProf1(620)->Fill(theData->getPhi(), theData->getOtherMB());
374  hmgr->getHistoProf2(630)->Fill(theData->getEta(), theData->getPhi(), theData->getOtherMB());
375 
376  // Air
377  hmgr->getHisto1(711)->Fill(theData->getEta());
378  hmgr->getHisto1(721)->Fill(theData->getPhi());
379  hmgr->getHisto2(731)->Fill(theData->getEta(), theData->getPhi());
380 
381  hmgr->getHistoProf1(710)->Fill(theData->getEta(), theData->getAirMB());
382  hmgr->getHistoProf1(720)->Fill(theData->getPhi(), theData->getAirMB());
383  hmgr->getHistoProf2(730)->Fill(theData->getEta(), theData->getPhi(), theData->getAirMB());
384 
385  //
386  // Compute the total x/X0 crossed at each step radius for each path
387  //
388  //
389  float theTotalMB_TOT = 0.0;
390  float theTotalMB_SUP = 0.0;
391  float theTotalMB_SEN = 0.0;
392  float theTotalMB_CAB = 0.0;
393  float theTotalMB_COL = 0.0;
394  float theTotalMB_ELE = 0.0;
395  float theTotalMB_OTH = 0.0;
396  float theTotalMB_AIR = 0.0;
397  for (int iStep = 0; iStep < theData->getNumberOfSteps(); iStep++) {
398  theTotalMB_TOT += theData->getStepDmb(iStep);
399  theTotalMB_SUP += theData->getSupportDmb(iStep);
400  theTotalMB_SEN += theData->getSensitiveDmb(iStep);
401  theTotalMB_CAB += theData->getCablesDmb(iStep);
402  theTotalMB_COL += theData->getCoolingDmb(iStep);
403  theTotalMB_ELE += theData->getElectronicsDmb(iStep);
404  theTotalMB_OTH += theData->getOtherDmb(iStep);
405  theTotalMB_AIR += theData->getAirDmb(iStep);
406 
407  int iSup = 0;
408  int iSen = 0;
409  int iCab = 0;
410  int iCol = 0;
411  int iEle = 0;
412  int iOth = 0;
413  int iAir = 0;
414  if (theData->getSupportDmb(iStep) > 0.) {
415  iSup = 1;
416  }
417  if (theData->getSensitiveDmb(iStep) > 0.) {
418  iSen = 1;
419  }
420  if (theData->getCablesDmb(iStep) > 0.) {
421  iCab = 1;
422  }
423  if (theData->getCoolingDmb(iStep) > 0.) {
424  iCol = 1;
425  }
426  if (theData->getElectronicsDmb(iStep) > 0.) {
427  iEle = 1;
428  }
429  if (theData->getOtherDmb(iStep) > 0.) {
430  iOth = 1;
431  }
432  if (theData->getAirDmb(iStep) > 0.) {
433  iAir = 1;
434  }
435 
436  float deltaRadius = sqrt(pow(theData->getStepFinalX(iStep) - theData->getStepInitialX(iStep), 2) +
437  pow(theData->getStepFinalY(iStep) - theData->getStepInitialY(iStep), 2));
438  float deltaz = theData->getStepFinalZ(iStep) - theData->getStepInitialZ(iStep);
439 
440  float x0 = theData->getStepMaterialX0(iStep);
441 
442  int nSubStep = 2;
443  float boxWidth = 0.1;
444  if ((deltaRadius > boxWidth) || (fabs(deltaz) > boxWidth)) {
445  nSubStep = static_cast<int>(max(ceil(deltaRadius / boxWidth / 2.) * 2, ceil(fabs(deltaz) / boxWidth / 2.) * 2));
446  }
447 
448  for (int iSubStep = 1; iSubStep < nSubStep; iSubStep += 2) {
449  float subdeltaRadius = deltaRadius / nSubStep;
450  float polarRadius = sqrt(pow(theData->getStepInitialX(iStep), 2) + pow(theData->getStepInitialY(iStep), 2)) +
451  iSubStep * subdeltaRadius;
452 
453  float subdeltaz = deltaz / nSubStep;
454  float z = theData->getStepInitialZ(iStep) + iSubStep * subdeltaz;
455 
456  float subdelta = sqrt(pow(subdeltaRadius, 2) + pow(subdeltaz, 2));
457 
458  float fillValue = subdelta / x0;
459 
460  //
461  // Average length
462  hmgr->getHisto2(999)->Fill(z, polarRadius, subdelta);
463  // Total
464  hmgr->getHisto1(41)->Fill(polarRadius);
465  hmgr->getHistoProf1(40)->Fill(polarRadius, theTotalMB_TOT);
466  hmgr->getHisto2(51)->Fill(z, polarRadius);
467  hmgr->getHistoProf2(50)->Fill(z, polarRadius, theTotalMB_TOT);
468  hmgr->getHisto2(61)->Fill(z, polarRadius);
469  hmgr->getHisto2(60)->Fill(z, polarRadius, fillValue);
470  // Support
471  hmgr->getHisto1(141)->Fill(polarRadius);
472  hmgr->getHistoProf1(140)->Fill(polarRadius, theTotalMB_SUP);
473  hmgr->getHisto2(151)->Fill(z, polarRadius);
474  hmgr->getHistoProf2(150)->Fill(z, polarRadius, theTotalMB_SUP);
475  hmgr->getHisto2(161)->Fill(z, polarRadius);
476  hmgr->getHisto2(160)->Fill(z, polarRadius, iSup * fillValue);
477  // Sensitive
478  hmgr->getHisto1(241)->Fill(polarRadius);
479  hmgr->getHistoProf1(240)->Fill(polarRadius, theTotalMB_SEN);
480  hmgr->getHisto2(251)->Fill(z, polarRadius);
481  hmgr->getHistoProf2(250)->Fill(z, polarRadius, theTotalMB_SEN);
482  hmgr->getHisto2(261)->Fill(z, polarRadius);
483  hmgr->getHisto2(260)->Fill(z, polarRadius, iSen * fillValue);
484  // Cables
485  hmgr->getHisto1(341)->Fill(polarRadius);
486  hmgr->getHistoProf1(340)->Fill(polarRadius, theTotalMB_CAB);
487  hmgr->getHisto2(351)->Fill(z, polarRadius);
488  hmgr->getHistoProf2(350)->Fill(z, polarRadius, theTotalMB_CAB);
489  hmgr->getHisto2(361)->Fill(z, polarRadius);
490  hmgr->getHisto2(360)->Fill(z, polarRadius, iCab * fillValue);
491  // Cooling
492  hmgr->getHisto1(441)->Fill(polarRadius);
493  hmgr->getHistoProf1(440)->Fill(polarRadius, theTotalMB_COL);
494  hmgr->getHisto2(451)->Fill(z, polarRadius);
495  hmgr->getHistoProf2(450)->Fill(z, polarRadius, theTotalMB_COL);
496  hmgr->getHisto2(461)->Fill(z, polarRadius);
497  hmgr->getHisto2(460)->Fill(z, polarRadius, iCol * fillValue);
498  // Electronics
499  hmgr->getHisto1(541)->Fill(polarRadius);
500  hmgr->getHistoProf1(540)->Fill(polarRadius, theTotalMB_ELE);
501  hmgr->getHisto2(551)->Fill(z, polarRadius);
502  hmgr->getHistoProf2(550)->Fill(z, polarRadius, theTotalMB_ELE);
503  hmgr->getHisto2(561)->Fill(z, polarRadius);
504  hmgr->getHisto2(560)->Fill(z, polarRadius, iEle * fillValue);
505  // Other
506  hmgr->getHisto1(641)->Fill(polarRadius);
507  hmgr->getHistoProf1(640)->Fill(polarRadius, theTotalMB_OTH);
508  hmgr->getHisto2(651)->Fill(z, polarRadius);
509  hmgr->getHistoProf2(650)->Fill(z, polarRadius, theTotalMB_OTH);
510  hmgr->getHisto2(661)->Fill(z, polarRadius);
511  hmgr->getHisto2(660)->Fill(z, polarRadius, iOth * fillValue);
512  // Air
513  hmgr->getHisto1(741)->Fill(polarRadius);
514  hmgr->getHistoProf1(740)->Fill(polarRadius, theTotalMB_AIR);
515  hmgr->getHisto2(751)->Fill(z, polarRadius);
516  hmgr->getHistoProf2(750)->Fill(z, polarRadius, theTotalMB_AIR);
517  hmgr->getHisto2(761)->Fill(z, polarRadius);
518  hmgr->getHisto2(760)->Fill(z, polarRadius, iAir * fillValue);
519  //
520  }
521  }
522  //
523  //
525  //
526  //
527  //
528 
529  // Total Lambda0
530  hmgr->getHisto1(1011)->Fill(theData->getEta());
531  hmgr->getHisto1(1021)->Fill(theData->getPhi());
532  hmgr->getHisto2(1031)->Fill(theData->getEta(), theData->getPhi());
533 
534  hmgr->getHistoProf1(1010)->Fill(theData->getEta(), theData->getTotalIL());
535  hmgr->getHistoProf1(1020)->Fill(theData->getPhi(), theData->getTotalIL());
536  hmgr->getHistoProf2(1030)->Fill(theData->getEta(), theData->getPhi(), theData->getTotalIL());
537 
538  // Support
539  hmgr->getHisto1(1111)->Fill(theData->getEta());
540  hmgr->getHisto1(1121)->Fill(theData->getPhi());
541  hmgr->getHisto2(1131)->Fill(theData->getEta(), theData->getPhi());
542 
543  hmgr->getHistoProf1(1110)->Fill(theData->getEta(), theData->getSupportIL());
544  hmgr->getHistoProf1(1120)->Fill(theData->getPhi(), theData->getSupportIL());
545  hmgr->getHistoProf2(1130)->Fill(theData->getEta(), theData->getPhi(), theData->getSupportIL());
546 
547  // Sensitive
548  hmgr->getHisto1(1211)->Fill(theData->getEta());
549  hmgr->getHisto1(1221)->Fill(theData->getPhi());
550  hmgr->getHisto2(1231)->Fill(theData->getEta(), theData->getPhi());
551 
552  hmgr->getHistoProf1(1210)->Fill(theData->getEta(), theData->getSensitiveIL());
553  hmgr->getHistoProf1(1220)->Fill(theData->getPhi(), theData->getSensitiveIL());
554  hmgr->getHistoProf2(1230)->Fill(theData->getEta(), theData->getPhi(), theData->getSensitiveIL());
555 
556  // Cables
557  hmgr->getHisto1(1311)->Fill(theData->getEta());
558  hmgr->getHisto1(1321)->Fill(theData->getPhi());
559  hmgr->getHisto2(1331)->Fill(theData->getEta(), theData->getPhi());
560 
561  hmgr->getHistoProf1(1310)->Fill(theData->getEta(), theData->getCablesIL());
562  hmgr->getHistoProf1(1320)->Fill(theData->getPhi(), theData->getCablesIL());
563  hmgr->getHistoProf2(1330)->Fill(theData->getEta(), theData->getPhi(), theData->getCablesIL());
564 
565  // Cooling
566  hmgr->getHisto1(1411)->Fill(theData->getEta());
567  hmgr->getHisto1(1421)->Fill(theData->getPhi());
568  hmgr->getHisto2(1431)->Fill(theData->getEta(), theData->getPhi());
569 
570  hmgr->getHistoProf1(1410)->Fill(theData->getEta(), theData->getCoolingIL());
571  hmgr->getHistoProf1(1420)->Fill(theData->getPhi(), theData->getCoolingIL());
572  hmgr->getHistoProf2(1430)->Fill(theData->getEta(), theData->getPhi(), theData->getCoolingIL());
573 
574  // Electronics
575  hmgr->getHisto1(1511)->Fill(theData->getEta());
576  hmgr->getHisto1(1521)->Fill(theData->getPhi());
577  hmgr->getHisto2(1531)->Fill(theData->getEta(), theData->getPhi());
578 
579  hmgr->getHistoProf1(1510)->Fill(theData->getEta(), theData->getElectronicsIL());
580  hmgr->getHistoProf1(1520)->Fill(theData->getPhi(), theData->getElectronicsIL());
581  hmgr->getHistoProf2(1530)->Fill(theData->getEta(), theData->getPhi(), theData->getElectronicsIL());
582 
583  // Other
584  hmgr->getHisto1(1611)->Fill(theData->getEta());
585  hmgr->getHisto1(1621)->Fill(theData->getPhi());
586  hmgr->getHisto2(1631)->Fill(theData->getEta(), theData->getPhi());
587 
588  hmgr->getHistoProf1(1610)->Fill(theData->getEta(), theData->getOtherIL());
589  hmgr->getHistoProf1(1620)->Fill(theData->getPhi(), theData->getOtherIL());
590  hmgr->getHistoProf2(1630)->Fill(theData->getEta(), theData->getPhi(), theData->getOtherIL());
591 
592  // Air
593  hmgr->getHisto1(1711)->Fill(theData->getEta());
594  hmgr->getHisto1(1721)->Fill(theData->getPhi());
595  hmgr->getHisto2(1731)->Fill(theData->getEta(), theData->getPhi());
596 
597  hmgr->getHistoProf1(1710)->Fill(theData->getEta(), theData->getAirIL());
598  hmgr->getHistoProf1(1720)->Fill(theData->getPhi(), theData->getAirIL());
599  hmgr->getHistoProf2(1730)->Fill(theData->getEta(), theData->getPhi(), theData->getAirIL());
600 
601  // Compute the total l/l0 crossed at each step radius for each path
602  float theTotalIL_TOT = 0.0;
603  float theTotalIL_SUP = 0.0;
604  float theTotalIL_SEN = 0.0;
605  float theTotalIL_CAB = 0.0;
606  float theTotalIL_COL = 0.0;
607  float theTotalIL_ELE = 0.0;
608  float theTotalIL_OTH = 0.0;
609  float theTotalIL_AIR = 0.0;
610  for (int iStep = 0; iStep < theData->getNumberOfSteps(); iStep++) {
611  theTotalIL_TOT += theData->getStepDil(iStep);
612  theTotalIL_SUP += theData->getSupportDil(iStep);
613  theTotalIL_SEN += theData->getSensitiveDil(iStep);
614  theTotalIL_CAB += theData->getCablesDil(iStep);
615  theTotalIL_COL += theData->getCoolingDil(iStep);
616  theTotalIL_ELE += theData->getElectronicsDil(iStep);
617  theTotalIL_OTH += theData->getOtherDil(iStep);
618  theTotalIL_AIR += theData->getAirDil(iStep);
619 
620  int iSup = 0;
621  int iSen = 0;
622  int iCab = 0;
623  int iCol = 0;
624  int iEle = 0;
625  int iOth = 0;
626  int iAir = 0;
627  if (theData->getSupportDil(iStep) > 0.) {
628  iSup = 1;
629  }
630  if (theData->getSensitiveDil(iStep) > 0.) {
631  iSen = 1;
632  }
633  if (theData->getCablesDil(iStep) > 0.) {
634  iCab = 1;
635  }
636  if (theData->getCoolingDil(iStep) > 0.) {
637  iCol = 1;
638  }
639  if (theData->getElectronicsDil(iStep) > 0.) {
640  iEle = 1;
641  }
642  if (theData->getOtherDil(iStep) > 0.) {
643  iOth = 1;
644  }
645  if (theData->getAirDil(iStep) > 0.) {
646  iAir = 1;
647  }
648 
649  float deltaRadius = sqrt(pow(theData->getStepFinalX(iStep) - theData->getStepInitialX(iStep), 2) +
650  pow(theData->getStepFinalY(iStep) - theData->getStepInitialY(iStep), 2));
651  float deltaz = theData->getStepFinalZ(iStep) - theData->getStepInitialZ(iStep);
652 
653  float il = theData->getStepMaterialLambda0(iStep);
654 
655  int nSubStep = 2;
656  float boxWidth = 0.1;
657  if ((deltaRadius > boxWidth) || (fabs(deltaz) > boxWidth)) {
658  nSubStep = static_cast<int>(max(ceil(deltaRadius / boxWidth / 2.) * 2, ceil(fabs(deltaz) / boxWidth / 2.) * 2));
659  }
660 
661  for (int iSubStep = 1; iSubStep < nSubStep; iSubStep += 2) {
662  float subdeltaRadius = deltaRadius / nSubStep;
663  float polarRadius = sqrt(pow(theData->getStepInitialX(iStep), 2) + pow(theData->getStepInitialY(iStep), 2)) +
664  iSubStep * subdeltaRadius;
665 
666  float subdeltaz = deltaz / nSubStep;
667  float z = theData->getStepInitialZ(iStep) + iSubStep * subdeltaz;
668 
669  float subdelta = sqrt(pow(subdeltaRadius, 2) + pow(subdeltaz, 2));
670 
671  float fillValue = subdelta / il;
672 
673  //
674  // Average length
675  hmgr->getHisto2(1999)->Fill(z, polarRadius, subdelta);
676  // Total
677  hmgr->getHisto1(1041)->Fill(polarRadius);
678  hmgr->getHistoProf1(1040)->Fill(polarRadius, theTotalIL_TOT);
679  hmgr->getHisto2(1051)->Fill(z, polarRadius);
680  hmgr->getHistoProf2(1050)->Fill(z, polarRadius, theTotalIL_TOT);
681  hmgr->getHisto2(1061)->Fill(z, polarRadius);
682  hmgr->getHisto2(1060)->Fill(z, polarRadius, fillValue);
683  // Support
684  hmgr->getHisto1(1141)->Fill(polarRadius);
685  hmgr->getHistoProf1(1140)->Fill(polarRadius, theTotalIL_SUP);
686  hmgr->getHisto2(1151)->Fill(z, polarRadius);
687  hmgr->getHistoProf2(1150)->Fill(z, polarRadius, theTotalIL_SUP);
688  hmgr->getHisto2(1161)->Fill(z, polarRadius);
689  hmgr->getHisto2(1160)->Fill(z, polarRadius, iSup * fillValue);
690  // Sensitive
691  hmgr->getHisto1(1241)->Fill(polarRadius);
692  hmgr->getHistoProf1(1240)->Fill(polarRadius, theTotalIL_SEN);
693  hmgr->getHisto2(1251)->Fill(z, polarRadius);
694  hmgr->getHistoProf2(1250)->Fill(z, polarRadius, theTotalIL_SEN);
695  hmgr->getHisto2(1261)->Fill(z, polarRadius);
696  hmgr->getHisto2(1260)->Fill(z, polarRadius, iSen * fillValue);
697  // Cables
698  hmgr->getHisto1(1341)->Fill(polarRadius);
699  hmgr->getHistoProf1(1340)->Fill(polarRadius, theTotalIL_CAB);
700  hmgr->getHisto2(1351)->Fill(z, polarRadius);
701  hmgr->getHistoProf2(1350)->Fill(z, polarRadius, theTotalIL_CAB);
702  hmgr->getHisto2(1361)->Fill(z, polarRadius);
703  hmgr->getHisto2(1360)->Fill(z, polarRadius, iCab * fillValue);
704  // Cooling
705  hmgr->getHisto1(1441)->Fill(polarRadius);
706  hmgr->getHistoProf1(1440)->Fill(polarRadius, theTotalIL_COL);
707  hmgr->getHisto2(1451)->Fill(z, polarRadius);
708  hmgr->getHistoProf2(1450)->Fill(z, polarRadius, theTotalIL_COL);
709  hmgr->getHisto2(1461)->Fill(z, polarRadius);
710  hmgr->getHisto2(1460)->Fill(z, polarRadius, iCol * fillValue);
711  // Electronics
712  hmgr->getHisto1(1541)->Fill(polarRadius);
713  hmgr->getHistoProf1(1540)->Fill(polarRadius, theTotalIL_ELE);
714  hmgr->getHisto2(1551)->Fill(z, polarRadius);
715  hmgr->getHistoProf2(1550)->Fill(z, polarRadius, theTotalIL_ELE);
716  hmgr->getHisto2(1561)->Fill(z, polarRadius);
717  hmgr->getHisto2(1560)->Fill(z, polarRadius, iEle * fillValue);
718  // Other
719  hmgr->getHisto1(1641)->Fill(polarRadius);
720  hmgr->getHistoProf1(1640)->Fill(polarRadius, theTotalIL_OTH);
721  hmgr->getHisto2(1651)->Fill(z, polarRadius);
722  hmgr->getHistoProf2(1650)->Fill(z, polarRadius, theTotalIL_OTH);
723  hmgr->getHisto2(1661)->Fill(z, polarRadius);
724  hmgr->getHisto2(1660)->Fill(z, polarRadius, iOth * fillValue);
725  // Air
726  hmgr->getHisto1(1741)->Fill(polarRadius);
727  hmgr->getHistoProf1(1740)->Fill(polarRadius, theTotalIL_AIR);
728  hmgr->getHisto2(1751)->Fill(z, polarRadius);
729  hmgr->getHistoProf2(1750)->Fill(z, polarRadius, theTotalIL_AIR);
730  hmgr->getHisto2(1761)->Fill(z, polarRadius);
731  hmgr->getHisto2(1760)->Fill(z, polarRadius, iAir * fillValue);
732  //
733  }
734  }
735 
736  // rr
737  } else {
738  edm::LogWarning("MaterialBudget") << "MaterialBudgetTrackerHistos: This event is out of the acceptance:"
739  << "eta = " << theData->getEta() << "\t phi = " << theData->getPhi()
740  << "\t x/X0 = " << theData->getTotalMB() << "\t l/l0 = " << theData->getTotalIL()
741  << "\t steps = " << theData->getNumberOfSteps();
742  }
743 }
constexpr int32_t ceil(float num)
std::shared_ptr< TestHistoMgr > hmgr
const T & max(const T &a, const T &b)
T sqrt(T t)
Definition: SSEVec.h:23
Log< level::Warning, false > LogWarning
std::shared_ptr< MaterialBudgetData > theData
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29

◆ fillPerStep()

void MaterialBudgetTrackerHistos::fillPerStep ( )
overridevirtual

Reimplemented from MaterialBudgetFormat.

Definition at line 303 of file MaterialBudgetTrackerHistos.cc.

303 {}

◆ fillStartTrack()

void MaterialBudgetTrackerHistos::fillStartTrack ( )
overridevirtual

Reimplemented from MaterialBudgetFormat.

Definition at line 301 of file MaterialBudgetTrackerHistos.cc.

301 {}

Member Data Documentation

◆ hmgr

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

Definition at line 27 of file MaterialBudgetTrackerHistos.h.

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

◆ theDmb

double* MaterialBudgetTrackerHistos::theDmb
private

Definition at line 20 of file MaterialBudgetTrackerHistos.h.

◆ theMateId

double* MaterialBudgetTrackerHistos::theMateId
private

Definition at line 25 of file MaterialBudgetTrackerHistos.h.

◆ theVoluId

double* MaterialBudgetTrackerHistos::theVoluId
private

Definition at line 24 of file MaterialBudgetTrackerHistos.h.

◆ theX

double* MaterialBudgetTrackerHistos::theX
private

Definition at line 21 of file MaterialBudgetTrackerHistos.h.

◆ theY

double* MaterialBudgetTrackerHistos::theY
private

Definition at line 22 of file MaterialBudgetTrackerHistos.h.

◆ theZ

double* MaterialBudgetTrackerHistos::theZ
private

Definition at line 23 of file MaterialBudgetTrackerHistos.h.