Skip to content

Commit 2567f8f

Browse files
authored
Merge pull request #45365 from bsunanda/Phase2-hgx358B
Phase2-hgx358B Modify the name of the class HGCPassive to HGCalTBPassive to separate the names of TB and non-TB classes of HGCal
2 parents 36289c5 + 78782ce commit 2567f8f

13 files changed

+58
-50
lines changed

Geometry/HGCalTBCommonData/python/testTB181V0XML_cfi.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
'Geometry/HGCalTBCommonData/data/hgcalwafer/v7/hgcalwafer.xml',
1414
'Geometry/HGCalTBCommonData/data/TB181/Oct181/hgcalsense.xml',
1515
'Geometry/HGCalTBCommonData/data/TB181/hgcProdCuts.xml',
16-
'Geometry/HGCalTBCommonData/data/TB181/Oct181/hgcalCons.xml'
16+
'Geometry/HGCalTBCommonData/data/TB181/Oct181/hgcalCons.xml',
17+
'Geometry/HcalSimData/data/CaloUtil/2026/v5c/CaloUtil.xml'
1718
),
1819
rootNodeName = cms.string('cms:OCMS')
1920
)

Geometry/HGCalTBCommonData/python/testTB181V1XML_cfi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
'Geometry/HGCalTBCommonData/data/TB181/Oct181/hgcalEE.xml',
1111
'Geometry/HGCalTBCommonData/data/TB181/Oct181/hgcalsense.xml',
1212
'Geometry/HGCalTBCommonData/data/TB181/hgcProdCuts.xml',
13-
'Geometry/HGCalTBCommonData/data/TB181/Oct181/hgcalCons.xml'
13+
'Geometry/HGCalTBCommonData/data/TB181/Oct181/hgcalCons.xml',
14+
'Geometry/HcalSimData/data/CaloUtil/2026/v5c/CaloUtil.xml'
15+
1416
),
1517
rootNodeName = cms.string('cms:OCMS')
1618
)

Geometry/HGCalTBCommonData/python/testTB181V2XML_cfi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
'Geometry/HGCalTBCommonData/data/hgcalwafer/v7/hgcalwafer.xml',
1111
'Geometry/HGCalTBCommonData/data/TB181/Test/hgcalsense.xml',
1212
'Geometry/HGCalTBCommonData/data/TB181/Test/hgcProdCuts.xml',
13-
'Geometry/HGCalTBCommonData/data/TB181/Test/hgcalCons.xml'
13+
'Geometry/HGCalTBCommonData/data/TB181/Test/hgcalCons.xml',
14+
'Geometry/HcalSimData/data/CaloUtil/2026/v5c/CaloUtil.xml'
15+
1416
),
1517
rootNodeName = cms.string('cms:OCMS')
1618
)

Geometry/HGCalTBCommonData/python/testTB181XML_cfi.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
'Geometry/HGCalTBCommonData/data/hgcalwafer/v7/hgcalwafer.xml',
1414
'Geometry/HGCalTBCommonData/data/TB181/Oct181/hgcalsense.xml',
1515
'Geometry/HGCalTBCommonData/data/TB181/hgcProdCuts.xml',
16-
'Geometry/HGCalTBCommonData/data/TB181/Oct181/hgcalCons.xml'
16+
'Geometry/HGCalTBCommonData/data/TB181/Oct181/hgcalCons.xml',
17+
'Geometry/HcalSimData/data/CaloUtil/2026/v5c/CaloUtil.xml'
18+
1719
),
1820
rootNodeName = cms.string('cms:OCMS')
1921
)

SimG4CMS/HGCalTestBeam/plugins/HGCPassive.cc renamed to SimG4CMS/HGCalTestBeam/plugins/HGCalTBPassive.cc

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
///////////////////////////////////////////////////////////////////////////////
2-
// File: HGCPassive.cc
2+
// File: HGCalTBPassive.cc
33
// copied from SimG4HGCalValidation
44
// Description: Main analysis class for HGCal Validation of G4 Hits
55
///////////////////////////////////////////////////////////////////////////////
@@ -33,15 +33,15 @@
3333

3434
//#define EDM_ML_DEBUG
3535

