Skip to content

Commit 80647a3

Browse files
author
Sunanda
committed
Remove namespace for comparison in SD classes
1 parent 008b386 commit 80647a3

File tree

5 files changed

+103
-59
lines changed

5 files changed

+103
-59
lines changed

Geometry/EcalSimData/data/ecalsens.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<Parameter name="Depth2Name" value="EATJ" eval="false"/>
2020
</SpecPar>
2121
<SpecPar name="ecal_ee">
22-
<PartSelector path="//EFRY"/>
22+
<PartSelector path="//EFRY.*"/>
2323
<Parameter name="SensitiveDetector" value="EcalSensitiveDetector" eval="false"/>
2424
<Parameter name="ReadOutName" value="EcalHitsEE" eval="false"/>
2525
<Parameter name="ncrys" value="25.0"/>

SimG4CMS/Calo/plugins/EcalSimHitStudy.cc

Lines changed: 78 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "Geometry/Records/interface/CaloGeometryRecord.h"
3333

3434
#include <TH1F.h>
35+
#include <TH2F.h>
3536
#include <cmath>
3637
#include <iostream>
3738
#include <fstream>
@@ -40,7 +41,7 @@
4041
#include <string>
4142
#include <vector>
4243

43-
//#define EDM_ML_DEBUG
44+
#define EDM_ML_DEBUG
4445

4546
class EcalSimHitStudy : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::SharedResources> {
4647
public:
@@ -74,6 +75,7 @@ class EcalSimHitStudy : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::on
7475
TH1F *etot_[ndets_], *etotg_[ndets_], *edepAll_[ndets_];
7576
TH1F *r1by9_[ndets_], *r1by25_[ndets_], *r9by25_[ndets_];
7677
TH1F *sEtaEta_[ndets_], *sEtaPhi_[ndets_], *sPhiPhi_[ndets_];
78+
TH2F *poszp_[ndets_], *poszn_[ndets_];
7779
};
7880

