Skip to content
This repository was archived by the owner on May 6, 2024. It is now read-only.

Commit 4150170

Browse files
EinarElentomeichlersmith
authored andcommitted
Last set of minor refactors
1 parent 1ec4833 commit 4150170

7 files changed

Lines changed: 10 additions & 12 deletions

File tree

include/SimCore/DetectorConstruction.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class DetectorConstruction : public G4VUserDetectorConstruction {
4646
/**
4747
* Class destructor.
4848
*/
49-
~DetectorConstruction() = default;
49+
virtual ~DetectorConstruction() = default;
5050

5151
/**
5252
* Construct the detector.

include/SimCore/UserPrimaryParticleInformation.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ class UserPrimaryParticleInformation
2222
/**
2323
* Class Constructor.
2424
*/
25-
UserPrimaryParticleInformation() { ; }
25+
UserPrimaryParticleInformation() = default;
2626

2727
/**
2828
* Class destructor.
2929
*/
30-
virtual ~UserPrimaryParticleInformation() { ; }
30+
virtual ~UserPrimaryParticleInformation() = default;
3131

3232
/**
3333
* Set the HEP event status (generator status) e.g. from an LHE particle.

include/SimCore/UserRegionInformation.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class UserRegionInformation : public G4VUserRegionInformation {
2626
public:
2727
UserRegionInformation(bool storeSecondaries);
2828

29-
virtual ~UserRegionInformation();
29+
virtual ~UserRegionInformation() = default;
3030

3131
void Print() const;
3232

include/SimCore/UserTrackInformation.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,12 @@ class UserTrackInformation : public G4VUserTrackInformation {
1818
/// Constructor
1919
UserTrackInformation() = default;
2020

21+
virtual ~UserTrackInformation() = default;
2122
/**
2223
* get
2324
*
2425
* A static helper function for getting the track information
25-
* from the passed G4Track. If the track doesn't have an
26+
* from the passed G4Track. If the track doesn't have an
2627
* information attached, a new one is created.
2728
*
2829
* @note The return value of this pointer is never NULL.

src/SimCore/BiasOperators/DarkBrem.cxx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ G4VBiasingOperation* DarkBrem::ProposeOccurenceBiasingOperation(
2222
callingProcess->GetWrappedProcess()->GetProcessName();
2323
if (currentProcess.compare(this->getProcessToBias()) == 0) {
2424
// bias only the primary particle if we don't want to bias all particles
25-
if (not bias_all_ and track->GetParentID() != 0) return 0;
25+
if (not bias_all_ and track->GetParentID() != 0) return nullptr;
2626

2727
G4double interactionLength =
2828
callingProcess->GetWrappedProcess()->GetCurrentInteractionLength();
@@ -37,8 +37,8 @@ G4VBiasingOperation* DarkBrem::ProposeOccurenceBiasingOperation(
3737
}
3838

3939
return BiasedXsec(dbXsecBiased);
40-
} else
41-
return nullptr;
40+
}
41+
return nullptr;
4242
}
4343

4444
void DarkBrem::RecordConfig(ldmx::RunHeader& h) const {

src/SimCore/RunManager.cxx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,7 @@ void RunManager::TerminateOneEvent() {
168168
// reactivate any process that contains the G4DarkBremmstrahlung name
169169
// this covers both cases where the process is biased and not
170170
static auto reactivate_dark_brem = [](G4ProcessManager* pman) {
171-
for (std::size_t i_proc{0}; i_proc < pman->GetProcessList()->size();
172-
i_proc++) {
171+
for (int i_proc{0}; i_proc < pman->GetProcessList()->size(); i_proc++) {
173172
G4VProcess* p{(*(pman->GetProcessList()))[i_proc]};
174173
if (p->GetProcessName().contains(G4DarkBremsstrahlung::PROCESS_NAME)) {
175174
pman->SetProcessActivation(p, true);

src/SimCore/UserRegionInformation.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ namespace simcore {
55
UserRegionInformation::UserRegionInformation(bool aStoreSecondaries)
66
: storeSecondaries_(aStoreSecondaries) {}
77

8-
UserRegionInformation::~UserRegionInformation() {}
9-
108
bool UserRegionInformation::getStoreSecondaries() const {
119
return storeSecondaries_;
1210
}

0 commit comments

Comments
 (0)