Skip to content

Commit e186baf

Browse files
author
Sunanda
committed
Correct some of the tesing code in Geometry/HGCalGeometry
1 parent af06969 commit e186baf

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

Geometry/HGCalGeometry/test/HGCalWaferSimWt.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ void HGCalWaferSimWt::analyze(const edm::Event& /*iEvent*/, const edm::EventSetu
6262
HGCSiliconDetId hid(id);
6363
auto cell = geom->getPosition(hid, false);
6464
int type = hid.type();
65-
int waferU = (hid.zside() > 0) ? -hid.waferU() : hid.waferU();
65+
int waferU = hid.waferU();
6666
int part = geom->topology().dddConstants().partialWaferType(hid.layer(), waferU, hid.waferV());
6767
int idx = part * 10 + type;
6868
if (std::find(idxs.begin(), idxs.end(), idx) == idxs.end()) {

Geometry/HGCalGeometry/test/python/testHGCalMissingID_cfg.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
###############################################################################
22
# Way to use this:
3-
# cmsRun testHGCalMissingID_cfg.py geometry=D120
3+
# cmsRun testHGCalMissingID_cfg.py geometry=D120 total=10
44
#
55
# Options for geometry D120, D122, D123
6+
# total All, Ten
67
#
78
###############################################################################
89
import FWCore.ParameterSet.Config as cms
@@ -17,6 +18,11 @@
1718
VarParsing.VarParsing.multiplicity.singleton,
1819
VarParsing.VarParsing.varType.string,
1920
"geometry of operations: D120, D122, D123")
21+
options.register('total',
22+
"Ten",
23+
VarParsing.VarParsing.multiplicity.singleton,
24+
VarParsing.VarParsing.varType.string,
25+
"geometry of operations: All, Ten")
2026

2127
### get and parse the command line arguments
2228
options.parseArguments()
@@ -26,13 +32,19 @@
2632
####################################################################
2733
# Use the options
2834

35+
if (options.total == "All"):
36+
total = -1
37+
else:
38+
total = 10
39+
2940
geomName = "Run4" + options.geometry
3041
geomFile = "Configuration.Geometry.GeometryExtended" + geomName + "Reco_cff"
3142
fileName = "HGCMissingID" + options.geometry + ".root"
3243
import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
3344
GLOBAL_TAG, ERA = _settings.get_era_and_conditions(geomName)
3445
print("Geometry file: ", geomFile)
3546
print("Output file: ", fileName)
47+
print("Total: ", total)
3648

3749
process = cms.Process('HGCMissingID',ERA)
3850

@@ -79,6 +91,6 @@
7991
closeFileFast = cms.untracked.bool(True)
8092
)
8193

82-
#process.hgcalGeometryCheck.verbosity = True
94+
process.hgcalMissingID.total = total
8395

8496
process.p1 = cms.Path(process.generator*process.hgcalMissingID)

0 commit comments

Comments
 (0)