24 hDelaySpread->Reset();
28 typedef std::vector<std::pair<unsigned int, unsigned int> > TopOccup;
29 typedef std::vector<std::pair<double, unsigned int> > TopSpread;
30 TopOccup topOccup(10, std::make_pair(0, 0));
31 TopSpread topSpread(10, std::make_pair(0., 0));
36 int sum = bc.second.sum();
37 double rms = bc.second.rms();
39 hDelaySpread->Fill(bc.second.mean() - 3., bc.second.rms());
43 for (
int i = 0;
i <= 7; ++
i)
44 hDelay->Fill(
i - 3, bc.second.counts()[
i]);
46 std::pair<unsigned int, unsigned int> canOccup = std::make_pair(sum,
idx);
47 std::pair<double, unsigned int> canSpread = std::make_pair(
rms,
idx);
50 if (io != topOccup.end()) {
51 topOccup.insert(io, canOccup);
52 topOccup.erase(topOccup.end() - 1);
54 if (is != topSpread.end()) {
55 topSpread.insert(is, canSpread);
56 topSpread.erase(topSpread.end() - 1);
60 for (
int itop = 0; itop < 10; itop++) {
63 hTopOccup->GetYaxis()->SetBinLabel(itop + 1, occup.first.name().c_str());
64 hTopSpread->GetYaxis()->SetBinLabel(itop + 1, spread.first.name().c_str());
65 for (
unsigned int icount = 0; icount < occup.second.counts().size(); icount++) {
66 hTopOccup->SetBinContent(icount + 1, itop + 1,
float(occup.second.counts()[icount]));
67 hTopSpread->SetBinContent(icount + 1, itop + 1,
float(spread.second.counts()[icount]));