7981
EcalSimHitStudy::EcalSimHitStudy(const edm::ParameterSet& ps) {
@@ -134,96 +136,119 @@ void EcalSimHitStudy::beginJob() {
134136
for (int i = 0; i < ndets_; i++) {
135137
sprintf(name, "Hit%d", i);
136138
sprintf(title, "Number of hits in %s", dets[i].c_str());
137-
hit_[i] = tfile->make<TH1F>(name, title, 1000, 0., 20000.);
139+
hit_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 1000, 0., 20000.);
138140
hit_[i]->GetXaxis()->SetTitle(title);
139141
hit_[i]->GetYaxis()->SetTitle("Events");
140142
hit_[i]->Sumw2();
141143
sprintf(name, "Time%d", i);
142144
sprintf(title, "Time of the hit (ns) in %s", dets[i].c_str());
143-
time_[i] = tfile->make<TH1F>(name, title, 1000, 0., 1000.);
145+
time_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 1000, 0., 1000.);
144146
time_[i]->GetXaxis()->SetTitle(title);
145147
time_[i]->GetYaxis()->SetTitle("Hits");
146148
time_[i]->Sumw2();
147149
sprintf(name, "TimeAll%d", i);
148150
sprintf(title, "Hit time (ns) in %s (for first hit in the cell)", dets[i].c_str());
149-
timeAll_[i] = tfile->make<TH1F>(name, title, 1000, 0., 1000.);
151+
timeAll_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 1000, 0., 1000.);
150152
timeAll_[i]->GetXaxis()->SetTitle(title);
151153
timeAll_[i]->GetYaxis()->SetTitle("Hits");
152154
timeAll_[i]->Sumw2();
153155
sprintf(name, "Edep%d", i);
154156
sprintf(title, "Energy deposit (GeV) in %s", dets[i].c_str());
155-
edep_[i] = tfile->make<TH1F>(name, title, 5000, 0., maxEnergy_);
157+
edep_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 5000, 0., maxEnergy_);
156158
edep_[i]->GetXaxis()->SetTitle(title);
157159
edep_[i]->GetYaxis()->SetTitle("Hits");
158160
edep_[i]->Sumw2();
159161
sprintf(name, "EdepAll%d", i);
160162
sprintf(title, "Total Energy deposit in the cell (GeV) in %s", dets[i].c_str());
161-
edepAll_[i] = tfile->make<TH1F>(name, title, 5000, 0., maxEnergy_);
163+
edepAll_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 5000, 0., maxEnergy_);
162164
edepAll_[i]->GetXaxis()->SetTitle(title);
163165
edepAll_[i]->GetYaxis()->SetTitle("Hits");
164166
edepAll_[i]->Sumw2();
165167
sprintf(name, "EdepEM%d", i);
166168
sprintf(title, "Energy deposit (GeV) by EM particles in %s", dets[i].c_str());
167-
edepEM_[i] = tfile->make<TH1F>(name, title, 5000, 0., maxEnergy_);
169+
edepEM_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 5000, 0., maxEnergy_);
168170
edepEM_[i]->GetXaxis()->SetTitle(title);
169171
edepEM_[i]->GetYaxis()->SetTitle("Hits");
170172
edepEM_[i]->Sumw2();
171173
sprintf(name, "EdepHad%d", i);
172174
sprintf(title, "Energy deposit (GeV) by hadrons in %s", dets[i].c_str());
173-
edepHad_[i] = tfile->make<TH1F>(name, title, 5000, 0., maxEnergy_);
175+
edepHad_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 5000, 0., maxEnergy_);
174176
edepHad_[i]->GetXaxis()->SetTitle(title);
175177
edepHad_[i]->GetYaxis()->SetTitle("Hits");
176178
edepHad_[i]->Sumw2();
177179
sprintf(name, "Etot%d", i);
178180
sprintf(title, "Total energy deposit (GeV) in %s", dets[i].c_str());
179-
etot_[i] = tfile->make<TH1F>(name, title, 5000, 0., maxEnergy_);
181+
etot_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 5000, 0., maxEnergy_);
180182
etot_[i]->GetXaxis()->SetTitle(title);
181183
etot_[i]->GetYaxis()->SetTitle("Events");
182184
etot_[i]->Sumw2();
183185
sprintf(name, "EtotG%d", i);
184186
sprintf(title, "Total energy deposit (GeV) in %s (t < 100 ns)", dets[i].c_str());
185-
etotg_[i] = tfile->make<TH1F>(name, title, 5000, 0., maxEnergy_);
187+
etotg_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 5000, 0., maxEnergy_);
186188
etotg_[i]->GetXaxis()->SetTitle(title);
187189
etotg_[i]->GetYaxis()->SetTitle("Events");
188190
etotg_[i]->Sumw2();
189191
sprintf(name, "r1by9%d", i);
190192
sprintf(title, "E1/E9 in %s", dets[i].c_str());
191-
r1by9_[i] = tfile->make<TH1F>(name, title, 100, 0.0, 1.0);
193+
r1by9_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 100, 0.0, 1.0);
192194
r1by9_[i]->GetXaxis()->SetTitle(title);
193195
r1by9_[i]->GetYaxis()->SetTitle("Events");
194196
r1by9_[i]->Sumw2();
195197
sprintf(name, "r1by25%d", i);
196198
sprintf(title, "E1/E25 in %s", dets[i].c_str());
197-
r1by25_[i] = tfile->make<TH1F>(name, title, 100, 0.0, 1.0);
199+
r1by25_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 100, 0.0, 1.0);
198200
r1by25_[i]->GetXaxis()->SetTitle(title);
199201
r1by25_[i]->GetYaxis()->SetTitle("Events");
200202
r1by25_[i]->Sumw2();
201203
sprintf(name, "r9by25%d", i);
202204
sprintf(title, "E9/E25 in %s", dets[i].c_str());
203-
r9by25_[i] = tfile->make<TH1F>(name, title, 100, 0.0, 1.0);
205+
r9by25_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 100, 0.0, 1.0);
204206
r9by25_[i]->GetXaxis()->SetTitle(title);
205207
r9by25_[i]->GetYaxis()->SetTitle("Events");
206208
r9by25_[i]->Sumw2();
207209
double ymax = (i == 0) ? 0.0005 : 0.005;
208210
sprintf(name, "sEtaEta%d", i);
209211
sprintf(title, "Cov(#eta,#eta) in %s", dets[i].c_str());
210-
sEtaEta_[i] = tfile->make<TH1F>(name, title, 1000, 0.0, ymax);
212+
sEtaEta_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 1000, 0.0, ymax);
211213
sEtaEta_[i]->GetXaxis()->SetTitle(title);
212214
sEtaEta_[i]->GetYaxis()->SetTitle("Events");
213215
sEtaEta_[i]->Sumw2();
214216
sprintf(name, "sEtaPhi%d", i);
215217
sprintf(title, "Cov(#eta,#phi) in %s", dets[i].c_str());
216-
sEtaPhi_[i] = tfile->make<TH1F>(name, title, 1000, 0.0, ymax);
218+
sEtaPhi_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 1000, 0.0, ymax);
217219
sEtaPhi_[i]->GetXaxis()->SetTitle(title);
218220
sEtaPhi_[i]->GetYaxis()->SetTitle("Events");
219221
sEtaPhi_[i]->Sumw2();
220222
ymax = (i == 0) ? 0.001 : 0.01;
221223
sprintf(name, "sPhiPhi%d", i);
222224
sprintf(title, "Cov(#phi,#phi) in %s", dets[i].c_str());
223-
sPhiPhi_[i] = tfile->make<TH1F>(name, title, 1000, 0.0, ymax);
225+
sPhiPhi_[i] = tfile->make<TH1F>(name, dets[i].c_str(), 1000, 0.0, ymax);
224226
sPhiPhi_[i]->GetXaxis()->SetTitle(title);
225227
sPhiPhi_[i]->GetYaxis()->SetTitle("Events");
226228
sPhiPhi_[i]->Sumw2();
229+
if (i == 0) {
230+
sprintf (title, "%s+", dets[i].c_str());
231+
poszp_[i] = tfile->make<TH2F>("poszp0", title, 100, 0, 100, 360, 0, 360);
232+
poszp_[i]->GetXaxis()->SetTitle("i#eta");
233+
poszp_[i]->GetYaxis()->SetTitle("i#phi");
234+
sprintf (title, "%s-", dets[i].c_str());
235+
poszn_[i] = tfile->make<TH2F>("poszn0", title, 100, 0, 100, 360, 0, 360);
236+
poszn_[i]->GetXaxis()->SetTitle("i#eta");
237+
poszn_[i]->GetYaxis()->SetTitle("i#phi");
238+
} else {
239+
sprintf (title, "%s+", dets[i].c_str());
240+
poszp_[i] = tfile->make<TH2F>("poszp1", title, 100, -200, 200, 100, -200, 200);
241+
poszp_[i]->GetXaxis()->SetTitle("x (cm)");
242+
poszp_[i]->GetYaxis()->SetTitle("y (cm)");
243+
sprintf (title, "%s-", dets[i].c_str());
244+
poszn_[i] = tfile->make<TH2F>("poszn1", title, 100, -200, 200, 100, -200, 200);
245+
poszn_[i]->GetXaxis()->SetTitle("x (cm)");
246+
poszn_[i]->GetYaxis()->SetTitle("y (cm)");
247+
}
248+
poszp_[i]->GetYaxis()->SetTitleOffset(1.2);
249+
poszp_[i]->Sumw2();
250+
poszn_[i]->GetYaxis()->SetTitleOffset(1.2);
251+
poszn_[i]->Sumw2();
227252
}
228253
}
229254

