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

DrawBeamCal: adapt to new BitField API in DD4hep #26

Merged
merged 2 commits into from Oct 2, 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
2 changes: 1 addition & 1 deletion CMakeLists.txt
@@ -1,6 +1,6 @@
CMAKE_MINIMUM_REQUIRED( VERSION 3.3 )

PROJECT( FCalClusterer CXX )
PROJECT( FCalClusterer CXX C )

SET( PROJECT_VERSION_MAJOR 0 )
SET( PROJECT_VERSION_MINOR 5 )
Expand Down
23 changes: 12 additions & 11 deletions source/MarlinProcessors/src/DrawBeamCalFromDD4hep.cpp
Expand Up @@ -331,9 +331,10 @@ void DrawBeamCalFromDD4hep::drawCartesianGridXY() {
for (MapIdVal::iterator it = hitEnergies.begin(); it != hitEnergies.end(); ++it) {
unsigned int cellid = it->first;
double energy = it->second;
(*m_seg.segmentation()->decoder()).setValue(0, cellid);
int xBin = (*m_seg.segmentation()->decoder())["x"];
int yBin = (*m_seg.segmentation()->decoder())["y"];
auto const& decoder = *m_seg.segmentation()->decoder();
auto llCellID = decoder.toLong(0, cellid);
int xBin = decoder.get(llCellID, "x");
int yBin = decoder.get(llCellID, "y");
g.Fill( xBin*gridX, yBin*gridY, energy );
}

Expand Down Expand Up @@ -366,11 +367,10 @@ void DrawBeamCalFromDD4hep::drawPolarGridRPhi2() {
for (MapIdVal::iterator it = hitEnergies.begin(); it != hitEnergies.end(); ++it) {
unsigned int cellid = it->first;
double energy = it->second;
(*m_seg.segmentation()->decoder()).setValue(0, cellid);
int rBin = (*m_seg.segmentation()->decoder())["r"];
int pBin = (*m_seg.segmentation()->decoder())["phi"];


auto const& decoder = *m_seg.segmentation()->decoder();
auto llCellID = decoder.toLong(0, cellid);
int rBin = decoder.get(llCellID, "r");
int pBin = decoder.get(llCellID, "phi");

dummy.Fill( rBin, pBin, energy);
}
Expand All @@ -390,9 +390,10 @@ void DrawBeamCalFromDD4hep::drawPolarGridRPhi2() {
for (MapIdVal::iterator it = hitEnergies.begin(); it != hitEnergies.end(); ++it) {
unsigned int cellid = it->first;
double energy = it->second;
(*m_seg.segmentation()->decoder()).setValue(0, cellid);
int rBin = (*m_seg.segmentation()->decoder())["r"];
int pBin = (*m_seg.segmentation()->decoder())["phi"];
auto const& decoder = *m_seg.segmentation()->decoder();
auto llCellID = decoder.toLong(0, cellid);
int rBin = decoder.get(llCellID, "r");
int pBin = decoder.get(llCellID, "phi");

const double offset = offsetPhi;
const double rI = rValues[rBin];
Expand Down