Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions inc/TRestGeant4QuenchingProcess.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@

#include <TRestEventProcess.h>

#include <map>
#include <set>
#include <string>

#include "TRestGeant4Event.h"
#include "TRestGeant4Metadata.h"

//! Recomputes the energy of every hit based on quenching factor for each particle and volume
//! Recomputes visible hit energies using simple Lindhard and Birks quenching models
class TRestGeant4QuenchingProcess : public TRestEventProcess {
private:
/// A pointer to the specific TRestGeant4Event input
Expand All @@ -42,6 +46,17 @@ class TRestGeant4QuenchingProcess : public TRestEventProcess {

std::set<std::string> fUserVolumeExpressions;
std::set<std::string> fVolumes;
std::map<std::string, std::string> fUserVolumeModels;
std::map<std::string, double> fUserVolumeBirksConstants;
std::map<std::string, double> fUserVolumeBirksFallbackStepLengths;

std::map<std::string, std::string> fVolumeModels;
std::map<std::string, double> fVolumeBirksConstants;
std::map<std::string, double> fVolumeBirksFallbackStepLengths;

Double_t fBirksConstant = 0.000126; // mm/keV, equivalent to 0.126 mm/MeV
Double_t fBirksFallbackStepLength = 0.5; // mm
Bool_t fApplyToHitEnergies = true;

void Initialize() override;
void InitFromConfigFile() override;
Expand Down Expand Up @@ -72,6 +87,6 @@ class TRestGeant4QuenchingProcess : public TRestEventProcess {
explicit TRestGeant4QuenchingProcess(const char* configFilename);
~TRestGeant4QuenchingProcess() override;

ClassDefOverride(TRestGeant4QuenchingProcess, 2);
ClassDefOverride(TRestGeant4QuenchingProcess, 3);
};
#endif
4 changes: 2 additions & 2 deletions macros/REST_Geant4_ViewEvent.C
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include <cstdlib>

#include "TRestBrowser.h"
#include "TRestTask.h"

#include <cstdlib>

#ifndef RestTask_ViewG4Events
#define RestTask_ViewG4Events

Expand Down
Loading
Loading