@@ -236,34 +261,37 @@ void EcalSimHitStudy::analyze(const edm::Event& e, const edm::EventSetup& iS) {
236261
iS.get<CaloGeometryRecord>().get(pG);
237262
geometry_ = pG.product();
238263

264+
double eInc = 0, etaInc = 0, phiInc = 0;
265+
int type(-1);
239266
edm::Handle<edm::HepMCProduct> EvtHandle;
240267
e.getByToken(tok_evt_, EvtHandle);
241-
const HepMC::GenEvent* myGenEvent = EvtHandle->GetEvent();
268+
if (EvtHandle.isValid()) {
269+
const HepMC::GenEvent* myGenEvent = EvtHandle->GetEvent();
242270

243-
double eInc = 0, etaInc = 0, phiInc = 0;
244-
HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin();
245-
if (p != myGenEvent->particles_end()) {
246-
eInc = (*p)->momentum().e();
247-
etaInc = (*p)->momentum().eta();
248-
phiInc = (*p)->momentum().phi();
271+
HepMC::GenEvent::particle_const_iterator p = myGenEvent->particles_begin();
272+
if (p != myGenEvent->particles_end()) {
273+
eInc = (*p)->momentum().e();
274+
etaInc = (*p)->momentum().eta();
275+
phiInc = (*p)->momentum().phi();
276+
}
277+
double ptInc = eInc / std::cosh(etaInc);
278+
ptInc_->Fill(ptInc);
279+
eneInc_->Fill(eInc);
280+
etaInc_->Fill(etaInc);
281+
phiInc_->Fill(phiInc);
282+
283+
if (std::abs(etaInc) < 1.46)
284+
type = 0;
285+
else if (std::abs(etaInc) > 1.49 && std::abs(etaInc) < 3.0)
286+
type = 1;
249287
}
250-
double ptInc = eInc / std::cosh(etaInc);
251-
ptInc_->Fill(ptInc);
252-
eneInc_->Fill(eInc);
253-
etaInc_->Fill(etaInc);
254-
phiInc_->Fill(phiInc);
255288

256-
int type(-1);
257-
if (std::abs(etaInc) < 1.46)
258-
type = 0;
259-
else if (std::abs(etaInc) > 1.49 && std::abs(etaInc) < 3.0)
260-
type = 1;
261-
if (type >= 0) {
262-
bool getHits(false);
289+
int typeMin = (type < 0) ? 0 : type;
290+
int typeMax = (type < 0) ? 1 : type;
291+
for (int type = typeMin; type <= typeMax; ++type) {
263292
edm::Handle<edm::PCaloHitContainer> hitsCalo;
264293
e.getByToken(toks_calo_[type], hitsCalo);
265-
if (hitsCalo.isValid())
266-
getHits = true;
294+
bool getHits = (hitsCalo.isValid());
267295
#ifdef EDM_ML_DEBUG
268296
edm::LogVerbatim("HitStudy") << "EcalSimHitStudy: Input flags Hits " << getHits << " with " << hitsCalo->size()
269297
<< " hits";
@@ -340,6 +368,19 @@ void EcalSimHitStudy::analyzeHits(std::vector<PCaloHit>& hits, int indx) {
340368
for (auto it : hitMap) {
341369
timeAll_[indx]->Fill((it.second).time);
342370
edepAll_[indx]->Fill((it.second).energy);
371+
DetId id(it.first);
372+
if (indx == 0) {
373+
if (EBDetId(id).zside() >= 0)
374+
poszp_[indx]->Fill(EBDetId(id).ietaAbs(), EBDetId(id).iphi());
375+
else
376+
poszn_[indx]->Fill(EBDetId(id).ietaAbs(), EBDetId(id).iphi());
377+
} else {
378+
GlobalPoint gpos = geometry_->getGeometry(id)->getPosition();
379+
if (EEDetId(id).zside() >= 0)
380+
poszp_[indx]->Fill(gpos.x(), gpos.y());
381+
else
382+
poszn_[indx]->Fill(gpos.x(), gpos.y());
383+
}
343384
}
344385

345386
math::XYZVector meanPosition(0.0, 0.0, 0.0);

SimG4CMS/Calo/src/ECalSD.cc

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ double ECalSD::getEnergyDeposit(const G4Step* aStep) {
224224
#ifdef EDM_ML_DEBUG
225225
edm::LogVerbatim("EcalSim") << lv->GetName() << " " << dd4hep::dd::noNamespace(lv->GetName())
226226
<< " Light Collection Efficiency " << weight << ":" << wt1 << " wt2= " << wt2
227-
<< " Weighted Energy Deposit " << edep / CLHEP::MeV << " MeV";
227+
<< " Weighted Energy Deposit " << edep / CLHEP::MeV << " MeV at " << preStepPoint->GetPosition();
228228
#endif
229229
return edep;
230230
}
@@ -293,7 +293,7 @@ uint16_t ECalSD::getRadiationLength(const G4StepPoint* hitPoint, const G4Logical
293293
double radl = hitPoint->GetMaterial()->GetRadlen();
294294
thisX0 = (uint16_t)floor(scaleRL * crystalDepth / radl);
295295
#ifdef plotDebug
296-
const std::string& lvname = lv->GetName();
296+
const std::string& lvname = dd4hep::dd::noNamespace(lv->GetName());
297297
int k1 = (lvname.find("EFRY") != std::string::npos) ? 2 : 0;
298298
int k2 = (lvname.find("refl") != std::string::npos) ? 1 : 0;
299299
int kk = k1 + k2;
@@ -354,27 +354,27 @@ void ECalSD::initMap() {
354354
if (strncmp(lvname.c_str(), depth1Name.c_str(), 4) == 0) {
355355
if (!any(useDepth1, lv)) {
356356
useDepth1.push_back(lv);
357-
//#ifdef EDM_ML_DEBUG
357+
#ifdef EDM_ML_DEBUG
358358
edm::LogVerbatim("EcalSim") << "ECalSD::initMap Logical Volume " << lvname << " in Depth 1 volume list";
359-
//#endif
359+
#endif
360360
}
361361
const G4LogicalVolume* lvr = nameMap[lvname + "_refl"];
362362
if (lvr != nullptr && !any(useDepth1, lvr)) {
363363
useDepth1.push_back(lvr);
364-
//#ifdef EDM_ML_DEBUG
364+
#ifdef EDM_ML_DEBUG
365365
edm::LogVerbatim("EcalSim") << "ECalSD::initMap Logical Volume " << lvname << "_refl"
366366
<< " in Depth 1 volume list";
367-
//#endif
367+
#endif
368368
}
369369
}
370370
}
371371
if (depth2Name != " ") {
372372
if (strncmp(lvname.c_str(), depth2Name.c_str(), 4) == 0) {
373373
if (!any(useDepth2, lv)) {
374374
useDepth2.push_back(lv);
375-
//#ifdef EDM_ML_DEBUG
375+
#ifdef EDM_ML_DEBUG
376376
edm::LogVerbatim("EcalSim") << "ECalSD::initMap Logical Volume " << lvname << " in Depth 2 volume list";
377-
//#endif
377+
#endif
378378
}
379379
const G4LogicalVolume* lvr = nameMap[lvname + "_refl"];
380380
if (lvr != nullptr && !any(useDepth2, lvr)) {
@@ -400,18 +400,18 @@ void ECalSD::initMap() {
400400
} else {
401401
if (!any(noWeight, lv)) {
402402
noWeight.push_back(lv);
403-
//#ifdef EDM_ML_DEBUG
403+
#ifdef EDM_ML_DEBUG
404404
edm::LogVerbatim("EcalSim") << "ECalSD::initMap Logical Volume " << lvname << " Material " << matname
405405
<< " in noWeight list";
406-
//#endif
406+
#endif
407407
}
408408
lv = nameMap[lvname];
409409
if (lv != nullptr && !any(noWeight, lv)) {
410410
noWeight.push_back(lv);
411-
//#ifdef EDM_ML_DEBUG
411+
#ifdef EDM_ML_DEBUG
412412
edm::LogVerbatim("EcalSim") << "ECalSD::initMap Logical Volume " << lvname << " Material " << matname
413413
<< " in noWeight list";
414-
//#endif
414+
#endif
415415
}
416416
}
417417
}
@@ -420,9 +420,9 @@ void ECalSD::initMap() {
420420
edm::LogVerbatim("EcalSim") << "ECalSD: Length Table:";
421421
int i = 0;
422422
for (auto ite : xtalLMap) {
423-
G4String name("Unknown");
423+
std::string name("Unknown");
424424
if (ite.first != nullptr)
425-
name = (ite.first)->GetName();
425+
name = dd4hep::dd::noNamespace((ite.first)->GetName());
426426
edm::LogVerbatim("EcalSim") << " " << i << " " << ite.first << " " << name << " L = " << ite.second;
427427
++i;
428428
}

SimG4CMS/Calo/src/EcalDumpGeometry.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ void EcalDumpGeometry::dumpTouch(G4VPhysicalVolume* pv, unsigned int leafDepth)
9999
double a2 = (std::abs(solid->GetTanAlpha2()) > 1.e-5) ? solid->GetTanAlpha2() : 0.0;
100100
pars.emplace_back(a2);
101101
}
102-
infoVec_.emplace_back(CaloDetInfo(id, noRefl(lvname), globalpoint, pars));
102+
// infoVec_.emplace_back(CaloDetInfo(id, lvname, globalpoint, pars));
103+
infoVec_.emplace_back(CaloDetInfo(id, noRefl(lvname), globalpoint, pars));
103104
}
104105
break;
105106
}

SimG4CMS/Calo/src/HCalSD.cc

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
#include "G4PhysicalConstants.hh"
3131
#include "Randomize.hh"
3232

33+
#include "DD4hep/Filter.h"
34+
3335
#include <iostream>
3436
#include <fstream>
3537
#include <iomanip>
@@ -191,10 +193,10 @@ HCalSD::HCalSD(const std::string& name,
191193
ss0 << "HCalSD: Names to be tested for Volume = HF has " << hfNames.size() << " elements";
192194
#endif
193195
for (unsigned int i = 0; i < hfNames.size(); ++i) {
194-
G4String namv = static_cast<G4String>(hfNames[i]);
196+
G4String namv(static_cast<std::string>(dd4hep::dd::noNamespace(hfNames[i])));
195197
lv = nullptr;
196198
for (auto lvol : *lvs) {
197-
if (lvol->GetName() == namv) {
199+
if (dd4hep::dd::noNamespace(lvol->GetName()) == namv) {
198200
lv = lvol;
199201
break;
200202
}
@@ -225,7 +227,7 @@ HCalSD::HCalSD(const std::string& name,
225227
for (auto const& namx : matNames) {
226228
const G4Material* mat = nullptr;
227229
for (matite = matTab->begin(); matite != matTab->end(); ++matite) {
228-
if ((*matite)->GetName() == static_cast<G4String>(namx)) {
230+
if (static_cast<std::string>(dd4hep::dd::noNamespace((*matite)->GetName())) == namx) {
229231
mat = (*matite);
230232
break;
231233
}
@@ -341,10 +343,10 @@ void HCalSD::fillLogVolumeVector(const std::string& value,
341343
std::stringstream ss3;
342344
ss3 << "HCalSD: " << lvnames.size() << " names to be tested for Volume <" << value << ">:";
343345
for (unsigned int i = 0; i < lvnames.size(); ++i) {
344-
G4String namv = static_cast<G4String>(lvnames[i]);
346+
G4String namv(static_cast<std::string>(dd4hep::dd::noNamespace(lvnames[i])));
345347
lv = nullptr;
346348
for (auto lvol : *lvs) {
347-
if (lvol->GetName() == namv) {
349+
if (dd4hep::dd::noNamespace(lvol->GetName()) == namv) {
348350
lv = lvol;
349351
break;
350352
}
@@ -989,7 +991,7 @@ void HCalSD::plotProfile(const G4Step* aStep, const G4ThreeVector& global, doubl
989991
double depth = -2000;
990992
int idx = 4;
991993
for (int n = 0; n < touch->GetHistoryDepth(); ++n) {
992-
G4String name = touch->GetVolume(n)->GetName();
994+
G4String name(static_cast<std::string>(dd4hep::dd::noNamespace(touch->GetVolume(n)->GetName())));
993995
#ifdef EDM_ML_DEBUG
994996
edm::LogVerbatim("HcalSim") << "plotProfile Depth " << n << " Name " << name;
995997
#endif

0 commit comments

Comments
 (0)