36-
class HGCPassive : public SimProducer,
37-
public Observer<const BeginOfRun *>,
38-
public Observer<const BeginOfEvent *>,
39-
public Observer<const G4Step *> {
36+
class HGCalTBPassive : public SimProducer,
37+
public Observer<const BeginOfRun *>,
38+
public Observer<const BeginOfEvent *>,
39+
public Observer<const G4Step *> {
4040
public:
41-
HGCPassive(const edm::ParameterSet &p);
42-
HGCPassive(const HGCPassive &) = delete; // stop default
43-
const HGCPassive &operator=(const HGCPassive &) = delete;
44-
~HGCPassive() override;
41+
HGCalTBPassive(const edm::ParameterSet &p);
42+
HGCalTBPassive(const HGCalTBPassive &) = delete; // stop default
43+
const HGCalTBPassive &operator=(const HGCalTBPassive &) = delete;
44+
~HGCalTBPassive() override;
4545

4646
void produce(edm::Event &, const edm::EventSetup &) override;
4747

@@ -75,8 +75,8 @@ class HGCPassive : public SimProducer,
7575
std::map<std::pair<G4LogicalVolume *, unsigned int>, std::array<double, 3>> store_;
7676
};
7777

78-
HGCPassive::HGCPassive(const edm::ParameterSet &p)
79-
: m_Passive(p.getParameter<edm::ParameterSet>("HGCPassive")),
78+
HGCalTBPassive::HGCalTBPassive(const edm::ParameterSet &p)
79+
: m_Passive(p.getParameter<edm::ParameterSet>("HGCalTBPassive")),
8080
LVNames_(m_Passive.getParameter<std::vector<std::string>>("LVNames")),
8181
motherName_(m_Passive.getParameter<std::string>("MotherName")),
8282
addlevel_((m_Passive.getParameter<bool>("IfDD4hep")) ? 1 : 0),
@@ -97,17 +97,17 @@ HGCPassive::HGCPassive(const edm::ParameterSet &p)
9797
}
9898
}
9999

100-
HGCPassive::~HGCPassive() {}
100+
HGCalTBPassive::~HGCalTBPassive() {}
101101

