ATLAS Offline Software
InDetGlobalBCMTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
3 */
4 
15 //Local
16 #include "InDetGlobalBCMTool.h"
17 //Framework
18 #include "GaudiKernel/IInterface.h"
19 #include "GaudiKernel/StatusCode.h"
20 #include "StoreGate/ReadHandle.h"
21 //Root
22 #include "TH1F.h"
23 #include "TH2F.h"
24 
25 //Primary Vertex
27 #include "VxVertex/VxCandidate.h"
30 //Pixel and SCT stuff
32 
33 //Standard c++
34 #include <string>
35 #include <list>
36 #include <vector>
37 
38 
39 #define BCM_LVL1A 18
40 
41 //Some variables
42 static const unsigned int bcid_start = 0; //to choose the first bcid displayed
43 static const unsigned int bcids_displayed = 3570; //to choose the number of bcids displayed when bcid as x-axis
44 static const signed int ecr_start = 0; //to chose the first ECR displayed
45 static const unsigned int ecrs_displayed = 256; //to chose the number of ecrs displayed when ECR as X-axis
46 static const unsigned int bc_readout = 31; // length of read out per L1A, at the moment 31 BCs re read out
47 static const unsigned int lb_start = 0;
48 static const unsigned int lb_max = 5000;
49 
50 // the declare property can be used to make variables accessible through python
52  const std::string & type,
53  const std::string & name,
54  const IInterface* parent)
56  m_detector("ID"),
57  m_pulse_width_all{nullptr,nullptr},
58  m_hits_lvl1a{nullptr,nullptr},
59  m_hits_bcid{nullptr, nullptr},
60  m_hitdistribution{nullptr, nullptr},
61  m_pulse_position_gen{nullptr, nullptr},
62  m_pulse_width_gen{nullptr, nullptr},
63  m_strange_signals{nullptr, nullptr},
64  m_highocc(nullptr),
65  m_deltat_vs_hits{nullptr,nullptr},
66  m_deltat_aligned_vs_hits{nullptr,nullptr},
67  m_deltat_vs_bcid{nullptr,nullptr},
68  m_deltat_aligned_vs_bcid{nullptr,nullptr},
69  m_deltat_vs_lb{nullptr,nullptr},
70  m_deltat_aligned_vs_lb{nullptr,nullptr},
71  m_deltat_vs_ecr{nullptr,nullptr},
72  m_deltat_aligned_vs_ecr{nullptr,nullptr},
73  m_deltat_vs_PrVertex{nullptr,nullptr},
74  m_deltat_vs_pixhits{nullptr,nullptr},
75  m_deltat_vs_pixhitsEC{nullptr,nullptr},
76  m_deltat_vs_pixhitsBR{nullptr,nullptr},
77  m_deltat_vs_scthits{nullptr,nullptr},
78  m_deltat_vs_scthitsBR{nullptr,nullptr},
79  m_sct_vs_pix_col{nullptr,nullptr},
80  m_sct_vs_pix_bkg{nullptr,nullptr}
81 {
82  declareProperty("Detector", m_detector);
83  declareProperty("histFolder",m_histFolder= "InDetGlobal/PrimaryVertex");
84 }
85 
87 {
90 
91  return StatusCode::SUCCESS;
92 }
93 
94 //---------------------------------------------------------
96 {
97  MonGroup monGr_shift ( this, "InDetGlobal/BCM", run, ATTRIB_UNMANAGED);
98  MonGroup monGr_GlobalHistograms ( this, "InDetGlobal/BCM/GlobalHistograms", run, ATTRIB_UNMANAGED);
99  MonGroup monGr_SideHistograms ( this, "InDetGlobal/BCM/SideHistograms", run, ATTRIB_UNMANAGED);
100  MonGroup monGr_DetectorHistograms ( this, "InDetGlobal/BCM/DetectorHistograms", run, ATTRIB_UNMANAGED);
101 
102  bool status = true;
103 
104  if (newRunFlag()){
105  // Example of plot registration per new run
106  status &= registerHist(monGr_shift,m_nExamplePlot = new TH1F("m_nExample","Example plot BCM",5,0,5));
107 
108  std::string name,title,station_name,gain,pulse;
109 
110  /*************************************************************************************************************
111  * Register Monitoring Histograms
112  *************************************************************************************************************/
113 
114  name = "HitsVsLvl1AAll";
115  title = "Hits vs LVL1A All";
116  status &= registerHist(monGr_GlobalHistograms,m_hits_lvl1a_all = new TH1F(name.c_str(),title.c_str(),32,0,32));
117  m_hits_lvl1a_all->GetXaxis()->SetTitle("lvl1a [25 ns]");
118  m_hits_lvl1a_all->GetYaxis()->SetTitle("# of hits");
119 
120  name = "ChannelVsLvl1a";
121  title = "Channel vs LVL1 A";
122  status &= registerHist(monGr_GlobalHistograms,m_ChannelVsLvl1a = new TH2F(name.c_str(), title.c_str(), 64, 0, 64, 16, 0, 16));
123  m_ChannelVsLvl1a->GetXaxis()->SetTitle("LVL1 A [25 ns]");
124  m_ChannelVsLvl1a->GetYaxis()->SetTitle("Channel #");
125 
126  name = "ChannelVsBCID";
127  title = "Channel vs BCID";
128  status &= registerHist(monGr_GlobalHistograms,m_ChannelVsBCID = new TH2F(name.c_str(),title.c_str(), bcids_displayed,bcid_start, bcid_start+bcids_displayed, 16, 0,16));
129  m_ChannelVsBCID->GetXaxis()->SetTitle("BCID [25 ns]");
130  m_ChannelVsBCID->GetYaxis()->SetTitle("Channel #");
131 
132  name = "ChannelVsECR";
133  title = "Channel vs ECR";
134  status &= registerHist(monGr_GlobalHistograms,m_ChannelVsECR = new TH2F(name.c_str(), title.c_str(), 256, 0, 256, 16, 0, 16));
135  m_ChannelVsECR->GetXaxis()->SetTitle("ECR [5 s]");
136  m_ChannelVsECR->GetYaxis()->SetTitle("Channel #");
137 
138  name = "NumberOfEvents";
139  title = "Number of monitored events";
140  status &= registerHist(monGr_GlobalHistograms,m_NumberOfEvents = new TH1F(name.c_str(), title.c_str(), 3,0,3));
141  m_NumberOfEvents->GetXaxis()->SetTitle("sourceID [0=BCM, 1=LowHorizontal, 2=LowVertical]");
142  m_NumberOfEvents->GetYaxis()->SetTitle("# of events");
143 
144  name = "AbortFraction";
145  title = "Abort Fraction";
146  status &= registerHist(monGr_GlobalHistograms,m_AbortFraction = new TH1F(name.c_str(), title.c_str(), 101, 0, 101));
147  m_AbortFraction->GetXaxis()->SetTitle("Abort Fraction %");
148  m_AbortFraction->GetYaxis()->SetTitle("# of Hits");
149 
150  name = "AbortFractionROD0";
151  title = "Abort Fraction ROD0";
152  status &= registerHist(monGr_GlobalHistograms,m_AbortFractionROD0 = new TH1F(name.c_str(), title.c_str(), 101, 0, 101));
153  m_AbortFractionROD0->GetXaxis()->SetTitle("Abort Fraction %");
154  m_AbortFractionROD0->GetYaxis()->SetTitle("# of Hits");
155 
156  name = "AbortFractionROD1";
157  title = "Abort Fraction ROD1";
158  status &= registerHist(monGr_GlobalHistograms,m_AbortFractionROD1 = new TH1F(name.c_str(), title.c_str(), 101, 0, 101));
159  m_AbortFractionROD1->GetXaxis()->SetTitle("Abort Fraction %");
160  m_AbortFractionROD1->GetYaxis()->SetTitle("# of Hits");
161 
162  name = "AbortFractionVsBCID";
163  title = "Abort Fraction Vs BCID";
164  status &= registerHist(monGr_GlobalHistograms,m_AbortFractionVsBCID = new TH1F(name.c_str(), title.c_str(), 3563, 0, 3563));
165  m_AbortFractionVsBCID->GetXaxis()->SetTitle("BCID [25 ns]");
166  m_AbortFractionVsBCID->GetYaxis()->SetTitle("Abort Fraction %");
167 
168  name = "AbortFractionROD0VsBCID";
169  title = "Abort Fraction ROD0 Vs BCID";
170  status &= registerHist(monGr_GlobalHistograms,m_AbortFractionROD0VsBCID = new TH1F(name.c_str(), title.c_str(), 3563, 0, 3563));
171  m_AbortFractionROD0VsBCID->GetXaxis()->SetTitle("BCID [25 ns]");
172  m_AbortFractionROD0VsBCID->GetYaxis()->SetTitle("Abort Fraction %");
173 
174  name = "AbortFractionROD1VsBCID";
175  title = "Abort Fraction ROD1 Vs BCID";
176  status &= registerHist(monGr_GlobalHistograms,m_AbortFractionROD1VsBCID = new TH1F(name.c_str(), title.c_str(), 3563, 0, 3563));
177  m_AbortFractionROD1VsBCID->GetXaxis()->SetTitle("BCID [25 ns]");
178  m_AbortFractionROD1VsBCID->GetYaxis()->SetTitle("Abort Fraction %");
179 
180  name = "AbortFractionVsECR";
181  title = "Abort Fraction Vs ECR";
182  status &= registerHist(monGr_GlobalHistograms,m_AbortFractionVsECR = new TH1F(name.c_str(), title.c_str(), 256, 0, 256));
183  m_AbortFractionVsECR->GetXaxis()->SetTitle("ECR [5 s]");
184  m_AbortFractionVsECR->GetYaxis()->SetTitle("Abort Fraction %");
185 
186  name = "AbortFractionVsLB";
187  title = "Abort Fraction Vs LB";
188  status &= registerHist(monGr_GlobalHistograms,m_AbortFractionVsLB = new TH2F(name.c_str(), title.c_str(), lb_max, lb_start, lb_max, 100, 0, 1));
189  m_AbortFractionVsLB->GetXaxis()->SetTitle("LB");
190  m_AbortFractionVsLB->GetYaxis()->SetTitle("Abort Fraction %");
191 
192  name = "AbortFractionROD0VsECR";
193  title = "Abort Fraction ROD0 Vs ECR";
194  status &= registerHist(monGr_GlobalHistograms,m_AbortFractionROD0VsECR = new TH1F(name.c_str(), title.c_str(), 256, 0, 256));
195  m_AbortFractionROD0VsECR->GetXaxis()->SetTitle("ECR [5 s]");
196  m_AbortFractionROD0VsECR->GetYaxis()->SetTitle("Abort Fraction %");
197 
198  name = "AbortFractionROD1VsECR";
199  title = "Abort Fraction ROD1 Vs ECR";
200  status &= registerHist(monGr_GlobalHistograms,m_AbortFractionROD1VsECR = new TH1F(name.c_str(), title.c_str(), 256, 0, 256));
201  m_AbortFractionROD1VsECR->GetXaxis()->SetTitle("BCID [5 s]");
202  m_AbortFractionROD1VsECR->GetYaxis()->SetTitle("Abort Fraction %");
203 
204  name = "timewalkAll";
205  title = "timewalk All";
206  status &= registerHist(monGr_GlobalHistograms,m_timewalk_all = new TH2F(name.c_str(),title.c_str(),64, 0, 64, 32, 0, 32));
207  m_timewalk_all->GetXaxis()->SetTitle("pulse pos in time bins [25/64 ns]");
208  m_timewalk_all->GetYaxis()->SetTitle("pulse width in time bins [25/64 ns]");
209 
210  name = "NumberHighOccupancyEventsVsLB";
211  title = "Number of High Occupancy Events Vs LB";
212  status &= registerHist(monGr_GlobalHistograms, m_highocc = new TH1F(name.c_str(),title.c_str(), lb_max, lb_start, lb_max));
213  m_highocc->GetXaxis()->SetTitle("LB number");
214  m_highocc->GetYaxis()->SetTitle("Number of High Occupancy Events");
215 
216 
217  // station_nr=0 for A-side, 1 for C-side
218  // gain_value=0 if low , 1 if high
219  // pulse_nr=0 for pulse1, 1 for pulse2
220 
221  for (unsigned int gain_value=0;gain_value<2;gain_value++)
222  {
223  if (gain_value==0){gain = "Low";}
224  else gain="High";
225 
226  name = "PulsePositionAll";
227  title = "Pulse Position All";
228  status &= registerHist(monGr_GlobalHistograms,m_pulse_position_all[gain_value] = new TH1F(name.c_str(),title.c_str(),64, 0, 64));
229  m_pulse_position_all[gain_value]->GetXaxis()->SetTitle("time bins [25/64 ns]");
230  m_pulse_position_all[gain_value]->GetYaxis()->SetTitle("# of hits");
231 
232  name = "PulseWidthAll";
233  title = "Pulse Width All";
234  status &= registerHist(monGr_GlobalHistograms,m_pulse_width_all[gain_value] = new TH1F(name.c_str(),title.c_str(),32, 0, 32));
235  m_pulse_width_all[gain_value]->GetXaxis()->SetTitle("time bins [25/64 ns]");
236  m_pulse_width_all[gain_value]->GetYaxis()->SetTitle("# of hits");
237 
238  name = "HitDistribution" + gain + "Gain";
239  title = "Hits vs Channel " + gain + " Gain";
240  status &= registerHist(monGr_GlobalHistograms,m_hitdistribution[gain_value] = new TH1F(name.c_str(),title.c_str(),8,0,8));
241  m_hitdistribution[gain_value]->GetXaxis()->SetTitle("detector");
242  m_hitdistribution[gain_value]->GetYaxis()->SetTitle("# of hits");
243 
244  name = "HitsVsLvl1A" + gain + "Gain";
245  title = "Hits vs LVL1 A " + gain + " Gain";
246  status &= registerHist(monGr_GlobalHistograms,m_hits_lvl1a[gain_value] = new TH1F(name.c_str(),title.c_str(),32,0,32));
247  m_hits_lvl1a[gain_value]->GetXaxis()->SetTitle("lvl1a [25 ns]");
248  m_hits_lvl1a[gain_value]->GetYaxis()->SetTitle("# of hits");
249 
250  name = "HitsVsBCID" + gain + "Gain";
251  title = "Hits vs BCID " + gain + " Gain";
252  status &= registerHist(monGr_GlobalHistograms,m_hits_bcid[gain_value] = new TH1F(name.c_str(),title.c_str(), bcids_displayed, bcid_start, bcid_start+bcids_displayed));
253  m_hits_bcid[gain_value]->GetXaxis()->SetTitle("BCID [25 ns]");
254  m_hits_bcid[gain_value]->GetYaxis()->SetTitle("# of hits");\
255 
256  name = "StrangeSignals" + gain + "Gain";
257  title = "Strange Signals " + gain + " Gain";
258  status &= registerHist(monGr_GlobalHistograms,m_strange_signals[gain_value] = new TH1F(name.c_str(),title.c_str(),16,0,16));
259  m_strange_signals[gain_value]->GetXaxis()->SetTitle("Channel");
260  m_strange_signals[gain_value]->GetYaxis()->SetTitle("# of hits");
261 
262  name = "PulsePosition" + gain + "Gain";
263  title = "Pulse Position " + gain + " Gain";
264  status &= registerHist(monGr_GlobalHistograms,m_pulse_position_gen[gain_value] = new TH1F(name.c_str(),title.c_str(),64, 0, 64));
265  m_pulse_position_gen[gain_value]->GetXaxis()->SetTitle("time bins [25/64 ns]");
266  m_pulse_position_gen[gain_value]->GetYaxis()->SetTitle("# of hits");
267 
268  name = "PulseWidth" + gain + "Gain";
269  title = "Pulse Width " + gain + " Gain";
270  status &= registerHist(monGr_GlobalHistograms,m_pulse_width_gen[gain_value] = new TH1F(name.c_str(),title.c_str(),32, 0, 32));
271  m_pulse_width_gen[gain_value]->GetXaxis()->SetTitle("time bins [25/64 ns]");
272  m_pulse_width_gen[gain_value]->GetYaxis()->SetTitle("# of hits");
273 
274  name = "Deltat" + gain + "Gain";
275  title = "#Delta t " + gain + " Gain";
276  status &= registerHist(monGr_GlobalHistograms, m_deltat_vs_hits[gain_value] = new TH1F(name.c_str(),title.c_str(),50,-25,25));
277  m_deltat_vs_hits[gain_value]->GetXaxis()->SetTitle("#Delta t [ns]");
278  m_deltat_vs_hits[gain_value]->GetYaxis()->SetTitle("# of hits");
279 
280  name = "DeltatAligned" + gain + "Gain";
281  title = "#Delta t Aligned " + gain + " Gain";
282  status &= registerHist(monGr_GlobalHistograms, m_deltat_aligned_vs_hits[gain_value] = new TH1F(name.c_str(),title.c_str(),50,-25,25));
283  m_deltat_aligned_vs_hits[gain_value]->GetXaxis()->SetTitle("#Delta t [ns]");
284  m_deltat_aligned_vs_hits[gain_value]->GetYaxis()->SetTitle("# of hits");
285 
286  name = "DeltatVsBCID" + gain + "Gain";
287  title = "#Delta t vs BCID " + gain + " Gain";
288  status &= registerHist(monGr_GlobalHistograms, m_deltat_vs_bcid[gain_value] = new TH2F(name.c_str(),title.c_str(), bcids_displayed,bcid_start, bcid_start+bcids_displayed,50,-25,25));
289  m_deltat_vs_bcid[gain_value]->GetXaxis()->SetTitle("BCID [25 ns]");
290  m_deltat_vs_bcid[gain_value]->GetYaxis()->SetTitle("#Delta t [ns]");
291 
292  name = "DeltatAlignedVsBCID" + gain + "Gain";
293  title = "#Delta t Aligned vs BCID " + gain + " Gain";
294  status &= registerHist(monGr_GlobalHistograms, m_deltat_aligned_vs_bcid[gain_value] = new TH2F(name.c_str(),title.c_str(), bcids_displayed,bcid_start, bcid_start+bcids_displayed,50,-25,25));
295  m_deltat_aligned_vs_bcid[gain_value]->GetXaxis()->SetTitle("BCID [25 ns]");
296  m_deltat_aligned_vs_bcid[gain_value]->GetYaxis()->SetTitle("#Delta t [ns]");
297 
298  name = "DeltatVsLB" + gain + "Gain";
299  title = "#Delta t vs LB " + gain + " Gain";
300  status &= registerHist(monGr_GlobalHistograms, m_deltat_vs_lb[gain_value] = new TH2F(name.c_str(),title.c_str(), lb_max, lb_start, lb_max, 50,-25,25));
301  m_deltat_vs_lb[gain_value]->GetXaxis()->SetTitle("LB number");
302  m_deltat_vs_lb[gain_value]->GetYaxis()->SetTitle("#Delta t [ns]");
303 
304  name = "DeltatAlignedVsLB" + gain + "Gain";
305  title = "#Delta t Aligned vs LB " + gain + " Gain";
306  status &= registerHist(monGr_GlobalHistograms, m_deltat_aligned_vs_lb[gain_value] = new TH2F(name.c_str(),title.c_str(), lb_max, lb_start, lb_max, 50,-25,25));
307  m_deltat_aligned_vs_lb[gain_value]->GetXaxis()->SetTitle("LB number");
308  m_deltat_aligned_vs_lb[gain_value]->GetYaxis()->SetTitle("#Delta t [ns]");
309 
310  name = "DeltatVsECR" + gain + "Gain";
311  title = "#Delta t vs ECR " + gain + " Gain";
312  status &= registerHist(monGr_GlobalHistograms, m_deltat_vs_ecr[gain_value] = new TH2F(name.c_str(),title.c_str(), ecrs_displayed,ecr_start, ecr_start+ecrs_displayed,50,-25,25));
313  m_deltat_vs_ecr[gain_value]->GetXaxis()->SetTitle("ECR");
314  m_deltat_vs_ecr[gain_value]->GetYaxis()->SetTitle("#Delta t [ns]");
315 
316  name = "DeltatAlignedVsECR" + gain + "Gain";
317  title = "#Delta t Aligned vs ECR " + gain + " Gain";
318  status &= registerHist(monGr_GlobalHistograms, m_deltat_aligned_vs_ecr[gain_value] = new TH2F(name.c_str(),title.c_str(), ecrs_displayed,ecr_start, ecr_start+ecrs_displayed,50,-25,25));
319  m_deltat_aligned_vs_ecr[gain_value]->GetXaxis()->SetTitle("ECR");
320  m_deltat_aligned_vs_ecr[gain_value]->GetYaxis()->SetTitle("#Delta t [ns]");
321 
322  name = "DeltatVsPrVertex" + gain + "Gain";
323  title = "#Delta t vs Primary Vertex " + gain + " Gain";
324  status &= registerHist(monGr_GlobalHistograms, m_deltat_vs_PrVertex[gain_value] = new TH2F(name.c_str(),title.c_str(),100,-200,200,50,-25,25));
325  m_deltat_vs_PrVertex[gain_value]->GetXaxis()->SetTitle("Primary Vertex z position [mm] ");
326  m_deltat_vs_PrVertex[gain_value]->GetYaxis()->SetTitle("#Delta t [ns]");
327 
328  name = "DeltatVsPixelHits" + gain + "Gain";
329  title = "#Delta t vs NumberPixelHits " + gain + " Gain";
330  status &= registerHist(monGr_GlobalHistograms, m_deltat_vs_pixhits[gain_value] = new TH2F(name.c_str(),title.c_str(), 100, 0, 10000, 50,-25,25));
331  m_deltat_vs_pixhits[gain_value]->GetXaxis()->SetTitle("Number Pixel Hits");
332  m_deltat_vs_pixhits[gain_value]->GetYaxis()->SetTitle("#Delta t [ns]");
333 
334  name = "DeltatVsPixelHitsBR" + gain + "Gain";
335  title = "#Delta t vs NumberPixelHits in Barrel " + gain + " Gain";
336  status &= registerHist(monGr_GlobalHistograms, m_deltat_vs_pixhitsBR[gain_value] = new TH2F(name.c_str(),title.c_str(), 100, 0, 10000, 50,-25,25));
337  m_deltat_vs_pixhitsBR[gain_value]->GetXaxis()->SetTitle("Number Barrel Pixel Hits");
338  m_deltat_vs_pixhitsBR[gain_value]->GetYaxis()->SetTitle("#Delta t [ns]");
339 
340  name = "DeltatVsPixelHitsEC" + gain + "Gain";
341  title = "#Delta t vs NumberPixelHits in Endcap " + gain + " Gain";
342  status &= registerHist(monGr_GlobalHistograms, m_deltat_vs_pixhitsEC[gain_value] = new TH2F(name.c_str(),title.c_str(), 100, 0, 10000, 50,-25,25));
343  m_deltat_vs_pixhitsEC[gain_value]->GetXaxis()->SetTitle("Number Endcap Pixel Hits");
344  m_deltat_vs_pixhitsEC[gain_value]->GetYaxis()->SetTitle("#Delta t [ns]");
345 
346  name = "DeltatVsSctHits" + gain + "Gain";
347  title = "#Delta t vs NumberSctHits " + gain + " Gain";
348  status &= registerHist(monGr_GlobalHistograms, m_deltat_vs_scthits[gain_value] = new TH2F(name.c_str(),title.c_str(), 100, 0, 20000, 50,-25,25));
349  m_deltat_vs_scthits[gain_value]->GetXaxis()->SetTitle("Number Sct Hits");
350  m_deltat_vs_scthits[gain_value]->GetYaxis()->SetTitle("#Delta t [ns]");
351 
352  name = "DeltatVsSctHitsBR" + gain + "Gain";
353  title = "#Delta t vs NumberSctHits in Barrel " + gain + " Gain";
354  status &= registerHist(monGr_GlobalHistograms, m_deltat_vs_scthitsBR[gain_value] = new TH2F(name.c_str(),title.c_str(), 100, 0, 20000, 50,-25,25));
355  m_deltat_vs_scthitsBR[gain_value]->GetXaxis()->SetTitle("Number Barrel Sct Hits");
356  m_deltat_vs_scthitsBR[gain_value]->GetYaxis()->SetTitle("#Delta t [ns]");
357 
358  name = "DeltatVsSctHitsEC" + gain + "Gain";
359  title = "#Delta t vs NumberSctHits in Endcap " + gain + " Gain";
360  status &= registerHist(monGr_GlobalHistograms, m_deltat_vs_scthitsEC[gain_value] = new TH2F(name.c_str(),title.c_str(), 100, 0, 20000, 50,-25,25));
361  m_deltat_vs_scthitsEC[gain_value]->GetXaxis()->SetTitle("Number Endcap Sct Hits");
362  m_deltat_vs_scthitsEC[gain_value]->GetYaxis()->SetTitle("#Delta t [ns]");
363 
364  name = "SctVsPixHitsCol" + gain + "Gain";
365  title = "#NumberSctHits vs NumberPixHits w/ Collison delta t " + gain + " Gain";
366  status &= registerHist(monGr_GlobalHistograms, m_sct_vs_pix_col[gain_value] = new TH2F(name.c_str(),title.c_str(), 100, 0, 20000, 100, 0, 10000));
367  m_sct_vs_pix_col[gain_value]->GetXaxis()->SetTitle("Number Pixel Hits");
368  m_sct_vs_pix_col[gain_value]->GetYaxis()->SetTitle("Number Sct Hits");
369 
370  name = "SctVsPixHitsBkg" + gain + "Gain";
371  title = "#NumberSctHits vs NumberPixHits w/ Background delta t " + gain + " Gain";
372  status &= registerHist(monGr_GlobalHistograms, m_sct_vs_pix_bkg[gain_value] = new TH2F(name.c_str(),title.c_str(), 100, 0, 20000, 100, 0, 10000));
373  m_sct_vs_pix_bkg[gain_value]->GetXaxis()->SetTitle("Number Pixel Hits");
374  m_sct_vs_pix_bkg[gain_value]->GetYaxis()->SetTitle("Number Sct Hits");
375 
376  for (unsigned int pulse_nr=0;pulse_nr<2;pulse_nr++) {
377 
378  if (pulse_nr==0){pulse = "1";}
379  else pulse="2";
380 
381  name="Pulse"+pulse+"Width"+gain+"Gain";
382  title="Pulse"+ pulse +"Width" + gain + "Gain";
383  status &= registerHist(monGr_GlobalHistograms, m_pulse_width[gain_value][pulse_nr] = new TH1F(name.c_str(),title.c_str(),32,0,32));
384  m_pulse_width[gain_value][pulse_nr]->GetXaxis()->SetTitle("time bins [25/32 ns]");
385  m_pulse_width[gain_value][pulse_nr]->GetYaxis()->SetTitle("# of hits");
386 
387  name= "Pulse"+pulse+"Position"+ gain+"Gain";
388  title = "Pulse " + pulse + " Position " + gain + " Gain";
389  status &= registerHist(monGr_GlobalHistograms, m_pulse_position[gain_value][pulse_nr] = new TH1F(name.c_str(),title.c_str(),64,0,64));
390  m_pulse_position[gain_value][pulse_nr]->GetXaxis()->SetTitle("time bins [25/64 ns]");
391  m_pulse_position[gain_value][pulse_nr]->GetYaxis()->SetTitle("# of hits");
392 
393  name = "HitDistributionPulse"+pulse+gain+"Gain";
394  title = "Hitdistribution Pulse " + pulse + " " + gain + " Gain";
395  status &= registerHist(monGr_GlobalHistograms, m_hitdistribution_pulse[gain_value][pulse_nr] = new TH1F(name.c_str(),title.c_str(),8,0,8));
396  m_hitdistribution_pulse[gain_value][pulse_nr]->GetXaxis()->SetTitle("detector");
397  m_hitdistribution_pulse[gain_value][pulse_nr]->GetYaxis()->SetTitle("# of hits");
398 
399  }//end of pulse loop
400  }//end of gain loop
401 
402  /**************************
403  * Register Side Histograms
404  ***************************/
405 
406  for(unsigned int station_nr=0;station_nr<2;station_nr++)
407  {
408  if (station_nr==0) station_name="A-side";
409  else station_name="C-side";
410 
411  for (unsigned int gain_value=0;gain_value<2;gain_value++)
412  {
413  if (gain_value==0){gain="Low";}
414  else gain="High";
415 
416  name="HitsVsLvl1A"+station_name+"Gain_gain";
417  title = "" + station_name + " Hits vs LVL1 A " + gain + " Gain";
418  status &= registerHist(monGr_SideHistograms,m_stat_lvl1a[station_nr][gain_value] = new TH1F(name.c_str(),title.c_str(),32,0,32));
419  m_stat_lvl1a[station_nr][gain_value]->GetXaxis()->SetTitle("lvl1a [25 ns]");
420  m_stat_lvl1a[station_nr][gain_value]->GetYaxis()->SetTitle("# of hits");
421 
422  name="PulsePosition"+station_name+"Gain_"+gain;
423  title = "" + station_name + " Pulse Position " + gain + " Gain";
424  status &= registerHist(monGr_SideHistograms, m_stat_pulse_position_gen[station_nr][gain_value] = new TH1F(name.c_str(),title.c_str(),64,0,64));
425  m_stat_pulse_position_gen[station_nr][gain_value]->GetXaxis()->SetTitle("time bins [25/64 ns]");
426  m_stat_pulse_position_gen[station_nr][gain_value]->GetYaxis()->SetTitle("# of hits");
427 
428  name="PulseWidth"+station_name+"Gain_"+gain;
429  title = "" + station_name + " Pulse Width " + gain + " Gain";
430  status &= registerHist(monGr_SideHistograms,m_stat_pulse_width_gen[station_nr][gain_value] = new TH1F(name.c_str(),title.c_str(),32,0,32));
431  m_stat_pulse_width_gen[station_nr][gain_value]->GetXaxis()->SetTitle("time bins [25/32 ns]");
432  m_stat_pulse_width_gen[station_nr][gain_value]->GetYaxis()->SetTitle("# of hits");
433 
434  for (unsigned int pulse_nr=0; pulse_nr<2;pulse_nr++)
435  {
436  if (pulse_nr==0){pulse="1";}
437  else pulse="2";
438 
439  name="Pulse"+station_name+"Position"+pulse+"Gain_"+gain;
440  title=station_name+" Pulse "+pulse+" Position "+gain+" Gain";
441  status &= registerHist(monGr_SideHistograms, m_stat_pulse_position[station_nr][gain_value][pulse_nr] = new TH1F(name.c_str(),title.c_str(),64,0,64));
442  m_stat_pulse_position[station_nr][gain_value][pulse_nr]->GetXaxis()->SetTitle("time bins [25/64 ns]");
443  m_stat_pulse_position[station_nr][gain_value][pulse_nr]->GetYaxis()->SetTitle("# of hits");
444 
445  name="Pulse"+station_name+"Width"+pulse+"Gain_"+gain;
446  title=station_name+" Pulse "+pulse+" Width "+gain+" Gain";
447  status &= registerHist(monGr_SideHistograms,m_stat_pulse_width[station_nr][gain_value][pulse_nr] = new TH1F(name.c_str(),title.c_str(),32,0,32));
448  m_stat_pulse_width[station_nr][gain_value][pulse_nr]->GetXaxis()->SetTitle("time bins [25/32 ns]");
449  m_stat_pulse_width[station_nr][gain_value][pulse_nr]->GetYaxis()->SetTitle("# of hits");
450 
451  }//end of pulse_nr loop
452  }//end of gain loop
453  }//end of side loop
454 
455  /*************************
456  * Register Detector Histograms
457  *************************/
458  std::string detector_name;
459 
460  for (unsigned int detector=0;detector<8;detector++) {
461 
462  if (detector<4) station_name="A-side";
463  else station_name="C-side";
464 
465  switch(detector) {
466  case 0:
467  detector_name="+X";
468  break;
469  case 1:
470  detector_name="+Y";
471  break;
472  case 2:
473  detector_name="-X";
474  break;
475  case 3:
476  detector_name="-Y";
477  break;
478  case 4:
479  detector_name="+X";
480  break;
481  case 5:
482  detector_name="+Y";
483  break;
484  case 6:
485  detector_name="-X";
486  break;
487  case 7:
488  detector_name="-Y";
489  break;
490  }
491 
492  for (unsigned int gain_value=0;gain_value<2;gain_value++)
493  {
494  if (gain_value==0){gain="Low";}
495  else gain="High";
496 
497  name="HitsVsLvl1A"+station_name+"Gain_"+detector_name+gain;
498  title= station_name+ " "+ detector_name +" Hits vs LVL1 A "+ gain +" Gain";
499  status &= registerHist(monGr_DetectorHistograms,m_det_lvl1a[detector][gain_value] = new TH1F(name.c_str(),title.c_str(),32,0,32));
500  m_det_lvl1a[detector][gain_value]->GetXaxis()->SetTitle("lvl1a [25 ns]");
501  m_det_lvl1a[detector][gain_value]->GetYaxis()->SetTitle("# of hits");
502 
503  name="PulsePosition"+station_name+"Gain_"+detector_name+gain;
504  title=station_name+" "+detector_name+" Pulse Position "+gain +" Gain";
505  status &= registerHist(monGr_DetectorHistograms, m_det_pulse_position_gen[detector][gain_value] = new TH1F(name.c_str(),title.c_str(),64,0,64));
506  m_det_pulse_position_gen[detector][gain_value]->GetXaxis()->SetTitle("time bins [25/64 ns]");
507  m_det_pulse_position_gen[detector][gain_value]->GetYaxis()->SetTitle("# of hits");
508 
509  name="PulseWidth"+station_name+"Gain_"+detector_name+gain;
510  title=station_name+" "+detector_name+" Pulse Width "+gain+" Gain";
511  status &= registerHist(monGr_DetectorHistograms,m_det_pulse_width_gen[detector][gain_value] = new TH1F(name.c_str(),title.c_str(),32,0,32));
512  m_det_pulse_width_gen[detector][gain_value]->GetXaxis()->SetTitle("time bins [25/32 ns]");
513  m_det_pulse_width_gen[detector][gain_value]->GetYaxis()->SetTitle("# of hits");
514 
515  name="timewalk"+station_name+"_"+detector_name+gain;
516  title=station_name+" "+detector_name+" timewalk "+ gain +" Gain";
517  status &= registerHist(monGr_GlobalHistograms,m_det_timewalk[detector][gain_value] = new TH2F(name.c_str(),title.c_str(),64, 0, 64, 32, 0, 32));
518  m_det_timewalk[detector][gain_value]->GetXaxis()->SetTitle("pulse pos in time bins [25/64 ns]");
519  m_det_timewalk[detector][gain_value]->GetYaxis()->SetTitle("pulse width in time bins [25/64 ns]");
520 
521  for (unsigned int pulse_nr=0;pulse_nr<2;pulse_nr++) {
522  if (pulse_nr==0){pulse="1";}
523  else pulse="2";
524 
525  name="Pulse"+station_name+"Position"+detector_name+"Gain_"+pulse+gain;
526  title=station_name+" "+ detector_name +" Pulse "+pulse+" Position "+ gain +" Gain";
527  status &= registerHist(monGr_DetectorHistograms, m_det_pulse_position[detector][gain_value][pulse_nr] = new TH1F(name.c_str(),title.c_str(),64,0,64));
528  m_det_pulse_position[detector][gain_value][pulse_nr]->GetXaxis()->SetTitle("time bins [25/64 ns]");
529  m_det_pulse_position[detector][gain_value][pulse_nr]->GetYaxis()->SetTitle("# of hits");
530 
531  name="Pulse"+station_name+"Width"+detector_name+"Gain_"+pulse+gain;
532  title=station_name + " " + detector_name + " Pulse " + pulse + " Width " + gain + " Gain";
533  status &= registerHist(monGr_DetectorHistograms,m_det_pulse_width[detector][gain_value][pulse_nr] = new TH1F(name.c_str(),title.c_str(),32,0,33));
534  m_det_pulse_width[detector][gain_value][pulse_nr]->GetXaxis()->SetTitle("time bins [25/32 ns]");
535  m_det_pulse_width[detector][gain_value][pulse_nr]->GetYaxis()->SetTitle("# of hits");
536  }//end of pulse loop
537  }//end of gain loop
538  }//end of detector loop
539  }
540 
541  if (status) return StatusCode::SUCCESS;
542  else return StatusCode::FAILURE;
543 }
544 
545 //---------------------------------------------------------
546 /***************************************************************************
547  * At first a method to fill the global and the pulse 1 and 2 histos
548  **************************************************************************/
549 void FillGlobalHistos(TH2F* h1, TH2F* h2, TH2F* h3, TH1F* h4, TH1F* h5, int pulsewid, int channel, int bcid, int ecr, int lvl1a){
550  if (pulsewid!=0){
551  h1->Fill(lvl1a, channel);
552  h2->Fill(bcid, channel);
553  h3->Fill(ecr, channel);
554  h4->Fill(lvl1a);
555  h5->Fill(bcid);
556  }
557 }
558 
559 void FillPulseHistos(TH1F* h1, TH1F* h2, TH1F* h3, TH1F* h4, int pulsepos, int pulsewid, int tmp = 0, TH1F* h5 = nullptr){
560  if (pulsewid!=0){
561  h1->Fill(pulsepos);
562  h2->Fill(pulsewid);
563  h3->Fill(pulsepos);
564  h4->Fill(pulsewid);
565  if (h5 != nullptr){
566  h5->Fill(tmp);
567  }
568  }
569 }
570 /****************************************************************************
571  * Some methods one needs for the calculation of Delta t
572  ***************************************************************************/
574  bcid(0),
575  ecr(0),
576  position(0),
577  detector(0),
578  lvl1a(0)
579 {
580 }
581 
583  return (bcid<data.bcid);
584 }
585 
587  return (data.bcid <data.bcid_max);
588 }
589 
591 
592  //Filling of histograms (loop over collections) :
593 
594  if (m_detector == "sct") { m_nExampleInt = 2; }
595  else if (m_detector == "trt") { m_nExampleInt = 3; }
596  else if (m_detector == "pixel"){m_nExampleInt = 1; }
597  else if (m_detector == "ID" ) { m_nExampleInt = 4; }
598  else { m_nExampleInt = 0; }
599 
601 
602  //retrieve LB number for plots vs LB
603  SG::ReadHandle<xAOD::EventInfo> evtInfo(m_eventInfoKey,Gaudi::Hive::currentContext());
604  if (!evtInfo.isValid()) {
605  m_current_LB = 0;
606  if ( msgLvl(MSG::WARNING) ){
607  msg(MSG::WARNING) << "Could not retrieve the event information container" << endmsg;
608  }
609  } else {
610  m_current_LB = evtInfo->lumiBlock();
611  }
612 
613  //lists for calculation of deltat
614  std::vector<std::list<deltat_data> > positions_A(2);
615  std::vector<std::list<deltat_data> > positions_C(2);
616 
617  //double z to store Primary Vertex z position
618  double z = 1001; //that it can not mix with data if primary vertex calculation fails, z_max = 1000
619 
620  // Primary vertex monitoring
622  if (evtStore()->contains<VxContainer>(m_vxContainerName.key())) {
623  if (!vxContainer.isValid()) {
624  ATH_MSG_DEBUG ("Could not retrieve primary vertex container with key "+m_vxContainerName.key());
625  return StatusCode::SUCCESS;
626  } else {
627 
628 
629  if (vxContainer->size() == 1) {
630  if ( msgLvl(MSG::DEBUG ) ) {
631  msg(MSG::DEBUG) << "vxContainer size = 1 ->contains only dummy vertex" << endmsg;
632  }
633  }
634  else{
635  for (VxContainer::const_iterator vxIter = vxContainer->begin(); vxIter != vxContainer->end(); ++vxIter)
636  {
637 
638  // Select primary vertex
639  if ((*vxIter)->vertexType() != Trk::PriVtx) continue;
640  z = (*vxIter)->recVertex().position().z();
641  }
642  }
643  }
644  } else {
645  ATH_MSG_DEBUG ("StoreGate doesn't contain primary vertex container with key "+m_vxContainerName.key());
646  }
647 
648 
649  if ( m_BCM_RDO != nullptr && !m_BCM_RDO->empty() ){
651  BCM_RDO_Container::const_iterator BCM_RDO_itr_end = m_BCM_RDO->end();
652 
653  bool ROD0 = true; //bools for m_NumberOfEvents histo
654  bool ROD1 = true;
655 
656 
657 
658  int nROD0HitLG[bc_readout] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
659  int nROD0HitHG[bc_readout] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
660  int nROD1HitLG[bc_readout] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
661  int nROD1HitHG[bc_readout] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
662  int nROD0BCID[bc_readout] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
663  int nROD1BCID[bc_readout] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
664 
665  unsigned int ecr = -1;
666  int ROD = -1;
667 
668  int BC_counter = -1;
669  int channel_counter = -1;
670 
671  for (; BCM_RDO_itr != BCM_RDO_itr_end; ++BCM_RDO_itr) { // loops over 16 channels (HR counter 0 to 15)
672  channel_counter++;
673  if ( !(*BCM_RDO_itr)->empty()) {
674  BCM_RDO_Collection::const_iterator RDO_element = (*BCM_RDO_itr)->begin();
675  BCM_RDO_Collection::const_iterator RDO_element_last = (*BCM_RDO_itr)->end();
676  BC_counter = -1;
677 
678  for (; RDO_element != RDO_element_last; ++RDO_element){ // loops over 31 BCs read out per L1A
679  ++BC_counter;
680  if (*RDO_element == nullptr)
681  {
682  ATH_MSG_WARNING ("NULL pointer!");
683  continue;
684  }
685 
686  int bcm_lvl1a = (*RDO_element)->getLVL1A();
687  int bcm_channel = (*RDO_element)->getChannel();
688  int bcm_bcid = (*RDO_element)->getBCID();
689  int bcm_pulse1position = (*RDO_element)->getPulse1Position();
690  int bcm_pulse1width = (*RDO_element)->getPulse1Width();
691  int bcm_pulse2position = (*RDO_element)->getPulse2Position();
692  int bcm_pulse2width = (*RDO_element)->getPulse2Width();
693 
694 
695 
696 
697  /*********************************
698  *Filling Abort Fraction arrays
699  **********************************/
700 
701  if (channel_counter == 0 || channel_counter == 2 || channel_counter == 4 || channel_counter == 6 || channel_counter == 9 || channel_counter == 11 || channel_counter == 13 || channel_counter == 15) ROD = 0;
702  else ROD = 1;
703  if (bcm_pulse1width>0 || bcm_pulse2width>0){
704  if (ROD == 0 && channel_counter < 8 && nROD0HitLG[BC_counter]<3) nROD0HitLG[BC_counter]++;
705  if (ROD == 1 && channel_counter < 8 && nROD1HitLG[BC_counter]<3) nROD1HitLG[BC_counter]++;
706  if (ROD == 0) nROD0BCID[BC_counter] = bcm_bcid;
707  if (ROD == 0 && channel_counter > 7 && nROD0HitHG[BC_counter]<3) nROD0HitHG[BC_counter]++;
708  if (ROD == 1 && channel_counter > 7 && nROD1HitHG[BC_counter]<3) nROD1HitHG[BC_counter]++;
709  if (ROD == 1) nROD1BCID[BC_counter] = bcm_bcid;
710  }
711 
712  /*********************************
713  *Filling NumberOfEvent histograms
714  *********************************/
715  if (ROD0 && (bcm_channel == 0 || bcm_channel == 2 || bcm_channel == 4 || bcm_channel == 6 || bcm_channel == 9 || bcm_channel == 11 || bcm_channel == 13 || bcm_channel == 15)){
716  m_NumberOfEvents->Fill(1.5);
717  m_NumberOfEvents->Fill(0.5);
718  ROD0 = false; // FIXME seems to be a bug: first loop is over channel, so alternating RODs, bit bool ROD0 (and ROD1) is being set to false after filling first time! as well filled, if all BC was empty!
719  }
720  if (ROD1 && (bcm_channel == 1 || bcm_channel == 3 || bcm_channel == 5 || bcm_channel == 7 || bcm_channel == 8 || bcm_channel == 10 || bcm_channel == 12 || bcm_channel == 14)){
721  m_NumberOfEvents->Fill(2.5);
722  m_NumberOfEvents->Fill(0.5);
723  ROD1 = false;
724  }
725 
726  if ( bcm_pulse1width !=0 || bcm_pulse2width !=0){
727 
728  // strange signals: You see something where there should be nothing, because the pulse widths are zero. // FIXME condition never fulfillable
729  if (( bcm_pulse1width == 0 && bcm_pulse2width == 0) && (bcm_pulse1position !=0 || bcm_pulse2position !=0)){
730  if (bcm_channel < 8) m_strange_signals[0]->Fill(bcm_channel);
731  if (bcm_channel > 7) m_strange_signals[1]->Fill(bcm_channel);
732  }
733 
734  //Event information to get ECR
735  ecr = evtInfo.isValid() ? (evtInfo->extendedLevel1ID() & 0xff000000) >> 24 : 0;
736 
737  /******************************************************************************************
738  *Global Histograms
739  ******************************************************************************************/
740 
741  if ( bcm_channel < 8 ){
742  if (bcm_pulse1width != 0) m_hitdistribution[0]->Fill(bcm_channel);
743  if (bcm_pulse2width != 0) m_hitdistribution[0]->Fill(bcm_channel);
744  FillGlobalHistos(m_ChannelVsLvl1a, m_ChannelVsBCID, m_ChannelVsECR, m_hits_lvl1a[0], m_hits_bcid[0], bcm_pulse1width, bcm_channel, bcm_bcid, ecr, bcm_lvl1a);
745  FillGlobalHistos(m_ChannelVsLvl1a, m_ChannelVsBCID, m_ChannelVsECR, m_hits_lvl1a[0], m_hits_bcid[0], bcm_pulse2width, bcm_channel, bcm_bcid, ecr, bcm_lvl1a);
746  FillPulseHistos(m_pulse_position_gen[0], m_pulse_width_gen[0], m_pulse_position[0][0], m_pulse_width[0][0], bcm_pulse1position, bcm_pulse1width, bcm_channel, m_hitdistribution_pulse[0][0]);
747  FillPulseHistos(m_pulse_position_gen[0], m_pulse_width_gen[0], m_pulse_position[0][1], m_pulse_width[0][1], bcm_pulse2position, bcm_pulse2width, bcm_channel, m_hitdistribution_pulse[0][1]);
748  }
749  if (bcm_channel > 7){
750  if (bcm_pulse1width != 0) m_hitdistribution[1]->Fill(bcm_channel-8);
751  if (bcm_pulse2width != 0) m_hitdistribution[1]->Fill(bcm_channel-8);
752  FillGlobalHistos(m_ChannelVsLvl1a, m_ChannelVsBCID, m_ChannelVsECR, m_hits_lvl1a[1], m_hits_bcid[1], bcm_pulse1width, bcm_channel, bcm_bcid, ecr, bcm_lvl1a);
753  FillGlobalHistos(m_ChannelVsLvl1a, m_ChannelVsBCID, m_ChannelVsECR, m_hits_lvl1a[1], m_hits_bcid[1], bcm_pulse2width, bcm_channel, bcm_bcid, ecr, bcm_lvl1a);
754  FillPulseHistos(m_pulse_position_gen[1], m_pulse_width_gen[1], m_pulse_position[1][0], m_pulse_width[1][0], bcm_pulse1position, bcm_pulse1width, bcm_channel-8, m_hitdistribution_pulse[1][0]);
755  FillPulseHistos(m_pulse_position_gen[1], m_pulse_width_gen[1], m_pulse_position[1][1], m_pulse_width[1][1], bcm_pulse2position, bcm_pulse2width, bcm_channel-8, m_hitdistribution_pulse[1][1]);
756  }
757 
758  /************************************************************************************************
759  *Side Histograms
760  *************************************************************************************************/
761 
762  // A Side Low Gain
763  if (bcm_channel < 4){
764  deltat_data s1a;
765  s1a.bcid = bcm_bcid;
766  s1a.position = bcm_pulse1position;
767  s1a.ecr = ecr;
768  s1a.detector = bcm_channel%4;
769  s1a.lvl1a = bcm_lvl1a;
770  positions_A[0].push_back(s1a);
771  if (bcm_pulse2width != 0){
772  deltat_data s2a;
773  s2a.bcid = bcm_bcid;
774  s2a.position = bcm_pulse2position;
775  s2a.ecr = ecr;
776  s2a.detector = bcm_channel%4;
777  s2a.lvl1a = bcm_lvl1a;
778  positions_A[0].push_back(s2a);
779  }
780  FillPulseHistos(m_stat_pulse_position_gen[0][0], m_stat_pulse_width_gen[0][0], m_stat_pulse_position[0][0][0], m_stat_pulse_width[0][0][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_stat_lvl1a[0][0]);
781  FillPulseHistos(m_stat_pulse_position_gen[0][0], m_stat_pulse_width_gen[0][0], m_stat_pulse_position[0][0][1], m_stat_pulse_width[0][0][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_stat_lvl1a[0][0]);
782  }
783 
784  // A Side High Gain
785  if (bcm_channel > 7 && bcm_channel < 12){
786  deltat_data s1a;
787  s1a.bcid = bcm_bcid;
788  s1a.position = bcm_pulse1position;
789  s1a.ecr = ecr;
790  s1a.detector = bcm_channel%4;
791  s1a.lvl1a = bcm_lvl1a;
792  positions_A[1].push_back(s1a);
793  if (bcm_pulse2width != 0){
794  deltat_data s2a;
795  s2a.bcid = bcm_bcid;
796  s2a.position = bcm_pulse2position;
797  s2a.ecr = ecr;
798  s2a.detector = bcm_channel%4;
799  s2a.lvl1a = bcm_lvl1a;
800  positions_A[1].push_back(s2a);
801  }
802  FillPulseHistos(m_stat_pulse_position_gen[0][1], m_stat_pulse_width_gen[0][1], m_stat_pulse_position[0][1][0], m_stat_pulse_width[0][1][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_stat_lvl1a[0][1]);
803  FillPulseHistos(m_stat_pulse_position_gen[0][1], m_stat_pulse_width_gen[0][1], m_stat_pulse_position[0][1][1], m_stat_pulse_width[0][1][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_stat_lvl1a[0][1]);
804  }
805  // C Side Low Gain
806  if (bcm_channel > 3 && bcm_channel < 8){
807  deltat_data s1c;
808  s1c.bcid = bcm_bcid;
809  s1c.position = bcm_pulse1position;
810  s1c.ecr = ecr;
811  s1c.detector = bcm_channel%4;
812  s1c.lvl1a = bcm_lvl1a;
813  positions_C[0].push_back(s1c);
814  if (bcm_pulse2width != 0){
815  deltat_data s2c;
816  s2c.bcid = bcm_bcid;
817  s2c.position = bcm_pulse2position;
818  s2c.ecr = ecr;
819  s2c.detector = bcm_channel%4;
820  s2c.lvl1a = bcm_lvl1a;
821  positions_C[0].push_back(s2c);
822  }
823  FillPulseHistos(m_stat_pulse_position_gen[1][0], m_stat_pulse_width_gen[1][0], m_stat_pulse_position[1][0][0], m_stat_pulse_width[1][0][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_stat_lvl1a[1][0]);
824  FillPulseHistos(m_stat_pulse_position_gen[1][0], m_stat_pulse_width_gen[1][0], m_stat_pulse_position[1][0][1], m_stat_pulse_width[1][0][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_stat_lvl1a[1][0]);
825  }
826  // C Side High Gain
827  if (bcm_channel > 11){
828  deltat_data s1c;
829  s1c.bcid = bcm_bcid;
830  s1c.position = bcm_pulse1position;
831  s1c.ecr = ecr;
832  s1c.detector = bcm_channel%4;
833  s1c.lvl1a = bcm_lvl1a;
834  positions_C[1].push_back(s1c);
835  if (bcm_pulse2width != 0){
836  deltat_data s2c;
837  s2c.bcid = bcm_bcid;
838  s2c.position = bcm_pulse2position;
839  s2c.ecr = ecr;
840  s2c.detector = bcm_channel%4;
841  s2c.lvl1a = bcm_lvl1a;
842  positions_C[1].push_back(s2c);
843  }
844  FillPulseHistos(m_stat_pulse_position_gen[1][1], m_stat_pulse_width_gen[1][1], m_stat_pulse_position[1][1][0], m_stat_pulse_width[1][1][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_stat_lvl1a[1][1]);
845  FillPulseHistos(m_stat_pulse_position_gen[1][1], m_stat_pulse_width_gen[1][1], m_stat_pulse_position[1][1][1], m_stat_pulse_width[1][1][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_stat_lvl1a[1][1]);
846  }
847 
848  /****************************************************************************
849  *And filling the detector histograms
850  ****************************************************************************/
851  switch (bcm_channel){
852  case 0:
853  FillPulseHistos(m_det_pulse_position_gen[0][0], m_det_pulse_width_gen[0][0], m_det_pulse_position[0][0][0], m_det_pulse_width[0][0][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_det_lvl1a[0][0]);
854  FillPulseHistos(m_det_pulse_position_gen[0][0], m_det_pulse_width_gen[0][0], m_det_pulse_position[0][0][1], m_det_pulse_width[0][0][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_det_lvl1a[0][0]);
855  break;
856  case 1:
857  FillPulseHistos(m_det_pulse_position_gen[1][0], m_det_pulse_width_gen[1][0], m_det_pulse_position[1][0][0], m_det_pulse_width[1][0][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_det_lvl1a[1][0]);
858  FillPulseHistos(m_det_pulse_position_gen[1][0], m_det_pulse_width_gen[1][0], m_det_pulse_position[1][0][1], m_det_pulse_width[1][0][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_det_lvl1a[1][0]);
859  break;
860  case 2:
861  FillPulseHistos(m_det_pulse_position_gen[2][0], m_det_pulse_width_gen[2][0], m_det_pulse_position[2][0][0], m_det_pulse_width[2][0][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_det_lvl1a[2][0]);
862  FillPulseHistos(m_det_pulse_position_gen[2][0], m_det_pulse_width_gen[2][0], m_det_pulse_position[2][0][1], m_det_pulse_width[2][0][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_det_lvl1a[2][0]);
863  break;
864  case 3:
865  FillPulseHistos(m_det_pulse_position_gen[3][0], m_det_pulse_width_gen[3][0], m_det_pulse_position[3][0][0], m_det_pulse_width[3][0][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_det_lvl1a[3][0]);
866  FillPulseHistos(m_det_pulse_position_gen[3][0], m_det_pulse_width_gen[3][0], m_det_pulse_position[3][0][1], m_det_pulse_width[3][0][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_det_lvl1a[3][0]);
867  break;
868  case 4:
869  FillPulseHistos(m_det_pulse_position_gen[4][0], m_det_pulse_width_gen[4][0], m_det_pulse_position[4][0][0], m_det_pulse_width[4][0][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_det_lvl1a[4][0]);
870  FillPulseHistos(m_det_pulse_position_gen[4][0], m_det_pulse_width_gen[4][0], m_det_pulse_position[4][0][1], m_det_pulse_width[4][0][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_det_lvl1a[4][0]);
871  break;
872  case 5:
873  FillPulseHistos(m_det_pulse_position_gen[5][0], m_det_pulse_width_gen[5][0], m_det_pulse_position[5][0][0], m_det_pulse_width[5][0][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_det_lvl1a[5][0]);
874  FillPulseHistos(m_det_pulse_position_gen[5][0], m_det_pulse_width_gen[5][0], m_det_pulse_position[5][0][1], m_det_pulse_width[5][0][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_det_lvl1a[5][0]);
875  break;
876  case 6:
877  FillPulseHistos(m_det_pulse_position_gen[6][0], m_det_pulse_width_gen[6][0], m_det_pulse_position[6][0][0], m_det_pulse_width[6][0][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_det_lvl1a[6][0]);
878  FillPulseHistos(m_det_pulse_position_gen[6][0], m_det_pulse_width_gen[6][0], m_det_pulse_position[6][0][1], m_det_pulse_width[6][0][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_det_lvl1a[6][0]);
879  break;
880  case 7:
881  FillPulseHistos(m_det_pulse_position_gen[7][0], m_det_pulse_width_gen[7][0], m_det_pulse_position[7][0][0], m_det_pulse_width[7][0][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_det_lvl1a[7][0]);
882  FillPulseHistos(m_det_pulse_position_gen[7][0], m_det_pulse_width_gen[7][0], m_det_pulse_position[7][0][1], m_det_pulse_width[7][0][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_det_lvl1a[7][0]);
883  break;
884  case 8:
885  FillPulseHistos(m_det_pulse_position_gen[0][1], m_det_pulse_width_gen[0][1], m_det_pulse_position[0][1][0], m_det_pulse_width[0][1][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_det_lvl1a[0][1]);
886  FillPulseHistos(m_det_pulse_position_gen[0][1], m_det_pulse_width_gen[0][1], m_det_pulse_position[0][1][1], m_det_pulse_width[0][1][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_det_lvl1a[0][1]);
887  break;
888  case 9:
889  FillPulseHistos(m_det_pulse_position_gen[1][1], m_det_pulse_width_gen[1][1], m_det_pulse_position[1][1][0], m_det_pulse_width[1][1][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_det_lvl1a[1][1]);
890  FillPulseHistos(m_det_pulse_position_gen[1][1], m_det_pulse_width_gen[1][1], m_det_pulse_position[1][1][1], m_det_pulse_width[1][1][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_det_lvl1a[1][1]);
891  break;
892  case 10:
893  FillPulseHistos(m_det_pulse_position_gen[2][1], m_det_pulse_width_gen[2][1], m_det_pulse_position[2][1][0], m_det_pulse_width[2][1][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_det_lvl1a[2][1]);
894  FillPulseHistos(m_det_pulse_position_gen[2][1], m_det_pulse_width_gen[2][1], m_det_pulse_position[2][1][1], m_det_pulse_width[2][1][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_det_lvl1a[2][1]);
895  break;
896  case 11:
897  FillPulseHistos(m_det_pulse_position_gen[3][1], m_det_pulse_width_gen[3][1], m_det_pulse_position[3][1][0], m_det_pulse_width[3][1][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_det_lvl1a[3][1]);
898  FillPulseHistos(m_det_pulse_position_gen[3][1], m_det_pulse_width_gen[3][1], m_det_pulse_position[3][1][1], m_det_pulse_width[3][1][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_det_lvl1a[3][1]);
899  break;
900  case 12:
901  FillPulseHistos(m_det_pulse_position_gen[4][1], m_det_pulse_width_gen[4][1], m_det_pulse_position[4][1][0], m_det_pulse_width[4][1][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_det_lvl1a[4][1]);
902  FillPulseHistos(m_det_pulse_position_gen[4][1], m_det_pulse_width_gen[4][1], m_det_pulse_position[4][1][1], m_det_pulse_width[4][1][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_det_lvl1a[4][1]);
903  break;
904  case 13:
905  FillPulseHistos(m_det_pulse_position_gen[5][1], m_det_pulse_width_gen[5][1], m_det_pulse_position[5][1][0], m_det_pulse_width[5][1][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_det_lvl1a[5][1]);
906  FillPulseHistos(m_det_pulse_position_gen[5][1], m_det_pulse_width_gen[5][1], m_det_pulse_position[5][1][1], m_det_pulse_width[5][1][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_det_lvl1a[5][1]);
907  break;
908  case 14:
909  FillPulseHistos(m_det_pulse_position_gen[6][1], m_det_pulse_width_gen[6][1], m_det_pulse_position[6][1][0], m_det_pulse_width[6][1][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_det_lvl1a[6][1]);
910  FillPulseHistos(m_det_pulse_position_gen[6][1], m_det_pulse_width_gen[6][1], m_det_pulse_position[6][1][1], m_det_pulse_width[6][1][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_det_lvl1a[6][1]);
911  break;
912  case 15:
913  FillPulseHistos(m_det_pulse_position_gen[7][1], m_det_pulse_width_gen[7][1], m_det_pulse_position[7][1][0], m_det_pulse_width[7][1][0], bcm_pulse1position, bcm_pulse1width, bcm_lvl1a, m_det_lvl1a[7][1]);
914  FillPulseHistos(m_det_pulse_position_gen[7][1], m_det_pulse_width_gen[7][1], m_det_pulse_position[7][1][1], m_det_pulse_width[7][1][1], bcm_pulse2position, bcm_pulse2width, bcm_lvl1a, m_det_lvl1a[7][1]);
915  break;
916  }
917  }
918  }// End of for BCM_RDO_element
919  }
920  } // End of for BCM_RDO_itr
921 
922 
923  /********************************************
924  *count pixel hits
925  ********************************************/
926  unsigned int n_pix_hits[3] = {0};
927 
928  if(m_pixRdoContainer != nullptr){
931  for( ; colNextpix != colNextpix_end; ++colNextpix){
932  const InDetRawDataCollection<PixelRDORawData>* PIX_Collection(*colNextpix);
933  if(!PIX_Collection) continue;
934 
935  Identifier id = PIX_Collection->identify();
936  switch ( m_pixelID->barrel_ec( id ) )
937  {
938  case 0: // Barrel
939  n_pix_hits[1] += PIX_Collection->size();
940  break;
941  case -2: // ECA
942  n_pix_hits[0] += PIX_Collection->size();
943  break;
944  case 2: // ECC
945  n_pix_hits[2] += PIX_Collection->size();
946  break;
947  }
948  }
949  }
950 
951 
952  /********************************************
953  *count sct hits
954  ********************************************/
955  unsigned int n_sct_hits[3] = {0};
956 
957  if(m_sctRdoContainer != nullptr){
960  for( ; colNextsct != colNextsct_end; ++colNextsct){
961  const InDetRawDataCollection<SCT_RDORawData>* SCT_Collection(*colNextsct);
962  if(!SCT_Collection) continue;
963 
964  Identifier id = SCT_Collection->identify();
965  switch ( m_sctID->barrel_ec( id ) )
966  {
967  case 0: // Barrel
968  n_sct_hits[1] += SCT_Collection->size();
969  break;
970  case -2: // ECA
971  n_sct_hits[0] += SCT_Collection->size();
972  break;
973  case 2: // ECC
974  n_sct_hits[2] += SCT_Collection->size();
975  break;
976  }
977  }
978  }
979 
980  /********************************************
981  *Delta t histograms
982  ********************************************/
983  for(unsigned int gain =0;gain<2;gain++){
984 
985  positions_A[gain].sort();
986  positions_C[gain].sort();
987 
988  float deltat=350.0;//so that it can't mix with normal data if calculation of deltat fails
989  while (!positions_A[gain].empty()){
990  unsigned int bcid=(positions_A[gain].front()).bcid;
991  unsigned int detector_a=(positions_A[gain].front()).detector;
992 
993 
994  for (std::list<deltat_data>::iterator it_c =positions_C[gain].begin();it_c!=positions_C[gain].end();++it_c){
995  if(bcid<(*it_c).bcid) continue;
996  if (bcid==(*it_c).bcid) { // i.e. (positions_A[gain].front()).bcid == (positions_C[gain].begin()).bcid
997  int deltatbins=(*it_c).position-(positions_A[gain].front()).position;
998  deltat = deltatbins/64.0*25.0;
999  m_deltat_vs_hits[gain]->Fill(deltat);
1000  m_deltat_vs_bcid[gain]->Fill((*it_c).bcid, deltat);
1001  m_deltat_vs_lb[gain]->Fill(m_current_LB, deltat);
1002  m_deltat_vs_ecr[gain]->Fill((*it_c).ecr, deltat);
1003  m_deltat_vs_PrVertex[gain]->Fill(z, deltat);
1004  m_deltat_vs_pixhits[gain]->Fill(n_pix_hits[0]+n_pix_hits[1]+n_pix_hits[2], deltat);
1005  m_deltat_vs_pixhitsBR[gain]->Fill(n_pix_hits[1], deltat);
1006  m_deltat_vs_pixhitsEC[gain]->Fill(n_pix_hits[0]+n_pix_hits[2], deltat);
1007  m_deltat_vs_scthits[gain]->Fill(n_sct_hits[0]+n_sct_hits[1]+n_sct_hits[2], deltat);
1008  m_deltat_vs_scthitsBR[gain]->Fill(n_sct_hits[1], deltat);
1009  m_deltat_vs_scthitsEC[gain]->Fill(n_sct_hits[0]+n_sct_hits[2], deltat);
1010  if (abs(deltat) < 6.25) m_sct_vs_pix_col[gain]->Fill(n_sct_hits[0]+n_sct_hits[1]+n_sct_hits[2], n_pix_hits[0]+n_pix_hits[1]+n_pix_hits[2]);
1011  else m_sct_vs_pix_bkg[gain]->Fill(n_sct_hits[0]+n_sct_hits[1]+n_sct_hits[2], n_pix_hits[0]+n_pix_hits[1]+n_pix_hits[2]);
1012  if (detector_a==(*it_c).detector) {
1013  m_deltat_aligned_vs_ecr[gain]->Fill(ecr,deltat);
1014  m_deltat_aligned_vs_bcid[gain]->Fill(bcid,deltat);
1015  m_deltat_aligned_vs_lb[gain]->Fill(m_current_LB, deltat);
1016  m_deltat_aligned_vs_hits[gain]->Fill(deltat);
1017  }
1018  }//end of bcid if
1019  }//end of c loop
1020  // Need to set bcid_max before using bcid_select method
1021  for (deltat_data& data : positions_C[gain]) {
1022  data.bcid_max = (positions_A[gain].front()).bcid;
1023  }
1024  positions_C[gain].remove_if(bcid_select);
1025  positions_A[gain].pop_front();
1026  }//end of a loop
1027  }//end of gain loop
1028 
1029 
1030  /*********************************
1031  *Filling Abort Fraction arrays
1032  **********************************/
1033 
1034 
1035  for(unsigned int bc_counter = 0; bc_counter < bc_readout; bc_counter++){
1036  double nROD0abortfraction = 100*((nROD0HitLG[bc_counter]*11)+nROD0HitHG[bc_counter])/36.0;
1037  double nROD1abortfraction = 100*((nROD1HitLG[bc_counter]*11)+nROD1HitHG[bc_counter])/36.0;
1038  if (nROD0abortfraction != 0 || nROD1abortfraction !=0) {
1039  double nabortfraction = (nROD0abortfraction+nROD1abortfraction)/2;
1040  m_AbortFraction->Fill(nabortfraction);
1041  m_AbortFractionVsECR->Fill(ecr, nabortfraction);
1042  m_AbortFractionVsLB->Fill(m_current_LB, nabortfraction);
1043  if (nROD0BCID[bc_counter]==nROD1BCID[bc_counter]) {
1044  m_AbortFractionVsBCID->Fill(nROD0BCID[bc_counter], nabortfraction);
1045  }
1046  }
1047  if (nROD0abortfraction != 0) {
1048  m_AbortFractionROD0->Fill(nROD0abortfraction);
1049  m_AbortFractionROD0VsECR->Fill(ecr,nROD0abortfraction);
1050  m_AbortFractionROD0VsBCID->Fill(nROD0BCID[bc_counter],nROD0abortfraction);
1051  }
1052  if (nROD1abortfraction != 0) {
1053  m_AbortFractionROD1->Fill(nROD1abortfraction);
1054  m_AbortFractionROD1VsECR->Fill(ecr,nROD1abortfraction);
1055  m_AbortFractionROD1VsBCID->Fill(nROD1BCID[bc_counter],nROD1abortfraction);
1056  }
1057  }
1058 
1059 
1060  }// end if bcm_rdo not empty
1061  return StatusCode::SUCCESS;
1062 }
InDetGlobalBCMTool::m_current_LB
unsigned int m_current_LB
Definition: InDetGlobalBCMTool.h:139
xAOD::iterator
JetConstituentVector::iterator iterator
Definition: JetConstituentVector.cxx:68
InDetGlobalBCMTool::m_AbortFractionVsECR
TH1F * m_AbortFractionVsECR
Definition: InDetGlobalBCMTool.h:100
FillPulseHistos
void FillPulseHistos(TH1F *h1, TH1F *h2, TH1F *h3, TH1F *h4, int pulsepos, int pulsewid, int tmp=0, TH1F *h5=nullptr)
Definition: InDetGlobalBCMTool.cxx:559
InDetGlobalBCMTool::m_sct_vs_pix_bkg
TH2F * m_sct_vs_pix_bkg[2]
Definition: InDetGlobalBCMTool.h:136
InDetGlobalBCMTool::m_pulse_position_all
TH1F * m_pulse_position_all[2]
Definition: InDetGlobalBCMTool.h:106
InDetGlobalBCMTool::m_hits_lvl1a_all
TH1F * m_hits_lvl1a_all
Definition: InDetGlobalBCMTool.h:92
InDetGlobalBCMTool::m_hitdistribution_pulse
TH1F * m_hitdistribution_pulse[2][2]
Definition: InDetGlobalBCMTool.h:114
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
InDetGlobalMotherMonTool::m_pixRdoContainer
const PixelRDO_Container * m_pixRdoContainer
Definition: InDetGlobalMotherMonTool.h:615
InDetGlobalBCMTool::m_pulse_width_gen
TH1F * m_pulse_width_gen[2]
Definition: InDetGlobalBCMTool.h:112
DataModel_detail::const_iterator
Const iterator class for DataVector/DataList.
Definition: DVLIterator.h:82
deltat_data::ecr
unsigned int ecr
Definition: InDetGlobalBCMTool.h:146
InDetGlobalBCMTool::m_vxContainerName
SG::ReadHandleKey< VxContainer > m_vxContainerName
Definition: InDetGlobalBCMTool.h:63
InDetGlobalBCMTool::m_pulse_width_all
TH1F * m_pulse_width_all[2]
Definition: InDetGlobalBCMTool.h:107
InDetGlobalBCMTool::m_AbortFractionROD1VsBCID
TH1F * m_AbortFractionROD1VsBCID
Definition: InDetGlobalBCMTool.h:99
plotting.yearwise_efficiency.channel
channel
Definition: yearwise_efficiency.py:28
InDetGlobalBCMTool::m_det_pulse_position
TH1F * m_det_pulse_position[8][2][2]
Definition: InDetGlobalBCMTool.h:81
deltat_data::bcid
unsigned int bcid
Definition: InDetGlobalBCMTool.h:144
InDetGlobalBCMTool::m_ChannelVsECR
TH2F * m_ChannelVsECR
Definition: InDetGlobalBCMTool.h:90
TH2F
Definition: rootspy.cxx:420
PixelID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: PixelID.h:619
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
InDetGlobalBCMTool::m_hitdistribution
TH1F * m_hitdistribution[2]
Definition: InDetGlobalBCMTool.h:110
InDetGlobalBCMTool::m_deltat_vs_scthitsEC
TH2F * m_deltat_vs_scthitsEC[2]
Definition: InDetGlobalBCMTool.h:133
InDetGlobalBCMTool::m_hits_lvl1a
TH1F * m_hits_lvl1a[2]
Definition: InDetGlobalBCMTool.h:108
InDetGlobalMotherMonTool::registerHist
StatusCode registerHist(MonGroup &theGroup, TH1 *h1)
Register single histogram.
Definition: InDetGlobalMotherMonTool.cxx:121
InDetGlobalBCMTool::m_stat_pulse_width_gen
TH1F * m_stat_pulse_width_gen[2][2]
Definition: InDetGlobalBCMTool.h:76
InDetGlobalMotherMonTool::m_sctRdoContainer
const SCT_RDO_Container * m_sctRdoContainer
Definition: InDetGlobalMotherMonTool.h:617
InDetGlobalBCMTool::m_det_pulse_width
TH1F * m_det_pulse_width[8][2][2]
Definition: InDetGlobalBCMTool.h:82
CaloCondBlobAlgs_fillNoiseFromASCII.gain
gain
Definition: CaloCondBlobAlgs_fillNoiseFromASCII.py:110
InDetGlobalMotherMonTool::m_BCM_RDO
const BCM_RDO_Container * m_BCM_RDO
Definition: InDetGlobalMotherMonTool.h:613
InDetRawDataCollection::identify
virtual Identifier identify() const override final
InDetGlobalBCMTool::m_AbortFractionVsLB
TH2F * m_AbortFractionVsLB
Definition: InDetGlobalBCMTool.h:103
InDetGlobalMotherMonTool::m_sctID
const SCT_ID * m_sctID
the SCT ID helper
Definition: InDetGlobalMotherMonTool.h:601
PlotCalibFromCool.begin
begin
Definition: PlotCalibFromCool.py:94
InDetGlobalBCMTool::m_hits_bcid
TH1F * m_hits_bcid[2]
Definition: InDetGlobalBCMTool.h:109
InDetGlobalBCMTool::m_pulse_position
TH1F * m_pulse_position[2][2]
Definition: InDetGlobalBCMTool.h:115
deltat_data::operator<
bool operator<(const deltat_data &data) const
Definition: InDetGlobalBCMTool.cxx:582
AthCommonMsg< AlgTool >::msgLvl
bool msgLvl(const MSG::Level lvl) const
Definition: AthCommonMsg.h:30
InDetGlobalBCMTool::m_AbortFractionROD0VsBCID
TH1F * m_AbortFractionROD0VsBCID
Definition: InDetGlobalBCMTool.h:98
InDetGlobalBCMTool::m_stat_lvl1a
TH1F * m_stat_lvl1a[2][2]
Definition: InDetGlobalBCMTool.h:77
InDetGlobalBCMTool::fillHistograms
virtual StatusCode fillHistograms() override
An inheriting class should either override this function or fillHists().
Definition: InDetGlobalBCMTool.cxx:590
InDetGlobalBCMTool::m_deltat_vs_pixhits
TH2F * m_deltat_vs_pixhits[2]
Definition: InDetGlobalBCMTool.h:129
SCT_ID::barrel_ec
int barrel_ec(const Identifier &id) const
Values of different levels (failure returns 0)
Definition: SCT_ID.h:728
SG::VarHandleKey::key
const std::string & key() const
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:141
InDetGlobalBCMTool::m_strange_signals
TH1F * m_strange_signals[2]
Definition: InDetGlobalBCMTool.h:113
InDetGlobalBCMTool::m_stat_pulse_position
TH1F * m_stat_pulse_position[2][2][2]
Definition: InDetGlobalBCMTool.h:73
read_hist_ntuple.h1
h1
Definition: read_hist_ntuple.py:21
InDetGlobalBCMTool::m_nExamplePlot
TH1F * m_nExamplePlot
Example histogram.
Definition: InDetGlobalBCMTool.h:67
python.TrigEgammaMonitorHelper.TH2F
def TH2F(name, title, nxbins, bins_par2, bins_par3, bins_par4, bins_par5=None, bins_par6=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:45
deltat_data::detector
unsigned int detector
Definition: InDetGlobalBCMTool.h:148
empty
bool empty(TH1 *h)
Definition: computils.cxx:294
ParamDefs.h
InDetGlobalBCMTool::m_pulse_width
TH1F * m_pulse_width[2][2]
Definition: InDetGlobalBCMTool.h:116
InDetGlobalBCMTool::m_det_pulse_width_gen
TH1F * m_det_pulse_width_gen[8][2]
Definition: InDetGlobalBCMTool.h:84
InDetGlobalBCMTool::m_deltat_vs_pixhitsBR
TH2F * m_deltat_vs_pixhitsBR[2]
Definition: InDetGlobalBCMTool.h:131
TRT::Hit::detector
@ detector
Definition: HitInfo.h:78
deltat_data::position
unsigned int position
Definition: InDetGlobalBCMTool.h:147
InDetGlobalBCMTool::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: InDetGlobalBCMTool.h:64
InDetGlobalBCMTool::m_deltat_vs_scthits
TH2F * m_deltat_vs_scthits[2]
Definition: InDetGlobalBCMTool.h:132
AthCommonDataStore< AthCommonMsg< AlgTool > >::evtStore
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Definition: AthCommonDataStore.h:85
InDetGlobalBCMTool::m_deltat_aligned_vs_bcid
TH2F * m_deltat_aligned_vs_bcid[2]
Definition: InDetGlobalBCMTool.h:123
ManagedMonitorToolBase::MonGroup
A container of information describing a monitoring object.
Definition: ManagedMonitorToolBase.h:138
InDetGlobalMotherMonTool
This tool derives from InDetGlobalMonitorToolBase The Mother tool interfaces to all subtools.
Definition: InDetGlobalMotherMonTool.h:75
InDetGlobalBCMTool::m_ChannelVsLvl1a
TH2F * m_ChannelVsLvl1a
Definition: InDetGlobalBCMTool.h:88
InDetGlobalBCMTool::m_highocc
TH1F * m_highocc
Definition: InDetGlobalBCMTool.h:117
PixelRDORawData.h
InDetGlobalBCMTool::m_deltat_vs_bcid
TH2F * m_deltat_vs_bcid[2]
Definition: InDetGlobalBCMTool.h:122
z
#define z
InDetGlobalBCMTool::m_deltat_aligned_vs_ecr
TH2F * m_deltat_aligned_vs_ecr[2]
Definition: InDetGlobalBCMTool.h:127
InDetGlobalBCMTool::m_sct_vs_pix_col
TH2F * m_sct_vs_pix_col[2]
Definition: InDetGlobalBCMTool.h:135
Identifier
Definition: DetectorDescription/Identifier/Identifier/Identifier.h:32
endmsg
#define endmsg
Definition: AnalysisConfig_Ntuple.cxx:63
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
InDetGlobalBCMTool::InDetGlobalBCMTool
InDetGlobalBCMTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor.
Definition: InDetGlobalBCMTool.cxx:51
InDetGlobalBCMTool::m_nExampleInt
int m_nExampleInt
Definition: InDetGlobalBCMTool.h:70
covarianceTool.title
title
Definition: covarianceTool.py:542
createCablingJSON.station_name
int station_name
Simple script to generate a BIS78 cabling map as used for the Monte Carlo processing.
Definition: createCablingJSON.py:8
InDetGlobalBCMTool::m_deltat_aligned_vs_lb
TH2F * m_deltat_aligned_vs_lb[2]
Definition: InDetGlobalBCMTool.h:125
InDetGlobalBCMTool::m_pulse_position_gen
TH1F * m_pulse_position_gen[2]
Definition: InDetGlobalBCMTool.h:111
InDetRawDataCollection
Definition: InDetRawDataCollection.h:31
ManagedMonitorToolBase::ATTRIB_UNMANAGED
@ ATTRIB_UNMANAGED
Definition: ManagedMonitorToolBase.h:131
xAOD::EventInfo_v1::extendedLevel1ID
uint32_t extendedLevel1ID() const
The extended Level-1 identifier.
InDetGlobalBCMTool::m_timewalk_all
TH2F * m_timewalk_all
Definition: InDetGlobalBCMTool.h:93
test_pyathena.parent
parent
Definition: test_pyathena.py:15
deltat_data
Definition: InDetGlobalBCMTool.h:142
VxTrackAtVertex.h
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
IdentifiableContainerMT::end
const_iterator end() const
return const_iterator for end of container
Definition: IdentifiableContainerMT.h:242
run
Definition: run.py:1
IdentifiableContainerMT::const_iterator
Definition: IdentifiableContainerMT.h:82
IdentifiableContainerMT::begin
const_iterator begin() const
return const_iterator for first entry
Definition: IdentifiableContainerMT.h:236
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
InDetGlobalBCMTool::m_deltat_vs_lb
TH2F * m_deltat_vs_lb[2]
Definition: InDetGlobalBCMTool.h:124
xAOD::EventInfo_v1::lumiBlock
uint32_t lumiBlock() const
The current event's luminosity block number.
InDetGlobalBCMTool::m_NumberOfEvents
TH1F * m_NumberOfEvents
Definition: InDetGlobalBCMTool.h:105
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
InDetGlobalBCMTool.h
InDetGlobalBCMTool::m_AbortFractionROD1
TH1F * m_AbortFractionROD1
Definition: InDetGlobalBCMTool.h:96
InDetGlobalBCMTool::m_ChannelVsBCID
TH2F * m_ChannelVsBCID
Definition: InDetGlobalBCMTool.h:89
InDetGlobalBCMTool::m_stat_pulse_position_gen
TH1F * m_stat_pulse_position_gen[2][2]
Definition: InDetGlobalBCMTool.h:75
InDetGlobalBCMTool::m_AbortFraction
TH1F * m_AbortFraction
Definition: InDetGlobalBCMTool.h:94
VxCandidate.h
InDetGlobalMotherMonTool::m_pixelID
const PixelID * m_pixelID
the Pixel ID helper
Definition: InDetGlobalMotherMonTool.h:604
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
InDetGlobalBCMTool::initialize
virtual StatusCode initialize() override
Initialisation.
Definition: InDetGlobalBCMTool.cxx:86
InDetGlobalBCMTool::m_deltat_aligned_vs_hits
TH1F * m_deltat_aligned_vs_hits[2]
Definition: InDetGlobalBCMTool.h:121
xAOD::bcid
setEventNumber setTimeStamp bcid
Definition: EventInfo_v1.cxx:133
InDetGlobalBCMTool::m_deltat_vs_pixhitsEC
TH2F * m_deltat_vs_pixhitsEC[2]
Definition: InDetGlobalBCMTool.h:130
DataVector::end
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
InDetGlobalBCMTool::m_deltat_vs_hits
TH1F * m_deltat_vs_hits[2]
Definition: InDetGlobalBCMTool.h:120
InDetGlobalBCMTool::m_stat_pulse_width
TH1F * m_stat_pulse_width[2][2][2]
Definition: InDetGlobalBCMTool.h:74
InDetGlobalBCMTool::bookHistogramsRecurrent
virtual StatusCode bookHistogramsRecurrent() override
An inheriting class should either override this function or bookHists().
Definition: InDetGlobalBCMTool.cxx:95
TH1F
Definition: rootspy.cxx:320
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
bcid_select
bool bcid_select(const deltat_data &data)
Definition: InDetGlobalBCMTool.cxx:586
InDetGlobalBCMTool::m_AbortFractionVsBCID
TH1F * m_AbortFractionVsBCID
Definition: InDetGlobalBCMTool.h:97
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
InDetGlobalBCMTool::m_AbortFractionROD0VsECR
TH1F * m_AbortFractionROD0VsECR
Definition: InDetGlobalBCMTool.h:101
AthCommonMsg< AlgTool >::msg
MsgStream & msg() const
Definition: AthCommonMsg.h:24
InDetGlobalBCMTool::m_detector
std::string m_detector
Definition: InDetGlobalBCMTool.h:61
deltat_data::deltat_data
deltat_data()
Definition: InDetGlobalBCMTool.cxx:573
InDetGlobalBCMTool::m_deltat_vs_ecr
TH2F * m_deltat_vs_ecr[2]
Definition: InDetGlobalBCMTool.h:126
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
merge.status
status
Definition: merge.py:17
Trk::PriVtx
@ PriVtx
Primary Vertex.
Definition: VertexType.h:27
python.TrigEgammaMonitorHelper.TH1F
def TH1F(name, title, nxbins, bins_par2, bins_par3=None, path='', **kwargs)
Definition: TrigEgammaMonitorHelper.py:24
InDetGlobalBCMTool::m_det_lvl1a
TH1F * m_det_lvl1a[8][2]
Definition: InDetGlobalBCMTool.h:80
ReadHandle.h
Handle class for reading from StoreGate.
InDetGlobalBCMTool::m_deltat_vs_scthitsBR
TH2F * m_deltat_vs_scthitsBR[2]
Definition: InDetGlobalBCMTool.h:134
InDetGlobalPrimaryVertexMonTool.h
InDetGlobalBCMTool::m_AbortFractionROD0
TH1F * m_AbortFractionROD0
Definition: InDetGlobalBCMTool.h:95
deltat_data::lvl1a
unsigned int lvl1a
Definition: InDetGlobalBCMTool.h:149
DataVector::size
size_type size() const noexcept
Returns the number of elements in the collection.
FillGlobalHistos
void FillGlobalHistos(TH2F *h1, TH2F *h2, TH2F *h3, TH1F *h4, TH1F *h5, int pulsewid, int channel, int bcid, int ecr, int lvl1a)
Definition: InDetGlobalBCMTool.cxx:549
InDetGlobalBCMTool::m_det_pulse_position_gen
TH1F * m_det_pulse_position_gen[8][2]
Definition: InDetGlobalBCMTool.h:83
DataVector::empty
bool empty() const noexcept
Returns true if the collection is empty.
DataVector::begin
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
InDetGlobalBCMTool::m_AbortFractionROD1VsECR
TH1F * m_AbortFractionROD1VsECR
Definition: InDetGlobalBCMTool.h:102
InDetGlobalBCMTool::m_det_timewalk
TH2F * m_det_timewalk[8][2]
Definition: InDetGlobalBCMTool.h:85
ManagedMonitorToolBase::newRunFlag
bool newRunFlag() const
Definition: ManagedMonitorToolBase.h:854
InDetGlobalBCMTool::m_deltat_vs_PrVertex
TH2F * m_deltat_vs_PrVertex[2]
Definition: InDetGlobalBCMTool.h:128