CMS 3D CMS Logo

MaterialBudgetTrackerHistos.cc
Go to the documentation of this file.
3 
4 template <class T> const T& max ( const T& a, const T& b ) {
5  return (b<a)?a:b; // or: return comp(b,a)?a:b; for the comp version
6 }
7 
9  std::shared_ptr<TestHistoMgr> mgr,
10  const std::string& fileName )
11  : MaterialBudgetFormat( data ),
12  hmgr(mgr)
13 {
15  book();
16 }
17 
18 
20 {
21  edm::LogInfo("MaterialBudget") << " MaterialBudgetTrackerHistos: Booking Histos";
22 
23  // Parameters for 2D histograms
24  int nzbin = 1200;
25  float zMax = 3000.;
26  float zMin = -3000.;
27  int nrbin = 290;
28  float rMin = -50.;
29  float rMax = 1400.;
30 
31  // total X0
32  hmgr->addHistoProf1( new TProfile("10", "MB prof Eta [Total];#eta;x/X_{0} ", 250, -5., 5. ) );
33  hmgr->addHisto1( new TH1F("11", "Eta " , 501, -5., 5. ) );
34  hmgr->addHistoProf1( new TProfile("20", "MB prof Phi [Total];#varphi [rad];x/X_{0} ", 180, -3.1416, 3.1416 ) );
35  hmgr->addHisto1( new TH1F("21", "Phi " , 180, -3.1416, 3.1416 ) );
36  hmgr->addHistoProf2( new TProfile2D("30", "MB prof Eta Phi [Total];#eta;#varphi;x/X_{0} ", 250, -5., 5., 180, -3.1416, 3.1416 ) );
37  hmgr->addHisto2( new TH2F("31", "Eta vs Phi " , 501, -5., 5., 180, -3.1416, 3.1416 ) );
38  hmgr->addHistoProf1( new TProfile("40", "MB prof R [Total];R [mm];x/X_{0} ", 200, 0., 2000. ) );
39  hmgr->addHisto1( new TH1F("41", "R " , 200, 0., 2000. ) );
40  hmgr->addHistoProf2( new TProfile2D("50", "MB prof sum R z [Total];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
41  hmgr->addHisto2( new TH2F("999", "Tot track length for MB", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
42  hmgr->addHisto2( new TH2F("51", "R vs z " , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
43  hmgr->addHisto2( new TH2F("60", "MB prof local R z;z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
44  hmgr->addHisto2( new TH2F("61", "R vs z " , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
45 
46  // Support
47  hmgr->addHistoProf1( new TProfile("110", "MB prof Eta [Support];#eta;x/X_{0}", 250, -5.0, 5.0 ) );
48  hmgr->addHisto1( new TH1F("111", "Eta [Support]" , 501, -5., 5. ) );
49  hmgr->addHistoProf1( new TProfile("120", "MB prof Phi [Support];#varphi [rad];x/X_{0}", 180, -3.1416, 3.1416 ) );
50  hmgr->addHisto1( new TH1F("121", "Phi [Support]" , 180, -3.1416, 3.1416 ) );
51  hmgr->addHistoProf2( 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( new TProfile2D("150", "MB prof sum R z [Support];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
56  hmgr->addHisto2( new TH2F("151", "R vs z [Support]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
57  hmgr->addHisto2( new TH2F("160", "MB prof local R z [Support];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
58  hmgr->addHisto2( new TH2F("161", "R vs z [Support]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
59 
60  // Sensitive
61  hmgr->addHistoProf1( new TProfile("210", "MB prof Eta [Sensitive];#eta;x/X_{0}", 250, -5.0, 5.0 ) );
62  hmgr->addHisto1( new TH1F("211", "Eta [Sensitive]" , 501, -5., 5. ) );
63  hmgr->addHistoProf1( new TProfile("220", "MB prof Phi [Sensitive];#varphi [rad];x/X_{0}", 180, -3.1416, 3.1416 ) );
64  hmgr->addHisto1( new TH1F("221", "Phi [Sensitive]" , 180, -3.1416, 3.1416 ) );
65  hmgr->addHistoProf2( new TProfile2D("230", "MB prof Eta Phi [Sensitive];#eta;#varphi;x/X_{0}", 250, -5., 5., 180, -3.1416, 3.1416 ) );
66  hmgr->addHisto2( new TH2F("231", "Eta vs Phi [Sensitive]" , 501, -5., 5., 180, -3.1416, 3.1416 ) );
67  hmgr->addHistoProf1( new TProfile("240", "MB prof R [Sensitive];R [mm];x/X_{0}", 200, 0., 2000. ) );
68  hmgr->addHisto1( new TH1F("241", "R [Sensitive]" , 200, 0., 2000. ) );
69  hmgr->addHistoProf2( new TProfile2D("250", "MB prof sum R z [Sensitive];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
70  hmgr->addHisto2( new TH2F("251", "R vs z [Sensitive]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
71  hmgr->addHisto2( new TH2F("260", "MB prof local R z [Sensitive];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
72  hmgr->addHisto2( new TH2F("261", "R vs z [Sensitive]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
73  // Cables
74  hmgr->addHistoProf1( new TProfile("310", "MB prof Eta [Cables];#eta;x/X_{0}", 250, -5.0, 5.0 ) );
75  hmgr->addHisto1( new TH1F("311", "Eta [Cables]" , 501, -5., 5. ) );
76  hmgr->addHistoProf1( new TProfile("320", "MB prof Phi [Cables];#varphi [rad];x/X_{0}", 180, -3.1416, 3.1416 ) );
77  hmgr->addHisto1( new TH1F("321", "Phi [Cables]" , 180, -3.1416, 3.1416 ) );
78  hmgr->addHistoProf2( new TProfile2D("330", "MB prof Eta Phi [Cables];#eta;#varphi;x/X_{0}", 250, -5., 5., 180, -3.1416, 3.1416 ) );
79  hmgr->addHisto2( new TH2F("331", "Eta vs Phi [Cables]" , 501, -5., 5., 180, -3.1416, 3.1416 ) );
80  hmgr->addHistoProf1( new TProfile("340", "MB prof R [Cables];R [mm];x/X_{0}", 200, 0., 2000. ) );
81  hmgr->addHisto1( new TH1F("341", "R [Cables]" , 200, 0., 2000. ) );
82  hmgr->addHistoProf2( new TProfile2D("350", "MB prof sum R z [Cables];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
83  hmgr->addHisto2( new TH2F("351", "R vs z [Cables]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
84  hmgr->addHisto2( new TH2F("360", "MB prof local R z [Cables];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
85  hmgr->addHisto2( new TH2F("361", "R vs z [Cables]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
86  // Cooling
87  hmgr->addHistoProf1( new TProfile("410", "MB prof Eta [Cooling];#eta;x/X_{0}", 250, -5.0, 5.0 ) );
88  hmgr->addHisto1( new TH1F("411", "Eta [Cooling]" , 501, -5., 5. ) );
89  hmgr->addHistoProf1( new TProfile("420", "MB prof Phi [Cooling];#varphi [rad];x/X_{0}", 180, -3.1416, 3.1416 ) );
90  hmgr->addHisto1( new TH1F("421", "Phi [Cooling]" , 180, -3.1416, 3.1416 ) );
91  hmgr->addHistoProf2( new TProfile2D("430", "MB prof Eta Phi [Cooling];#eta;#varphi;x/X_{0}", 250, -5., 5., 180, -3.1416, 3.1416 ) );
92  hmgr->addHisto2( new TH2F("431", "Eta vs Phi [Cooling]" , 501, -5., 5., 180, -3.1416, 3.1416 ) );
93  hmgr->addHistoProf1( new TProfile("440", "MB prof R [Cooling];R [mm];x/X_{0}", 200, 0., 2000. ) );
94  hmgr->addHisto1( new TH1F("441", "R [Cooling]" , 200, 0., 2000. ) );
95  hmgr->addHistoProf2( new TProfile2D("450", "MB prof sum R z [Cooling];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
96  hmgr->addHisto2( new TH2F("451", "R vs z [Cooling]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
97  hmgr->addHisto2( new TH2F("460", "MB prof local R z [Cooling];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
98  hmgr->addHisto2( new TH2F("461", "R vs z [Cooling]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
99  // Electronics
100  hmgr->addHistoProf1( new TProfile("510", "MB prof Eta [Electronics];#eta;x/X_{0}", 250, -5.0, 5.0 ) );
101  hmgr->addHisto1( new TH1F("511", "Eta [Electronics]" , 501, -5., 5. ) );
102  hmgr->addHistoProf1( new TProfile("520", "MB prof Phi [Electronics];#varphi [rad];x/X_{0}", 180, -3.1416, 3.1416 ) );
103  hmgr->addHisto1( new TH1F("521", "Phi [Electronics]" , 180, -3.1416, 3.1416 ) );
104  hmgr->addHistoProf2( new TProfile2D("530", "MB prof Eta Phi [Electronics];#eta;#varphi;x/X_{0}", 250, -5., 5., 180, -3.1416, 3.1416 ) );
105  hmgr->addHisto2( new TH2F("531", "Eta vs Phi [Electronics]" , 501, -5., 5., 180, -3.1416, 3.1416 ) );
106  hmgr->addHistoProf1( new TProfile("540", "MB prof R [Electronics];R [mm];x/X_{0}", 200, 0., 2000. ) );
107  hmgr->addHisto1( new TH1F("541", "R [Electronics]" , 200, 0., 2000. ) );
108  hmgr->addHistoProf2( new TProfile2D("550", "MB prof sum R z [Electronics];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
109  hmgr->addHisto2( new TH2F("551", "R vs z [Electronics]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
110  hmgr->addHisto2( new TH2F("560", "MB prof local R z [Electronics];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
111  hmgr->addHisto2( new TH2F("561", "R vs z [Electronics]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
112  // Other
113  hmgr->addHistoProf1( new TProfile("610", "MB prof Eta [Other];#eta;x/X_{0}", 250, -5.0, 5.0 ) );
114  hmgr->addHisto1( new TH1F("611", "Eta [Other]" , 501, -5., 5. ) );
115  hmgr->addHistoProf1( new TProfile("620", "MB prof Phi [Other];#varphi [rad];x/X_{0}", 180, -3.1416, 3.1416 ) );
116  hmgr->addHisto1( new TH1F("621", "Phi [Other]" , 180, -3.1416, 3.1416 ) );
117  hmgr->addHistoProf2( new TProfile2D("630", "MB prof Eta Phi [Other];#eta;#varphi;x/X_{0}", 250, -5., 5., 180, -3.1416, 3.1416 ) );
118  hmgr->addHisto2( new TH2F("631", "Eta vs Phi [Other]" , 501, -5., 5., 180, -3.1416, 3.1416 ) );
119  hmgr->addHistoProf1( new TProfile("640", "MB prof R [Other];R [mm];x/X_{0}", 200, 0., 2000. ) );
120  hmgr->addHisto1( new TH1F("641", "R [Other]" , 200, 0., 2000. ) );
121  hmgr->addHistoProf2( new TProfile2D("650", "MB prof sum R z [Other];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
122  hmgr->addHisto2( new TH2F("651", "R vs z [Other]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
123  hmgr->addHisto2( new TH2F("660", "MB prof local R z [Other];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
124  hmgr->addHisto2( new TH2F("661", "R vs z [Other]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
125  // Air
126  hmgr->addHistoProf1( new TProfile("710", "MB prof Eta [Air];#eta;x/X_{0}", 250, -5.0, 5.0 ) );
127  hmgr->addHisto1( new TH1F("711", "Eta [Air]" , 501, -5., 5. ) );
128  hmgr->addHistoProf1( new TProfile("720", "MB prof Phi [Air];#varphi [rad];x/X_{0}", 180, -3.1416, 3.1416 ) );
129  hmgr->addHisto1( new TH1F("721", "Phi [Air]" , 180, -3.1416, 3.1416 ) );
130  hmgr->addHistoProf2( new TProfile2D("730", "MB prof Eta Phi [Air];#eta;#varphi;x/X_{0}", 250, -5., 5., 180, -3.1416, 3.1416 ) );
131  hmgr->addHisto2( new TH2F("731", "Eta vs Phi [Air]" , 501, -5., 5., 180, -3.1416, 3.1416 ) );
132  hmgr->addHistoProf1( new TProfile("740", "MB prof R [Air];R [mm];x/X_{0}", 200, 0., 2000. ) );
133  hmgr->addHisto1( new TH1F("741", "R [Air]" , 200, 0., 2000. ) );
134  hmgr->addHistoProf2( new TProfile2D("750", "MB prof sum R z [Air];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
135  hmgr->addHisto2( new TH2F("751", "R vs z [Air]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
136  hmgr->addHisto2( new TH2F("760", "MB prof local R z [Air];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
137  hmgr->addHisto2( new TH2F("761", "R vs z [Air]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
138  //
139 
140  // total Lambda0
141  hmgr->addHistoProf1( new TProfile("1010", "MB prof Eta [Total];#eta;#lambda/#lambda_{0} ", 250, -5., 5. ) );
142  hmgr->addHisto1( new TH1F("1011", "Eta " , 501, -5., 5. ) );
143  hmgr->addHistoProf1( new TProfile("1020", "MB prof Phi [Total];#varphi [rad];#lambda/#lambda_{0} ", 180, -3.1416, 3.1416 ) );
144  hmgr->addHisto1( new TH1F("1021", "Phi " , 180, -3.1416, 3.1416 ) );
145  hmgr->addHistoProf2( new TProfile2D("1030", "MB prof Eta Phi [Total];#eta;#varphi;#lambda/#lambda_{0} ", 250, -5., 5., 180, -3.1416, 3.1416 ) );
146  hmgr->addHisto2( new TH2F("1031", "Eta vs Phi " , 501, -5., 5., 180, -3.1416, 3.1416 ) );
147 
148  // rr
149  hmgr->addHistoProf1( new TProfile("1040", "MB prof R [Total];R [mm];#lambda/#lambda_{0} ", 200, 0., 2000. ) );
150  hmgr->addHisto1( new TH1F("1041", "R " , 200, 0., 2000. ) );
151  hmgr->addHistoProf2( new TProfile2D("1050", "MB prof sum R z [Total];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
152  hmgr->addHisto2( new TH2F("1999", "Tot track length for l0", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
153  hmgr->addHisto2( new TH2F("1051", "R vs z " , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
154  hmgr->addHisto2( new TH2F("1060", "MB prof local R z;z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
155  hmgr->addHisto2( new TH2F("1061", "R vs z " , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
156 
157  // Support
158  hmgr->addHistoProf1( new TProfile("1110", "MB prof Eta [Support];#eta;#lambda/#lambda_{0}", 250, -5.0, 5.0 ) );
159  hmgr->addHisto1( new TH1F("1111", "Eta [Support]" , 501, -5., 5. ) );
160  hmgr->addHistoProf1( new TProfile("1120", "MB prof Phi [Support];#varphi [rad];#lambda/#lambda_{0}", 180, -3.1416, 3.1416 ) );
161  hmgr->addHisto1( new TH1F("1121", "Phi [Support]" , 180, -3.1416, 3.1416 ) );
162  hmgr->addHistoProf2( new TProfile2D("1130", "MB prof Eta Phi [Support];#eta;#varphi;#lambda/#lambda_{0}", 250, -5., 5., 180, -3.1416, 3.1416 ) );
163  hmgr->addHisto2( new TH2F("1131", "Eta vs Phi [Support]" , 501, -5., 5., 180, -3.1416, 3.1416 ) );
164  hmgr->addHistoProf1( new TProfile("1140", "MB prof R [Support];R [mm];#lambda/#lambda_{0}", 200, 0., 2000. ) );
165  hmgr->addHisto1( new TH1F("1141", "R [Support]" , 200, 0., 2000. ) );
166  hmgr->addHistoProf2( new TProfile2D("1150", "MB prof sum R z [Support];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
167  hmgr->addHisto2( new TH2F("1151", "R vs z [Support]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
168  hmgr->addHisto2( new TH2F("1160", "MB prof local R z [Support];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
169  hmgr->addHisto2( new TH2F("1161", "R vs z [Support]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
170  // Sensitive
171  hmgr->addHistoProf1( new TProfile("1210", "MB prof Eta [Sensitive];#eta;#lambda/#lambda_{0}", 250, -5.0, 5.0 ) );
172  hmgr->addHisto1( new TH1F("1211", "Eta [Sensitive]" , 501, -5., 5. ) );
173  hmgr->addHistoProf1( new TProfile("1220", "MB prof Phi [Sensitive];#varphi [rad];#lambda/#lambda_{0}", 180, -3.1416, 3.1416 ) );
174  hmgr->addHisto1( new TH1F("1221", "Phi [Sensitive]" , 180, -3.1416, 3.1416 ) );
175  hmgr->addHistoProf2( new TProfile2D("1230", "MB prof Eta Phi [Sensitive];#eta;#varphi;#lambda/#lambda_{0}", 250, -5., 5., 180, -3.1416, 3.1416 ) );
176  hmgr->addHisto2( new TH2F("1231", "Eta vs Phi [Sensitive]" , 501, -5., 5., 180, -3.1416, 3.1416 ) );
177  hmgr->addHistoProf1( new TProfile("1240", "MB prof R [Sensitive];R [mm];#lambda/#lambda_{0}", 200, 0., 2000. ) );
178  hmgr->addHisto1( new TH1F("1241", "R [Sensitive]" , 200, 0., 2000. ) );
179  hmgr->addHistoProf2( new TProfile2D("1250", "MB prof sum R z [Sensitive];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
180  hmgr->addHisto2( new TH2F("1251", "R vs z [Sensitive]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
181  hmgr->addHisto2( new TH2F("1260", "MB prof local R z [Sensitive];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
182  hmgr->addHisto2( new TH2F("1261", "R vs z [Sensitive]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
183  // Cables
184  hmgr->addHistoProf1( new TProfile("1310", "MB prof Eta [Cables];#eta;#lambda/#lambda_{0}", 250, -5.0, 5.0 ) );
185  hmgr->addHisto1( new TH1F("1311", "Eta [Cables]" , 501, -5., 5. ) );
186  hmgr->addHistoProf1( new TProfile("1320", "MB prof Phi [Cables];#varphi [rad];#lambda/#lambda_{0}", 180, -3.1416, 3.1416 ) );
187  hmgr->addHisto1( new TH1F("1321", "Phi [Cables]" , 180, -3.1416, 3.1416 ) );
188  hmgr->addHistoProf2( new TProfile2D("1330", "MB prof Eta Phi [Cables];#eta;#varphi;#lambda/#lambda_{0}", 250, -5., 5., 180, -3.1416, 3.1416 ) );
189  hmgr->addHisto2( new TH2F("1331", "Eta vs Phi [Cables]" , 501, -5., 5., 180, -3.1416, 3.1416 ) );
190  hmgr->addHistoProf1( new TProfile("1340", "MB prof R [Cables];R [mm];#lambda/#lambda_{0}", 200, 0., 2000. ) );
191  hmgr->addHisto1( new TH1F("1341", "R [Cables]" , 200, 0., 2000. ) );
192  hmgr->addHistoProf2( new TProfile2D("1350", "MB prof sum R z [Cables];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
193  hmgr->addHisto2( new TH2F("1351", "R vs z [Cables]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
194  hmgr->addHisto2( new TH2F("1360", "MB prof local R z [Cables];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
195  hmgr->addHisto2( new TH2F("1361", "R vs z [Cables]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
196  // Cooling
197  hmgr->addHistoProf1( new TProfile("1410", "MB prof Eta [Cooling];#eta;#lambda/#lambda_{0}", 250, -5.0, 5.0 ) );
198  hmgr->addHisto1( new TH1F("1411", "Eta [Cooling]" , 501, -5., 5. ) );
199  hmgr->addHistoProf1( new TProfile("1420", "MB prof Phi [Cooling];#varphi [rad];#lambda/#lambda_{0}", 180, -3.1416, 3.1416 ) );
200  hmgr->addHisto1( new TH1F("1421", "Phi [Cooling]" , 180, -3.1416, 3.1416 ) );
201  hmgr->addHistoProf2( new TProfile2D("1430", "MB prof Eta Phi [Cooling];#eta;#varphi;#lambda/#lambda_{0}", 250, -5., 5., 180, -3.1416, 3.1416 ) );
202  hmgr->addHisto2( new TH2F("1431", "Eta vs Phi [Cooling]" , 501, -5., 5., 180, -3.1416, 3.1416 ) );
203  hmgr->addHistoProf1( new TProfile("1440", "MB prof R [Cooling];R [mm];#lambda/#lambda_{0}", 200, 0., 2000. ) );
204  hmgr->addHisto1( new TH1F("1441", "R [Cooling]" , 200, 0., 2000. ) );
205  hmgr->addHistoProf2( new TProfile2D("1450", "MB prof sum R z [Cooling];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
206  hmgr->addHisto2( new TH2F("1451", "R vs z [Cooling]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
207  hmgr->addHisto2( new TH2F("1460", "MB prof local R z [Cooling];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
208  hmgr->addHisto2( new TH2F("1461", "R vs z [Cooling]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
209  // Electronics
210  hmgr->addHistoProf1( new TProfile("1510", "MB prof Eta [Electronics];#eta;#lambda/#lambda_{0}", 250, -5.0, 5.0 ) );
211  hmgr->addHisto1( new TH1F("1511", "Eta [Electronics]" , 501, -5., 5. ) );
212  hmgr->addHistoProf1( new TProfile("1520", "MB prof Phi [Electronics];#varphi [rad];#lambda/#lambda_{0}", 180, -3.1416, 3.1416 ) );
213  hmgr->addHisto1( new TH1F("1521", "Phi [Electronics]" , 180, -3.1416, 3.1416 ) );
214  hmgr->addHistoProf2( new TProfile2D("1530", "MB prof Eta Phi [Electronics];#eta;#varphi;#lambda/#lambda_{0}", 250, -5., 5., 180, -3.1416, 3.1416 ) );
215  hmgr->addHisto2( new TH2F("1531", "Eta vs Phi [Electronics]" , 501, -5., 5., 180, -3.1416, 3.1416 ) );
216  hmgr->addHistoProf1( new TProfile("1540", "MB prof R [Electronics];R [mm];#lambda/#lambda_{0}", 200, 0., 2000. ) );
217  hmgr->addHisto1( new TH1F("1541", "R [Electronics]" , 200, 0., 2000. ) );
218  hmgr->addHistoProf2( new TProfile2D("1550", "MB prof sum R z [Electronics];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
219  hmgr->addHisto2( new TH2F("1551", "R vs z [Electronics]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
220  hmgr->addHisto2( new TH2F("1560", "MB prof local R z [Electronics];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
221  hmgr->addHisto2( new TH2F("1561", "R vs z [Electronics]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
222  // Other
223  hmgr->addHistoProf1( new TProfile("1610", "MB prof Eta [Other];#eta;#lambda/#lambda_{0}", 250, -5.0, 5.0 ) );
224  hmgr->addHisto1( new TH1F("1611", "Eta [Other]" , 501, -5., 5. ) );
225  hmgr->addHistoProf1( new TProfile("1620", "MB prof Phi [Other];#varphi [rad];#lambda/#lambda_{0}", 180, -3.1416, 3.1416 ) );
226  hmgr->addHisto1( new TH1F("1621", "Phi [Other]" , 180, -3.1416, 3.1416 ) );
227  hmgr->addHistoProf2( new TProfile2D("1630", "MB prof Eta Phi [Other];#eta;#varphi;#lambda/#lambda_{0}", 250, -5., 5., 180, -3.1416, 3.1416 ) );
228  hmgr->addHisto2( new TH2F("1631", "Eta vs Phi [Other]" , 501, -5., 5., 180, -3.1416, 3.1416 ) );
229  hmgr->addHistoProf1( new TProfile("1640", "MB prof R [Other];R [mm];#lambda/#lambda_{0}", 200, 0., 2000. ) );
230  hmgr->addHisto1( new TH1F("1641", "R [Other]" , 200, 0., 2000. ) );
231  hmgr->addHistoProf2( new TProfile2D("1650", "MB prof sum R z [Other];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
232  hmgr->addHisto2( new TH2F("1651", "R vs z [Other]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
233  hmgr->addHisto2( new TH2F("1660", "MB prof local R z [Other];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
234  hmgr->addHisto2( new TH2F("1661", "R vs z [Other]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
235  // Air
236  hmgr->addHistoProf1( new TProfile("1710", "MB prof Eta [Air];#eta;#lambda/#lambda_{0}", 250, -5.0, 5.0 ) );
237  hmgr->addHisto1( new TH1F("1711", "Eta [Air]" , 501, -5., 5. ) );
238  hmgr->addHistoProf1( new TProfile("1720", "MB prof Phi [Air];#varphi [rad];#lambda/#lambda_{0}", 180, -3.1416, 3.1416 ) );
239  hmgr->addHisto1( new TH1F("1721", "Phi [Air]" , 180, -3.1416, 3.1416 ) );
240  hmgr->addHistoProf2( new TProfile2D("1730", "MB prof Eta Phi [Air];#eta;#varphi;#lambda/#lambda_{0}", 250, -5., 5., 180, -3.1416, 3.1416 ) );
241  hmgr->addHisto2( new TH2F("1731", "Eta vs Phi [Air]" , 501, -5., 5., 180, -3.1416, 3.1416 ) );
242  hmgr->addHistoProf1( new TProfile("1740", "MB prof R [Air];R [mm];#lambda/#lambda_{0}", 200, 0., 2000. ) );
243  hmgr->addHisto1( new TH1F("1741", "R [Air]" , 200, 0., 2000. ) );
244  hmgr->addHistoProf2( new TProfile2D("1750", "MB prof sum R z [Air];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
245  hmgr->addHisto2( new TH2F("1751", "R vs z [Air]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
246  hmgr->addHisto2( new TH2F("1760", "MB prof local R z [Air];z [mm];R [mm];x/X_{0} ", nzbin, zMin, zMax, nrbin, rMin, rMax ) );
247  hmgr->addHisto2( new TH2F("1761", "R vs z [Air]" , nzbin, zMin, zMax, nrbin, rMin, rMax ) );
248 }
249 
250 
252 {
253 
254 }
255 
256 
258 {
259 
260 }
261 
262 
264 {
265  //
266  // fill histograms and profiles only if the material has been crossed
267  //
268 
269  if( theData->getNumberOfSteps() != 0 ) {
270 
271  // Total X0
272  hmgr->getHisto1(11)->Fill(theData->getEta());
273  hmgr->getHisto1(21)->Fill(theData->getPhi());
274  hmgr->getHisto2(31)->Fill(theData->getEta(),theData->getPhi());
275 
276  hmgr->getHistoProf1(10)->Fill(theData->getEta(),theData->getTotalMB());
277  hmgr->getHistoProf1(20)->Fill(theData->getPhi(),theData->getTotalMB());
278  hmgr->getHistoProf2(30)->Fill(theData->getEta(),theData->getPhi(),theData->getTotalMB());
279 
280  // rr
281 
282  // Support
283  hmgr->getHisto1(111)->Fill(theData->getEta());
284  hmgr->getHisto1(121)->Fill(theData->getPhi());
285  hmgr->getHisto2(131)->Fill(theData->getEta(),theData->getPhi());
286 
287  hmgr->getHistoProf1(110)->Fill(theData->getEta(),theData->getSupportMB());
288  hmgr->getHistoProf1(120)->Fill(theData->getPhi(),theData->getSupportMB());
289  hmgr->getHistoProf2(130)->Fill(theData->getEta(),theData->getPhi(),theData->getSupportMB());
290 
291  // Sensitive
292  hmgr->getHisto1(211)->Fill(theData->getEta());
293  hmgr->getHisto1(221)->Fill(theData->getPhi());
294  hmgr->getHisto2(231)->Fill(theData->getEta(),theData->getPhi());
295 
296  hmgr->getHistoProf1(210)->Fill(theData->getEta(),theData->getSensitiveMB());
297  hmgr->getHistoProf1(220)->Fill(theData->getPhi(),theData->getSensitiveMB());
298  hmgr->getHistoProf2(230)->Fill(theData->getEta(),theData->getPhi(),theData->getSensitiveMB());
299 
300  // Cables
301  hmgr->getHisto1(311)->Fill(theData->getEta());
302  hmgr->getHisto1(321)->Fill(theData->getPhi());
303  hmgr->getHisto2(331)->Fill(theData->getEta(),theData->getPhi());
304 
305  hmgr->getHistoProf1(310)->Fill(theData->getEta(),theData->getCablesMB());
306  hmgr->getHistoProf1(320)->Fill(theData->getPhi(),theData->getCablesMB());
307  hmgr->getHistoProf2(330)->Fill(theData->getEta(),theData->getPhi(),theData->getCablesMB());
308 
309  // Cooling
310  hmgr->getHisto1(411)->Fill(theData->getEta());
311  hmgr->getHisto1(421)->Fill(theData->getPhi());
312  hmgr->getHisto2(431)->Fill(theData->getEta(),theData->getPhi());
313 
314  hmgr->getHistoProf1(410)->Fill(theData->getEta(),theData->getCoolingMB());
315  hmgr->getHistoProf1(420)->Fill(theData->getPhi(),theData->getCoolingMB());
316  hmgr->getHistoProf2(430)->Fill(theData->getEta(),theData->getPhi(),theData->getCoolingMB());
317 
318  // Electronics
319  hmgr->getHisto1(511)->Fill(theData->getEta());
320  hmgr->getHisto1(521)->Fill(theData->getPhi());
321  hmgr->getHisto2(531)->Fill(theData->getEta(),theData->getPhi());
322 
323  hmgr->getHistoProf1(510)->Fill(theData->getEta(),theData->getElectronicsMB());
324  hmgr->getHistoProf1(520)->Fill(theData->getPhi(),theData->getElectronicsMB());
325  hmgr->getHistoProf2(530)->Fill(theData->getEta(),theData->getPhi(),theData->getElectronicsMB());
326 
327  // Other
328  hmgr->getHisto1(611)->Fill(theData->getEta());
329  hmgr->getHisto1(621)->Fill(theData->getPhi());
330  hmgr->getHisto2(631)->Fill(theData->getEta(),theData->getPhi());
331 
332  hmgr->getHistoProf1(610)->Fill(theData->getEta(),theData->getOtherMB());
333  hmgr->getHistoProf1(620)->Fill(theData->getPhi(),theData->getOtherMB());
334  hmgr->getHistoProf2(630)->Fill(theData->getEta(),theData->getPhi(),theData->getOtherMB());
335 
336  // Air
337  hmgr->getHisto1(711)->Fill(theData->getEta());
338  hmgr->getHisto1(721)->Fill(theData->getPhi());
339  hmgr->getHisto2(731)->Fill(theData->getEta(),theData->getPhi());
340 
341  hmgr->getHistoProf1(710)->Fill(theData->getEta(),theData->getAirMB());
342  hmgr->getHistoProf1(720)->Fill(theData->getPhi(),theData->getAirMB());
343  hmgr->getHistoProf2(730)->Fill(theData->getEta(),theData->getPhi(),theData->getAirMB());
344 
345  //
346  // Compute the total x/X0 crossed at each step radius for each path
347  //
348  //
349  float theTotalMB_TOT = 0.0;
350  float theTotalMB_SUP = 0.0;
351  float theTotalMB_SEN = 0.0;
352  float theTotalMB_CAB = 0.0;
353  float theTotalMB_COL = 0.0;
354  float theTotalMB_ELE = 0.0;
355  float theTotalMB_OTH = 0.0;
356  float theTotalMB_AIR = 0.0;
357  for(int iStep = 0; iStep < theData->getNumberOfSteps(); iStep++) {
358  theTotalMB_TOT += theData->getStepDmb(iStep);
359  theTotalMB_SUP += theData->getSupportDmb(iStep);
360  theTotalMB_SEN += theData->getSensitiveDmb(iStep);
361  theTotalMB_CAB += theData->getCablesDmb(iStep);
362  theTotalMB_COL += theData->getCoolingDmb(iStep);
363  theTotalMB_ELE += theData->getElectronicsDmb(iStep);
364  theTotalMB_OTH += theData->getOtherDmb(iStep);
365  theTotalMB_AIR += theData->getAirDmb(iStep);
366 
367  int iSup = 0;
368  int iSen = 0;
369  int iCab = 0;
370  int iCol = 0;
371  int iEle = 0;
372  int iOth = 0;
373  int iAir = 0;
374  if( theData->getSupportDmb(iStep)>0. ) { iSup = 1; }
375  if( theData->getSensitiveDmb(iStep)>0. ) { iSen = 1; }
376  if( theData->getCablesDmb(iStep)>0. ) { iCab = 1; }
377  if( theData->getCoolingDmb(iStep)>0. ) { iCol = 1; }
378  if( theData->getElectronicsDmb(iStep)>0. ) { iEle = 1; }
379  if( theData->getOtherDmb(iStep)>0. ) { iOth = 1; }
380  if( theData->getAirDmb(iStep)>0. ) { iAir = 1; }
381 
382  float deltaRadius = sqrt(
383  pow( theData->getStepFinalX(iStep)-theData->getStepInitialX(iStep),2 )
384  +
385  pow( theData->getStepFinalY(iStep)-theData->getStepInitialY(iStep),2 )
386  );
387  float deltaz = theData->getStepFinalZ(iStep)-theData->getStepInitialZ(iStep) ;
388 
389  float x0 = theData->getStepMaterialX0(iStep);
390 
391  int nSubStep = 2;
392  float boxWidth = 0.1;
393  if( (deltaRadius>boxWidth) || (fabs(deltaz)>boxWidth) ) {
394  nSubStep = static_cast<int>(max(
395  ceil(deltaRadius/boxWidth/2.)*2,
396  ceil(fabs(deltaz)/boxWidth/2.)*2
397  ));
398  }
399 
400  for(int iSubStep = 1; iSubStep < nSubStep; iSubStep+=2) {
401 
402  float subdeltaRadius = deltaRadius/nSubStep;
403  float polarRadius = sqrt(
404  pow( theData->getStepInitialX(iStep),2 )
405  +
406  pow( theData->getStepInitialY(iStep),2 )
407  ) + iSubStep*subdeltaRadius;
408 
409  float subdeltaz = deltaz/nSubStep;
410  float z = theData->getStepInitialZ(iStep) + iSubStep*subdeltaz;
411 
412  float subdelta = sqrt(
413  pow ( subdeltaRadius,2 ) + pow( subdeltaz,2 )
414  );
415 
416  float fillValue=subdelta/x0;
417 
418  //
419  // Average length
420  hmgr->getHisto2(999)->Fill(z,polarRadius,subdelta);
421  // Total
422  hmgr->getHisto1(41)->Fill(polarRadius);
423  hmgr->getHistoProf1(40)->Fill(polarRadius,theTotalMB_TOT);
424  hmgr->getHisto2(51)->Fill(z,polarRadius);
425  hmgr->getHistoProf2(50)->Fill(z,polarRadius,theTotalMB_TOT);
426  hmgr->getHisto2(61)->Fill(z,polarRadius);
427  hmgr->getHisto2(60)->Fill(z,polarRadius,fillValue);
428  // Support
429  hmgr->getHisto1(141)->Fill(polarRadius);
430  hmgr->getHistoProf1(140)->Fill(polarRadius,theTotalMB_SUP);
431  hmgr->getHisto2(151)->Fill(z,polarRadius);
432  hmgr->getHistoProf2(150)->Fill(z,polarRadius,theTotalMB_SUP);
433  hmgr->getHisto2(161)->Fill(z,polarRadius);
434  hmgr->getHisto2(160)->Fill(z,polarRadius,iSup*fillValue);
435  // Sensitive
436  hmgr->getHisto1(241)->Fill(polarRadius);
437  hmgr->getHistoProf1(240)->Fill(polarRadius,theTotalMB_SEN);
438  hmgr->getHisto2(251)->Fill(z,polarRadius);
439  hmgr->getHistoProf2(250)->Fill(z,polarRadius,theTotalMB_SEN);
440  hmgr->getHisto2(261)->Fill(z,polarRadius);
441  hmgr->getHisto2(260)->Fill(z,polarRadius,iSen*fillValue);
442  // Cables
443  hmgr->getHisto1(341)->Fill(polarRadius);
444  hmgr->getHistoProf1(340)->Fill(polarRadius,theTotalMB_CAB);
445  hmgr->getHisto2(351)->Fill(z,polarRadius);
446  hmgr->getHistoProf2(350)->Fill(z,polarRadius,theTotalMB_CAB);
447  hmgr->getHisto2(361)->Fill(z,polarRadius);
448  hmgr->getHisto2(360)->Fill(z,polarRadius,iCab*fillValue);
449  // Cooling
450  hmgr->getHisto1(441)->Fill(polarRadius);
451  hmgr->getHistoProf1(440)->Fill(polarRadius,theTotalMB_COL);
452  hmgr->getHisto2(451)->Fill(z,polarRadius);
453  hmgr->getHistoProf2(450)->Fill(z,polarRadius,theTotalMB_COL);
454  hmgr->getHisto2(461)->Fill(z,polarRadius);
455  hmgr->getHisto2(460)->Fill(z,polarRadius,iCol*fillValue);
456  // Electronics
457  hmgr->getHisto1(541)->Fill(polarRadius);
458  hmgr->getHistoProf1(540)->Fill(polarRadius,theTotalMB_ELE);
459  hmgr->getHisto2(551)->Fill(z,polarRadius);
460  hmgr->getHistoProf2(550)->Fill(z,polarRadius,theTotalMB_ELE);
461  hmgr->getHisto2(561)->Fill(z,polarRadius);
462  hmgr->getHisto2(560)->Fill(z,polarRadius,iEle*fillValue);
463  // Other
464  hmgr->getHisto1(641)->Fill(polarRadius);
465  hmgr->getHistoProf1(640)->Fill(polarRadius,theTotalMB_OTH);
466  hmgr->getHisto2(651)->Fill(z,polarRadius);
467  hmgr->getHistoProf2(650)->Fill(z,polarRadius,theTotalMB_OTH);
468  hmgr->getHisto2(661)->Fill(z,polarRadius);
469  hmgr->getHisto2(660)->Fill(z,polarRadius,iOth*fillValue);
470  // Air
471  hmgr->getHisto1(741)->Fill(polarRadius);
472  hmgr->getHistoProf1(740)->Fill(polarRadius,theTotalMB_AIR);
473  hmgr->getHisto2(751)->Fill(z,polarRadius);
474  hmgr->getHistoProf2(750)->Fill(z,polarRadius,theTotalMB_AIR);
475  hmgr->getHisto2(761)->Fill(z,polarRadius);
476  hmgr->getHisto2(760)->Fill(z,polarRadius,iAir*fillValue);
477  //
478  }
479  }
480  //
481  //
483  //
484  //
485  //
486 
487 
488  // Total Lambda0
489  hmgr->getHisto1(1011)->Fill(theData->getEta());
490  hmgr->getHisto1(1021)->Fill(theData->getPhi());
491  hmgr->getHisto2(1031)->Fill(theData->getEta(),theData->getPhi());
492 
493  hmgr->getHistoProf1(1010)->Fill(theData->getEta(),theData->getTotalIL());
494  hmgr->getHistoProf1(1020)->Fill(theData->getPhi(),theData->getTotalIL());
495  hmgr->getHistoProf2(1030)->Fill(theData->getEta(),theData->getPhi(),theData->getTotalIL());
496 
497  // Support
498  hmgr->getHisto1(1111)->Fill(theData->getEta());
499  hmgr->getHisto1(1121)->Fill(theData->getPhi());
500  hmgr->getHisto2(1131)->Fill(theData->getEta(),theData->getPhi());
501 
502  hmgr->getHistoProf1(1110)->Fill(theData->getEta(),theData->getSupportIL());
503  hmgr->getHistoProf1(1120)->Fill(theData->getPhi(),theData->getSupportIL());
504  hmgr->getHistoProf2(1130)->Fill(theData->getEta(),theData->getPhi(),theData->getSupportIL());
505 
506  // Sensitive
507  hmgr->getHisto1(1211)->Fill(theData->getEta());
508  hmgr->getHisto1(1221)->Fill(theData->getPhi());
509  hmgr->getHisto2(1231)->Fill(theData->getEta(),theData->getPhi());
510 
511  hmgr->getHistoProf1(1210)->Fill(theData->getEta(),theData->getSensitiveIL());
512  hmgr->getHistoProf1(1220)->Fill(theData->getPhi(),theData->getSensitiveIL());
513  hmgr->getHistoProf2(1230)->Fill(theData->getEta(),theData->getPhi(),theData->getSensitiveIL());
514 
515  // Cables
516  hmgr->getHisto1(1311)->Fill(theData->getEta());
517  hmgr->getHisto1(1321)->Fill(theData->getPhi());
518  hmgr->getHisto2(1331)->Fill(theData->getEta(),theData->getPhi());
519 
520  hmgr->getHistoProf1(1310)->Fill(theData->getEta(),theData->getCablesIL());
521  hmgr->getHistoProf1(1320)->Fill(theData->getPhi(),theData->getCablesIL());
522  hmgr->getHistoProf2(1330)->Fill(theData->getEta(),theData->getPhi(),theData->getCablesIL());
523 
524  // Cooling
525  hmgr->getHisto1(1411)->Fill(theData->getEta());
526  hmgr->getHisto1(1421)->Fill(theData->getPhi());
527  hmgr->getHisto2(1431)->Fill(theData->getEta(),theData->getPhi());
528 
529  hmgr->getHistoProf1(1410)->Fill(theData->getEta(),theData->getCoolingIL());
530  hmgr->getHistoProf1(1420)->Fill(theData->getPhi(),theData->getCoolingIL());
531  hmgr->getHistoProf2(1430)->Fill(theData->getEta(),theData->getPhi(),theData->getCoolingIL());
532 
533  // Electronics
534  hmgr->getHisto1(1511)->Fill(theData->getEta());
535  hmgr->getHisto1(1521)->Fill(theData->getPhi());
536  hmgr->getHisto2(1531)->Fill(theData->getEta(),theData->getPhi());
537 
538  hmgr->getHistoProf1(1510)->Fill(theData->getEta(),theData->getElectronicsIL());
539  hmgr->getHistoProf1(1520)->Fill(theData->getPhi(),theData->getElectronicsIL());
540  hmgr->getHistoProf2(1530)->Fill(theData->getEta(),theData->getPhi(),theData->getElectronicsIL());
541 
542  // Other
543  hmgr->getHisto1(1611)->Fill(theData->getEta());
544  hmgr->getHisto1(1621)->Fill(theData->getPhi());
545  hmgr->getHisto2(1631)->Fill(theData->getEta(),theData->getPhi());
546 
547  hmgr->getHistoProf1(1610)->Fill(theData->getEta(),theData->getOtherIL());
548  hmgr->getHistoProf1(1620)->Fill(theData->getPhi(),theData->getOtherIL());
549  hmgr->getHistoProf2(1630)->Fill(theData->getEta(),theData->getPhi(),theData->getOtherIL());
550 
551  // Air
552  hmgr->getHisto1(1711)->Fill(theData->getEta());
553  hmgr->getHisto1(1721)->Fill(theData->getPhi());
554  hmgr->getHisto2(1731)->Fill(theData->getEta(),theData->getPhi());
555 
556  hmgr->getHistoProf1(1710)->Fill(theData->getEta(),theData->getAirIL());
557  hmgr->getHistoProf1(1720)->Fill(theData->getPhi(),theData->getAirIL());
558  hmgr->getHistoProf2(1730)->Fill(theData->getEta(),theData->getPhi(),theData->getAirIL());
559 
560  // Compute the total l/l0 crossed at each step radius for each path
561  float theTotalIL_TOT = 0.0;
562  float theTotalIL_SUP = 0.0;
563  float theTotalIL_SEN = 0.0;
564  float theTotalIL_CAB = 0.0;
565  float theTotalIL_COL = 0.0;
566  float theTotalIL_ELE = 0.0;
567  float theTotalIL_OTH = 0.0;
568  float theTotalIL_AIR = 0.0;
569  for(int iStep = 0; iStep < theData->getNumberOfSteps(); iStep++) {
570  theTotalIL_TOT += theData->getStepDil(iStep);
571  theTotalIL_SUP += theData->getSupportDil(iStep);
572  theTotalIL_SEN += theData->getSensitiveDil(iStep);
573  theTotalIL_CAB += theData->getCablesDil(iStep);
574  theTotalIL_COL += theData->getCoolingDil(iStep);
575  theTotalIL_ELE += theData->getElectronicsDil(iStep);
576  theTotalIL_OTH += theData->getOtherDil(iStep);
577  theTotalIL_AIR += theData->getAirDil(iStep);
578 
579  int iSup = 0;
580  int iSen = 0;
581  int iCab = 0;
582  int iCol = 0;
583  int iEle = 0;
584  int iOth = 0;
585  int iAir = 0;
586  if( theData->getSupportDil(iStep)>0. ) { iSup = 1; }
587  if( theData->getSensitiveDil(iStep)>0. ) { iSen = 1; }
588  if( theData->getCablesDil(iStep)>0. ) { iCab = 1; }
589  if( theData->getCoolingDil(iStep)>0. ) { iCol = 1; }
590  if( theData->getElectronicsDil(iStep)>0. ) { iEle = 1; }
591  if( theData->getOtherDil(iStep)>0. ) { iOth = 1; }
592  if( theData->getAirDil(iStep)>0. ) { iAir = 1; }
593 
594  float deltaRadius = sqrt(
595  pow( theData->getStepFinalX(iStep)-theData->getStepInitialX(iStep),2 )
596  +
597  pow( theData->getStepFinalY(iStep)-theData->getStepInitialY(iStep),2 )
598  );
599  float deltaz = theData->getStepFinalZ(iStep)-theData->getStepInitialZ(iStep) ;
600 
601  float il = theData->getStepMaterialLambda0(iStep);
602 
603  int nSubStep = 2;
604  float boxWidth = 0.1;
605  if( (deltaRadius>boxWidth) || (fabs(deltaz)>boxWidth) ) {
606  nSubStep = static_cast<int>(max(
607  ceil(deltaRadius/boxWidth/2.)*2,
608  ceil(fabs(deltaz)/boxWidth/2.)*2
609  ));
610  }
611 
612  for(int iSubStep = 1; iSubStep < nSubStep; iSubStep+=2) {
613 
614  float subdeltaRadius = deltaRadius/nSubStep;
615  float polarRadius = sqrt(
616  pow( theData->getStepInitialX(iStep),2 )
617  +
618  pow( theData->getStepInitialY(iStep),2 )
619  ) + iSubStep*subdeltaRadius;
620 
621  float subdeltaz = deltaz/nSubStep;
622  float z = theData->getStepInitialZ(iStep) + iSubStep*subdeltaz;
623 
624  float subdelta = sqrt(
625  pow ( subdeltaRadius,2 ) + pow( subdeltaz,2 )
626  );
627 
628  float fillValue=subdelta/il;
629 
630  //
631  // Average length
632  hmgr->getHisto2(1999)->Fill(z,polarRadius,subdelta);
633  // Total
634  hmgr->getHisto1(1041)->Fill(polarRadius);
635  hmgr->getHistoProf1(1040)->Fill(polarRadius,theTotalIL_TOT);
636  hmgr->getHisto2(1051)->Fill(z,polarRadius);
637  hmgr->getHistoProf2(1050)->Fill(z,polarRadius,theTotalIL_TOT);
638  hmgr->getHisto2(1061)->Fill(z,polarRadius);
639  hmgr->getHisto2(1060)->Fill(z,polarRadius,fillValue);
640  // Support
641  hmgr->getHisto1(1141)->Fill(polarRadius);
642  hmgr->getHistoProf1(1140)->Fill(polarRadius,theTotalIL_SUP);
643  hmgr->getHisto2(1151)->Fill(z,polarRadius);
644  hmgr->getHistoProf2(1150)->Fill(z,polarRadius,theTotalIL_SUP);
645  hmgr->getHisto2(1161)->Fill(z,polarRadius);
646  hmgr->getHisto2(1160)->Fill(z,polarRadius,iSup*fillValue);
647  // Sensitive
648  hmgr->getHisto1(1241)->Fill(polarRadius);
649  hmgr->getHistoProf1(1240)->Fill(polarRadius,theTotalIL_SEN);
650  hmgr->getHisto2(1251)->Fill(z,polarRadius);
651  hmgr->getHistoProf2(1250)->Fill(z,polarRadius,theTotalIL_SEN);
652  hmgr->getHisto2(1261)->Fill(z,polarRadius);
653  hmgr->getHisto2(1260)->Fill(z,polarRadius,iSen*fillValue);
654  // Cables
655  hmgr->getHisto1(1341)->Fill(polarRadius);
656  hmgr->getHistoProf1(1340)->Fill(polarRadius,theTotalIL_CAB);
657  hmgr->getHisto2(1351)->Fill(z,polarRadius);
658  hmgr->getHistoProf2(1350)->Fill(z,polarRadius,theTotalIL_CAB);
659  hmgr->getHisto2(1361)->Fill(z,polarRadius);
660  hmgr->getHisto2(1360)->Fill(z,polarRadius,iCab*fillValue);
661  // Cooling
662  hmgr->getHisto1(1441)->Fill(polarRadius);
663  hmgr->getHistoProf1(1440)->Fill(polarRadius,theTotalIL_COL);
664  hmgr->getHisto2(1451)->Fill(z,polarRadius);
665  hmgr->getHistoProf2(1450)->Fill(z,polarRadius,theTotalIL_COL);
666  hmgr->getHisto2(1461)->Fill(z,polarRadius);
667  hmgr->getHisto2(1460)->Fill(z,polarRadius,iCol*fillValue);
668  // Electronics
669  hmgr->getHisto1(1541)->Fill(polarRadius);
670  hmgr->getHistoProf1(1540)->Fill(polarRadius,theTotalIL_ELE);
671  hmgr->getHisto2(1551)->Fill(z,polarRadius);
672  hmgr->getHistoProf2(1550)->Fill(z,polarRadius,theTotalIL_ELE);
673  hmgr->getHisto2(1561)->Fill(z,polarRadius);
674  hmgr->getHisto2(1560)->Fill(z,polarRadius,iEle*fillValue);
675  // Other
676  hmgr->getHisto1(1641)->Fill(polarRadius);
677  hmgr->getHistoProf1(1640)->Fill(polarRadius,theTotalIL_OTH);
678  hmgr->getHisto2(1651)->Fill(z,polarRadius);
679  hmgr->getHistoProf2(1650)->Fill(z,polarRadius,theTotalIL_OTH);
680  hmgr->getHisto2(1661)->Fill(z,polarRadius);
681  hmgr->getHisto2(1660)->Fill(z,polarRadius,iOth*fillValue);
682  // Air
683  hmgr->getHisto1(1741)->Fill(polarRadius);
684  hmgr->getHistoProf1(1740)->Fill(polarRadius,theTotalIL_AIR);
685  hmgr->getHisto2(1751)->Fill(z,polarRadius);
686  hmgr->getHistoProf2(1750)->Fill(z,polarRadius,theTotalIL_AIR);
687  hmgr->getHisto2(1761)->Fill(z,polarRadius);
688  hmgr->getHisto2(1760)->Fill(z,polarRadius,iAir*fillValue);
689  //
690  }
691 
692  }
693 
694  // rr
695  } else {
696  edm::LogWarning("MaterialBudget")
697  << "MaterialBudgetTrackerHistos: This event is out of the acceptance:"
698  << "eta = " << theData->getEta()
699  << "\t phi = " << theData->getPhi()
700  << "\t x/X0 = " << theData->getTotalMB()
701  << "\t l/l0 = " << theData->getTotalIL()
702  << "\t steps = " << theData->getNumberOfSteps();
703  }
704 }
705 
707 {
708 
709  // Prefered method to include any instruction
710  // once all the tracks are done
711 
712  hmgr->getHisto2(60)->Divide(hmgr->getHisto2(999));
713  hmgr->getHisto2(160)->Divide(hmgr->getHisto2(999));
714  hmgr->getHisto2(260)->Divide(hmgr->getHisto2(999));
715  hmgr->getHisto2(360)->Divide(hmgr->getHisto2(999));
716  hmgr->getHisto2(460)->Divide(hmgr->getHisto2(999));
717  hmgr->getHisto2(560)->Divide(hmgr->getHisto2(999));
718  hmgr->getHisto2(660)->Divide(hmgr->getHisto2(999));
719  hmgr->getHisto2(760)->Divide(hmgr->getHisto2(999));
720 
721  hmgr->getHisto2(160)->Divide(hmgr->getHisto2(1999));
722  hmgr->getHisto2(1160)->Divide(hmgr->getHisto2(1999));
723  hmgr->getHisto2(1260)->Divide(hmgr->getHisto2(1999));
724  hmgr->getHisto2(1360)->Divide(hmgr->getHisto2(1999));
725  hmgr->getHisto2(1460)->Divide(hmgr->getHisto2(1999));
726  hmgr->getHisto2(1560)->Divide(hmgr->getHisto2(1999));
727  hmgr->getHisto2(1660)->Divide(hmgr->getHisto2(1999));
728  hmgr->getHisto2(1760)->Divide(hmgr->getHisto2(1999));
729 
730  edm::LogInfo("MaterialBudget") << "MaterialBudgetTrackerHistos: Saving Histograms to: " << theFileName;
731  hmgr->save( theFileName );
732 
733 }
std::shared_ptr< TestHistoMgr > hmgr
const T & max(const T &a, const T &b)
T sqrt(T t)
Definition: SSEVec.h:18
MaterialBudgetTrackerHistos(std::shared_ptr< MaterialBudgetData > data, std::shared_ptr< TestHistoMgr > mgr, const std::string &fileName)
double b
Definition: hdecay.h:120
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:82
double a
Definition: hdecay.h:121
long double T
std::shared_ptr< MaterialBudgetData > theData
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40