20 hDelaySpread->Reset();
24 typedef std::vector<std::pair<unsigned int, unsigned int> > TopOccup;
25 typedef std::vector<std::pair<double, unsigned int> > TopSpread;
26 TopOccup topOccup(10, std::make_pair(0, 0));
27 TopSpread topSpread(10, std::make_pair(0., 0));
32 int sum = bc.second.sum();
33 double rms = bc.second.rms();
35 hDelaySpread->Fill(bc.second.mean() - 3., bc.second.rms());
39 for (
int i = 0;
i <= 7; ++
i)
40 hDelay->Fill(
i - 3, bc.second.counts()[
i]);
42 std::pair<unsigned int, unsigned int> canOccup = std::make_pair(sum,
idx);
43 std::pair<double, unsigned int> canSpread = std::make_pair(
rms,
idx);
46 if (io != topOccup.end()) {
47 topOccup.insert(io, canOccup);
48 topOccup.erase(topOccup.end() - 1);
50 if (is != topSpread.end()) {
51 topSpread.insert(is, canSpread);
52 topSpread.erase(topSpread.end() - 1);
56 for (
int itop = 0; itop < 10; itop++) {
59 hTopOccup->GetYaxis()->SetBinLabel(itop + 1, occup.first.name().c_str());
60 hTopSpread->GetYaxis()->SetBinLabel(itop + 1, spread.first.name().c_str());
61 for (
unsigned int icount = 0; icount < occup.second.counts().size(); icount++) {
62 hTopOccup->SetBinContent(icount + 1, itop + 1,
float(occup.second.counts()[icount]));
63 hTopSpread->SetBinContent(icount + 1, itop + 1,
float(spread.second.counts()[icount]));