Skip to content

Commit

Permalink
Allow GE2/1 demonstrator to be built while 2 GE2/1 layers are in the …
Browse files Browse the repository at this point in the history
…other region during 2024
  • Loading branch information
yeckang committed Feb 16, 2024
1 parent 695ed78 commit 0bc4e54
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
9 changes: 5 additions & 4 deletions Geometry/GEMGeometryBuilder/src/GEMGeometryBuilder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
Updated: 7 August 2020
Updated by Ian J. Watson ([email protected]) to allow GE2/1 demonstrator to be built
Updated: 7 December 2021
Updated by Yechan Kang ([email protected]) to allow GE2/1 demonstrator to be built while 2 GE2/1 layers are in the other region during 2024
Updated : 13 Feburary 2024
*/
#include "Geometry/GEMGeometryBuilder/src/GEMGeometryBuilder.h"
#include "Geometry/GEMGeometry/interface/GEMGeometry.h"
Expand Down Expand Up @@ -74,7 +76,7 @@ void GEMGeometryBuilder::build(GEMGeometry& theGeometry,
fvGE2.parent();
doSuper = fvGE2.nextSibling();
}
bool demonstratorGeometry = nGE21 == 1;
bool demonstratorGeometry = nGE21 % 2 == 1;

#ifdef EDM_ML_DEBUG
edm::LogVerbatim("Geometry") << "Found " << nGE21 << " GE2/1 chambers. Demonstrator geometry on? "
Expand Down Expand Up @@ -369,7 +371,7 @@ void GEMGeometryBuilder::build(GEMGeometry& theGeometry,
}
}

bool demonstratorGeometry = nGE21 == 1;
bool demonstratorGeometry = nGE21 % 2 == 1;
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("Geometry") << "Found " << nGE21 << " GE2/1 chambers. Demonstrator geometry on? "
<< demonstratorGeometry;
Expand Down Expand Up @@ -585,8 +587,7 @@ void GEMGeometryBuilder::buildRegions(GEMGeometry& theGeometry,
auto chamber = theGeometry.chamber(chId);
if (!chamber) {
// this particular layer 1 chamber *should* be missing in the demonstrator geometry (we only have layer 2)
if (!demonstratorGeometry or
not(chId.region() == 1 and chId.station() == 2 and chId.chamber() == 16 and chId.layer() == 1)) {
if (!demonstratorGeometry or not(chId.station() == 2)) {
edm::LogWarning("GEMGeometryBuilder") << "Missing chamber " << chId;
}
} else {
Expand Down
4 changes: 2 additions & 2 deletions Geometry/GEMGeometryBuilder/src/GEMGeometryParsFromDD.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ void GEMGeometryParsFromDD::buildGeometry(DDFilteredView& fv,
edm::LogError("GEMGeometryParsFromDD") << "Failed to find next child volume. Cannot determine presence of GE 2/1";
}
}
bool demonstratorGeometry = nGE21 == 1;
bool demonstratorGeometry = nGE21 % 2 == 1;

#ifdef EDM_ML_DEBUG
edm::LogVerbatim("Geometry") << "Found " << nGE21 << " GE2/1 chambers. Demonstrator geometry on? "
Expand Down Expand Up @@ -296,7 +296,7 @@ void GEMGeometryParsFromDD::buildGeometry(cms::DDFilteredView& fv,
nGE21++;
}
}
bool demonstratorGeometry = nGE21 == 1;
bool demonstratorGeometry = nGE21 % 2 == 1;
#ifdef EDM_ML_DEBUG
edm::LogVerbatim("Geometry") << "Found " << nGE21 << " GE2/1 chambers. Demonstrator geometry on? "
<< demonstratorGeometry;
Expand Down

0 comments on commit 0bc4e54

Please sign in to comment.