Skip to content

Commit

Permalink
Apply clang-format to new SpectrumAnalyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
lopezzot committed Sep 4, 2023
1 parent 39fa93c commit 7cf41d7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
12 changes: 6 additions & 6 deletions include/SpectrumAnalyzer.hh
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@

#ifdef ATLHECTB_LEAKANALYSIS

#ifndef SpectrumAnalyzer_h
# define SpectrumAnalyzer_h
# ifndef SpectrumAnalyzer_h
# define SpectrumAnalyzer_h

// Includers from Geant4
//
# include "G4Step.hh"
# include "G4ThreadLocalSingleton.hh"
# include "G4Step.hh"
# include "G4ThreadLocalSingleton.hh"

// Includers from C++
//
# include <functional>
# include <functional>

class SpectrumAnalyzer
{
Expand Down Expand Up @@ -87,7 +87,7 @@ class SpectrumAnalyzer
void operator=(SpectrumAnalyzer const&) = delete;
};

#endif // SpectrumAnalyzer_h
# endif // SpectrumAnalyzer_h
#endif // ATLHECTB_LEAKANALYSIS

//**************************************************
32 changes: 16 additions & 16 deletions src/SpectrumAnalyzer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@

// Includers from project files
//
#include "SpectrumAnalyzer.hh"
# include "SpectrumAnalyzer.hh"

// Includers from Geant4
//
#include "G4Version.hh"
#if G4VERSION_NUMBER < 1100
# include "g4root.hh"
#else
# include "G4AnalysisManager.hh"
#endif
#include "G4ParticleTable.hh"
#include "G4Step.hh"
# include "G4Version.hh"
# if G4VERSION_NUMBER < 1100
# include "g4root.hh"
# else
# include "G4AnalysisManager.hh"
# endif
# include "G4ParticleTable.hh"
# include "G4Step.hh"

// #define DEBUG

Expand All @@ -42,19 +42,19 @@ void SpectrumAnalyzer::CreateNtupleAndScorer(const G4String scName)
scorerName = scName;
if (scorerName == "te") {
scorer = GetTE;
G4cout<<"SpectrumAnalyzer scoring total energy"<<G4endl;
G4cout << "SpectrumAnalyzer scoring total energy" << G4endl;
}
else if (scorerName == "momentum") {
scorer = GetMomentum;
G4cout<<"SpectrumAnalyzer scoring momentum"<<G4endl;
G4cout << "SpectrumAnalyzer scoring momentum" << G4endl;
}
else if (scorerName == "ke") {
scorer = GetKE;
G4cout<<"SpectrumAnalyzer scoring kinetic energy"<<G4endl;
G4cout << "SpectrumAnalyzer scoring kinetic energy" << G4endl;
}
else {
scorer = GetTE;
G4cout<<"SpectrumAnalyzer scoring total energy"<<G4endl;
G4cout << "SpectrumAnalyzer scoring total energy" << G4endl;
} // default case
}

Expand Down Expand Up @@ -105,14 +105,14 @@ void SpectrumAnalyzer::Analyze(const G4Step* step)
othersScore += val;
}

#ifdef DEBUG
# ifdef DEBUG
G4cout << "-->SpectrumAnalyzer::Analyze, scorer name " << scorerName << " " << PDGID << " "
<< step->GetTrack()->GetParticleDefinition()->GetParticleName() << " Total Energy "
<< GetTE(step) << " Momentum " << GetMomentum(step) << " Kinetic Energy " << GetKE(step)
<< G4endl;
#endif
# endif
}

#endif // ATLHECTB_LEAKANALYSIS
#endif // ATLHECTB_LEAKANALYSIS

//**************************************************

0 comments on commit 7cf41d7

Please sign in to comment.