Skip to content

Commit d3f418c

Browse files
authored
Move TargetENProcessFilter msg to the logging system (#1844)
1 parent 3b497fa commit d3f418c

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

Biasing/src/Biasing/TargetENProcessFilter.cxx

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,7 @@ void TargetENProcessFilter::stepping(const G4Step* step) {
5454
// If the particle isn't in the target, don't continue with the processing.
5555
if (track_volume != target_volume) return;
5656

57-
/*std::cout << "*******************************" << std::endl;
58-
std::cout << "* Step " << track->GetCurrentStepNumber() << std::endl;
59-
std::cout << "********************************" << std::endl;*/
57+
// ldmx_log(trace)<< "* Step " << track->GetCurrentStepNumber();
6058

6159
if (track->GetMomentum().mag() > recoil_energy_threshold_) {
6260
track->SetTrackStatus(fKillTrackAndSecondaries);
@@ -70,10 +68,8 @@ void TargetENProcessFilter::stepping(const G4Step* step) {
7068
// If the brem photon doesn't undergo any reaction in the target, stop
7169
// processing the rest of the event.
7270
if (secondaries->size() == 0) {
73-
/*std::cout << "[ TargetENProcessFilter ]: "
74-
<< "Electron did not interact in the target. --> Postponing
75-
tracks."
76-
<< std::endl;*/
71+
ldmx_log(debug)
72+
<< "Electron did not interact in the target. --> Postponing tracks.";
7773

7874
track->SetTrackStatus(fKillTrackAndSecondaries);
7975
G4RunManager::GetRunManager()->AbortEvent();
@@ -82,26 +78,22 @@ void TargetENProcessFilter::stepping(const G4Step* step) {
8278
G4String process_name =
8379
secondaries->at(0)->GetCreatorProcess()->GetProcessName();
8480

85-
/*std::cout << "[ TargetENProcessFilter ]: "
86-
<< "Electron produced " << secondaries->size()
87-
<< " particle via " << processName << " process."
88-
<< std::endl;*/
81+
ldmx_log(debug) << "Electron produced " << secondaries->size()
82+
<< " particle via " << process_name << " process.";
8983

9084
// Only record the process that is being biased
9185
if (!process_name.contains(process_)) {
92-
/*std::cout << "[ TargetENProcessFilter ]: "
93-
<< "Process was not " << BiasingMessenger::getProcess() << "-->
94-
Killing all tracks!"
95-
<< std::endl;*/
86+
ldmx_log(debug) << "Process was not " << process_
87+
<< "--> Killing all tracks!";
9688

9789
track->SetTrackStatus(fKillTrackAndSecondaries);
9890
G4RunManager::GetRunManager()->AbortEvent();
9991
return;
10092
}
10193

102-
std::cout << "[ TargetENProcessFilter ]: "
103-
<< "Electronuclear reaction resulted in " << secondaries->size()
104-
<< " particles via " << process_name << " process." << std::endl;
94+
ldmx_log(info) << "Electronuclear reaction resulted in "
95+
<< secondaries->size() << " particles via " << process_name
96+
<< " process.";
10597
// BiasingMessenger::setEventWeight(track->GetWeight());
10698
reaction_occurred_ = true;
10799
}

0 commit comments

Comments
 (0)