Skip to content

Commit

Permalink
fix hgcal layercluster visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
waredjeb committed Aug 14, 2023
1 parent e1e81d1 commit 743c4ba
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 5 deletions.
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

0 comments on commit 743c4ba

Please sign in to comment.