102-
void HGCPassive::produce(edm::Event &e, const edm::EventSetup &) {
102+
void HGCalTBPassive::produce(edm::Event &e, const edm::EventSetup &) {
103103
for (unsigned int k = 0; k < LVNames_.size(); ++k) {
104104
std::unique_ptr<edm::PassiveHitContainer> hgcPH(new edm::PassiveHitContainer);
105105
endOfEvent(*hgcPH, k);
106106
e.put(std::move(hgcPH), Form("%sPassiveHits", LVNames_[k].c_str()));
107107
}
108108
}
109109

110-
void HGCPassive::update(const BeginOfRun *run) {
110+
void HGCalTBPassive::update(const BeginOfRun *run) {
111111
topPV_ = getTopPV();
112112
if (topPV_ == nullptr) {
113113
edm::LogWarning("HGCSim") << "Cannot find top level volume\n";
@@ -119,7 +119,7 @@ void HGCPassive::update(const BeginOfRun *run) {
119119
}
120120

121121
#ifdef EDM_ML_DEBUG
122-
edm::LogVerbatim("HGCSim") << "HGCPassive::Finds " << mapLV_.size() << " logical volumes";
122+
edm::LogVerbatim("HGCSim") << "HGCalTBPassive::Finds " << mapLV_.size() << " logical volumes";
123123
unsigned int k(0);
124124
for (const auto &lvs : mapLV_) {
125125
edm::LogVerbatim("HGCSim") << "Entry[" << k << "] " << lvs.first << ": (" << (lvs.second).first << ", "
@@ -131,17 +131,17 @@ void HGCPassive::update(const BeginOfRun *run) {
131131
}
132132

133133
//=================================================================== per EVENT
134-
void HGCPassive::update(const BeginOfEvent *evt) {
134+
void HGCalTBPassive::update(const BeginOfEvent *evt) {
135135
int iev = (*evt)()->GetEventID();
136-
edm::LogVerbatim("HGCSim") << "HGCPassive: =====> Begin event = " << iev << std::endl;
136+
edm::LogVerbatim("HGCSim") << "HGCalTBPassive: =====> Begin event = " << iev << std::endl;
137137

138138
++count_;
139139
store_.clear();
140140
}
141141

142142
// //=================================================================== each
143143
// STEP
144-
void HGCPassive::update(const G4Step *aStep) {
144+
void HGCalTBPassive::update(const G4Step *aStep) {
145145
if (aStep != nullptr) {
146146
G4VSensitiveDetector *curSD = aStep->GetPreStepPoint()->GetSensitiveDetector();
147147
const G4VTouchable *touchable = aStep->GetPreStepPoint()->GetTouchable();
@@ -211,7 +211,7 @@ void HGCPassive::update(const G4Step *aStep) {
211211

212212
//================================================================ End of EVENT
213213

214-
void HGCPassive::endOfEvent(edm::PassiveHitContainer &hgcPH, unsigned int k) {
214+
void HGCalTBPassive::endOfEvent(edm::PassiveHitContainer &hgcPH, unsigned int k) {
215215
#ifdef EDM_ML_DEBUG
216216
unsigned int kount(0);
217217
#endif
@@ -224,19 +224,19 @@ void HGCPassive::endOfEvent(edm::PassiveHitContainer &hgcPH, unsigned int k) {
224224
(it->second).second, (element.first).second, (element.second)[1], (element.second)[2], (element.second)[0]);
225225
hgcPH.push_back(hit);
226226
#ifdef EDM_ML_DEBUG
227-
edm::LogVerbatim("HGCSim") << "HGCPassive[" << k << "] Hit[" << kount << "] " << hit;
227+
edm::LogVerbatim("HGCSim") << "HGCalTBPassive[" << k << "] Hit[" << kount << "] " << hit;
228228
++kount;
229229
#endif
230230
}
231231
}
232232
}
233233
}
234234

235-
G4VPhysicalVolume *HGCPassive::getTopPV() {
235+
G4VPhysicalVolume *HGCalTBPassive::getTopPV() {
236236
return G4TransportationManager::GetTransportationManager()->GetNavigatorForTracking()->GetWorldVolume();
237237
}
238238

239-
HGCPassive::volumeIterator HGCPassive::findLV(G4LogicalVolume *plv) {
239+
HGCalTBPassive::volumeIterator HGCalTBPassive::findLV(G4LogicalVolume *plv) {
240240
auto itr = mapLV_.find(plv);
241241
if (itr == mapLV_.end()) {
242242
std::string name = DD4hep2DDDName::noNameSpace(static_cast<std::string>(plv->GetName()));
@@ -255,12 +255,12 @@ HGCPassive::volumeIterator HGCPassive::findLV(G4LogicalVolume *plv) {
255255
return itr;
256256
}
257257

258-
void HGCPassive::storeInfo(const HGCPassive::volumeIterator it,
259-
G4LogicalVolume *plv,
260-
unsigned int copy,
261-
double time,
262-
double energy,
263-
bool flag) {
258+
void HGCalTBPassive::storeInfo(const HGCalTBPassive::volumeIterator it,
259+
G4LogicalVolume *plv,
260+
unsigned int copy,
261+
double time,
262+
double energy,
263+
bool flag) {
264264
std::pair<G4LogicalVolume *, unsigned int> key(plv, copy);
265265
auto itr = store_.find(key);
266266
double ee = (flag) ? energy : 0;
@@ -272,7 +272,7 @@ void HGCPassive::storeInfo(const HGCPassive::volumeIterator it,
272272
}
273273
#ifdef EDM_ML_DEBUG
274274
itr = store_.find(key);
275-
edm::LogVerbatim("HGCSim") << "HGCPassive: Element " << (it->second).first << ":" << (it->second).second << ":"
275+
edm::LogVerbatim("HGCSim") << "HGCalTBPassive: Element " << (it->second).first << ":" << (it->second).second << ":"
276276
<< copy << " T " << (itr->second)[0] << " E " << (itr->second)[1] << ":"
277277
<< (itr->second)[2];
278278
#endif
@@ -281,4 +281,4 @@ void HGCPassive::storeInfo(const HGCPassive::volumeIterator it,
281281
#include "SimG4Core/Watcher/interface/SimWatcherFactory.h"
282282
#include "FWCore/PluginManager/interface/ModuleDef.h"
283283

284-
DEFINE_SIMWATCHER(HGCPassive);
284+
DEFINE_SIMWATCHER(HGCalTBPassive);

SimG4CMS/HGCalTestBeam/test/HGCalTBCERN170_cfg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@
9797
process.g4SimHits.HGCSD.RejectMouseBite = True
9898
process.g4SimHits.HGCSD.RotatedWafer = True
9999
process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
100-
HGCPassive = cms.PSet(
100+
HGCalTBPassive = cms.PSet(
101101
LVNames = cms.vstring('HGCalEE','HGCalHE','HGCalAH', 'HGCalBeam', 'CMSE'),
102102
MotherName = cms.string('OCMS'),
103103
IfDD4hep = cms.bool(False),
104104
),
105-
type = cms.string('HGCPassive'),
105+
type = cms.string('HGCalTBPassive'),
106106
)
107107
)
108108
process.HGCalTBAnalyzer.doDigis = False

SimG4CMS/HGCalTestBeam/test/HGCalTBCERN181Oct1DD4hep_cfg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@
9999
process.DDDetectorESProducer.confGeomXMLFiles = cms.FileInPath("SimG4CMS/HGCalTestBeam/data/dd4hep/HGCalTB181Oct1.xml")
100100

101101
process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
102-
HGCPassive = cms.PSet(
102+
HGCalTBPassive = cms.PSet(
103103
LVNames = cms.vstring('HGCalEE','HGCalHE','HGCalAH', 'HGCalBeam', 'CMSE'),
104104
MotherName = cms.string('OCMS'),
105105
IfDD4hep = cms.bool(True),
106106
),
107-
type = cms.string('HGCPassive'),
107+
type = cms.string('HGCalTBPassive'),
108108
)
109109
)
110110
process.HGCalTBAnalyzer.doDigis = False

SimG4CMS/HGCalTestBeam/test/HGCalTBCERN181Oct1PC1mm_cfg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,12 +97,12 @@
9797
process.g4SimHits.HGCSD.RejectMouseBite = True
9898
process.g4SimHits.HGCSD.RotatedWafer = True
9999
process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
100-
HGCPassive = cms.PSet(
100+
HGCalTBPassive = cms.PSet(
101101
LVNames = cms.vstring('HGCalEE','HGCalHE','HGCalAH', 'HGCalBeam', 'CMSE'),
102102
MotherName = cms.string('OCMS'),
103103
IfDD4hep = cms.bool(False),
104104
),
105-
type = cms.string('HGCPassive'),
105+
type = cms.string('HGCalTBPassive'),
106106
)
107107
)
108108
process.HGCalTBAnalyzer.doDigis = False

SimG4CMS/HGCalTestBeam/test/HGCalTBCERN181Oct1_cfg.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
process.load('Geometry.HGCalTBCommonData.hgcalTBNumberingInitialization_cfi')
1414
process.load('Geometry.HGCalTBCommonData.hgcalTBParametersInitialization_cfi')
1515
process.load('Geometry.HcalTestBeamData.hcalTB06Parameters_cff')
16+
process.load('Geometry.HcalCommonData.caloSimulationParameters_cff')
1617
process.load('Geometry.CaloEventSetup.HGCalTBTopology_cfi')
1718
process.load('Geometry.HGCalGeometry.HGCalTBGeometryESProducer_cfi')
1819
process.load('Configuration.StandardSequences.MagneticField_0T_cff')
@@ -101,12 +102,12 @@
101102
process.g4SimHits.G4CheckOverlap.gdmlFlag = True
102103
process.g4SimHits.FileNameGDML = "TBHGCal181Oct.gdml"
103104
process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
104-
HGCPassive = cms.PSet(
105+
HGCalTBPassive = cms.PSet(
105106
LVNames = cms.vstring('HGCalEE','HGCalHE','HGCalAH', 'HGCalBeam', 'CMSE'),
106107
MotherName = cms.string('OCMS'),
107108
IfDD4hep = cms.bool(False),
108109
),
109-
type = cms.string('HGCPassive'),
110+
type = cms.string('HGCalTBPassive'),
110111
)
111112
)
112113
process.HGCalTBAnalyzer.doDigis = False

SimG4CMS/HGCalTestBeam/test/HGCalTBCERN181Oct1el100_cfg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@
9999
process.g4SimHits.HGCSD.RotatedWafer = True
100100

101101
process.g4SimHits.Watchers = cms.VPSet(cms.PSet(
102-
HGCPassive = cms.PSet(
102+
HGCalTBPassive = cms.PSet(
103103
LVNames = cms.vstring('HGCalEE','HGCalHE','HGCalAH', 'HGCalBeam', 'CMSE'),
104104
MotherName = cms.string('OCMS'),
105105
IfDD4hep = cms.bool(False),
106106
),
107-
type = cms.string('HGCPassive'),
107+
type = cms.string('HGCalTBPassive'),
108108
)
109109
)
110110
process.HGCalTBAnalyzer.doDigis = False

0 commit comments

Comments
 (0)