Geant4  10.02.p03
HistoManager Class Reference

#include <HistoManager.hh>

Collaboration diagram for HistoManager:

Public Member Functions

 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
void Book ()
 
void Save ()
 
void FillHisto (G4int id, G4double e, G4double weight=1.0)
 
void Normalize (G4int id, G4double fac)
 
void FillNtuple (G4double EnergyAbs, G4double EnergyGap, G4double TrackLAbs, G4double TrackLGap)
 
void PrintStatistic ()
 
 HistoManager ()
 
 ~HistoManager ()
 
void Book ()
 
void Save ()
 
void FillHisto (G4int id, G4double bin, G4double weight=1.0)
 
void Normalize (G4int id, G4double fac)
 
void FillNtuple (G4double energyAbs, G4double energyGap, G4double trackLAbs, G4double trackLGap)
 
void PrintStatistic ()
 
 HistoManager ()
 
 ~HistoManager ()
 
void Book ()
 
void Save ()
 
void FillHisto (G4int id, G4double bin, G4double weight=1.0)
 
void Normalize (G4int id, G4double fac)
 
void FillNtuple (G4double EnergyAbs, G4double EnergyGap, G4double TrackLAbs, G4double TrackLGap)
 
void PrintStatistic ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
void book ()
 
void save ()
 
void SetHisto (G4int, G4int, G4double, G4double, const G4String &unit="none")
 
void FillHisto (G4int id, G4double e, G4double weight=1.0)
 
void Normalize (G4int id, G4double fac)
 
void PrintHisto (G4int)
 
void SetFileName (const G4String &name)
 
G4bool HistoExist (G4int id)
 
G4String GetTitle (G4int id)
 
G4int GetNbins (G4int id)
 
G4double GetVmin (G4int id)
 
G4double GetVmax (G4int id)
 
G4double GetHistoUnit (G4int id)
 
G4double GetBinWidth (G4int id)
 
G4int GetHistoID (G4int id)
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 ~HistoManager ()
 
void bookHisto ()
 
void BeginOfRun ()
 
void EndOfRun (G4int runID)
 
void BeginOfEvent ()
 
void EndOfEvent ()
 
void ScoreNewTrack (const G4Track *aTrack)
 
void AddEnergy (G4double edep, G4int idx, G4int copyNo)
 
void AddDeltaElectron (const G4DynamicParticle *)
 
void AddPhoton (const G4DynamicParticle *)
 
void ResetTrackLength ()
 
void AddPositron (const G4DynamicParticle *)
 
void SetVerbose (G4int val)
 
G4int GetVerbose () const
 
void SetHistoNumber (G4int val)
 
void SetFirstEventToDebug (G4int val)
 
G4int FirstEventToDebug () const
 
void SetLastEventToDebug (G4int val)
 
G4int LastEventToDebug () const
 
void SetMaxEnergy (G4double val)
 
G4double GetMaxEnergy () const
 
void AddStep ()
 
void SetBeamEnergy (G4double val)
 
void SetEdepAndRMS (G4int, G4ThreeVector)
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
void BeginOfRun ()
 
void EndOfRun ()
 
void SetVerbose (G4int val)
 
void SetParticleName (const G4String &)
 
void SetElementName (const G4String &)
 
void SetNumberOfBinsE (G4int val)
 
void SetNumberOfBinsP (G4int val)
 
void SetMinKinEnergy (G4double val)
 
void SetMaxKinEnergy (G4double val)
 
void SetMinMomentum (G4double val)
 
void SetMaxMomentum (G4double val)
 
void SetHistoName (G4String &val)
 
void SetTargetMaterial (const G4Material *p)
 
 ~HistoManager ()
 
void bookHisto ()
 
void BeginOfRun ()
 
void EndOfRun ()
 
void BeginOfEvent ()
 
void EndOfEvent ()
 
void Fill (G4int id, G4double x, G4double w)
 
void ScoreNewTrack (const G4Track *)
 
void AddTargetStep (const G4Step *)
 
void AddLeakingParticle (const G4Track *)
 
void SetVerbose (G4int val)
 
void SetTargetLength (G4double val)
 
void SetNumberOfSlices (G4int val)
 
void SetNumberOfBinsE (G4int val)
 
void SetDefaultBeamPositionFlag (G4bool f)
 
void SetMaxEnergyDeposit (G4double val)
 
G4double Length () const
 
G4bool DefaultBeamPosition () const
 
G4int NumberOfSlices () const
 
G4int GetVerbose () const
 
 ~HistoManager ()
 
void BookHisto ()
 
void BeginOfRun ()
 
void EndOfRun ()
 
void BeginOfEvent ()
 
void EndOfEvent ()
 
void Fill (G4int id, G4double x, G4double w)
 
void ScoreNewTrack (const G4Track *)
 
void AddTargetStep (const G4Step *)
 
void SetVerbose (G4int val)
 
void SetIonPhysics (const G4String &)
 
void SetTargetMaterial (const G4Material *mat)
 
void SetTargetLength (G4double val)
 
void SetNumberOfSlices (G4int val)
 
void SetNumberOfBinsE (G4int val)
 
G4double Length () const
 
G4int NumberOfSlices () const
 
G4int GetVerbose () const
 
void SetDefaultBeamPositionFlag (G4bool f)
 
G4bool DefaultBeamPosition () const
 
void SetMaxEnergyDeposit (G4double val)
 
void SetPhysicsList (G4VModularPhysicsList *p)
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
void BeginOfRun ()
 
void EndOfRun ()
 
void SetVerbose (G4int val)
 
void SetParticleName (const G4String &)
 
void SetElementName (const G4String &)
 
void SetNumberOfBinsE (G4int val)
 
void SetNumberOfBinsP (G4int val)
 
void SetMinKinEnergy (G4double val)
 
void SetMaxKinEnergy (G4double val)
 
void SetMinMomentum (G4double val)
 
void SetMaxMomentum (G4double val)
 
void SetHistoName (G4String &val)
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 
 HistoManager ()
 
 ~HistoManager ()
 

Static Public Member Functions

static HistoManagerGetPointer ()
 
static HistoManagerGetPointer ()
 
static HistoManagerGetPointer ()
 

Private Member Functions

void Book ()
 
void Book ()
 
void Book ()
 
void Book ()
 
void Book ()
 
void Book ()
 
void Book ()
 
void saveAscii ()
 
void Book ()
 
void Book ()
 
void Book ()
 
 HistoManager ()
 
void Book ()
 
void Book ()
 
void Book ()
 
 HistoManager ()
 
 HistoManager ()
 
void Initialise ()
 
void Book ()
 
void Book ()
 
void Book ()
 
void Book ()
 
void Book ()
 
void Book ()
 
void Book ()
 
void Book ()
 
void Book ()
 
void Book ()
 
void Book ()
 

Private Attributes

G4String fFileName
 
G4bool fFactoryOn
 
TFile * fRootFile
 
TH1D * fHisto [MaxHisto]
 
TTree * fNtuple1
 
TTree * fNtuple2
 
G4double fEabs
 
G4double fEgap
 
G4double fLabs
 
G4double fLgap
 
AIDA::IAnalysisFactory * fAF
 
AIDA::ITree * fTree
 
AIDA::IHistogram1D * fHisto [MaxHisto]
 
AIDA::ITuple * fNtuple1
 
AIDA::ITuple * fNtuple2
 
G4String fileName [2]
 
G4bool factoryOn
 
G4int fNbHist
 
G4int fHistId [MaxHisto]
 
G4AnaH1fHistPt [MaxHisto]
 
G4bool fExist [MaxHisto]
 
G4String fLabel [MaxHisto]
 
G4String fTitle [MaxHisto]
 
G4int fNbins [MaxHisto]
 
G4double fVmin [MaxHisto]
 
G4double fVmax [MaxHisto]
 
G4double fUnit [MaxHisto]
 
G4double fWidth [MaxHisto]
 
G4bool fAscii [MaxHisto]
 
HistoMessengerfHistoMessenger
 
const G4ParticleDefinitionfGamma
 
const G4ParticleDefinitionfElectron
 
const G4ParticleDefinitionfPositron
 
G4int fNHisto
 
G4int fVerbose
 
G4int fEvt1
 
G4int fEvt2
 
G4double fBeamEnergy
 
G4double fMaxEnergy
 
G4double fMaxEnergyAbs
 
G4double fTrackLength
 
G4double fStep
 
G4bool fTrackAbs
 
G4int fEvt
 
G4int fElec
 
G4int fPosit
 
G4int fGam
 
G4int fLowe
 
G4int fBinsE
 
G4int fBinsEA
 
G4int fBinsED
 
G4double fEabs1
 
G4double fEabs2
 
G4double fEabs3
 
G4double fEabs4
 
G4double fE [25]
 
G4DataVector fEvertex
 
G4DataVector fNvertex
 
G4DataVector fBrem
 
G4DataVector fPhot
 
G4DataVector fComp
 
G4DataVector fConv
 
G4double fEdeptrue [3]
 
G4double fRmstrue [3]
 
G4double fLimittrue [3]
 
G4double fEdep [6]
 
G4double fErms [6]
 
G4double fEdeptr [6]
 
G4double fErmstr [6]
 
G4int fStat [6]
 
G4int fNmax
 
HistofHisto
 
HistoManagerMessengerfMessenger
 
G4AnalysisManagerfAnalysisManager
 
const G4ParticleDefinitionfNeutron
 
const G4MaterialfTargetMaterial
 
G4String fParticleName
 
G4String fElementName
 
G4double fMinKinEnergy
 
G4double fMaxKinEnergy
 
G4double fMinMomentum
 
G4double fMaxMomentum
 
G4int fBinsP
 
G4String fHistoName
 
const G4ParticleDefinitionfPrimaryDef
 
G4double fEdepMax
 
G4double fEdepEvt
 
G4double fEdepEM
 
G4double fEdepPI
 
G4double fEdepP
 
G4double fEdepSum
 
G4double fEdepSum2
 
G4double fLength
 
G4double fAbsZ0
 
G4double fPrimaryKineticEnergy
 
G4int fNBinsE
 
G4int fNSlices
 
G4int fNevt
 
G4int fNelec
 
G4int fNposit
 
G4int fNgam
 
G4int fNprot_leak
 
G4int fNpiofNleak
 
G4int fNcpions
 
G4int fNpi0
 
G4int fNkaons
 
G4int fNmuons
 
G4int fNions
 
G4int fNdeut
 
G4int fNalpha
 
G4int fNneutron
 
G4int fNproton
 
G4int fNaproton
 
G4int fNneu_forw
 
G4int fNneu_leak
 
G4int fNneu_back
 
G4int fNstep
 
G4bool fBeamFlag
 
