Skip to content

Commit 49ac479

Browse files
author
Sunanda
committed
Take Mrco's suggestions
1 parent 37468b4 commit 49ac479

File tree

3 files changed

+30
-46
lines changed

3 files changed

+30
-46
lines changed

Geometry/HcalTowerAlgo/test/HcalCellKount.cc renamed to Geometry/HcalTowerAlgo/test/HcalCellCount.cc

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,19 @@
22
#include "FWCore/Framework/interface/EventSetup.h"
33
#include "FWCore/Framework/interface/MakerMacros.h"
44
#include "FWCore/MessageLogger/interface/MessageLogger.h"
5-
#include "Geometry/HcalCommonData/interface/HcalDDDRecConstants.h"
65
#include "Geometry/Records/interface/CaloGeometryRecord.h"
76
#include "Geometry/CaloGeometry/interface/CaloGeometry.h"
87
#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
9-
#include "Geometry/HcalTowerAlgo/interface/HcalGeometry.h"
108
#include "DataFormats/DetId/interface/DetId.h"
119
#include "DataFormats/EcalDetId/interface/EcalSubdetector.h"
1210
#include "DataFormats/HcalDetId/interface/HcalSubdetector.h"
1311
#include <iostream>
1412
#include <string>
1513

16-
class HcalCellKount : public edm::one::EDAnalyzer<> {
14+
class HcalCellCount : public edm::one::EDAnalyzer<> {
1715
public:
18-
explicit HcalCellKount(const edm::ParameterSet&);
19-
~HcalCellKount(void) override = default;
16+
explicit HcalCellCount(const edm::ParameterSet&);
17+
~HcalCellCount(void) override = default;
2018

2119
static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);
2220
void beginJob() override {}
@@ -28,17 +26,17 @@ class HcalCellKount : public edm::one::EDAnalyzer<> {
2826
edm::ESGetToken<CaloGeometry, CaloGeometryRecord> tok_geom_;
2927
};
3028

31-
HcalCellKount::HcalCellKount(const edm::ParameterSet& iConfig) : verbose_(iConfig.getParameter<int>("Verbosity")) {
29+
HcalCellCount::HcalCellCount(const edm::ParameterSet& iConfig) : verbose_(iConfig.getParameter<int>("Verbosity")) {
3230
tok_geom_ = esConsumes<CaloGeometry, CaloGeometryRecord>();
3331
}
3432

35-
void HcalCellKount::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
33+
void HcalCellCount::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
3634
edm::ParameterSetDescription desc;
3735
desc.add<int>("Verbosity", 0);
38-
descriptions.add("hcalCellKount", desc);
36+
descriptions.add("hcalCellCount", desc);
3937
}
4038

41-
void HcalCellKount::analyze(edm::Event const& /*iEvent*/, const edm::EventSetup& iSetup) {
39+
void HcalCellCount::analyze(edm::Event const& /*iEvent*/, const edm::EventSetup& iSetup) {
4240
const CaloGeometry* geo = &iSetup.getData(tok_geom_);
4341

4442
// ECAL
@@ -99,4 +97,4 @@ void HcalCellKount::analyze(edm::Event const& /*iEvent*/, const edm::EventSetup&
9997
edm::LogVerbatim("HCalGeom") << "HGCaLHSc Geometry does not exist";
10098
}
10199

102-
DEFINE_FWK_MODULE(HcalCellKount);
100+
DEFINE_FWK_MODULE(HcalCellCount);

Geometry/HcalTowerAlgo/test/python/runHcalCellKountRun3_cfg.py renamed to Geometry/HcalTowerAlgo/test/python/runHcalCellCountRun3_cfg.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
###############################################################################
22
# Way to use this:
3-
# cmsRun runHcalCellKountRun3_cfg.py geometry=2021
3+
# cmsRun runHcalCellCountRun3_cfg.py geometry=2021
44
#
55
# Options for geometry 2016, 2016dev, 2017, 2018, 2021, 2023, 2024
66
#
@@ -57,7 +57,7 @@
5757
process.load('Configuration.StandardSequences.SimIdeal_cff')
5858
process.load('Configuration.StandardSequences.EndOfProcess_cff')
5959
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
60-
process.load('Geometry.HcalTowerAlgo.hcalCellKount_cfi')
60+
process.load('Geometry.HcalTowerAlgo.hcalCellCount_cfi')
6161

6262
process.MessageLogger.G4cout=dict()
6363

@@ -127,7 +127,7 @@
127127
process.simulation_step = cms.Path(process.psim)
128128
process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
129129
process.endjob_step = cms.EndPath(process.endOfProcess)
130-
process.analysis_step = cms.EndPath(process.hcalCellKount)
130+
process.analysis_step = cms.EndPath(process.hcalCellCount)
131131

132132
# Schedule definition
133133
process.schedule = cms.Schedule(process.generation_step,

Geometry/HcalTowerAlgo/test/python/runHcalCellKountRun4_cfg.py renamed to Geometry/HcalTowerAlgo/test/python/runHcalCellCountRun4_cfg.py

Lines changed: 19 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
###############################################################################
22
# Way to use this:
3-
# cmsRun runHcalCellKountRun4_cfg.py geometry=D110
3+
# cmsRun runHcalCellCountRun4_cfg.py geometry=D110
44
#
55
# Options for geometry D95, D96, D98, D99, D100, D101, D102, D103, D104,
66
# D105, D106, D107, D108, D109, D110, D111, D112, D113,
@@ -27,48 +27,34 @@
2727
####################################################################
2828
# Use the options
2929

30-
geomName = "Configuration.Geometry.GeometryExtendedRun4" + options.geometry + "Reco_cff"
31-
32-
if (options.geometry == "D115"):
33-
from Configuration.Eras.Era_Phase2C20I13M9_cff import Phase2C20I13M9
34-
process = cms.Process('HcalCellKount',Phase2C20I13M9)
35-
elif (options.geometry == "D104"):
36-
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
37-
process = cms.Process('HcalCellKount',Phase2C22I13M9)
38-
elif (options.geometry == "D106"):
39-
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
40-
process = cms.Process('HcalCellKount',Phase2C22I13M9)
41-
elif (options.geometry == "D109"):
42-
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
43-
process = cms.Process('HcalCellKount',Phase2C22I13M9)
44-
elif (options.geometry == "D111"):
45-
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
46-
process = cms.Process('HcalCellKount',Phase2C22I13M9)
47-
elif (options.geometry == "D112"):
48-
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
49-
process = cms.Process('HcalCellKount',Phase2C22I13M9)
50-
elif (options.geometry == "D113"):
51-
from Configuration.Eras.Era_Phase2C22I13M9_cff import Phase2C22I13M9
52-
process = cms.Process('HcalCellKount',Phase2C22I13M9)
53-
else:
54-
from Configuration.Eras.Era_Phase2C17I13M9_cff import Phase2C17I13M9
55-
process = cms.Process('HcalCellKount',Phase2C17I13M9)
56-
57-
print("Geom file Name: ", geomName)
30+
geomFile = "Configuration.Geometry.GeometryExtendedRun4" + options.geometry + "Reco_cff"
31+
geomName = "Run4" + options.geometry
32+
33+
print("Geometry Name: ", geomName)
34+
print("Geom file Name: ", geomFile)
35+
36+
import Configuration.Geometry.defaultPhase2ConditionsEra_cff as _settings
37+
GLOBAL_TAG, ERA = _settings.get_era_and_conditions(geomName)
38+
39+
print("Global Tag Name: ", GLOBAL_TAG)
40+
print("Era Name: ", ERA)
41+
42+
43+
process = cms.Process('HcalCellCount',ERA)
5844

5945
process.load('Configuration.StandardSequences.Services_cff')
6046
process.load('SimGeneral.HepPDTESSource.pythiapdt_cfi')
6147
process.load('FWCore.MessageService.MessageLogger_cfi')
6248
process.load('Configuration.EventContent.EventContent_cff')
63-
process.load(geomName)
49+
process.load(geomFile)
6450
process.load('Configuration.StandardSequences.MagneticField_cff')
6551
process.load('Configuration.StandardSequences.Generator_cff')
6652
process.load('IOMC.EventVertexGenerators.VtxSmearedRealisticHLLHC_cfi')
6753
process.load('GeneratorInterface.Core.genFilterSummary_cff')
6854
process.load('Configuration.StandardSequences.SimIdeal_cff')
6955
process.load('Configuration.StandardSequences.EndOfProcess_cff')
7056
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
71-
process.load('Geometry.HcalTowerAlgo.hcalCellKount_cfi')
57+
process.load('Geometry.HcalTowerAlgo.hcalCellCount_cfi')
7258

7359
process.MessageLogger.G4cout=dict()
7460

@@ -131,14 +117,14 @@
131117

132118
process.ProductionFilterSequence = cms.Sequence(process.generator)
133119
from Configuration.AlCa.GlobalTag import GlobalTag
134-
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:phase2_realistic_T21', '')
120+
process.GlobalTag = GlobalTag(process.GlobalTag, GLOBAL_TAG, '')
135121

136122
# Path and EndPath definitions
137123
process.generation_step = cms.Path(process.pgen)
138124
process.simulation_step = cms.Path(process.psim)
139125
process.genfiltersummary_step = cms.EndPath(process.genFilterSummary)
140126
process.endjob_step = cms.EndPath(process.endOfProcess)
141-
process.analysis_step = cms.EndPath(process.hcalCellKount)
127+
process.analysis_step = cms.EndPath(process.hcalCellCount)
142128

143129
# Schedule definition
144130
process.schedule = cms.Schedule(process.generation_step,

0 commit comments

Comments
 (0)