Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FED Digis trend plot fix #19061

Merged
merged 4 commits into from Jun 7, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions DQM/SiPixelPhase1Common/python/HistogramManager_cfi.py
Expand Up @@ -27,6 +27,9 @@
onlineblock = cms.int32(20), # #LS after which histograms are reset
n_onlineblocks = cms.int32(100), # #blocks to keep for histograms with history

# lumiblock - for coarse temporal splitting
lumiblock = cms.int32(10), # Number of LS to include in a block

# other geometry parameters (n_layers, n_ladders per layer, etc.) are inferred.
# there are lots of geometry assuptions in the code.
)
Expand Down
13 changes: 13 additions & 0 deletions DQM/SiPixelPhase1Common/src/GeometryInterface.cc
Expand Up @@ -335,6 +335,7 @@ void GeometryInterface::loadTimebased(edm::EventSetup const& iSetup, const edm::
},
1, iConfig.getParameter<int>("max_lumisection")
);

int onlineblock = iConfig.getParameter<int>("onlineblock");
int n_onlineblocks = iConfig.getParameter<int>("n_onlineblocks");
addExtractor(intern("OnlineBlock"),
Expand All @@ -346,6 +347,18 @@ void GeometryInterface::loadTimebased(edm::EventSetup const& iSetup, const edm::
// but the strange range allows the RenderPlugin to know the block size.
onlineblock, onlineblock+n_onlineblocks-1
);

int lumiblock = iConfig.getParameter<int>("lumiblock");
addExtractor(intern("LumiBlock"),
[lumiblock] (InterestingQuantities const& iq) {
if(!iq.sourceEvent) return UNDEFINED;
// The '-1' is for making 1-10 the same block rather than 0-9
// The '+0.5' makes the block span an integer range rather n.5-m.5
return Value( ((iq.sourceEvent->luminosityBlock()-1)/lumiblock) + 0.5 );
},
-0.5, iConfig.getParameter<int>("max_lumisection")/lumiblock
);

addExtractor(intern("BX"),
[] (InterestingQuantities const& iq) {
if(!iq.sourceEvent) return UNDEFINED;
Expand Down
6 changes: 3 additions & 3 deletions DQM/SiPixelPhase1Digis/python/SiPixelPhase1Digis_cfi.py
Expand Up @@ -82,18 +82,18 @@
range_max = 1000,
range_nbins = 200,
dimensions = 0,
enabled = False,
#enabled = False,
specs = VPSet(
Specification().groupBy("FED/Event") #produce the mean number of digis per event and FED per lumisection
.reduce("COUNT")
.groupBy("FED/Lumisection")
.groupBy("FED/LumiBlock")
.reduce("MEAN")
.groupBy("FED", "EXTEND_X")
.groupBy("", "EXTEND_Y")
.save(),
Specification().groupBy("FED/Event") #produce the mean number of digis per event and FED per lumisection
.reduce("COUNT")
.groupBy("Lumisection")
.groupBy("LumiBlock")
.reduce("MEAN")
.groupBy("", "EXTEND_X")
.save()
Expand Down