26 #include "GaudiKernel/StatusCode.h"
43 #include "TProfile2D.h"
50 #define ROB_PIXEL_BARREL 0x11
51 #define ROB_PIXEL_DISKS 0x12
52 #define ROB_PIXEL_BLAYER 0x13
54 #define ROB_SCT_BARREL_A 0x21
55 #define ROB_SCT_BARREL_C 0x22
56 #define ROB_SCT_EC_A 0x23
57 #define ROB_SCT_EC_C 0x24
59 #define ROB_TRT_BARREL_A 0x31
60 #define ROB_TRT_BARREL_C 0x32
61 #define ROB_TRT_EC_A 0x33
62 #define ROB_TRT_EC_C 0x34
66 const std::string &
type,
67 const std::string &
name,
74 m_diff_LVL1ID(nullptr),
75 m_diff_Overview_LVL1ID(nullptr),
77 m_diff_Pixel_SCT_TRT_BCID(nullptr),
78 m_diff_Overview_BCID(nullptr),
79 m_diff_SCT_BCID(nullptr),
80 m_diff_TRT_BCID(nullptr),
81 m_diff_PIX_BCID(nullptr),
82 m_diff_SCT_TRT_BCID(nullptr),
83 m_diff_SCT_PIX_BCID(nullptr),
84 m_diff_SCT_TRT_BCID_evt(nullptr),
85 m_diff_SCT_PIX_BCID_evt(nullptr),
93 m_Pixel_Hits_BCID(nullptr),
94 m_SCT_Hits_BCID(nullptr),
95 m_TRT_Hits_BCID(nullptr),
96 m_InDet_Hits_BCID(nullptr),
97 m_Tracks_BCID(nullptr)
109 return StatusCode::FAILURE;
139 return StatusCode::SUCCESS;
150 "Fraction of RODS with synchronized LVL1ID in each ID region",
153 axis->SetBinLabel(1,
"Pixel Barrel");
154 axis->SetBinLabel(2,
"Pixel Disks");
155 axis->SetBinLabel(3,
"Pixel B-Layer");
156 axis->SetBinLabel(4,
"SCT Barrel A");
157 axis->SetBinLabel(5,
"SCT Barrel C");
158 axis->SetBinLabel(6,
"SCT ECA");
159 axis->SetBinLabel(7,
"SCT ECC");
160 axis->SetBinLabel(8,
"TRT Barrel A");
161 axis->SetBinLabel(9,
"TRT Barrel C");
162 axis->SetBinLabel(10,
"TRT ECA");
163 axis->SetBinLabel(11,
"TRT ECC");
169 "m_diff_Overview_LVL1ID"
170 ,
"LVL1ID difference warning between the detectors and the RODs of each detector",
173 axis->SetBinLabel(1,
"BCM");
174 axis->SetBinLabel(2,
"Pixel");
175 axis->SetBinLabel(3,
"SCT");
176 axis->SetBinLabel(4,
"TRT");
178 axis->SetBinLabel(1,
"BCM");
179 axis->SetBinLabel(2,
"Pixel");
180 axis->SetBinLabel(3,
"SCT");
181 axis->SetBinLabel(4,
"TRT");
185 "Fraction of RODS with synchronized BCID in each ID region",
189 axis->SetBinLabel(1,
"Pixel Barrel");
190 axis->SetBinLabel(2,
"Pixel Disks");
191 axis->SetBinLabel(3,
"Pixel B-Layer");
192 axis->SetBinLabel(4,
"SCT Barrel A");
193 axis->SetBinLabel(5,
"SCT Barrel C");
194 axis->SetBinLabel(6,
"SCT ECA");
195 axis->SetBinLabel(7,
"SCT ECC");
196 axis->SetBinLabel(8,
"TRT Barrel A");
197 axis->SetBinLabel(9,
"TRT Barrel C");
198 axis->SetBinLabel(10,
"TRT ECA");
199 axis->SetBinLabel(11,
"TRT ECC");
203 ,
"BCID difference warning status between SCT and Pixel vs between SCT and TRT",
206 axis->SetBinLabel(1,
"SCT!= TRT");
207 axis->SetBinLabel(2,
"SCT == TRT");
209 axis->SetBinLabel(1,
"SCT != Pix");
210 axis->SetBinLabel(2,
"SCT == Pix");
214 ,
"BCID difference warning between the detectors and the RODs of each detector",
217 axis->SetBinLabel(1,
"BCM");
218 axis->SetBinLabel(2,
"Pixel");
219 axis->SetBinLabel(3,
"SCT");
220 axis->SetBinLabel(4,
"TRT");
222 axis->SetBinLabel(1,
"BCM");
223 axis->SetBinLabel(2,
"Pixel");
224 axis->SetBinLabel(3,
"SCT");
225 axis->SetBinLabel(4,
"TRT");
230 ,
"BCID difference between SCT and TRT",
235 "BCID difference between SCT and PIX",
242 "BCID warning status between PIX RODS",
248 "BCID warning status between SCT RODS",
254 "BCID warning status between TRT RODS",
262 "LVL1ID warning status between PIX RODS",
268 "LVL1ID warning status between SCT RODS",
274 "LVL1ID warning status between TRT RODS",
299 "LVL1ID of PIX RODS",
304 "LVL1ID of SCT RODS",
309 "LVL1ID of TRT RODS",
344 return (
status ? StatusCode::SUCCESS : StatusCode::FAILURE );
351 int prev_bcm_bcid = -1;
352 int prev_bcm_lvl1id = -1;
366 for ( it_bcmraw =
m_BCM_RDO->
begin(); it_bcmraw != it_bcmraw_E; ++it_bcmraw) {
367 if ( !(*it_bcmraw)->empty()) {
369 int bcm_bcid = (*RDO_element_first)->getBCID();
370 int bcm_lvl1id = (*RDO_element_first)->getLVL1ID();
372 if ( bcm_bcid != prev_bcm_bcid && prev_bcm_bcid != -1 )
376 if ( bcm_lvl1id != prev_bcm_lvl1id && prev_bcm_lvl1id != -1 )
380 prev_bcm_bcid = bcm_bcid;
381 prev_bcm_lvl1id = bcm_lvl1id;
387 int n_InDet_hits = 0;
389 unsigned int prev_pix_bcid = 0;
398 unsigned int prev_sct_bcid = 0;
407 unsigned int prev_trt_bcid = 0;
416 unsigned int prev_pix_lvl1id = 0;
426 unsigned int prev_sct_lvl1id = 0;
435 unsigned int prev_trt_lvl1id = 0;
468 n_InDet_hits += n_Pixel_hits;
473 n_InDet_hits += n_SCT_hits;
482 if (!colNext)
continue;
484 n_TRT_hits = n_TRT_hits + colNext->size();
487 n_InDet_hits = n_InDet_hits + n_TRT_hits;
494 return StatusCode::SUCCESS;
505 h->SetEntries(
h->GetEntries()+
count-1);
507 double sumW,sumW2,sumWX,sumWX2,sumWY,sumWY2,sumWXY;
508 h->getSums(sumW,sumW2,sumWX,sumWX2,sumWY,sumWY2,sumWXY);
509 h->setSums(sumW,
h->GetEntries(),sumWX,sumWX2,sumWY,sumWY2,sumWXY);
515 if ( collection !=
nullptr )
518 for ( it_pixcol=collection->
begin(); it_pixcol != it_pixcol_E; ++it_pixcol) {
520 if (PIX_Collection ==
nullptr)
continue;
522 n_hits = n_hits + PIX_Collection->
size();
530 unsigned int n_SCT_hits =0 ;
533 for (it_sctcol = collection->
begin(); it_sctcol != it_sctcol_E; ++it_sctcol) {
535 if (SCT_Collection ==
nullptr)
continue;
536 n_SCT_hits = n_SCT_hits + SCT_Collection->
size();
549 return (lvl1id & 0xffff);
554 std::vector<TH2I_LW *> &
timing,
555 std::vector<TH2I_LW *> & timing_diff,
558 unsigned int (*procFunc)(
unsigned int) )
560 unsigned int nrobs = 0;
561 unsigned int prev = 0;
563 InDetTimeCollection::const_iterator it_time,it_time_E(collection->end());
564 for ( it_time = collection->begin(); it_time != it_time_E; ++it_time ) {
566 const unsigned int curr = (*procFunc)( (*it_time).second );
569 std::multimap<short, short>::const_iterator curr_rob =
m_robMapping.find(robid);
582 timing.at(hist_index)->Fill(nrobs,curr);
585 if ( it_time > collection->begin() ) {
587 timing_diff.at(hist_index)->Fill(nrobs-1,((prev-curr==0)?0:-1));
590 timing_over->
Fill(hist_index,hist_index);