71 :outputFileName(
"xrayfluo"), phaseSpaceFlag(false), physicFlag (false),
72 gunParticleEnergies(0), gunParticleTypes(0)
81 G4AnalysisManager::Instance();
98 delete G4AnalysisManager::Instance();
143 man->
CreateH1(
"h1",
"Energy Deposit", 500,0.,10.);
144 man->
CreateH1(
"h2",
"Gamma born in the sample", 100,0.,10.);
145 man->
CreateH1(
"h3",
"Electrons born in the sample", 100,0.,10.);
146 man->
CreateH1(
"h4",
"Gammas leaving the sample", 300,0.,10.);
147 man->
CreateH1(
"h5",
"Electrons leaving the sample ",200000 ,0.,10.0);
148 man->
CreateH1(
"h6",
"Gammas reaching the detector", 100,0.,10.);
149 man->
CreateH1(
"h7",
"Spectrum of the incident particles", 100,0.,10.);
150 man->
CreateH1(
"h8",
"Protons reaching the detector", 100,0.,10.);
151 man->
CreateH1(
"h9",
"Protons leaving the sample", 100,0.,10.);
177 G4int particleID, processID;
185 if (raileighFlag ^ (!raileighFlag && (processID == 1 ||
191 else if (particleID == 0)
206 std::pair<G4double,G4String>
result;
213 result.second =
name;
255 G4int isBornInTheSample=0;
277 if (creationPosVolume->
GetName() ==
"Sample" ) {
278 isBornInTheSample = 1;
294 if (parentProcess ==
"") parent = 0;
295 if (parentProcess ==
"ioni") parent = 1;
296 if (parentProcess ==
"LowEnPhotoElec") parent = 2;
297 if (parentProcess ==
"Transportation") parent = 3;
298 if (parentProcess ==
"initStep") parent = 4;
301 parentProcess =
"Not Known -- (primary generator + Rayleigh)";
307 if (sampleMaterial == (
"Dolorite" ||
"Anorthosite" ||
"Mars1" ||
"IceBasalt" ||
"HPGe")) sampleMat=1;
421 man->
FillH1(8,protonsAtTheDetPre);
const G4ThreeVector & GetVertexPosition() const
tools::rroot::ntuple * GetNtuple() const
static G4Gamma * Definition()
void analyseEnergyDep(G4double eDep)
static G4Proton * Definition()
CLHEP::Hep3Vector G4ThreeVector
G4LogicalVolume * GetLogicalVolume() const
static XrayFluoAnalysisManager * getInstance()
static constexpr double MeV
G4StepPoint * GetPreStepPoint() const
static constexpr double keV
void LoadGunData(G4String, G4bool)
G4bool SetFirstHistoId(G4int firstId)
G4bool OpenFile(const G4String &fileName="")
G4bool FillNtupleIColumn(G4int id, G4int value)
G4VPhysicalVolume * GetPhysicalVolume() const
G4int GetCurrentStepNumber() const
G4VPhysicalVolume * GetNextVolume() const
G4int CreateH1(const G4String &name, const G4String &title, G4int nbins, G4double xmin, G4double xmax, const G4String &unitName="none", const G4String &fcnName="none", const G4String &binSchemeName="linear")
G4int CreateNtupleIColumn(const G4String &name)
G4bool FillNtupleDColumn(G4int id, G4double value)
virtual ~XrayFluoAnalysisManager()
const G4String & GetName() const
void SetPhysicFlag(G4bool)
G4StepStatus GetStepStatus() const
#define G4MUTEX_INITIALIZER
G4ParticleDefinition * GetDefinition() const
void SetVerboseLevel(G4int verboseLevel)
G4Track * GetTrack() const
const G4String & GetProcessName() const
std::vector< G4String > * gunParticleTypes
G4bool SetNtupleIColumn(const G4String &columnName, G4int &value)
G4StepPoint * GetPostStepPoint() const
G4Material * GetMaterial() const
G4double GetKineticEnergy() const
G4int fParticleEnergyAndTypeIndex
G4int CreateNtupleDColumn(const G4String &name)
XrayFluoAnalysisMessenger * analisysMessenger
static G4Electron * Definition()
G4double G4ParticleHPJENDLHEData::G4double result
G4ThreeVector GetMomentum() const
G4bool SetNtupleDColumn(const G4String &columnName, G4double &value)
void SetVerboseLevel(G4int verboseLevel)
const G4VProcess * GetCreatorProcess() const
void analysePrimaryGenerator(G4double energy)
void SetOutputFileName(G4String)
G4GLOB_DLL std::ostream G4cout
virtual G4double DistanceToOut(const G4ThreeVector &p, const G4ThreeVector &v, const G4bool calcNorm=false, G4bool *validNorm=0, G4ThreeVector *n=0) const =0
G4VSolid * GetSolid() const
G4int CreateNtuple(const G4String &name, const G4String &title)
virtual G4VPhysicalVolume * LocateGlobalPointAndSetup(const G4ThreeVector &point, const G4ThreeVector *direction=0, const G4bool pRelativeSearch=true, const G4bool ignoreDirection=true)
XrayFluoAnalysisManager()
void analyseStepping(const G4Step *aStep)
static XrayFluoAnalysisManager * instance
static XrayFluoDetectorConstruction * GetInstance()
G4bool FillH1(G4int id, G4double value, G4double weight=1.0)
const G4DynamicParticle * GetDynamicParticle() const
G4bool SetFirstNtupleId(G4int firstId)
const G4String & GetName() const
G4VPhysicalVolume * GetVolume() const
std::vector< G4double > * gunParticleEnergies
G4int GetParentID() const
G4Navigator * GetGeometryNavigator() const
const std::pair< G4double, G4String > GetEmittedParticleEnergyAndType()