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

Fix HGCAL Layer Clusters visualization in Fireworks #42519

Merged
merged 1 commit into from
Aug 14, 2023
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion Fireworks/Calo/plugins/FWCaloClusterProxyBuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,15 @@ void FWCaloClusterProxyBuilder::build(const FWEventItem *iItem, TEveElementList
timeUpperBound = std::max(item()->getConfig()->value<double>("TimeLowerBound(ns)"),
item()->getConfig()->value<double>("TimeUpperBound(ns)"));
} else {
std::cerr << "Warning: couldn't locate 'timeLayerCluster' ValueMap in root file." << std::endl;
iItem->getEvent()->getByLabel(edm::InputTag("hgcalMergeLayerClusters", "timeLayerCluster"), TimeValueMapHandle);
std::cerr << __FILE__ << ":" << __LINE__
<< " couldn't locate 'hgcalLayerClusters:timeLayerCluster' ValueMap in input file. Trying to access "
"'hgcalMergeLayerClusters:timeLayerClusters' ValueMap"
<< std::endl;
if (!TimeValueMapHandle.isValid()) {
std::cerr << __FILE__ << ":" << __LINE__
<< " couldn't locate 'hgcalMergeLayerClusters:timeLayerCluster' ValueMap in input file." << std::endl;
}
}

layer = item()->getConfig()->value<long>("Layer");
Expand Down
21 changes: 19 additions & 2 deletions Fireworks/Calo/plugins/FWTracksterHitsProxyBuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,28 @@ void FWTracksterHitsProxyBuilder::build(const FWEventItem *iItem, TEveElementLis
<< "lower time bound is larger than upper time bound. Maybe opposite is desired?";
}
} else {
edm::LogWarning("DataNotFound|InvalidData") << "couldn't locate 'timeLayerCluster' ValueMap in root file.";
iItem->getEvent()->getByLabel(edm::InputTag("hgcalMergeLayerClusters", "timeLayerCluster"), TimeValueMapHandle_);
edm::LogWarning("DataNotFound|InvalidData")
<< __FILE__ << ":" << __LINE__
<< " couldn't locate 'hgcalLayerClusters:timeLayerCluster' ValueMap in input file. Trying to access "
"'hgcalMergeLayerClusters:timeLayerClusters' ValueMap";
if (!TimeValueMapHandle_.isValid()) {
edm::LogWarning("DataNotFound|InvalidData")
<< __FILE__ << ":" << __LINE__
<< " couldn't locate 'hgcalMergeLayerClusters:timeLayerCluster' ValueMap in input file.";
}
}

if (!layerClustersHandle_.isValid()) {
edm::LogWarning("DataNotFound|InvalidData") << "couldn't locate 'timeLayerCluster' ValueMap in root file.";
iItem->getEvent()->getByLabel(edm::InputTag("hgcalMergeLayerClusters"), layerClustersHandle_);
edm::LogWarning("DataNotFound|InvalidData")
<< __FILE__ << ":" << __LINE__
<< " couldn't locate 'hgcalLayerClusters' collection "
"in input file. Trying to access 'hgcalMergeLayerClusters' collection.";
if (!layerClustersHandle_.isValid()) {
edm::LogWarning("DataNotFound|InvalidData")
<< __FILE__ << ":" << __LINE__ << " couldn't locate 'hgcalMergeLayerClusters' collection in input file.";
}
}

layer_ = item()->getConfig()->value<long>("Layer");
Expand Down
21 changes: 19 additions & 2 deletions Fireworks/Calo/plugins/FWTracksterLayersProxyBuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,28 @@ void FWTracksterLayersProxyBuilder::build(const FWEventItem *iItem, TEveElementL
<< "lower time bound is larger than upper time bound. Maybe opposite is desired?";
}
} else {
edm::LogWarning("DataNotFound|InvalidData") << "couldn't locate 'timeLayerCluster' ValueMap in root file.";
iItem->getEvent()->getByLabel(edm::InputTag("hgcalMergeLayerClusters", "timeLayerCluster"), TimeValueMapHandle_);
edm::LogWarning("DataNotFound|InvalidData")
<< __FILE__ << ":" << __LINE__
<< " couldn't locate 'hgcalLayerClusters:timeLayerCluster' ValueMap in input file. Trying to access "
"'hgcalMergeLayerClusters:timeLayerClusters' ValueMap";
if (!TimeValueMapHandle_.isValid()) {
edm::LogWarning("DataNotFound|InvalidData")
<< __FILE__ << ":" << __LINE__
<< " couldn't locate 'hgcalMergeLayerClusters:timeLayerCluster' ValueMap in input file.";
}
}

if (!layerClustersHandle_.isValid()) {
edm::LogWarning("DataNotFound|InvalidData") << "couldn't locate 'timeLayerCluster' ValueMap in root file.";
iItem->getEvent()->getByLabel(edm::InputTag("hgcalMergeLayerClusters"), layerClustersHandle_);
edm::LogWarning("DataNotFound|InvalidData")
<< __FILE__ << ":" << __LINE__
<< " couldn't locate 'hgcalLayerClusters' collection "
"in input file. Trying to access 'hgcalMergeLayerClusters' collection.";
if (!layerClustersHandle_.isValid()) {
edm::LogWarning("DataNotFound|InvalidData")
<< __FILE__ << ":" << __LINE__ << " couldn't locate 'hgcalMergeLayerClusters' collection in input file.";
}
}

layer_ = item()->getConfig()->value<long>("Layer");
Expand Down