Skip to content

Commit

Permalink
change binning of TP occupnacy vs BX plot and edit BX plot descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
alejands committed Mar 25, 2021
1 parent 20a37ed commit aded279
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 34 deletions.
4 changes: 3 additions & 1 deletion DQM/EcalMonitorTasks/interface/TrigPrimTask.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ namespace ecaldqm {
/* bool HLTCaloBit_; */
/* bool HLTMuonBit_; */

std::array<int, nBXBins + 1> bxBinEdges_;
std::vector<int> bxBinEdges_;
std::vector<int> bxBinEdgesFine_;
double bxBin_;
double bxBinFine_;

std::map<uint32_t, unsigned> towerReadouts_;

Expand Down
8 changes: 4 additions & 4 deletions DQM/EcalMonitorTasks/python/TimingTask_cfi.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,14 @@
high = cms.untracked.double(1.0*nBXBins),
nbins = cms.untracked.int32(nBXBins),
low = cms.untracked.double(0.0),
title = cms.untracked.string('bunch crossing'),
title = cms.untracked.string('BX Id'),
labels = cms.untracked.vstring(bxBinLabels)
),
yaxis = cms.untracked.PSet(
title = cms.untracked.string('Timing (ns)')
),
btype = cms.untracked.string('User'),
description = cms.untracked.string('Average hit timing in the barrel as a function of BX number.')
description = cms.untracked.string('Average hit timing in EB as a function of BX number. BX ids start at 1. Only events with energy above 2.02 GeV and chi2 less than 16 are used.')
),
BarrelTimingVsBXFineBinned = cms.untracked.PSet(
path = cms.untracked.string('EcalBarrel/EBTimingTask/EBTMT Timing vs Finely Binned BX'),
Expand All @@ -157,14 +157,14 @@
high = cms.untracked.double(1.0*nBXBinsFine),
nbins = cms.untracked.int32(nBXBinsFine),
low = cms.untracked.double(0.0),
title = cms.untracked.string('bunch crossing'),
title = cms.untracked.string('BX Id'),
labels = cms.untracked.vstring(bxBinLabelsFine)
),
yaxis = cms.untracked.PSet(
title = cms.untracked.string('Timing (ns)')
),
btype = cms.untracked.string('User'),
description = cms.untracked.string('Average hit timing in the barrel as a finely-binned function of BX number.')
description = cms.untracked.string('Average hit timing in EB as a finely binned function of BX number. BX ids start at 1. Only events with energy above 2.02 GeV and chi2 less than 16 are used. The Customize button can be used to zoom in.')
),
TimeAmpBXm = cms.untracked.PSet(
kind = cms.untracked.string('TH2F'),
Expand Down
55 changes: 31 additions & 24 deletions DQM/EcalMonitorTasks/python/TrigPrimTask_cfi.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,35 @@
import FWCore.ParameterSet.Config as cms

bxBins = [
"1",
"271",
"541",
"892",
"1162",
"1432",
"1783",
"2053",
"2323",
"2674",
"2944",
"3214",
"3446",
"3490",
"3491",
"3565"
1,
271,
541,
892,
1162,
1432,
1783,
2053,
2323,
2674,
2944,
3214,
3446,
3490,
3491,
3565
]
bxBinLabels = [str(i) for i in bxBins]

bxBinsFine = [i for i in range(1, 3601)]
bxBinLabelsFine = [str(i) for i in bxBinsFine]
nBXBinsFine = len(bxBinsFine)

ecalTrigPrimTask = cms.untracked.PSet(
params = cms.untracked.PSet(
# HLTMuonPath = cms.untracked.string('HLT_Mu5_v*'),
# HLTCaloPath = cms.untracked.string('HLT_SingleJet*'),
bxBins = cms.untracked.vint32(bxBins),
bxBinsFine = cms.untracked.vint32(bxBinsFine),
runOnEmul = cms.untracked.bool(True),
lhcStatusInfoCollectionTag = cms.untracked.InputTag("tcdsDigis","tcdsRecord")
),
Expand Down Expand Up @@ -60,14 +67,14 @@
kind = cms.untracked.string('TProfile'),
otype = cms.untracked.string('Ecal3P'),
xaxis = cms.untracked.PSet(
high = cms.untracked.double(16.0),
nbins = cms.untracked.int32(16),
high = cms.untracked.double(1.0*nBXBinsFine),
nbins = cms.untracked.int32(nBXBinsFine),
low = cms.untracked.double(0.0),
title = cms.untracked.string('bunch crossing'),
labels = cms.untracked.vstring(bxBins)
title = cms.untracked.string('BX Id'),
labels = cms.untracked.vstring(bxBinLabelsFine)
),
btype = cms.untracked.string('User'),
description = cms.untracked.string('TP occupancy in different bunch crossing intervals. This plot is filled by data from physics data stream. It is normal to have very little entries in BX >= 3490.')
description = cms.untracked.string('TP occupancy in different bunch crossing intervals. This plot is filled by data from physics data stream. BX ids start at 1. It is normal to have very little entries in BX >= 3490. The Customize button can be used to zoom in.')
),
HighIntMap = cms.untracked.PSet(
path = cms.untracked.string('%(subdet)s/%(prefix)sSelectiveReadoutTask/Counters/%(prefix)sSRT tower high interest counter%(suffix)s'),
Expand All @@ -85,13 +92,13 @@
high = cms.untracked.double(16.0),
nbins = cms.untracked.int32(16),
low = cms.untracked.double(0.0),
title = cms.untracked.string('bunch crossing'),
labels = cms.untracked.vstring(bxBins)
title = cms.untracked.string('BX Id'),
labels = cms.untracked.vstring(bxBinLabels)
),
yaxis = cms.untracked.PSet(
title = cms.untracked.string('TP Et')
),
description = cms.untracked.string('Mean TP Et in different bunch crossing intervals. This plot is filled by data from physics data stream. It is normal to have very little entries in BX >= 3490.')
description = cms.untracked.string('Mean TP Et in different bunch crossing intervals. This plot is filled by data from physics data stream. BX ids start at 1. It is normal to have very little entries in BX >= 3490.')
),
EtEmulError = cms.untracked.PSet(
# path = cms.untracked.string('Ecal/Errors/TriggerPrimitives/EtEmulation/'),
Expand Down
18 changes: 13 additions & 5 deletions DQM/EcalMonitorTasks/src/TrigPrimTask.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ namespace ecaldqm {
// HLTMuonPath_(""),
// HLTCaloBit_(false),
// HLTMuonBit_(false),
bxBinEdges_{{1, 271, 541, 892, 1162, 1432, 1783, 2053, 2323, 2674, 2944, 3214, 3446, 3490, 3491, 3565}},
bxBinEdges_(),
bxBinEdgesFine_(),
bxBin_(0.),
bxBinFine_(0.),
towerReadouts_(),
lhcStatusInfoCollectionTag_() {}

Expand All @@ -38,6 +40,8 @@ namespace ecaldqm {
}
lhcStatusInfoCollectionTag_ = _params.getUntrackedParameter<edm::InputTag>(
"lhcStatusInfoCollectionTag", edm::InputTag("tcdsDigis", "tcdsRecord"));
bxBinEdges_ = _params.getUntrackedParameter<std::vector<int> >("bxBins");
bxBinEdgesFine_ = _params.getUntrackedParameter<std::vector<int> >("bxBinsFine");
}

void TrigPrimTask::addDependencies(DependencySet& _dependencies) {
Expand Down Expand Up @@ -83,8 +87,12 @@ namespace ecaldqm {
// HLTCaloBit_ = false;
// HLTMuonBit_ = false;

int* pBin(std::upper_bound(bxBinEdges_.begin(), bxBinEdges_.end(), _evt.bunchCrossing()));
std::vector<int>::iterator pBin(std::upper_bound(bxBinEdges_.begin(), bxBinEdges_.end(), _evt.bunchCrossing()));
bxBin_ = static_cast<int>(pBin - bxBinEdges_.begin()) - 0.5;
// fine binning for TP Occ vs BX plot as requested by DAQ in March 2021
std::vector<int>::iterator pBinFine(
std::upper_bound(bxBinEdgesFine_.begin(), bxBinEdgesFine_.end(), _evt.bunchCrossing()));
bxBinFine_ = static_cast<int>(pBinFine - bxBinEdgesFine_.begin()) - 0.5;

edm::ESHandle<EcalTPGTowerStatus> TTStatusRcd_;
_es.get<EcalTPGTowerStatusRcd>().get(TTStatusRcd_);
Expand Down Expand Up @@ -251,9 +259,9 @@ namespace ecaldqm {
meTTFMismatch.fill(ttid);
}

meOccVsBx.fill(EcalBarrel, bxBin_, nTP[0]);
meOccVsBx.fill(-EcalEndcap, bxBin_, nTP[1]);
meOccVsBx.fill(EcalEndcap, bxBin_, nTP[2]);
meOccVsBx.fill(EcalBarrel, bxBinFine_, nTP[0]);
meOccVsBx.fill(-EcalEndcap, bxBinFine_, nTP[1]);
meOccVsBx.fill(EcalEndcap, bxBinFine_, nTP[2]);

// Set TT/Strip Masking status in Ecal3P view
// Status Records are read-in at beginRun() but filled here
Expand Down

0 comments on commit aded279

Please sign in to comment.