Skip to content

Commit

Permalink
Reformat clang-format Google style minus include order
Browse files Browse the repository at this point in the history
  • Loading branch information
tunnell committed Nov 11, 2021
1 parent 0831862 commit 229aebd
Show file tree
Hide file tree
Showing 29 changed files with 5,821 additions and 4,919 deletions.
224 changes: 122 additions & 102 deletions G4integration/NESTProc.cpp

Large diffs are not rendered by default.

59 changes: 25 additions & 34 deletions G4integration/NESTProc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ namespace NEST {

struct Hit {
public:
Hit(double _E, double _t, G4ThreeVector _xyz) : E(_E), t(_t), xyz(_xyz), result{0,0,0,0,0,0}{};
Hit(double _E, double _t, G4ThreeVector _xyz)
: E(_E), t(_t), xyz(_xyz), result{0, 0, 0, 0, 0, 0} {};
double E;
double t;
G4ThreeVector xyz;
Expand Down Expand Up @@ -65,12 +66,10 @@ class NESTThermalElectron : public G4ParticleDefinition {

class NESTProc : public G4VRestDiscreteProcess {
public: // constructor and destructor
NESTProc(const G4String& processName ,
G4ProcessType type ,
VDetector* detector );
NESTProc(const G4String& processName ,
G4ProcessType type , NESTcalc* customcalc,
VDetector* detector );
NESTProc(const G4String& processName, G4ProcessType type,
VDetector* detector);
NESTProc(const G4String& processName, G4ProcessType type,
NESTcalc* customcalc, VDetector* detector);
~NESTProc();

public: // methods, with descriptions
Expand All @@ -91,10 +90,8 @@ class NESTProc : public G4VRestDiscreteProcess {
// For in-flight particles losing energy (or those stopped)
G4VParticleChange* PostStepDoIt(const G4Track& aTrack, const G4Step& aStep);
G4VParticleChange* AtRestDoIt(const G4Track& aTrack, const G4Step& aStep);

void TryPopLineages(const G4Track& aTrack, const G4Step& aStep);


void TryPopLineages(const G4Track& aTrack, const G4Step& aStep);

void SetScintillationYieldFactor(const G4double yieldfactor);
// Called to set the scintillation quantum yield factor, useful for
Expand All @@ -105,38 +102,29 @@ class NESTProc : public G4VRestDiscreteProcess {

G4double GetScintillationYieldFactor() const;
// Returns the quantum (photon/electron) yield factor. See above.



Lineage GetChildType(const G4Track* aTrack, const G4Track* sec) const;
G4Track* MakePhoton(G4ThreeVector xyz, double t);
G4Track* MakeElectron(G4ThreeVector xyz, double density, double t,double kin_E);
G4Track* MakeElectron(G4ThreeVector xyz, double density, double t,
double kin_E);
std::vector<NEST::Lineage> getLastLineages() const {
return lineages_prevEvent;
}
void SetDetailedSecondaries(bool detailed) {
detailed_secondaries = detailed;
}
void SetStackElectrons(bool stack_e) {
stack_electrons = stack_e;
}
void SetStackPhotons(bool stack_ph) {
stack_photons = stack_ph;
}
void SetStackElectrons(bool stack_e) { stack_electrons = stack_e; }
void SetStackPhotons(bool stack_ph) { stack_photons = stack_ph; }
void SetAnalysisTrigger(
std::function<void(std::vector<NEST::Lineage>)> _analysisTrigger) {
this->analysisTrigger = _analysisTrigger;
}

void SetGamma_break(double _gamma_break) {
this->gamma_break = _gamma_break;
}
void SetGamma_break(double _gamma_break) { this->gamma_break = _gamma_break; }

double GetGamma_break() const {
return gamma_break;
}

void SetNESTcalc(std::unique_ptr<NEST::NESTcalc> newcalc){
double GetGamma_break() const { return gamma_break; }

void SetNESTcalc(std::unique_ptr<NEST::NESTcalc> newcalc) {
fNESTcalc.reset(newcalc.release());
fDetector.reset(newcalc->GetDetector());
}
Expand All @@ -147,16 +135,19 @@ class NESTProc : public G4VRestDiscreteProcess {
std::unique_ptr<NEST::NESTcalc> fNESTcalc = NULL;
std::vector<NEST::Lineage> lineages;
std::vector<NEST::Lineage> lineages_prevEvent;
std::map<std::tuple<int, CLHEP::Hep3Vector, CLHEP::Hep3Vector>, uint64_t> track_lins;
std::map<std::tuple<int, CLHEP::Hep3Vector, CLHEP::Hep3Vector>, uint64_t>
track_lins;
std::unique_ptr<VDetector> fDetector;
NoTimeParticleChange fParticleChange;
G4double YieldFactor=1; // turns scint. on/off
bool detailed_secondaries=true;

G4double YieldFactor = 1; // turns scint. on/off
bool detailed_secondaries = true;
bool stack_electrons = true;
bool stack_photons = true;
double gamma_break = 9*mm; //Gammas will not pass on their lineage (if they have one, e.g. bremsstrahlung) if they are this far from their origin.
int verbose=0;
double gamma_break =
9 * mm; // Gammas will not pass on their lineage (if they have one, e.g.
// bremsstrahlung) if they are this far from their origin.
int verbose = 0;

std::function<void(std::vector<NEST::Lineage>)> analysisTrigger;
};
Expand All @@ -182,5 +173,5 @@ inline G4double NESTProc::GetScintillationYieldFactor() const {
return YieldFactor;
}

}//ensure namespace is closed
} // namespace NEST
#endif /* NESTPROC_h */
8 changes: 6 additions & 2 deletions G4integration/NESTStackingAction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,12 @@ G4ClassificationOfNewTrack NESTStackingAction::ClassifyNewTrack(
}

bool NESTStackingAction::isUrgentEmpty() {
if(!savedManager){
std::cerr<<"savedManager not set by NESTStackingAction::ClassifyNewTrack(). Did you set up NESTStackingAction as your stacking action? Did you override ClassifyNewTrack and forget to set savedManager?"<<std::endl;
if (!savedManager) {
std::cerr
<< "savedManager not set by NESTStackingAction::ClassifyNewTrack(). "
"Did you set up NESTStackingAction as your stacking action? Did you "
"override ClassifyNewTrack and forget to set savedManager?"
<< std::endl;
}
return savedManager->GetNUrgentTrack() == 0;
}
Expand Down
Loading

0 comments on commit 229aebd

Please sign in to comment.