Skip to content

Commit 0e6df76

Browse files
committed
update signature with fSkipSimChannelTrackIDs (default false)
1 parent 58268ff commit 0e6df76

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

sbncode/LArG4/MergeSimSourcesSBN_module.cc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@ class sbn::MergeSimSourcesSBN : public art::EDProducer {
9797
true // default
9898
};
9999

100+
fhicl::Atom<bool> SkipSimChannelTrackIDs{
101+
fhicl::Name{"SkipSimChannelTrackIDs"},
102+
fhicl::Comment{"Skip G4 track IDs in SimChannels"},
103+
false // default
104+
};
105+
100106
fhicl::Atom<bool> FillAuxDetSimChannels{
101107
fhicl::Name{"FillAuxDetSimChannels"},
102108
fhicl::Comment{"whether to merge AuxDetSimChannels"},
@@ -156,6 +162,7 @@ class sbn::MergeSimSourcesSBN : public art::EDProducer {
156162
bool const fFillMCParticlesAssociated;
157163
bool const fFillSimPhotons;
158164
bool const fFillSimChannels;
165+
bool const fSkipSimChannelTrackIDs;
159166
bool const fFillAuxDetSimChannels;
160167
bool const fFillSimEnergyDeposits;
161168
std::vector<std::string> const fEnergyDepositionInstances;
@@ -198,6 +205,7 @@ sbn::MergeSimSourcesSBN::MergeSimSourcesSBN(Parameters const& params)
198205
, fFillMCParticlesAssociated(params().FillMCParticlesAssociated())
199206
, fFillSimPhotons(params().FillSimPhotons())
200207
, fFillSimChannels(params().FillSimChannels())
208+
, fSkipSimChannelTrackIDs(params().SkipSimChannelTrackIDs())
201209
, fFillAuxDetSimChannels(params().FillAuxDetSimChannels())
202210
, fFillSimEnergyDeposits(
203211
getOptionalValue(params().FillSimEnergyDeposits)
@@ -349,7 +357,7 @@ void sbn::MergeSimSourcesSBN::produce(art::Event& e)
349357

350358
if (fFillSimChannels) {
351359
auto const& input_scCol = e.getProduct<std::vector<sim::SimChannel>>(input_label);
352-
MergeUtility.MergeSimChannels(*scCol, input_scCol, i_source);
360+
MergeUtility.MergeSimChannels(*scCol, input_scCol, i_source, !fSkipSimChannelTrackIDs);
353361
}
354362

355363
if (fFillAuxDetSimChannels) {
@@ -451,6 +459,7 @@ void sbn::MergeSimSourcesSBN::dumpConfiguration() const
451459
if (fFillMCParticlesAssociated) log << "\n - filling MCParticlesAssociated";
452460

453461
if (fFillSimChannels) log << "\n - filling SimChannels";
462+
if (fSkipSimChannelTrackIDs) log << "\n - skipping track IDs in filling SimChannels";
454463

455464
if (fFillAuxDetSimChannels) log << "\n - filling AuxDetSimChannels";
456465

0 commit comments

Comments
 (0)