G4bool fHistoBooked
 
G4VModularPhysicsListfPhysList
 
G4VPhysicsConstructorfIonPhysics
 
const G4MaterialfMaterial
 

Static Private Attributes

static HistoManagerfManager = 0
 

Detailed Description

Definition at line 44 of file advanced/amsEcal/include/HistoManager.hh.

Constructor & Destructor Documentation

◆ HistoManager() [1/33]

HistoManager::HistoManager ( )

Definition at line 39 of file advanced/amsEcal/src/HistoManager.cc.

40  : fFileName("amsEcal")
41 {
42  Book();
43 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~HistoManager() [1/33]

HistoManager::~HistoManager ( )

Definition at line 47 of file advanced/amsEcal/src/HistoManager.cc.

48 {
49  delete G4AnalysisManager::Instance();
50 }
Here is the caller graph for this function:

◆ HistoManager() [2/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [2/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [3/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [3/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [4/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [4/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [5/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [5/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [6/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [6/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [7/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [7/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [8/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [8/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [9/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [9/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [10/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [10/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [11/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [11/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [12/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [12/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [13/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [13/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [14/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [14/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [15/33]

HistoManager::HistoManager ( )
private

◆ ~HistoManager() [15/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [16/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [16/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [17/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [17/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [18/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [18/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [19/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [19/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [20/33]

HistoManager::HistoManager ( )
private

◆ ~HistoManager() [20/33]

HistoManager::~HistoManager ( )

◆ ~HistoManager() [21/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [21/33]

HistoManager::HistoManager ( )
private

◆ HistoManager() [22/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [22/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [23/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [23/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [24/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [24/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [25/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [25/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [26/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [26/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [27/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [27/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [28/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [28/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [29/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [29/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [30/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [30/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [31/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [31/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [32/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [32/33]

HistoManager::~HistoManager ( )

◆ HistoManager() [33/33]

HistoManager::HistoManager ( )

◆ ~HistoManager() [33/33]

HistoManager::~HistoManager ( )

Member Function Documentation

◆ AddDeltaElectron()

void HistoManager::AddDeltaElectron ( const G4DynamicParticle elec)

Definition at line 523 of file extended/electromagnetic/TestEm9/src/HistoManager.cc.

524 {
525  G4double e = elec->GetKineticEnergy()/MeV;
526  if(e > 0.0) fElec++;
527  fHisto->Fill(3,e,1.0);
528 }
static const double MeV
Definition: G4SIunits.hh:211
G4double GetKineticEnergy() const
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddEnergy()

void HistoManager::AddEnergy ( G4double  edep,
G4int  idx,
G4int  copyNo 
)

Definition at line 484 of file extended/electromagnetic/TestEm9/src/HistoManager.cc.

485 {
486  if(1 < fVerbose) {
487  G4cout << "HistoManager::AddEnergy: e(keV)= " << edep/keV
488  << "; volIdx= " << volIndex
489  << "; copyNo= " << copyNo
490  << G4endl;
491  }
492  if(0 == volIndex) {
493  fE[copyNo] += edep;
494  } else if (1 == volIndex) {
495  fEabs1 += edep;
496  } else if (2 == volIndex) {
497  fEabs2 += edep;
498  } else if (3 == volIndex) {
499  fEabs3 += edep;
500  } else if (4 == volIndex) {
501  fEabs4 += edep;
502  } else if (5 == volIndex) {
503  G4int n = fNvertex.size();
504  G4bool newPad = true;
505  if (n > 0) {
506  for(G4int i=0; i<n; i++) {
507  if (copyNo == fNvertex[i]) {
508  newPad = false;
509  fEvertex[i] += edep;
510  break;
511  }
512  }
513  }
514  if(newPad) {
515  fNvertex.push_back(copyNo);
516  fEvertex.push_back(edep);
517  }
518  }
519 }
int G4int
Definition: G4Types.hh:78
Double_t edep
Char_t n[5]
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
#define G4endl
Definition: G4ios.hh:61
static const double keV
Definition: G4SIunits.hh:213

◆ AddLeakingParticle()

void HistoManager::AddLeakingParticle ( const G4Track *  track)

Definition at line 462 of file extended/hadronic/Hadr01/src/HistoManager.cc.

463 {
464  const G4ParticleDefinition* pd = track->GetDefinition();
465  G4double e = std::log10(track->GetKineticEnergy()/MeV);
466 
467  G4ThreeVector pos = track->GetPosition();
468  G4ThreeVector dir = track->GetMomentumDirection();
469  G4double x = pos.x();
470  G4double y = pos.y();
471  G4double z = pos.z();
472 
473  G4bool isLeaking = false;
474 
475  // Forward
476  if(z > -fAbsZ0 && dir.z() > 0.0) {
477  isLeaking = true;
478  if(pd == fNeutron) {
479  ++fNneu_forw;
480  fHisto->Fill(15,e,1.0);
481  } else isLeaking = true;
482 
483  // Backward
484  } else if (z < fAbsZ0 && dir.z() < 0.0) {
485  isLeaking = true;
486  if(pd == fNeutron) {
487  ++fNneu_back;
488  fHisto->Fill(16,e,1.0);
489  } else isLeaking = true;
490 
491  // Side
492  } else if (std::abs(z) <= -fAbsZ0 && x*dir.x() + y*dir.y() > 0.0) {
493  isLeaking = true;
494  if(pd == fNeutron) {
495  ++fNneu_leak;
496  fHisto->Fill(14,e,1.0);
497  } else isLeaking = true;
498  }
499 
500  // protons and pions
501  if(isLeaking) {
502  if(pd == G4Proton::Proton()) {
503  fHisto->Fill(17,e,1.0);
504  ++fNprot_leak;
505  } else if (pd == G4PionPlus::PionPlus() ||
506  pd == G4PionMinus::PionMinus()) {
507  fHisto->Fill(18,e,1.0);
508  ++fNpiofNleak;
509  }
510  }
511 }
static const double MeV
Definition: G4SIunits.hh:211
TDirectory * dir
Double_t y
bool G4bool
Definition: G4Types.hh:79
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:98
double x() const
double y() const
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98
double z() const
const G4ParticleDefinition * fNeutron
double G4double
Definition: G4Types.hh:76
static const G4double pos
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddPhoton()

void HistoManager::AddPhoton ( const G4DynamicParticle ph)

Definition at line 532 of file extended/electromagnetic/TestEm9/src/HistoManager.cc.

533 {
534  G4double e = ph->GetKineticEnergy()/MeV;
535  if(e > 0.0) fGam++;
536  fHisto->Fill(4,e,1.0);
537 }
static const double MeV
Definition: G4SIunits.hh:211
G4double GetKineticEnergy() const
double G4double
Definition: G4Types.hh:76
Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddPositron()

void HistoManager::AddPositron ( const G4DynamicParticle )
inline

Definition at line 94 of file extended/electromagnetic/TestEm9/include/HistoManager.hh.

Here is the caller graph for this function:

◆ AddStep()

void HistoManager::AddStep ( )
inline

◆ AddTargetStep() [1/2]

void HistoManager::AddTargetStep ( const G4Step *  )

◆ AddTargetStep() [2/2]

void HistoManager::AddTargetStep ( const G4Step *  step)

Definition at line 413 of file extended/hadronic/Hadr01/src/HistoManager.cc.

414 {
415  fNstep++;
416  G4double fEdep = step->GetTotalEnergyDeposit();
417  if(1 < fVerbose) {
418  G4cout << "TargetSD::ProcessHits: beta1= "
419  << step->GetPreStepPoint()->GetVelocity()/c_light
420  << " beta2= " << step->GetPostStepPoint()->GetVelocity()/c_light
421  << " weight= " << step->GetTrack()->GetWeight()
422  << G4endl;
423  }
424  if(fEdep >= DBL_MIN) {
425  const G4Track* track = step->GetTrack();
426 
427  G4ThreeVector pos =
428  (step->GetPreStepPoint()->GetPosition() +
429  step->GetPostStepPoint()->GetPosition())*0.5;
430 
431  G4double z = pos.z() - fAbsZ0;
432 
433  // scoring
434  fEdepEvt += fEdep;
435  fHisto->Fill(0,z,fEdep);
436  const G4ParticleDefinition* pd = track->GetDefinition();
437 
438  if(pd == G4Gamma::Gamma() || pd == G4Electron::Electron()
439  || pd == G4Positron::Positron()) {
440  fEdepEM += fEdep;
441  } else if ( pd == G4PionPlus::PionPlus() ||
442  pd == G4PionMinus::PionMinus()) {
443  fEdepPI += fEdep;
444  } else if ( pd == G4Proton::Proton() ||
445  pd == G4AntiProton::AntiProton()) {
446  fEdepP += fEdep;
447  }
448 
449  if(1 < fVerbose) {
450  G4cout << "HistoManager::AddEnergy: e(keV)= " << fEdep/keV
451  << "; z(mm)= " << z/mm
452  << "; step(mm)= " << step->GetStepLength()/mm
453  << " by " << pd->GetParticleName()
454  << " E(MeV)= " << track->GetKineticEnergy()/MeV
455  << G4endl;
456  }
457  }
458 }
static const double MeV
Definition: G4SIunits.hh:211
const G4String & GetParticleName() const
G4GLOB_DLL std::ostream G4cout
static G4AntiProton * AntiProton()
Definition: G4AntiProton.cc:93
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:98
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
static G4Positron * Positron()
Definition: G4Positron.cc:94
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98
double z() const
#define DBL_MIN
Definition: templates.hh:75
static G4Electron * Electron()
Definition: G4Electron.cc:94
#define G4endl
Definition: G4ios.hh:61
static const double keV
Definition: G4SIunits.hh:213
double G4double
Definition: G4Types.hh:76
static const double mm
Definition: G4SIunits.hh:114
float c_light
Definition: hepunit.py:257
static const G4double pos
Here is the call graph for this function:
Here is the caller graph for this function:

◆ BeginOfEvent() [1/3]

void HistoManager::BeginOfEvent ( )

◆ BeginOfEvent() [2/3]

void HistoManager::BeginOfEvent ( )

◆ BeginOfEvent() [3/3]

void HistoManager::BeginOfEvent ( )

Definition at line 306 of file extended/electromagnetic/TestEm9/src/HistoManager.cc.

Here is the caller graph for this function:

◆ BeginOfRun() [1/5]

void HistoManager::BeginOfRun ( )

◆ BeginOfRun() [2/5]

void HistoManager::BeginOfRun ( )

◆ BeginOfRun() [3/5]

void HistoManager::BeginOfRun ( )

◆ BeginOfRun() [4/5]

void HistoManager::BeginOfRun ( )

Definition at line 129 of file extended/electromagnetic/TestEm9/src/HistoManager.cc.

130 {
131  // initilise scoring
132  fEvt = 0;
133  fElec = 0;
134  fPosit= 0;
135  fGam = 0;
136  fStep = 0;
137  fLowe = 0;
138 
139  for(G4int i=0; i<6; i++) {
140  fStat[i] = 0;
141  fEdep[i] = 0.0;
142  fErms[i] = 0.0;
143  if(i < 3) {
144  fEdeptr[i] = 0.0;
145  fErmstr[i] = 0.0;
146  }
147  }
148 
149  // initialise counters
150  fBrem.resize(93,0.0);
151  fPhot.resize(93,0.0);
152  fComp.resize(93,0.0);
153  fConv.resize(93,0.0);
154 
155  // initialise acceptance - by default is not applied
156  for(G4int i=0; i<fNmax; i++) {
157  fEdeptrue[i] = 1.0;
158  fRmstrue[i] = 1.0;
159  fLimittrue[i]= 10.;
160  }
161 
162  if(fHisto->IsActive()) {
163  for(G4int i=0; i<fNHisto; ++i) {fHisto->Activate(i, true); }
164  fHisto->Book();
165 
166  if(fVerbose > 0) {
167  G4cout << "HistoManager: Histograms are booked and run has been started"
168  << G4endl;
169  }
170  }
171 }
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
Here is the caller graph for this function:

◆ BeginOfRun() [5/5]

void HistoManager::BeginOfRun ( )

◆ Book() [1/27]

void HistoManager::Book ( )
private

◆ Book() [2/27]

void HistoManager::Book ( )
private

◆ Book() [3/27]

void HistoManager::Book ( )
private

◆ Book() [4/27]

void HistoManager::Book ( )
private

◆ Book() [5/27]

void HistoManager::Book ( )
private

◆ Book() [6/27]

void HistoManager::Book ( )
private

◆ Book() [7/27]

void HistoManager::Book ( )
private

◆ Book() [8/27]

void HistoManager::Book ( )
private

◆ Book() [9/27]

void HistoManager::Book ( )
private

◆ Book() [10/27]

void HistoManager::Book ( )
private

◆ Book() [11/27]

void HistoManager::Book ( )
private

◆ Book() [12/27]

void HistoManager::Book ( )
private

◆ Book() [13/27]

void HistoManager::Book ( )
private

◆ Book() [14/27]

void HistoManager::Book ( )
private

Definition at line 54 of file advanced/amsEcal/src/HistoManager.cc.

55 {
56  // Create or get analysis manager
57  // The choice of analysis technology is done via selection of a namespace
58  // in HistoManager.hh
59  G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
60  analysisManager->SetFileName(fFileName);
61  analysisManager->SetVerboseLevel(1);
62  analysisManager->SetActivation(true); // enable inactivation of histograms
63 
64  // Define histograms start values
65  const G4int kMaxHisto = 6;
66  const G4String id[] = {"0", "1", "2", "3" , "4", "5"};
67  const G4String title[] =
68  { "dummy", //0
69  "total Etot in Ecal", //1
70  "total Evis in Ecal", //2
71  "Etot profile", //3
72  "Evis profile", //4
73  "Evis per fiber" //5
74  };
75 
76  // Default values (to be reset via /analysis/h1/set command)
77  G4int nbins = 100;
78  G4double vmin = 0.;
79  G4double vmax = 100.;
80 
81  // Create all histograms as inactivated
82  // as we have not yet set nbins, vmin, vmax
83  for (G4int k=0; k<kMaxHisto; k++) {
84  G4int ih = analysisManager->CreateH1(id[k], title[k], nbins, vmin, vmax);
85  analysisManager->SetH1Activation(ih, false);
86  }
87 }
int G4int
Definition: G4Types.hh:78
ExG4HbookAnalysisManager G4AnalysisManager
Definition: g4hbook_defs.hh:66
double G4double
Definition: G4Types.hh:76
subroutine title
Definition: hijing1.383.f:5981
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Book() [15/27]

void HistoManager::Book ( )
private

◆ Book() [16/27]

void HistoManager::Book ( )
private

◆ Book() [17/27]

void HistoManager::Book ( )
private

◆ Book() [18/27]

void HistoManager::Book ( )
private

◆ Book() [19/27]

void HistoManager::Book ( )
private

◆ Book() [20/27]

void HistoManager::Book ( )
private

◆ Book() [21/27]

void HistoManager::Book ( )
private

◆ Book() [22/27]

void HistoManager::Book ( )
private

◆ Book() [23/27]

void HistoManager::Book ( )

◆ Book() [24/27]

void HistoManager::Book ( )
private

◆ Book() [25/27]

void HistoManager::Book ( )
private

◆ Book() [26/27]

void HistoManager::Book ( )

◆ book()

void HistoManager::book ( )

Definition at line 72 of file extended/electromagnetic/TestEm17/src/HistoManager.cc.

73 {
74  // if no histos, do nothing
75  if (fNbHist == 0) return;
76 
77  // Create or get analysis manager
78  // The choice of analysis technology is done via selection of a namespace
79  // in HistoManager.hh
80  G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
81  analysisManager->SetVerboseLevel(0);
82  G4String extension = analysisManager->GetFileType();
83  fileName[1] = fileName[0] + "." + extension;
84 
85  // Open an output file
86  //
87  G4bool fileOpen = analysisManager->OpenFile(fileName[0]);
88  if (!fileOpen) {
89  G4cout << "\n---> HistoManager::book(): cannot open " << fileName[1]
90  << G4endl;
91  return;
92  }
93 
94  // create selected histograms
95  //
96  analysisManager->SetFirstHistoId(1);
97 
98  for (G4int k=0; k<MaxHisto; k++) {
99  if (fExist[k]) {
100  fHistId[k] = analysisManager->CreateH1( fLabel[k], fTitle[k],
101  fNbins[k], fVmin[k], fVmax[k]);
102  fHistPt[k] = analysisManager->GetH1(fHistId[k]);
103  factoryOn = true;
104  }
105  }
106 
107  if (factoryOn)
108  G4cout << "\n----> Histogram file is opened in " << fileName[1] << G4endl;
109 }
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
ExG4HbookAnalysisManager G4AnalysisManager
Definition: g4hbook_defs.hh:66
#define G4endl
Definition: G4ios.hh:61
Here is the caller graph for this function:

◆ Book() [27/27]

void HistoManager::Book ( )

◆ BookHisto()

void HistoManager::BookHisto ( )

Definition at line 158 of file extended/hadronic/Hadr02/src/HistoManager.cc.

159 {
160  fHisto->Add1D("0","Energy deposition (MeV/mm/event) in the target",
161  fNSlices,0.0,fLength/mm,MeV/mm);
162  fHisto->Add1D("1","Log10 Energy (GeV) of gammas",fNBinsE,-5.,5.,1.0);
163  fHisto->Add1D("2","Log10 Energy (GeV) of electrons",fNBinsE,-5.,5.,1.0);
164  fHisto->Add1D("3","Log10 Energy (GeV) of positrons",fNBinsE,-5.,5.,1.0);
165  fHisto->Add1D("4","Log10 Energy (GeV) of protons",fNBinsE,-5.,5.,1.0);
166  fHisto->Add1D("5","Log10 Energy (GeV) of neutrons",fNBinsE,-5.,5.,1.0);
167  fHisto->Add1D("6","Log10 Energy (GeV) of charged pions",fNBinsE,-4.,6.,1.0);
168  fHisto->Add1D("7","Log10 Energy (GeV) of pi0",fNBinsE,-4.,6.,1.0);
169  fHisto->Add1D("8","Log10 Energy (GeV) of charged kaons",fNBinsE,-4.,6.,1.0);
170  fHisto->Add1D("9","Log10 Energy (GeV) of neutral kaons",fNBinsE,-4.,6.,1.0);
171  fHisto->Add1D("10","Log10 Energy (GeV) of deuterons and tritons",
172  fNBinsE,-5.,5.,1.0);
173  fHisto->Add1D("11","Log10 Energy (GeV) of He3 and alpha",fNBinsE,-5.,5.,1.0);
174  fHisto->Add1D("12","Log10 Energy (GeV) of Generic Ions",fNBinsE,-5.,5.,1.0);
175  fHisto->Add1D("13","Log10 Energy (GeV) of muons",fNBinsE,-4.,6.,1.0);
176  fHisto->Add1D("14","Log10 Energy (GeV) of pi+",fNBinsE,-4.,6.,1.0);
177  fHisto->Add1D("15","Log10 Energy (GeV) of pi-",fNBinsE,-4.,6.,1.0);
178  fHisto->Add1D("16","X Section (mb) of Secondary Fragments Z with E>1 GeV (mb)"
179  ,25,0.5,25.5,1.0);
180  fHisto->Add1D("17","Secondary Fragment A E>1 GeV",50,0.5,50.5,1.0);
181  fHisto->Add1D("18","Secondary Fragment Z E<1 GeV",25,0.5,25.5,1.0);
182  fHisto->Add1D("19","Secondary Fragment A E<1 GeV",50,0.5,50.5,1.0);
183  fHisto->Add1D("20","X Section (mb) of Secondary Fragments Z (mb) ",
184  25,0.5,25.5,1.0);
185  fHisto->Add1D("21","Secondary Fragment A ",50,0.5,50.5,1.0);
186 }
static const double MeV
Definition: G4SIunits.hh:211
static const double mm
Definition: G4SIunits.hh:114
Here is the call graph for this function:

◆ bookHisto() [1/2]

void HistoManager::bookHisto ( )

Definition at line 109 of file extended/electromagnetic/TestEm9/src/HistoManager.cc.

110 {
111  fHisto->Add1D("10","Evis/E0 in central crystal",fBinsED,0.0,1,1.0);
112  fHisto->Add1D("11","Evis/E0 in 3x3",fBinsED,0.0,1.0,1.0);
113  fHisto->Add1D("12","Evis/E0 in 5x5",fBinsED,0.0,1.0,1.0);
114  fHisto->Add1D("13","Energy (MeV) of delta-electrons",
115  fBinsE,0.0,fMaxEnergy,MeV);
116  fHisto->Add1D("14","Energy (MeV) of gammas",fBinsE,0.0,fMaxEnergy,MeV);
117  fHisto->Add1D("15","Energy (MeV) in abs1",fBinsEA,0.0,fMaxEnergyAbs,MeV);
118  fHisto->Add1D("16","Energy (MeV) in abs2",fBinsEA,0.0,fMaxEnergyAbs,MeV);
119  fHisto->Add1D("17","Energy (MeV) in abs3",fBinsEA,0.0,fMaxEnergyAbs,MeV);
120  fHisto->Add1D("18","Energy (MeV) in abs4",fBinsEA,0.0,fMaxEnergyAbs,MeV);
121  fHisto->Add1D("19","Number of vertex hits",20,-0.5,19.5,1.0);
122  fHisto->Add1D("20","E1/E9 Ratio",fBinsED,0.0,1,1.0);
123  fHisto->Add1D("21","E1/E25 Ratio",fBinsED,0.0,1.0,1.0);
124  fHisto->Add1D("22","E9/E25 Ratio",fBinsED,0.0,1.0,1.0);
125 }
static const double MeV
Definition: G4SIunits.hh:211
Here is the caller graph for this function:

◆ bookHisto() [2/2]

void HistoManager::bookHisto ( )

◆ DefaultBeamPosition() [1/2]

G4bool HistoManager::DefaultBeamPosition ( ) const
inline

◆ DefaultBeamPosition() [2/2]

G4bool HistoManager::DefaultBeamPosition ( ) const
inline

◆ EndOfEvent() [1/3]

void HistoManager::EndOfEvent ( )

◆ EndOfEvent() [2/3]

void HistoManager::EndOfEvent ( )

◆ EndOfEvent() [3/3]

void HistoManager::EndOfEvent ( )

Definition at line 323 of file extended/electromagnetic/TestEm9/src/HistoManager.cc.

324 {
325  G4double e9 = 0.0;
326  G4double e25= 0.0;
327  for (G4int i=0; i<25; i++) {
328  fE[i] /= fBeamEnergy;
329  e25 += fE[i];
330  if( ( 6<=i && 8>=i) || (11<=i && 13>=i) || (16<=i && 18>=i)) e9 += fE[i];
331  }
332 
333  if(1 < fVerbose && e25 < 0.8) {
334  ++fLowe;
335  G4cout << "### in the event# " << fEvt << " E25= " << e25 << G4endl;
336  }
337 
338  // compute ratios
339  G4double e0 = fE[12];
340  G4double e19 = 0.0;
341  G4double e125 = 0.0;
342  G4double e925 = 0.0;
343  if(e9 > 0.0) {
344  e19 = e0/e9;
345  e125 = e0/e25;
346  e925 = e9/e25;
347  fEdep[3] += e19;
348  fErms[3] += e19*e19;
349  fEdep[4] += e125;
350  fErms[4] += e125*e125;
351  fEdep[5] += e925;
352  fErms[5] += e925*e925;
353  fStat[3] += 1;
354  fStat[4] += 1;
355  fStat[5] += 1;
356  }
357 
358  // Fill histo
359  fHisto->Fill(0,e0,1.0);
360  fHisto->Fill(1,e9,1.0);
361  fHisto->Fill(2,e25,1.0);
362  fHisto->Fill(5,fEabs1,1.0);
363  fHisto->Fill(6,fEabs2,1.0);
364  fHisto->Fill(7,fEabs3,1.0);
365  fHisto->Fill(8,fEabs4,1.0);
366  fHisto->Fill(9,G4double(fNvertex.size()),1.0);
367  fHisto->Fill(10,e19,1.0);
368  fHisto->Fill(11,e125,1.0);
369  fHisto->Fill(12,e925,1.0);
370 
371  // compute sums
372  fEdep[0] += e0;
373  fErms[0] += e0*e0;
374  fEdep[1] += e9;
375  fErms[1] += e9*e9;
376  fEdep[2] += e25;
377  fErms[2] += e25*e25;
378 
379  // trancated mean
380  if(std::abs(e0-fEdeptrue[0])<fRmstrue[0]*fLimittrue[0]) {
381  fStat[0] += 1;
382  fEdeptr[0] += e0;
383  fErmstr[0] += e0*e0;
384  }
385  if(std::abs(e9-fEdeptrue[1])<fRmstrue[1]*fLimittrue[1]) {
386  fStat[1] += 1;
387  fEdeptr[1] += e9;
388  fErmstr[1] += e9*e9;
389  }
390  if(std::abs(e25-fEdeptrue[2])<fRmstrue[2]*fLimittrue[2]) {
391  fStat[2] += 1;
392  fEdeptr[2] += e25;
393  fErmstr[2] += e25*e25;
394  }
395 }
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
Here is the caller graph for this function:

◆ EndOfRun() [1/5]

void HistoManager::EndOfRun ( )

◆ EndOfRun() [2/5]

void HistoManager::EndOfRun ( )

Definition at line 145 of file extended/hadronic/Hadr00/src/HistoManager.cc.

146 {
147  if(fVerbose > 0) {
148  G4cout << "HistoManager: End of run actions are started" << G4endl;
149  }
150 
151  const G4Element* elm =
153  const G4Material* mat =
155  const G4ParticleDefinition* particle =
157 
158  G4cout << "### Fill Cross Sections for " << fParticleName
159  << " off " << fElementName
160  << G4endl;
161  if(fVerbose > 0) {
162  G4cout << "-------------------------------------------------------------"
163  << G4endl;
164  G4cout << " N E(MeV) Elastic(b) Inelastic(b)";
165  if(particle == fNeutron) { G4cout << " Capture(b) Fission(b)"; }
166  G4cout << " Total(b)" << G4endl;
167  G4cout << "-------------------------------------------------------------"
168  << G4endl;
169  }
170  if(!particle || !elm) {
171  G4cout << "HistoManager WARNING Particle or element undefined" << G4endl;
172  return;
173  }
174 
175  G4int prec = G4cout.precision();
176  G4cout.precision(4);
177 
179  G4double mass = particle->GetPDGMass();
180 
181  // Build histograms
182 
183  G4double p1 = std::log10(fMinMomentum/GeV);
184  G4double p2 = std::log10(fMaxMomentum/GeV);
185  G4double e1 = std::log10(fMinKinEnergy/MeV);
186  G4double e2 = std::log10(fMaxKinEnergy/MeV);
187  G4double de = (e2 - e1)/G4double(fBinsE);
188  G4double dp = (p2 - p1)/G4double(fBinsP);
189 
190  G4double x = e1 - de*0.5;
191  G4double e, p, xs, xtot;
192  G4int i;
193 
194  G4double coeff = 1.0;
195  if(fTargetMaterial) { coeff = fTargetMaterial->GetDensity()*cm2/g; }
196 
197  for(i=0; i<fBinsE; i++) {
198  x += de;
199  e = std::pow(10.,x)*MeV;
200  if(fVerbose>0) G4cout << std::setw(5) << i << std::setw(12) << e;
201  xs = store->GetElasticCrossSectionPerAtom(particle,e,elm,mat);
202  xtot = xs;
203  if(fVerbose>0) G4cout << std::setw(12) << xs/barn;
204  fAnalysisManager->FillH1(2, x, xs/barn);
205  xs = store->GetInelasticCrossSectionPerAtom(particle,e,elm,mat);
206  xtot += xs;
207  if(fVerbose>0) G4cout << " " << std::setw(12) << xs/barn;
208  fAnalysisManager->FillH1(4, x, xs/barn);
209  if(fTargetMaterial) {
210  xs =
212  fAnalysisManager->FillH1(9, x, xs/coeff);
213  xs =
215  fAnalysisManager->FillH1(10, x, xs/coeff);
216  }
217  if(particle == fNeutron) {
218  xs = store->GetCaptureCrossSectionPerAtom(particle,e,elm,mat);
219  xtot += xs;
220  if(fVerbose>0) G4cout << " " << std::setw(12) << xs/barn;
221  fAnalysisManager->FillH1(5, x, xs/barn);
222  xs = store->GetFissionCrossSectionPerAtom(particle,e,elm,mat);
223  xtot += xs;
224  if(fVerbose>0) G4cout << " " << std::setw(12) << xs/barn;
225  fAnalysisManager->FillH1(6, x, xs/barn);
226  }
227  xs = store->GetChargeExchangeCrossSectionPerAtom(particle,e,elm,mat);
228  if(fVerbose>0) G4cout << " " << std::setw(12) << xtot/barn << G4endl;
229  fAnalysisManager->FillH1(7, x, xs/barn);
230  fAnalysisManager->FillH1(8, x, xtot/barn);
231  }
232 
233  x = p1 - dp*0.5;
234  for(i=0; i<fBinsP; i++) {
235  x += dp;
236  p = std::pow(10.,x)*GeV;
237  e = std::sqrt(p*p + mass*mass) - mass;
238  xs = store->GetElasticCrossSectionPerAtom(particle,e,elm,mat);
239  fAnalysisManager->FillH1(1, x, xs/barn);
240  xs = store->GetInelasticCrossSectionPerAtom(particle,e,elm,mat);
241  fAnalysisManager->FillH1(3, x, xs/barn);
242  }
243  if(fVerbose > 0) {
244  G4cout << "-------------------------------------------------------------"
245  << G4endl;
246  }
247  G4cout.precision(prec);
248  fAnalysisManager->Write();
249  fAnalysisManager->CloseFile();
250 
251  delete fAnalysisManager;
252 }
G4Material * FindOrBuildMaterial(const G4String &name, G4bool isotopes=true, G4bool warning=false)
static const double MeV
Definition: G4SIunits.hh:211
G4ParticleDefinition * FindParticle(G4int PDGEncoding)
static const double cm2
Definition: G4SIunits.hh:119
static G4HadronicProcessStore * Instance()
G4double GetElasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
static const G4double e2
G4double GetDensity() const
Definition: G4Material.hh:180
G4double GetFissionCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
int G4int
Definition: G4Types.hh:78
static G4NistManager * Instance()
Float_t mat
function g(Y1, Y2, PT2)
Definition: hijing1.383.f:5206
static const double prec
Definition: RanecuEngine.cc:58
G4GLOB_DLL std::ostream G4cout
G4double GetInelasticCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
static const double GeV
Definition: G4SIunits.hh:214
G4double GetChargeExchangeCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
static const G4double e1
static G4ParticleTable * GetParticleTable()
const G4ParticleDefinition * fNeutron
#define G4endl
Definition: G4ios.hh:61
static const double barn
Definition: G4SIunits.hh:104
G4double GetElasticCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
double G4double
Definition: G4Types.hh:76
G4double GetInelasticCrossSectionPerVolume(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Material *material)
G4Element * FindOrBuildElement(G4int Z, G4bool isotopes=true)
G4double GetCaptureCrossSectionPerAtom(const G4ParticleDefinition *aParticle, G4double kineticEnergy, const G4Element *anElement, const G4Material *mat=0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ EndOfRun() [3/5]

void HistoManager::EndOfRun ( )

◆ EndOfRun() [4/5]

void HistoManager::EndOfRun ( G4int  runID)

Definition at line 175 of file extended/electromagnetic/TestEm9/src/HistoManager.cc.

176 {
177 
178  G4cout << "HistoManager: End of run actions are started RunID# "
179  << runID << G4endl;
180  G4String nam[6] = {"1x1", "3x3", "5x5", "E1/E9 ", "E1/E25", "E9/E25"};
181 
182  // average
183 
184  G4cout<<"================================================================="
185  <<G4endl;
186  G4double x = (G4double)fEvt;
187  if(fEvt > 0) x = 1.0/x;
188  G4int j;
189  for(j=0; j<fNmax; j++) {
190 
191  // total mean
192  fEdep[j] *= x;
193  G4double y = fErms[j]*x - fEdep[j]*fEdep[j];
194  if(y < 0.0) y = 0.0;
195  fErms[j] = std::sqrt(y);
196 
197  // trancated mean
198  G4double xx = G4double(fStat[j]);
199  if(xx > 0.0) xx = 1.0/xx;
200  fEdeptr[j] *= xx;
201  y = fErmstr[j]*xx - fEdeptr[j]*fEdeptr[j];
202  if(y < 0.0) y = 0.0;
203  fErmstr[j] = std::sqrt(y);
204  }
205  G4double xe = x*(G4double)fElec;
206  G4double xg = x*(G4double)fGam;
207  G4double xp = x*(G4double)fPosit;
208  G4double xs = x*fStep;
209 
210  G4double f = 100.*std::sqrt(fBeamEnergy/GeV);
211 
212  G4cout << "Number of events " << fEvt <<G4endl;
213  G4cout << std::setprecision(4) << "Average number of e- " << xe << G4endl;
214  G4cout << std::setprecision(4) << "Average number of gamma " << xg << G4endl;
215  G4cout << std::setprecision(4) << "Average number of e+ " << xp << G4endl;
216  G4cout << std::setprecision(4) << "Average number of steps " << xs << G4endl;
217 
218  for(j=0; j<3; j++) {
219  G4double ex = fEdeptr[j];
220  G4double sx = fErmstr[j];
221  G4double xx= G4double(fStat[j]);
222  if(xx > 0.0) xx = 1.0/xx;
223  G4double r = sx*std::sqrt(xx);
224  G4cout << std::setprecision(4) << "Edep " << nam[j]
225  << " = " << ex
226  << " +- " << r;
227  if(ex > 0.1) G4cout << " res= " << f*sx/ex << " % " << fStat[j];
228  G4cout << G4endl;
229  }
230  if(fLimittrue[0] < 10. || fLimittrue[1] < 10. || fLimittrue[2] < 10.) {
231  G4cout<<"=========== Mean values without trancating ====================="<<G4endl;
232  for(j=0; j<fNmax; j++) {
233  G4double ex = fEdep[j];
234  G4double sx = fErms[j];
235  G4double rx = sx*std::sqrt(x);
236  G4cout << std::setprecision(4) << "Edep " << nam[j]
237  << " = " << ex
238  << " +- " << rx;
239  if(ex > 0.0) G4cout << " res= " << f*sx/ex << " %";
240  G4cout << G4endl;
241  }
242  }
243  G4cout<<"=========== Ratios without trancating ==========================="<<G4endl;
244  for(j=3; j<6; j++) {
245  G4double e = fEdep[j];
246  G4double xx= G4double(fStat[j]);
247  if(xx > 0.0) xx = 1.0/xx;
248  e *= xx;
249  G4double y = fErms[j]*xx - e*e;
250  G4double r = 0.0;
251  if(y > 0.0) r = std::sqrt(y*xx);
252  G4cout << " " << nam[j] << " = " << e
253  << " +- " << r;
254  G4cout << G4endl;
255  }
256  G4cout << std::setprecision(4) << "Beam Energy " << fBeamEnergy/GeV
257  << " GeV" << G4endl;
258  if(fLowe > 0) G4cout << "Number of events E/E0<0.8 " << fLowe << G4endl;
259  G4cout<<"=================================================================="<<G4endl;
260  G4cout<<G4endl;
261 
262  // normalise histograms
263  if(fHisto->IsActive()) {
264  for(G4int i=0; i<fNHisto; i++) {
265  fHisto->ScaleH1(i,x);
266  }
267  fHisto->Save();
268  }
269  if(0 < runID) { return; }
270 
271  // Acceptance only for the first run
272  EmAcceptance acc;
273  G4bool isStarted = false;
274  for (j=0; j<fNmax; j++) {
275 
276  G4double ltrue = fLimittrue[j];
277  if (ltrue < DBL_MAX) {
278  if (!isStarted) {
279  acc.BeginOfAcceptance("Crystal Calorimeter",fEvt);
280  isStarted = true;
281  }
282  G4double etrue = fEdeptrue[j];
283  G4double rtrue = fRmstrue[j];
284  acc.EmAcceptanceGauss("Edep"+nam[j],fEvt,fEdeptr[j],etrue,rtrue,ltrue);
285  acc.EmAcceptanceGauss("Erms"+nam[j],fEvt,fErmstr[j],rtrue,rtrue,2.0*ltrue);
286  }
287  }
288  if(isStarted) acc.EndOfAcceptance();
289 
290  // atom frequency
291  G4cout << " Z bremsstrahlung photoeffect compton conversion" << G4endl;
292  for(j=1; j<93; ++j) {
293  G4int n1 = G4int(fBrem[j]*x);
294  G4int n2 = G4int(fPhot[j]*x);
295  G4int n3 = G4int(fComp[j]*x);
296  G4int n4 = G4int(fConv[j]*x);
297  if(n1 + n2 + n3 + n4 > 0) {
298  G4cout << std::setw(4) << j << std::setw(12) << n1 << std::setw(12) << n2
299  << std::setw(12) << n3 << std::setw(12) << n4 << G4endl;
300  }
301  }
302 }
void EmAcceptanceGauss(const G4String &title, G4int stat, G4double avr, G4double avr0, G4double rms, G4double limit)
Double_t xx
void BeginOfAcceptance(const G4String &title, G4int stat)
int G4int
Definition: G4Types.hh:78
Double_t y
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
static const double GeV
Definition: G4SIunits.hh:214
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
#define DBL_MAX
Definition: templates.hh:83
Here is the call graph for this function:

◆ EndOfRun() [5/5]

void HistoManager::EndOfRun ( )

◆ Fill() [1/2]

void HistoManager::Fill ( G4int  id,
G4double  x,
G4double  w 
)

◆ Fill() [2/2]

void HistoManager::Fill ( G4int  id,
G4double  x,
G4double  w 
)

Definition at line 523 of file extended/hadronic/Hadr01/src/HistoManager.cc.

524 {
525  fHisto->Fill(id, x, w);
526 }
Here is the caller graph for this function:

◆ FillHisto() [1/4]

void HistoManager::FillHisto ( G4int  id,
G4double  e,
G4double  weight = 1.0 
)

Definition at line 130 of file extended/analysis/AnaEx01/src/HistoManager.cc.

131 {
132  G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
133  analysisManager->FillH1(ih, xbin, weight);
134 }
double weight
Definition: plottest35.C:25
ExG4HbookAnalysisManager G4AnalysisManager
Definition: g4hbook_defs.hh:66
Here is the caller graph for this function:

◆ FillHisto() [2/4]

void HistoManager::FillHisto ( G4int  id,
G4double  bin,
G4double  weight = 1.0 
)

◆ FillHisto() [3/4]

void HistoManager::FillHisto ( G4int  id,
G4double  e,
G4double  weight = 1.0 
)

◆ FillHisto() [4/4]

void HistoManager::FillHisto ( G4int  id,
G4double  bin,
G4double  weight = 1.0 
)

◆ FillNtuple() [1/3]

void HistoManager::FillNtuple ( G4double  EnergyAbs,
G4double  EnergyGap,
G4double  TrackLAbs,
G4double  TrackLGap 
)

Definition at line 147 of file extended/analysis/AnaEx01/src/HistoManager.cc.

149 {
150  G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
151  // Fill 1st ntuple ( id = 0)
152  analysisManager->FillNtupleDColumn(0, 0, energyAbs);
153  analysisManager->FillNtupleDColumn(0, 1, energyGap);
154  analysisManager->AddNtupleRow(0);
155  // Fill 2nd ntuple ( id = 1)
156  analysisManager->FillNtupleDColumn(1, 0, trackLAbs);
157  analysisManager->FillNtupleDColumn(1, 1, trackLGap);
158  analysisManager->AddNtupleRow(1);
159 }
ExG4HbookAnalysisManager G4AnalysisManager
Definition: g4hbook_defs.hh:66
Here is the caller graph for this function:

◆ FillNtuple() [2/3]

void HistoManager::FillNtuple ( G4double  energyAbs,
G4double  energyGap,
G4double  trackLAbs,
G4double  trackLGap 
)

◆ FillNtuple() [3/3]

void HistoManager::FillNtuple ( G4double  EnergyAbs,
G4double  EnergyGap,
G4double  TrackLAbs,
G4double  TrackLGap 
)

◆ FirstEventToDebug()

G4int HistoManager::FirstEventToDebug ( ) const
inline

◆ GetBinWidth()

G4double HistoManager::GetBinWidth ( G4int  id)
inline

Definition at line 70 of file extended/electromagnetic/TestEm17/include/HistoManager.hh.

Here is the caller graph for this function:

◆ GetHistoID()

G4int HistoManager::GetHistoID ( G4int  id)
inline

Definition at line 71 of file extended/electromagnetic/TestEm17/include/HistoManager.hh.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetHistoUnit()

G4double HistoManager::GetHistoUnit ( G4int  id)
inline

◆ GetMaxEnergy()

G4double HistoManager::GetMaxEnergy ( ) const
inline

◆ GetNbins()

G4int HistoManager::GetNbins ( G4int  id)
inline

Definition at line 66 of file extended/electromagnetic/TestEm17/include/HistoManager.hh.

Here is the caller graph for this function:

◆ GetPointer() [1/3]

static HistoManager* HistoManager::GetPointer ( )
static

◆ GetPointer() [2/3]

HistoManager * HistoManager::GetPointer ( )
static

Definition at line 64 of file extended/electromagnetic/TestEm9/src/HistoManager.cc.

65 {
66  if(!fManager) {
67  fManager = new HistoManager();
68  }
69  return fManager;
70 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetPointer() [3/3]

static HistoManager* HistoManager::GetPointer ( )
static

◆ GetTitle()

G4String HistoManager::GetTitle ( G4int  id)
inline

◆ GetVerbose() [1/3]

G4int HistoManager::GetVerbose ( ) const
inline

◆ GetVerbose() [2/3]

G4int HistoManager::GetVerbose ( ) const
inline

◆ GetVerbose() [3/3]

G4int HistoManager::GetVerbose ( ) const
inline

◆ GetVmax()

G4double HistoManager::GetVmax ( G4int  id)
inline

Definition at line 68 of file extended/electromagnetic/TestEm17/include/HistoManager.hh.

68 {return fVmax[id];}
Here is the caller graph for this function:

◆ GetVmin()

G4double HistoManager::GetVmin ( G4int  id)
inline

Definition at line 67 of file extended/electromagnetic/TestEm17/include/HistoManager.hh.

67 {return fVmin[id];}
Here is the caller graph for this function:

◆ HistoExist()

G4bool HistoManager::HistoExist ( G4int  id)
inline

Definition at line 64 of file extended/electromagnetic/TestEm17/include/HistoManager.hh.

Here is the caller graph for this function:

◆ Initialise()

void HistoManager::Initialise ( )
private

Definition at line 125 of file extended/hadronic/Hadr02/src/HistoManager.cc.

126 {
127  fAbsZ0 = -0.5*fLength;
128  fNevt = 0;
129  fNelec = 0;
130  fNposit = 0;
131  fNgam = 0;
132  fNstep = 0;
133  fNions = 0;
134  fNdeut = 0;
135  fNalpha = 0;
136  fNkaons = 0;
137  fNmuons = 0;
138  fNcpions = 0;
139  fNpi0 = 0;
140  fNneutron = 0;
141  fNproton = 0;
142  fNaproton = 0;
143 
144  fEdepEvt = 0.0;
145  fEdepSum = 0.0;
146  fEdepSum2 = 0.0;
147 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ LastEventToDebug()

G4int HistoManager::LastEventToDebug ( ) const
inline

◆ Length() [1/2]

G4double HistoManager::Length ( ) const
inline

◆ Length() [2/2]

G4double HistoManager::Length ( ) const
inline

◆ Normalize() [1/4]

void HistoManager::Normalize ( G4int  id,
G4double  fac 
)

Definition at line 138 of file extended/analysis/AnaEx01/src/HistoManager.cc.

139 {
140  G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
141  G4H1* h1 = analysisManager->GetH1(ih);
142  if (h1) h1->scale(fac);
143 }
TH1F * h1
tools::hbook::h1 G4H1
Definition: g4hbook_defs.hh:45
ExG4HbookAnalysisManager G4AnalysisManager
Definition: g4hbook_defs.hh:66
static const G4double fac
Here is the caller graph for this function:

◆ Normalize() [2/4]

void HistoManager::Normalize ( G4int  id,
G4double  fac 
)

◆ Normalize() [3/4]

void HistoManager::Normalize ( G4int  id,
G4double  fac 
)

◆ Normalize() [4/4]

void HistoManager::Normalize ( G4int  id,
G4double  fac 
)

◆ NumberOfSlices() [1/2]

G4int HistoManager::NumberOfSlices ( ) const
inline

◆ NumberOfSlices() [2/2]

G4int HistoManager::NumberOfSlices ( ) const
inline

◆ PrintHisto()

void HistoManager::PrintHisto ( G4int  ih)

Definition at line 211 of file extended/electromagnetic/TestEm17/src/HistoManager.cc.

212 {
213  if (ih < MaxHisto) { fAscii[ih] = true; fAscii[0] = true; }
214  else
215  G4cout << "---> warning from HistoManager::PrintHisto() : histo " << ih
216  << "does not exist" << G4endl;
217 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
Here is the caller graph for this function:

◆ PrintStatistic() [1/3]

void HistoManager::PrintStatistic ( )

Definition at line 163 of file extended/analysis/AnaEx01/src/HistoManager.cc.

164 {
165  if (! fFactoryOn) return;
166 
167  G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
168 
169  G4cout << "\n ----> print histograms statistic \n" << G4endl;
170  for ( G4int i=0; i<analysisManager->GetNofH1s(); ++i ) {
171  G4String name = analysisManager->GetH1Name(i);
172  G4H1* h1 = analysisManager->GetH1(i);
173 
174  G4String unitCategory;
175  if (name[0U] == 'E' ) unitCategory = "Energy";
176  if (name[0U] == 'L' ) unitCategory = "Length";
177  // we use an explicit unsigned int type for operator [] argument
178  // to avoid problems with windows compiler
179 
180  G4cout << name
181  << ": mean = " << G4BestUnit(h1->mean(), unitCategory)
182  << " rms = " << G4BestUnit(h1->rms(), unitCategory )
183  << G4endl;
184  }
185 }
TH1F * h1
G4String name
Definition: TRTMaterials.hh:40
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
tools::hbook::h1 G4H1
Definition: g4hbook_defs.hh:45
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
ExG4HbookAnalysisManager G4AnalysisManager
Definition: g4hbook_defs.hh:66
#define G4endl
Definition: G4ios.hh:61
Here is the caller graph for this function:

◆ PrintStatistic() [2/3]

void HistoManager::PrintStatistic ( )

◆ PrintStatistic() [3/3]

void HistoManager::PrintStatistic ( )

◆ ResetTrackLength()

void HistoManager::ResetTrackLength ( )
inline

Definition at line 93 of file extended/electromagnetic/TestEm9/include/HistoManager.hh.

Here is the caller graph for this function:

◆ Save() [1/3]

void HistoManager::Save ( )

Definition at line 114 of file extended/analysis/AnaEx01/src/HistoManager.cc.

115 {
116  if (! fFactoryOn) return;
117 
118  G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
119  analysisManager->Write();
120  analysisManager->CloseFile();
121 
122  G4cout << "\n----> Histograms and ntuples are saved\n" << G4endl;
123 
124  delete G4AnalysisManager::Instance();
125  fFactoryOn = false;
126 }
G4GLOB_DLL std::ostream G4cout
ExG4HbookAnalysisManager G4AnalysisManager
Definition: g4hbook_defs.hh:66
#define G4endl
Definition: G4ios.hh:61
Here is the caller graph for this function:

◆ Save() [2/3]

void HistoManager::Save ( )

◆ save()

void HistoManager::save ( )

Definition at line 113 of file extended/electromagnetic/TestEm17/src/HistoManager.cc.

114 {
115  if (factoryOn) {
116  G4cout << "\n----> HistoManager::save " << G4endl;
117  G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
118  analysisManager->Write();
119  analysisManager->CloseFile();
120  saveAscii(); // Write fAscii file, if any
121  G4cout << "\n----> Histograms are saved in " << fileName[1] << G4endl;
122 
123  // delete G4AnalysisManager::Instance();
124  factoryOn = false;
125  }
126 }
G4GLOB_DLL std::ostream G4cout
ExG4HbookAnalysisManager G4AnalysisManager
Definition: g4hbook_defs.hh:66
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Save() [3/3]

void HistoManager::Save ( )

◆ saveAscii()

void HistoManager::saveAscii ( )
private

Definition at line 223 of file extended/electromagnetic/TestEm17/src/HistoManager.cc.

224 {
225  if (!fAscii[0]) return;
226 
227  G4String name = fileName[0] + ".ascii";
228  std::ofstream File(name, std::ios::out);
229  if (!File) {
230  G4cout
231  << "\n---> HistoManager::saveAscii(): cannot open " << name << G4endl;
232  return;
233  }
234 
235  File.setf( std::ios::scientific, std::ios::floatfield );
236 
237  //write selected histograms
238  for (G4int ih=0; ih<MaxHisto; ih++) {
239  if (fHistPt[ih] && fAscii[ih]) {
240 
241  File << "\n 1D histogram " << ih << ": " << fTitle[ih]
242  << "\n \n \t X \t\t Y" << G4endl;
243 
244  for (G4int iBin=0; iBin<fNbins[ih]; iBin++) {
245  File << " " << iBin << "\t"
246  << fHistPt[ih]->axis().bin_center(iBin) << "\t"
247  << fHistPt[ih]->bin_height(iBin)
248  << G4endl;
249  }
250  }
251  }
252 }
G4String name
Definition: TRTMaterials.hh:40
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
Here is the caller graph for this function:

◆ ScoreNewTrack() [1/3]

void HistoManager::ScoreNewTrack ( const G4Track *  )

◆ ScoreNewTrack() [2/3]

void HistoManager::ScoreNewTrack ( const G4Track *  aTrack)

Definition at line 399 of file extended/electromagnetic/TestEm9/src/HistoManager.cc.

400 {
401  //Save primary parameters
403  const G4ParticleDefinition* particle = aTrack->GetDefinition();
404  const G4DynamicParticle* dynParticle = aTrack->GetDynamicParticle();
405 
406  G4int pid = aTrack->GetParentID();
407  G4double kinE = dynParticle->GetKineticEnergy();
408  G4ThreeVector pos = aTrack->GetVertexPosition();
409 
410  // primary
411  if(0 == pid) {
412 
413  G4double mass = 0.0;
414  if(particle) {
415  mass = particle->GetPDGMass();
416  }
417 
418  G4ThreeVector dir = dynParticle->GetMomentumDirection();
419  if(1 < fVerbose) {
420  G4cout << "TrackingAction: Primary kinE(MeV)= " << kinE/MeV
421  << "; m(MeV)= " << mass/MeV
422  << "; pos= " << pos << "; dir= " << dir << G4endl;
423  }
424 
425  // secondary
426  } else {
427  const G4VProcess* proc = aTrack->GetCreatorProcess();
428  G4int type = proc->GetProcessSubType();
429  if(type == fBremsstrahlung) {
430  const G4Element* elm =
431  static_cast<const G4VEnergyLossProcess*>(proc)->GetCurrentElement();
432  if(elm) {
433  G4int Z = G4lrint(elm->GetZ());
434  if(Z > 0 && Z < 93) { fBrem[Z] += 1.0; }
435  }
436  } else if(type == fPhotoElectricEffect) {
437  const G4Element* elm =
438  static_cast<const G4VEmProcess*>(proc)->GetCurrentElement();
439  if(elm) {
440  G4int Z = G4lrint(elm->GetZ());
441  if(Z > 0 && Z < 93) { fPhot[Z] += 1.0; }
442  }
443  } else if(type == fGammaConversion) {
444  const G4Element* elm =
445  static_cast<const G4VEmProcess*>(proc)->GetCurrentElement();
446  if(elm) {
447  G4int Z = G4lrint(elm->GetZ());
448  if(Z > 0 && Z < 93) { fConv[Z] += 1.0; }
449  }
450  } else if(type == fComptonScattering) {
451  const G4Element* elm =
452  static_cast<const G4VEmProcess*>(proc)->GetCurrentElement();
453  if(elm) {
454  G4int Z = G4lrint(elm->GetZ());
455  if(Z > 0 && Z < 93) { fComp[Z] += 1.0; }
456  }
457  }
458 
459  // delta-electron
460  if (particle == fElectron) {
461  if(1 < fVerbose) {
462  G4cout << "TrackingAction: Secondary electron " << G4endl;
463  }
464  AddDeltaElectron(dynParticle);
465 
466  } else if (particle == fPositron) {
467  if(1 < fVerbose) {
468  G4cout << "TrackingAction: Secondary positron " << G4endl;
469  }
470  AddPositron(dynParticle);
471 
472  } else if (particle == fGamma) {
473  if(1 < fVerbose) {
474  G4cout << "TrackingAction: Secondary gamma; parentID= " << pid
475  << " E= " << kinE << G4endl;
476  }
477  AddPhoton(dynParticle);
478  }
479  }
480 }
static const double MeV
Definition: G4SIunits.hh:211
void AddPhoton(const G4DynamicParticle *)
TDirectory * dir
int G4int
Definition: G4Types.hh:78
G4int GetProcessSubType() const
Definition: G4VProcess.hh:426
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
Float_t Z
void AddDeltaElectron(const G4DynamicParticle *)
int G4lrint(double ad)
Definition: templates.hh:163
const G4ThreeVector & GetMomentumDirection() const
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4double GetZ() const
Definition: G4Element.hh:131
static const G4double pos
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ScoreNewTrack() [3/3]

void HistoManager::ScoreNewTrack ( const G4Track *  )

◆ SetBeamEnergy()

void HistoManager::SetBeamEnergy ( G4double  val)
inline

Definition at line 109 of file extended/electromagnetic/TestEm9/include/HistoManager.hh.

Here is the call graph for this function:

◆ SetDefaultBeamPositionFlag() [1/2]

void HistoManager::SetDefaultBeamPositionFlag ( G4bool  f)
inline

◆ SetDefaultBeamPositionFlag() [2/2]

void HistoManager::SetDefaultBeamPositionFlag ( G4bool  f)
inline

◆ SetEdepAndRMS()

void HistoManager::SetEdepAndRMS ( G4int  i,
G4ThreeVector  val 
)

Definition at line 541 of file extended/electromagnetic/TestEm9/src/HistoManager.cc.

542 {
543  if(i<fNmax && i>=0) {
544  if(val[0] > 0.0) fEdeptrue[i] = val[0];
545  if(val[1] > 0.0) fRmstrue[i] = val[1];
546  if(val[2] > 0.0) fLimittrue[i] = val[2];
547  }
548 }
Here is the caller graph for this function:

◆ SetElementName() [1/2]

void HistoManager::SetElementName ( const G4String name)
inline

Definition at line 120 of file extended/hadronic/Hadr00/include/HistoManager.hh.

121 {
122  fElementName = name;
123 }
G4String name
Definition: TRTMaterials.hh:40
Here is the caller graph for this function:

◆ SetElementName() [2/2]

void HistoManager::SetElementName ( const G4String )
inline

◆ SetFileName()

void HistoManager::SetFileName ( const G4String name)
inline

Definition at line 63 of file extended/electromagnetic/TestEm17/include/HistoManager.hh.

Here is the caller graph for this function:

◆ SetFirstEventToDebug()

void HistoManager::SetFirstEventToDebug ( G4int  val)
inline

◆ SetHisto()

void HistoManager::SetHisto ( G4int  ih,
G4int  nbins,
G4double  vmin,
G4double  vmax,
const G4String unit = "none" 
)

Definition at line 143 of file extended/electromagnetic/TestEm17/src/HistoManager.cc.

145 {
146  if (ih > MaxHisto) {
147  G4cout << "---> warning from HistoManager::SetHisto() : histo " << ih
148  << "does not fExist" << G4endl;
149  return;
150  }
151 
152  const G4String id[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9",
153  "10", "11", "12", "13", "14", "15"};
154  const G4String title[] =
155  { "dummy", //0
156  "log10(Etransfert/Emu) muIonization", //1
157  "log10(Etransfert/Emu) muPair", //2
158  "log10(Etransfert/Emu) muBrems", //3
159  "log10(Etransfert/Emu) muNuclear", //4
160  "log10(Etransfert/Emu) hIonization", //5
161  "log10(Etransfert/Emu) hPair", //6
162  "log10(Etransfert/Emu) hBrems", //7
163  "dummy", //8
164  "dummy", //9
165  "dummy", //10
166  "log10(Etransfert/Emu) muIonization", //11
167  "log10(Etransfert/Emu) muPair", //12
168  "log10(Etransfert/Emu) muBrems", //13
169  "log10(Etransfert/Emu) muNuclear" //14
170  };
171 
172  G4String titl = title[ih];
173  fUnit[ih] = 1.;
174 
175  if (unit != "none") {
176  titl = title[ih] + " (" + unit + ")";
178  }
179 
180  fExist[ih] = true;
181  fLabel[ih] = "h"+id[ih];
182  fTitle[ih] = titl;
183  fNbins[ih] = nbins;
184  fVmin[ih] = vmin;
185  fVmax[ih] = vmax;
186  fWidth[ih] = fUnit[ih]*(vmax-vmin)/nbins;
187 
188  fNbHist++;
189 
190  G4cout << "----> SetHisto " << ih << ": " << titl << "; "
191  << nbins << " bins from "
192  << vmin << " " << unit << " to " << vmax << " " << unit << G4endl;
193 
194 }
static G4double GetValueOf(const G4String &)
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
subroutine title
Definition: hijing1.383.f:5981
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetHistoName() [1/2]

void HistoManager::SetHistoName ( G4String val)
inline

Definition at line 155 of file extended/hadronic/Hadr00/include/HistoManager.hh.

156 {
157  fHistoName = val;
158 }
Here is the caller graph for this function:

◆ SetHistoName() [2/2]

void HistoManager::SetHistoName ( G4String val)
inline

◆ SetHistoNumber()

void HistoManager::SetHistoNumber ( G4int  val)
inline

◆ SetIonPhysics()

void HistoManager::SetIonPhysics ( const G4String nam)

Definition at line 453 of file extended/hadronic/Hadr02/src/HistoManager.cc.

454 {
455  if(fIonPhysics) {
456  G4cout << "### HistoManager WARNING: Ion Physics is already defined: <"
457  << nam << "> is ignored!" << G4endl;
458  } else if(nam == "HIJING") {
459 #ifdef G4_USE_HIJING
463  G4cout << "### SetIonPhysics: Ion Physics FTFP/Binary is added"
464  << G4endl;
465 #else
466  G4cout << "Error: Ion Physics HIJING is requested but is not available"
467  <<G4endl;
468 #endif
469  } else if(nam == "UrQMD") {
470 #ifdef G4_USE_URQMD
471  fIonPhysics = new IonUrQMDPhysics(1);
474  G4cout << "### SetIonPhysics: Ion Physics UrQMD is added"
475  << G4endl;
476 #else
477  G4cout << "Error: Ion Physics UrQMD is requested but is not available"
478  <<G4endl;
479 #endif
480  } else {
481  G4cout << "### HistoManager WARNING: Ion Physics <"
482  << nam << "> is unknown!" << G4endl;
483  }
484 }
G4GLOB_DLL std::ostream G4cout
void PhysicsHasBeenModified()
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:79
void ReplacePhysics(G4VPhysicsConstructor *)
#define G4endl
Definition: G4ios.hh:61
Here is the call graph for this function:

◆ SetLastEventToDebug()

void HistoManager::SetLastEventToDebug ( G4int  val)
inline

◆ SetMaxEnergy()

void HistoManager::SetMaxEnergy ( G4double  val)
inline

◆ SetMaxEnergyDeposit() [1/2]

void HistoManager::SetMaxEnergyDeposit ( G4double  val)
inline

◆ SetMaxEnergyDeposit() [2/2]

void HistoManager::SetMaxEnergyDeposit ( G4double  val)
inline

◆ SetMaxKinEnergy() [1/2]

void HistoManager::SetMaxKinEnergy ( G4double  val)
inline

◆ SetMaxKinEnergy() [2/2]

void HistoManager::SetMaxKinEnergy ( G4double  val)
inline

Definition at line 140 of file extended/hadronic/Hadr00/include/HistoManager.hh.

Here is the caller graph for this function:

◆ SetMaxMomentum() [1/2]

void HistoManager::SetMaxMomentum ( G4double  val)
inline

Definition at line 150 of file extended/hadronic/Hadr00/include/HistoManager.hh.

Here is the caller graph for this function:

◆ SetMaxMomentum() [2/2]

void HistoManager::SetMaxMomentum ( G4double  val)
inline

◆ SetMinKinEnergy() [1/2]

void HistoManager::SetMinKinEnergy ( G4double  val)
inline

Definition at line 135 of file extended/hadronic/Hadr00/include/HistoManager.hh.

Here is the caller graph for this function:

◆ SetMinKinEnergy() [2/2]

void HistoManager::SetMinKinEnergy ( G4double  val)
inline

◆ SetMinMomentum() [1/2]

void HistoManager::SetMinMomentum ( G4double  val)
inline

Definition at line 145 of file extended/hadronic/Hadr00/include/HistoManager.hh.

Here is the caller graph for this function:

◆ SetMinMomentum() [2/2]

void HistoManager::SetMinMomentum ( G4double  val)
inline

◆ SetNumberOfBinsE() [1/4]

void HistoManager::SetNumberOfBinsE ( G4int  val)
inline

◆ SetNumberOfBinsE() [2/4]

void HistoManager::SetNumberOfBinsE ( G4int  val)
inline

Definition at line 125 of file extended/hadronic/Hadr00/include/HistoManager.hh.

126 {
127  if(val>0) { fBinsE = val; }
128 }
Here is the caller graph for this function:

◆ SetNumberOfBinsE() [3/4]

void HistoManager::SetNumberOfBinsE ( G4int  val)
inline

◆ SetNumberOfBinsE() [4/4]

void HistoManager::SetNumberOfBinsE ( G4int  val)
inline

◆ SetNumberOfBinsP() [1/2]

void HistoManager::SetNumberOfBinsP ( G4int  val)
inline

Definition at line 130 of file extended/hadronic/Hadr00/include/HistoManager.hh.

131 {
132  if(val>0) { fBinsP = val; }
133 }
Here is the caller graph for this function:

◆ SetNumberOfBinsP() [2/2]

void HistoManager::SetNumberOfBinsP ( G4int  val)
inline

◆ SetNumberOfSlices() [1/2]

void HistoManager::SetNumberOfSlices ( G4int  val)
inline

◆ SetNumberOfSlices() [2/2]

void HistoManager::SetNumberOfSlices ( G4int  val)
inline

◆ SetParticleName() [1/2]

void HistoManager::SetParticleName ( const G4String name)
inline

Definition at line 115 of file extended/hadronic/Hadr00/include/HistoManager.hh.

116 {
118 }
G4String name
Definition: TRTMaterials.hh:40
Here is the caller graph for this function:

◆ SetParticleName() [2/2]

void HistoManager::SetParticleName ( const G4String )
inline

◆ SetPhysicsList()

void HistoManager::SetPhysicsList ( G4VModularPhysicsList p)
inline

Definition at line 101 of file extended/hadronic/Hadr02/include/HistoManager.hh.

101 {fPhysList = p;};
Here is the call graph for this function:
Here is the caller graph for this function:

◆ SetTargetLength() [1/2]

void HistoManager::SetTargetLength ( G4double  val)
inline

◆ SetTargetLength() [2/2]

void HistoManager::SetTargetLength ( G4double  val)
inline

◆ SetTargetMaterial() [1/2]

void HistoManager::SetTargetMaterial ( const G4Material mat)
inline

◆ SetTargetMaterial() [2/2]

void HistoManager::SetTargetMaterial ( const G4Material p)
inline

Definition at line 160 of file extended/hadronic/Hadr00/include/HistoManager.hh.

161 {
162  fTargetMaterial = p;
163 }

◆ SetVerbose() [1/5]

void HistoManager::SetVerbose ( G4int  val)

◆ SetVerbose() [2/5]

void HistoManager::SetVerbose ( G4int  val)

◆ SetVerbose() [3/5]

void HistoManager::SetVerbose ( G4int  val)

◆ SetVerbose() [4/5]

void HistoManager::SetVerbose ( G4int  val)

◆ SetVerbose() [5/5]

void HistoManager::SetVerbose ( G4int  val)
inline

Definition at line 95 of file extended/electromagnetic/TestEm9/include/HistoManager.hh.

Here is the caller graph for this function:

Member Data Documentation

◆ fAbsZ0

G4double HistoManager::fAbsZ0
private

◆ factoryOn

G4bool HistoManager::factoryOn
private

◆ fAF

AIDA::IAnalysisFactory* HistoManager::fAF
private

◆ fAnalysisManager

G4AnalysisManager * HistoManager::fAnalysisManager
private

◆ fAscii

G4bool HistoManager::fAscii[MaxHisto]
private

◆ fBeamEnergy

G4double HistoManager::fBeamEnergy
private

◆ fBeamFlag

G4bool HistoManager::fBeamFlag
private

◆ fBinsE

G4int HistoManager::fBinsE
private

◆ fBinsEA

G4int HistoManager::fBinsEA
private

◆ fBinsED

G4int HistoManager::fBinsED
private

◆ fBinsP

G4int HistoManager::fBinsP
private

◆ fBrem

G4DataVector HistoManager::fBrem
private

◆ fComp

G4DataVector HistoManager::fComp
private

◆ fConv

G4DataVector HistoManager::fConv
private

◆ fE

G4double HistoManager::fE[25]
private

◆ fEabs

G4double HistoManager::fEabs
private

◆ fEabs1

G4double HistoManager::fEabs1
private

◆ fEabs2

G4double HistoManager::fEabs2
private

◆ fEabs3

G4double HistoManager::fEabs3
private

◆ fEabs4

G4double HistoManager::fEabs4
private

◆ fEdep

G4double HistoManager::fEdep[6]
private

◆ fEdepEM

G4double HistoManager::fEdepEM
private

◆ fEdepEvt

G4double HistoManager::fEdepEvt
private

◆ fEdepMax

G4double HistoManager::fEdepMax
private

◆ fEdepP

G4double HistoManager::fEdepP
private

◆ fEdepPI

G4double HistoManager::fEdepPI
private

◆ fEdepSum

G4double HistoManager::fEdepSum
private

◆ fEdepSum2

G4double HistoManager::fEdepSum2
private

◆ fEdeptr

G4double HistoManager::fEdeptr[6]
private

◆ fEdeptrue

G4double HistoManager::fEdeptrue[3]
private

◆ fEgap

G4double HistoManager::fEgap
private

◆ fElec

G4int HistoManager::fElec
private

◆ fElectron

const G4ParticleDefinition* HistoManager::fElectron
private

◆ fElementName

G4String HistoManager::fElementName
private

◆ fErms

G4double HistoManager::fErms[6]
private

◆ fErmstr

G4double HistoManager::fErmstr[6]
private

◆ fEvertex

G4DataVector HistoManager::fEvertex
private

◆ fEvt

G4int HistoManager::fEvt
private

◆ fEvt1

G4int HistoManager::fEvt1
private

◆ fEvt2

G4int HistoManager::fEvt2
private

◆ fExist

G4bool HistoManager::fExist[MaxHisto]
private

◆ fFactoryOn

G4bool HistoManager::fFactoryOn
private

◆ fFileName

G4String HistoManager::fFileName
private

Definition at line 53 of file advanced/amsEcal/include/HistoManager.hh.

◆ fGam

G4int HistoManager::fGam
private

◆ fGamma

const G4ParticleDefinition* HistoManager::fGamma
private

◆ fHistId

G4int HistoManager::fHistId[MaxHisto]
private

◆ fHisto [1/3]

Histo * HistoManager::fHisto
private

◆ fHisto [2/3]

AIDA::IHistogram1D* HistoManager::fHisto[MaxHisto]
private

◆ fHisto [3/3]

Histo* HistoManager::fHisto
private

◆ fHistoBooked

G4bool HistoManager::fHistoBooked
private

◆ fHistoMessenger

HistoMessenger* HistoManager::fHistoMessenger
private

◆ fHistoName

G4String HistoManager::fHistoName
private

◆ fHistPt

G4AnaH1* HistoManager::fHistPt[MaxHisto]
private

◆ fileName

G4String HistoManager::fileName[2]
private

◆ fIonPhysics

G4VPhysicsConstructor* HistoManager::fIonPhysics
private

◆ fLabel

G4String HistoManager::fLabel[MaxHisto]
private

◆ fLabs

G4double HistoManager::fLabs
private

◆ fLength

G4double HistoManager::fLength
private

◆ fLgap

G4double HistoManager::fLgap
private

◆ fLimittrue

G4double HistoManager::fLimittrue[3]
private

◆ fLowe

G4int HistoManager::fLowe
private

◆ fManager

HistoManager * HistoManager::fManager = 0
staticprivate

◆ fMaterial

const G4Material* HistoManager::fMaterial
private

◆ fMaxEnergy

G4double HistoManager::fMaxEnergy
private

◆ fMaxEnergyAbs

G4double HistoManager::fMaxEnergyAbs
private

◆ fMaxKinEnergy

G4double HistoManager::fMaxKinEnergy
private

◆ fMaxMomentum

G4double HistoManager::fMaxMomentum
private

◆ fMessenger

HistoManagerMessenger * HistoManager::fMessenger
private

◆ fMinKinEnergy

G4double HistoManager::fMinKinEnergy
private

◆ fMinMomentum

G4double HistoManager::fMinMomentum
private

◆ fNalpha

G4int HistoManager::fNalpha
private

◆ fNaproton

G4int HistoManager::fNaproton
private

◆ fNbHist

G4int HistoManager::fNbHist
private

◆ fNbins

G4int HistoManager::fNbins[MaxHisto]
private

◆ fNBinsE

G4int HistoManager::fNBinsE
private

◆ fNcpions

G4int HistoManager::fNcpions
private

◆ fNdeut

G4int HistoManager::fNdeut
private

◆ fNelec

G4int HistoManager::fNelec
private

◆ fNeutron

const G4ParticleDefinition * HistoManager::fNeutron
private

◆ fNevt

G4int HistoManager::fNevt
private

◆ fNgam

G4int HistoManager::fNgam
private

◆ fNHisto

G4int HistoManager::fNHisto
private

◆ fNions

G4int HistoManager::fNions
private

◆ fNkaons

G4int HistoManager::fNkaons
private

◆ fNmax

G4int HistoManager::fNmax
private

◆ fNmuons

G4int HistoManager::fNmuons
private

◆ fNneu_back

G4int HistoManager::fNneu_back
private

◆ fNneu_forw

G4int HistoManager::fNneu_forw
private

◆ fNneu_leak

G4int HistoManager::fNneu_leak
private

◆ fNneutron

G4int HistoManager::fNneutron
private

◆ fNpi0

G4int HistoManager::fNpi0
private

◆ fNpiofNleak

G4int HistoManager::fNpiofNleak
private

◆ fNposit

G4int HistoManager::fNposit
private

◆ fNprot_leak

G4int HistoManager::fNprot_leak
private

◆ fNproton

G4int HistoManager::fNproton
private

◆ fNSlices

G4int HistoManager::fNSlices
private

◆ fNstep

G4int HistoManager::fNstep
private

◆ fNtuple1 [1/2]

TTree* HistoManager::fNtuple1
private

◆ fNtuple1 [2/2]

AIDA::ITuple* HistoManager::fNtuple1
private

◆ fNtuple2 [1/2]

TTree* HistoManager::fNtuple2
private

◆ fNtuple2 [2/2]

AIDA::ITuple* HistoManager::fNtuple2
private

◆ fNvertex

G4DataVector HistoManager::fNvertex
private

◆ fParticleName

G4String HistoManager::fParticleName
private

◆ fPhot

G4DataVector HistoManager::fPhot
private

◆ fPhysList

G4VModularPhysicsList* HistoManager::fPhysList
private

◆ fPosit

G4int HistoManager::fPosit
private

◆ fPositron

const G4ParticleDefinition* HistoManager::fPositron
private

◆ fPrimaryDef

const G4ParticleDefinition * HistoManager::fPrimaryDef
private

◆ fPrimaryKineticEnergy

G4double HistoManager::fPrimaryKineticEnergy
private

◆ fRmstrue

G4double HistoManager::fRmstrue[3]
private

◆ fRootFile

TFile* HistoManager::fRootFile
private

◆ fStat

G4int HistoManager::fStat[6]
private

◆ fStep

G4double HistoManager::fStep
private

◆ fTargetMaterial

const G4Material* HistoManager::fTargetMaterial
private

◆ fTitle

G4String HistoManager::fTitle[MaxHisto]
private

◆ fTrackAbs

G4bool HistoManager::fTrackAbs
private

◆ fTrackLength

G4double HistoManager::fTrackLength
private

◆ fTree

AIDA::ITree* HistoManager::fTree
private

◆ fUnit

G4double HistoManager::fUnit[MaxHisto]
private

◆ fVerbose

G4int HistoManager::fVerbose
private

◆ fVmax

G4double HistoManager::fVmax[MaxHisto]
private

◆ fVmin

G4double HistoManager::fVmin[MaxHisto]
private

◆ fWidth

G4double HistoManager::fWidth[MaxHisto]
private

The documentation for this class was generated from the following files: