Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions
HistoManager Class Reference

#include <HistoManager.hh>

Public Member Functions

 HistoManager ()
 
 ~HistoManager ()
 
void SetFileName (const G4String &name)
 
void SetFileType (const G4String &name)
 
void SetFileOption (const G4String &name)
 
void book ()
 
void save ()
 
void SetHisto (G4int, G4int, G4double, G4double, const G4String &unit="none")
 
void FillHisto (G4int id, G4double bin, G4double weight=1.0)
 
void Normalize (G4int id, G4double fac)
 
void RemoveHisto (G4int)
 
void PrintHisto (G4int)
 
void SetNtuple (G4int)
 
void FillNtuple (G4int id, G4int column, G4double value)
 
void AddRowNtuple (G4int id)
 
G4bool HistoExist (G4int id)
 
G4double GetHistoUnit (G4int id)
 
G4double GetBinWidth (G4int id)
 
G4String GetFileName ()
 
 HistoManager ()
 
 ~HistoManager ()
 
void SetFileName (const G4String &name)
 
void book ()
 
void save ()
 
void FillNtuple (G4int id, G4int col, G4double e, G4double weight=1.0)
 
void FillNtupleIColumn (G4int icol, G4int ival)
 
void FillNtupleFColumn (G4int icol, G4float ival)
 
void FillNtupleDColumn (G4int icol, G4double ival)
 
void AddNtupleRow ()
 
 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 BeginOfRun ()
 
void EndOfRun ()
 
void BeginOfEvent ()
 
void EndOfEvent ()
 
void AddEnergy (G4double edep, const G4Step *)
 
void SetMaxEnergy (G4double value)
 
void SetNumberBins (G4int value)
 
void SetNumberBinsCluster (G4int value)
 
void SetEnergyPerChannel (G4double value)
 
void SetVerbose (G4int value)
 
G4int GetVerbose () const
 
 ~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 ()
 
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 ()
 
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 ()
 
void SetFileName (const G4String &name)
 
void SetFileType (const G4String &name)
 
void SetFileOption (const G4String &name)
 
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 FillHistos (const G4String &particleName, G4double kinEnergy, G4double costheta, G4double phi, G4double longitudinalPolarization)
 
void RemoveHisto (G4int)
 
G4bool HistoExist (G4int id)
 
G4double GetHistoUnit (G4int id)
 
G4double GetBinWidth (G4int id)
 
 HistoManager ()
 
 ~HistoManager ()
 

Static Public Member Functions

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

Detailed Description

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

Constructor & Destructor Documentation

HistoManager::HistoManager ( )

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

References G4cout, G4endl, MaxHisto, and MaxNtupl.

Referenced by GetPointer().

43 : factoryOn(false),af(0),tree(0)
44 #endif
45 {
46 #ifdef G4ANALYSIS_USE
47  // Creating the analysis factory
48  af = AIDA_createAnalysisFactory();
49  if(!af) {
50  G4cout << " HistoManager::HistoManager :"
51  << " problem creating the AIDA analysis factory."
52  << G4endl;
53  }
54 #endif
55 
56  fileName[0] = "ecal";
57  fileType = "root";
58  fileOption = "export=root";
59 
60  // histograms
61  for (G4int k=0; k<MaxHisto; k++) {
62  histo[k] = 0;
63  exist[k] = false;
64  Unit[k] = 1.0;
65  Width[k] = 1.0;
66  ascii[k] = false;
67  }
68 
69  // ntuples
70  for (G4int k=0; k<MaxNtupl; k++) {
71  ntupl[k] = 0;
72  existNt[k] = false;
73  }
74 
75  histoMessenger = new HistoMessenger(this);
76 }
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
tuple tree
Definition: gammaraytel.py:4
#define G4endl
Definition: G4ios.hh:61
HistoManager::~HistoManager ( )

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

81 {
82  delete histoMessenger;
83 
84 #ifdef G4ANALYSIS_USE
85  delete af;
86 #endif
87 }
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )
HistoManager::HistoManager ( )
HistoManager::~HistoManager ( )

Member Function Documentation

void HistoManager::AddDeltaElectron ( const G4DynamicParticle elec)

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

References G4DynamicParticle::GetKineticEnergy(), and python.hepunit::MeV.

Referenced by ScoreNewTrack().

524 {
525  G4double e = elec->GetKineticEnergy()/MeV;
526  if(e > 0.0) fElec++;
527  fHisto->Fill(3,e,1.0);
528 }
G4double GetKineticEnergy() const
double G4double
Definition: G4Types.hh:76
void HistoManager::AddEnergy ( G4double  edep,
const G4Step step 
)

Definition at line 250 of file extended/electromagnetic/TestEm8/src/HistoManager.cc.

References G4cout, G4endl, G4Step::GetTrack(), G4Track::GetTrackID(), python.hepunit::keV, G4ElectronIonPair::MeanNumberOfIonsAlongStep(), and G4ElectronIonPair::SampleNumberOfIonsAlongStep().

Referenced by TargetSD::ProcessHits().

251 {
252  if(1 < fVerbose) {
253  G4cout << "HistoManager::AddEnergy: e(keV)= " << edep/keV
254  << G4endl;
255  }
256  fTotEdep += edep;
257  if(step) {
258  if(1 == step->GetTrack()->GetTrackID()) { fStepGas += 1.0; }
259 
260  fMeanCluster += fElIonPair->MeanNumberOfIonsAlongStep(step);
261  fCluster += fElIonPair->SampleNumberOfIonsAlongStep(step);
262  }
263 }
G4double MeanNumberOfIonsAlongStep(const G4ParticleDefinition *, const G4Material *, G4double edepTotal, G4double edepNIEL=0.0)
G4GLOB_DLL std::ostream G4cout
G4int SampleNumberOfIonsAlongStep(const G4Step *)
G4int GetTrackID() const
#define G4endl
Definition: G4ios.hh:61
G4Track * GetTrack() const
void HistoManager::AddEnergy ( G4double  edep,
G4int  idx,
G4int  copyNo 
)

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

References G4cout, G4endl, python.hepunit::keV, and n.

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
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
const G4int n
#define G4endl
Definition: G4ios.hh:61
void HistoManager::AddLeakingParticle ( const G4Track track)

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

References G4Track::GetDefinition(), G4Track::GetKineticEnergy(), G4Track::GetMomentumDirection(), G4Track::GetPosition(), python.hepunit::MeV, G4PionMinus::PionMinus(), G4PionPlus::PionPlus(), G4Proton::Proton(), CLHEP::Hep3Vector::x(), CLHEP::Hep3Vector::y(), z, and CLHEP::Hep3Vector::z().

Referenced by CheckVolumeSD::ProcessHits().

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 }
G4ParticleDefinition * GetDefinition() const
double x() const
G4double z
Definition: TRTMaterials.hh:39
const G4ThreeVector & GetPosition() const
double z() const
G4double GetKineticEnergy() const
bool G4bool
Definition: G4Types.hh:79
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4PionPlus * PionPlus()
Definition: G4PionPlus.cc:98
const G4ThreeVector & GetMomentumDirection() const
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98
double y() const
double G4double
Definition: G4Types.hh:76
void HistoManager::AddNtupleRow ( )

Definition at line 132 of file advanced/dnageometry/src/HistoManager.cc.

133 {
134  G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
135  analysisManager->AddNtupleRow();
136 }
ExG4HbookAnalysisManager G4AnalysisManager
Definition: g4hbook_defs.hh:46
void HistoManager::AddPhoton ( const G4DynamicParticle ph)

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

References G4DynamicParticle::GetKineticEnergy(), and python.hepunit::MeV.

Referenced by ScoreNewTrack().

533 {
534  G4double e = ph->GetKineticEnergy()/MeV;
535  if(e > 0.0) fGam++;
536  fHisto->Fill(4,e,1.0);
537 }
G4double GetKineticEnergy() const
double G4double
Definition: G4Types.hh:76
void HistoManager::AddPositron ( const G4DynamicParticle )
inline

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

Referenced by ScoreNewTrack().

94 {++fPosit;};
void HistoManager::AddRowNtuple ( G4int  id)

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

References G4cout, G4endl, and MaxNtupl.

Referenced by EventAction::EndOfEventAction().

349 {
350  if (nt >= MaxNtupl) {
351  G4cout << "---> warning from HistoManager::AddRowNtuple() : Ntuple " << nt
352  << " do not exist" << G4endl;
353  return;
354  }
355 #ifdef G4ANALYSIS_USE
356  if(existNt[nt]) ntupl[nt]->addRow();
357 #endif
358 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void HistoManager::AddStep ( )
inline

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

106 {fStep += 1.0;};
void HistoManager::AddTargetStep ( const G4Step )
void HistoManager::AddTargetStep ( const G4Step step)

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

References G4AntiProton::AntiProton(), python.hepunit::c_light, DBL_MIN, G4Electron::Electron(), G4cout, G4endl, G4Gamma::Gamma(), G4Track::GetDefinition(), G4Track::GetKineticEnergy(), G4ParticleDefinition::GetParticleName(), G4StepPoint::GetPosition(), G4Step::GetPostStepPoint(), G4Step::GetPreStepPoint(), G4Step::GetStepLength(), G4Step::GetTotalEnergyDeposit(), G4Step::GetTrack(), G4StepPoint::GetVelocity(), G4Track::GetWeight(), python.hepunit::keV, python.hepunit::MeV, python.hepunit::mm, G4PionMinus::PionMinus(), G4PionPlus::PionPlus(), G4Positron::Positron(), G4Proton::Proton(), z, and CLHEP::Hep3Vector::z().

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 }
G4ParticleDefinition * GetDefinition() const
G4double GetStepLength() const
G4double z
Definition: TRTMaterials.hh:39
G4double GetVelocity() const
const G4String & GetParticleName() const
double z() const
G4StepPoint * GetPreStepPoint() const
G4double GetKineticEnergy() const
G4GLOB_DLL std::ostream G4cout
const G4ThreeVector & GetPosition() const
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
G4double GetTotalEnergyDeposit() const
static G4Positron * Positron()
Definition: G4Positron.cc:94
static G4PionMinus * PionMinus()
Definition: G4PionMinus.cc:98
G4StepPoint * GetPostStepPoint() const
#define DBL_MIN
Definition: templates.hh:75
G4double GetWeight() const
static G4Electron * Electron()
Definition: G4Electron.cc:94
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4Track * GetTrack() const
float c_light
Definition: hepunit.py:257
void HistoManager::BeginOfEvent ( )

Definition at line 220 of file extended/electromagnetic/TestEm8/src/HistoManager.cc.

221 {
222  fEvt += 1.0;
223  fTotEdep = 0.0;
224  fStepGas = 0;
225  fCluster = 0;
226 }
void HistoManager::BeginOfEvent ( )
void HistoManager::BeginOfEvent ( )
void HistoManager::BeginOfEvent ( )
void HistoManager::BeginOfRun ( )
void HistoManager::BeginOfRun ( )
void HistoManager::BeginOfRun ( )

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

References G4cout, G4endl, python.hepunit::keV, and G4StatDouble::reset().

110 {
111  // initilise scoring
112  fEvt = 0.0;
113  fTotStepGas = 0.0;
114  fTotCluster = 0.0;
115  fMeanCluster= 0.0;
116  fOverflow = 0.0;
117 
118  if(fHisto->IsActive() && !fHistoBooked) {
119 
120  fHisto->Add1D("10","Energy deposition in detector (keV)",
121  fBinsE,0.0,fMaxEnergy/keV,1.0);
122  fHisto->Add1D("11","Number of primary clusters",
123  fBinsCluster,-0.5,fBinsCluster-0.5,1.0);
124  fHisto->Add1D("12","Energy deposition in detector (ADC)",
125  200,0.0,2000,1.0);
126 
127  fHisto->Activate(0, true);
128  fHisto->Activate(1, true);
129  fHisto->Activate(2, true);
130  }
131  fHisto->Book();
132 
133  fEgas.resize(fBinsE,0.0);
134  fEdep.reset();
135 
136  if(fVerbose > 0) {
137  G4cout << "HistoManager: Histograms are booked and run has been started"
138  << G4endl;
139  G4cout << " BinsCluster= " << fBinsCluster << " BinsE= " << fBinsE
140  << " Emax(keV)= " << fMaxEnergy/keV << G4endl;
141  }
142 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void HistoManager::BeginOfRun ( )
void HistoManager::BeginOfRun ( )
void HistoManager::BeginOfRun ( )
void HistoManager::book ( )
void HistoManager::book ( )
void HistoManager::book ( )
void HistoManager::book ( )
void HistoManager::book ( )
void HistoManager::book ( )

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

References G4cout, G4endl, gammaraytel::hf, MaxHisto, MaxNtupl, and gammaraytel::tree.

92 {
93 #ifdef G4ANALYSIS_USE
94  if(!af) return;
95 
96  // Creating a tree mapped to an histogram file.
97  fileName[1] = fileName[0] + "." + fileType;
98  G4bool readOnly = false;
99  G4bool createNew = true;
100  AIDA::ITreeFactory* tf = af->createTreeFactory();
101  tree = tf->create(fileName[1], fileType, readOnly, createNew, fileOption);
102  delete tf;
103  if(!tree) {
104  G4cout << " HistoManager::book :"
105  << " problem creating the AIDA tree with "
106  << " storeName = " << fileName[1]
107  << " storeType = " << fileType
108  << " readOnly = " << readOnly
109  << " createNew = " << createNew
110  << " options = " << fileOption
111  << G4endl;
112  return;
113  }
114 
115  // Creating a histogram factory, whose histograms will be handled by the tree
116  AIDA::IHistogramFactory* hf = af->createHistogramFactory(*tree);
117 
118  // create selected histograms
119  for (G4int k=1; k<MaxHisto; k++) {
120  if (exist[k]) {
121  histo[k] = hf->createHistogram1D( Label[k], Title[k],
122  Nbins[k], Vmin[k], Vmax[k]);
123  factoryOn = true;
124  }
125  }
126  delete hf;
127 
128  // Creating a ntuple factory, handled by the tree
129  AIDA::ITupleFactory* ntf = af->createTupleFactory(*tree);
130 
131  // create selected ntuples
132  for (G4int k=1; k<MaxNtupl; k++) {
133  if (existNt[k]) {
134  ntupl[k] = ntf->create( LabelNt[k], TitleNt[k], ColumnNt[k]);
135  factoryOn = true;
136  }
137  }
138 
139  delete ntf;
140 
141  if (factoryOn)
142  G4cout << "\n----> Histogram Tree is opened in " << fileName[1] << G4endl;
143 #endif
144 }
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
tuple tree
Definition: gammaraytel.py:4
bool G4bool
Definition: G4Types.hh:79
#define G4endl
Definition: G4ios.hh:61
tuple hf
Definition: gammaraytel.py:8
void HistoManager::book ( )
void HistoManager::BookHisto ( )

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

References python.hepunit::MeV, and python.hepunit::mm.

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

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

References python.hepunit::MeV.

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 }
void HistoManager::bookHisto ( )
G4bool HistoManager::DefaultBeamPosition ( ) const
inline

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

101 {return fBeamFlag;};
G4bool HistoManager::DefaultBeamPosition ( ) const
inline

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

103 {return fBeamFlag;};
void HistoManager::EndOfEvent ( )

Definition at line 230 of file extended/electromagnetic/TestEm8/src/HistoManager.cc.

References G4StatDouble::fill(), and python.hepunit::keV.

231 {
232  fTotStepGas += fStepGas;
233  fTotCluster += fCluster;
234 
235  G4int idx = G4int(fTotEdep*fBinsE/fMaxEnergy);
236  if(idx < 0) { idx = 0; }
237  if(idx >= fBinsE) { fOverflow += 1.0; }
238  else { fEgas[idx] += 1.0; }
239 
240  // fill histo
241  fHisto->Fill(0,fTotEdep/keV,1.0);
242  fHisto->Fill(1,fCluster,1.0);
243  fHisto->Fill(2,fTotEdep*fFactorALICE/keV,1.0);
244 
245  fEdep.fill(fTotEdep, 1.0);
246 }
void fill(G4double x, G4double weight=1.)
Definition: G4StatDouble.cc:57
int G4int
Definition: G4Types.hh:78
void HistoManager::EndOfEvent ( )
void HistoManager::EndOfEvent ( )
void HistoManager::EndOfEvent ( )
void HistoManager::EndOfRun ( )
void HistoManager::EndOfRun ( )
void HistoManager::EndOfRun ( )

Definition at line 146 of file extended/electromagnetic/TestEm8/src/HistoManager.cc.

References G4cout, G4endl, python.hepunit::keV, G4StatDouble::mean(), and G4StatDouble::rms().

147 {
148  G4double norm = fEvt;
149  if(fEvt > 0.0) { norm = 1.0/norm; }
150 
151  fTotStepGas *= norm;
152  fTotCluster *= norm;
153  fMeanCluster *= norm;
154  fOverflow *= norm;
155 
156  G4double y1 = fEdep.mean();
157  G4double y2 = sqrt(fEdep.rms());
158 
159  G4double de = fMaxEnergy/G4double(fBinsE);
160  G4double x1 = -de*0.5;
161 
162  G4cout << " ================== run summary =====================" << G4endl;
163  G4int prec = G4cout.precision(5);
164  G4cout << " End of Run TotNbofEvents = "
165  << G4int(fEvt) << G4endl;
166  G4cout << " Energy(keV) per ADC channel = "
167  << 1.0/(keV*fFactorALICE) << G4endl;
168  /*
169  G4double p1 = 1*GeV;
170  G4double p2 = 3*GeV;
171  G4double mass = proton_mass_c2;
172  G4cout << sqrt(p1*p1 + mass*mass) - mass << " "
173  << sqrt(p2*p2 + mass*mass) - mass << G4endl;
174  */
175  G4cout << G4endl;
176  G4cout << " Mean energy deposit in absorber = " <<
177  y1/keV << " +- " << y2*std::sqrt(norm)/keV << " keV; ";
178  if(y1 > 0.0) { G4cout << " RMS/Emean = " << y2/y1; }
179  G4cout << G4endl;
180  G4cout << " Mean number of steps in absorber= "
181  << fTotStepGas << "; mean number of ion-clusters = "
182  << fTotCluster << " MeanCluster= " << fMeanCluster
183  << G4endl;
184  G4cout << G4endl;
185 
186  G4cout << " ====== Energy deposit distribution Noverflows= " << fOverflow
187  << " ====== " << G4endl ;
188  G4cout << " bin nb Elow entries normalized " << G4endl;
189 
190  std::ofstream fileOut("distribution.out", std::ios::out );
191  fileOut.setf( std::ios::scientific, std::ios::floatfield );
192 
193  x1 = 0.0;
194 
195  fileOut << fBinsE << G4endl;
196 
197  for(G4int j=0; j<fBinsE; ++j)
198  {
199  G4cout << std::setw(5) << j << std::setw(10) << x1/keV
200  << std::setw(12) << fEgas[j] << std::setw(12) << fEgas[j]*norm
201  << G4endl ;
202  fileOut << x1/keV << "\t" << fEgas[j] << G4endl;
203  x1 += de;
204  }
205  G4cout.precision(prec);
206 
207  // normalise histograms
208  if(fHisto->IsActive() && !fHistoBooked) {
209  fHisto->ScaleH1(0,norm);
210  fHisto->ScaleH1(1,norm);
211  // fHisto->ScaleH1(2,0.05);
212  fHisto->ScaleH1(2,0.1);
213  fHisto->Save();
214  }
215  G4cout << " ================== run end ==========================" << G4endl;
216 }
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
G4double mean() const
Definition: G4StatDouble.cc:77
#define G4endl
Definition: G4ios.hh:61
G4double rms()
double G4double
Definition: G4Types.hh:76
void HistoManager::EndOfRun ( )
void HistoManager::EndOfRun ( G4int  runID)

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

References EmAcceptance::BeginOfAcceptance(), DBL_MAX, EmAcceptance::EmAcceptanceGauss(), EmAcceptance::EndOfAcceptance(), G4cout, G4endl, python.hepunit::GeV, and test::x.

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)
void BeginOfAcceptance(const G4String &title, G4int stat)
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
#define DBL_MAX
Definition: templates.hh:83
void HistoManager::EndOfRun ( )
void HistoManager::Fill ( G4int  id,
G4double  x,
G4double  w 
)
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 }
void HistoManager::FillHisto ( G4int  id,
G4double  e,
G4double  weight = 1.0 
)
void HistoManager::FillHisto ( G4int  id,
G4double  bin,
G4double  weight = 1.0 
)
void HistoManager::FillHisto ( G4int  id,
G4double  bin,
G4double  weight = 1.0 
)
void HistoManager::FillHisto ( G4int  id,
G4double  e,
G4double  weight = 1.0 
)
void HistoManager::FillHisto ( G4int  id,
G4double  bin,
G4double  weight = 1.0 
)

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

References G4cout, G4endl, and MaxHisto.

Referenced by EventAction::EndOfEventAction(), and FillHistos().

167 {
168  if (ih >= MaxHisto) {
169  G4cout << "---> warning from HistoManager::FillHisto() : histo " << ih
170  << " xbin= " << xbin << " weight= " << weight << G4endl;
171  return;
172  }
173 #ifdef G4ANALYSIS_USE
174  if(exist[ih]) histo[ih]->fill(xbin/Unit[ih], weight);
175 #endif
176 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void HistoManager::FillHisto ( G4int  id,
G4double  e,
G4double  weight = 1.0 
)
void HistoManager::FillHistos ( const G4String particleName,
G4double  kinEnergy,
G4double  costheta,
G4double  phi,
G4double  longitudinalPolarization 
)

Definition at line 152 of file extended/polarisation/Pol01/src/HistoManager.cc.

References FillHisto().

156 {
157  G4int id=1;
158  if (particleName=="gamma") id=1;
159  else if (particleName=="e-") id=5;
160  else if (particleName=="e+") id=9;
161  else return;
162 
163  if (costheta>=1.) costheta=.99999999;
164  if (costheta<-1.) costheta=-1.;
165  FillHisto(id,kinEnergy);
166  FillHisto(id+1,costheta);
167  FillHisto(id+2,phi);
168  FillHisto(id+3,longitudinalPolarization);
169 }
void FillHisto(G4int id, G4double bin, G4double weight=1.0)
int G4int
Definition: G4Types.hh:78
void HistoManager::FillNtuple ( G4int  id,
G4int  col,
G4double  e,
G4double  weight = 1.0 
)
void HistoManager::FillNtuple ( G4double  energyAbs,
G4double  energyGap,
G4double  trackLAbs,
G4double  trackLGap 
)
void HistoManager::FillNtuple ( G4double  EnergyAbs,
G4double  EnergyGap,
G4double  TrackLAbs,
G4double  TrackLGap 
)
void HistoManager::FillNtuple ( G4double  EnergyAbs,
G4double  EnergyGap,
G4double  TrackLAbs,
G4double  TrackLGap 
)

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

171 {
172  G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
173  // Fill 1st ntuple ( id = 1)
174  analysisManager->FillNtupleDColumn(1,fNtColId[0], energyAbs);
175  analysisManager->FillNtupleDColumn(1,fNtColId[1], energyGap);
176  analysisManager->AddNtupleRow(1);
177  // Fill 2nd ntuple ( id = 2)
178  analysisManager->FillNtupleDColumn(2,fNtColId[2], trackLAbs);
179  analysisManager->FillNtupleDColumn(2,fNtColId[3], trackLGap);
180  analysisManager->AddNtupleRow(2);
181 }
ExG4HbookAnalysisManager G4AnalysisManager
Definition: g4hbook_defs.hh:46
void HistoManager::FillNtuple ( G4int  id,
G4int  column,
G4double  value 
)

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

References G4cout, G4endl, and MaxNtupl.

Referenced by EventAction::EndOfEventAction().

335 {
336  if (nt >= MaxNtupl) {
337  G4cout << "---> warning from HistoManager::FillNtuple() : Ntuple " << nt
338  << " does not exist " << column << value << G4endl;
339  return;
340  }
341 #ifdef G4ANALYSIS_USE
342  if(existNt[nt]) ntupl[nt]->fill(column, value);
343 #endif
344 }
G4GLOB_DLL std::ostream G4cout
const XML_Char int const XML_Char * value
#define G4endl
Definition: G4ios.hh:61
void HistoManager::FillNtupleDColumn ( G4int  icol,
G4double  ival 
)

Definition at line 124 of file advanced/dnageometry/src/HistoManager.cc.

125 {
126  G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
127  analysisManager->FillNtupleDColumn(icol,dval);
128 }
ExG4HbookAnalysisManager G4AnalysisManager
Definition: g4hbook_defs.hh:46
void HistoManager::FillNtupleFColumn ( G4int  icol,
G4float  ival 
)

Definition at line 116 of file advanced/dnageometry/src/HistoManager.cc.

117 {
118  G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
119  analysisManager->FillNtupleFColumn(icol,fval);
120 }
ExG4HbookAnalysisManager G4AnalysisManager
Definition: g4hbook_defs.hh:46
void HistoManager::FillNtupleIColumn ( G4int  icol,
G4int  ival 
)

Definition at line 108 of file advanced/dnageometry/src/HistoManager.cc.

109 {
110  G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
111  analysisManager->FillNtupleIColumn(icol,ival);
112 }
ExG4HbookAnalysisManager G4AnalysisManager
Definition: g4hbook_defs.hh:46
G4int HistoManager::FirstEventToDebug ( ) const
inline

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

100 {return fEvt1;};
G4double HistoManager::GetBinWidth ( G4int  id)
inline

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

70 {return fWidth[id];}
G4double HistoManager::GetBinWidth ( G4int  id)
inline

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

75 {return Width[id];}
G4double HistoManager::GetBinWidth ( G4int  id)
inline

Definition at line 75 of file extended/polarisation/Pol01/include/HistoManager.hh.

75 {return Width[id];}
G4String HistoManager::GetFileName ( )
inline

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

Referenced by RunAction::CreateFilePixels(), and EventAction::WritePixels().

76 {return fileName[0];}
G4int HistoManager::GetHistoID ( G4int  id)
inline

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

71 {return fHistId[id];}
G4double HistoManager::GetHistoUnit ( G4int  id)
inline

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

69 {return fUnit[id];}
G4double HistoManager::GetHistoUnit ( G4int  id)
inline

Definition at line 74 of file extended/polarisation/Pol01/include/HistoManager.hh.

74 {return Unit[id];}
G4double HistoManager::GetHistoUnit ( G4int  id)
inline

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

74 {return Unit[id];}
G4double HistoManager::GetMaxEnergy ( ) const
inline

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

105 {return fMaxEnergy;};
G4int HistoManager::GetNbins ( G4int  id)
inline

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

66 {return fNbins[id];}
HistoManager * HistoManager::GetPointer ( )
static

Definition at line 58 of file extended/electromagnetic/TestEm8/src/HistoManager.cc.

References HistoManager().

Referenced by CheckVolumeSD::CheckVolumeSD(), and main().

59 {
60  if(!fManager) {
61  fManager = new HistoManager();
62  }
63  return fManager;
64 }
static HistoManager* HistoManager::GetPointer ( )
static
static HistoManager* HistoManager::GetPointer ( )
static
static HistoManager* HistoManager::GetPointer ( )
static
G4String HistoManager::GetTitle ( G4int  id)
inline

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

65 {return fTitle[id];}
G4int HistoManager::GetVerbose ( ) const
inline

Definition at line 154 of file extended/electromagnetic/TestEm8/include/HistoManager.hh.

155 {
156  return fVerbose;
157 }
G4int HistoManager::GetVerbose ( ) const
inline

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

96 {return fVerbose;};
G4int HistoManager::GetVerbose ( ) const
inline

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

100 {return fVerbose;};
G4int HistoManager::GetVerbose ( ) const
inline

Definition at line 103 of file extended/hadronic/Hadr01/include/HistoManager.hh.

103 {return fVerbose;};
G4double HistoManager::GetVmax ( G4int  id)
inline

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

68 {return fVmax[id];}
G4double HistoManager::GetVmin ( G4int  id)
inline

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

67 {return fVmin[id];}
G4bool HistoManager::HistoExist ( G4int  id)
inline

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

64 {return fExist[id];}
G4bool HistoManager::HistoExist ( G4int  id)
inline

Definition at line 73 of file extended/polarisation/Pol01/include/HistoManager.hh.

73 {return exist[id];}
G4bool HistoManager::HistoExist ( G4int  id)
inline

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

73 {return exist[id];}
G4int HistoManager::LastEventToDebug ( ) const
inline

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

102 {return fEvt2;};
G4double HistoManager::Length ( ) const
inline

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

97 {return fLength;};
G4double HistoManager::Length ( ) const
inline

Definition at line 100 of file extended/hadronic/Hadr01/include/HistoManager.hh.

100 {return fLength;};
void HistoManager::Normalize ( G4int  id,
G4double  fac 
)
void HistoManager::Normalize ( G4int  id,
G4double  fac 
)
void HistoManager::Normalize ( G4int  id,
G4double  fac 
)
void HistoManager::Normalize ( G4int  id,
G4double  fac 
)
void HistoManager::Normalize ( G4int  id,
G4double  fac 
)

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

References G4cout, G4endl, and MaxHisto.

226 {
227  if (ih >= MaxHisto) {
228  G4cout << "---> warning from HistoManager::Normalize() : histo " << ih
229  << " fac= " << fac << G4endl;
230  return;
231  }
232 #ifdef G4ANALYSIS_USE
233  if(exist[ih]) histo[ih]->scale(fac);
234 #endif
235 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4int HistoManager::NumberOfSlices ( ) const
inline

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

98 {return fNSlices;};
G4int HistoManager::NumberOfSlices ( ) const
inline

Definition at line 102 of file extended/hadronic/Hadr01/include/HistoManager.hh.

102 {return fNSlices;};
void HistoManager::PrintHisto ( G4int  )
void HistoManager::PrintHisto ( G4int  ih)

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

References G4cout, G4endl, and MaxHisto.

Referenced by HistoMessenger::SetNewValue().

253 {
254  if (ih < MaxHisto) { ascii[ih] = true; ascii[0] = true; }
255  else
256  G4cout << "---> warning from HistoManager::PrintHisto() : histo " << ih
257  << "does not exist" << G4endl;
258 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void HistoManager::PrintStatistic ( )
void HistoManager::PrintStatistic ( )
void HistoManager::PrintStatistic ( )

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

References G4BestUnit, G4cout, and G4endl.

186 {
187  if(fFactoryOn) {
188  G4cout << "\n ----> print histograms statistic \n" << G4endl;
189 
190  G4cout
191  << " EAbs : mean = " << G4BestUnit(fHistPt[1]->mean(), "Energy")
192  << " rms = " << G4BestUnit(fHistPt[1]->rms(), "Energy")
193  << G4endl;
194  G4cout
195  << " EGap : mean = " << G4BestUnit(fHistPt[2]->mean(), "Energy")
196  << " rms = " << G4BestUnit(fHistPt[2]->rms(), "Energy")
197  << G4endl;
198  G4cout
199  << " LAbs : mean = " << G4BestUnit(fHistPt[3]->mean(), "Length")
200  << " rms = " << G4BestUnit(fHistPt[3]->rms(), "Length")
201  << G4endl;
202  G4cout
203  << " LGap : mean = " << G4BestUnit(fHistPt[4]->mean(), "Length")
204  << " rms = " << G4BestUnit(fHistPt[4]->rms(), "Length")
205  << G4endl;
206  }
207 }
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void HistoManager::RemoveHisto ( G4int  ih)

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

References G4cout, G4endl, and MaxHisto.

Referenced by HistoMessenger::SetNewValue().

240 {
241  if (ih >= MaxHisto) {
242  G4cout << "---> warning from HistoManager::RemoveHisto() : histo " << ih
243  << "does not exist" << G4endl;
244  return;
245  }
246 
247  histo[ih] = 0; exist[ih] = false;
248 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
void HistoManager::RemoveHisto ( G4int  )
void HistoManager::ResetTrackLength ( )
inline

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

Referenced by ScoreNewTrack().

93 {fTrackLength = 0.0, fTrackAbs = true;};
void HistoManager::save ( )
void HistoManager::save ( )
void HistoManager::save ( )
void HistoManager::save ( )
void HistoManager::save ( )
void HistoManager::save ( )

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

References G4cout, G4endl, and gammaraytel::tree.

149 {
150 #ifdef G4ANALYSIS_USE
151  if (factoryOn) {
152  saveAscii(); // Write ascii file, if any
153  tree->commit(); // Writing the histograms to the file
154  tree->close(); // and closing the tree (and the file)
155  G4cout << "\n----> Histogram Tree is saved in " << fileName[1] << G4endl;
156 
157  delete tree;
158  tree = 0;
159  factoryOn = false;
160  }
161 #endif
162 }
G4GLOB_DLL std::ostream G4cout
tuple tree
Definition: gammaraytel.py:4
#define G4endl
Definition: G4ios.hh:61
void HistoManager::save ( )
void HistoManager::ScoreNewTrack ( const G4Track )
void HistoManager::ScoreNewTrack ( const G4Track aTrack)

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

References AddDeltaElectron(), AddPhoton(), AddPositron(), fBremsstrahlung, fComptonScattering, fGammaConversion, fPhotoElectricEffect, G4cout, G4endl, G4lrint(), G4Track::GetCreatorProcess(), G4Track::GetDefinition(), G4Track::GetDynamicParticle(), G4DynamicParticle::GetKineticEnergy(), G4DynamicParticle::GetMomentumDirection(), G4Track::GetParentID(), G4ParticleDefinition::GetPDGMass(), G4VProcess::GetProcessSubType(), G4Track::GetVertexPosition(), G4Element::GetZ(), python.hepunit::MeV, and ResetTrackLength().

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 }
G4ParticleDefinition * GetDefinition() const
G4int GetParentID() const
void AddPhoton(const G4DynamicParticle *)
G4double GetKineticEnergy() const
const G4DynamicParticle * GetDynamicParticle() const
G4double GetZ() const
Definition: G4Element.hh:131
int G4int
Definition: G4Types.hh:78
const G4VProcess * GetCreatorProcess() const
G4GLOB_DLL std::ostream G4cout
void AddDeltaElectron(const G4DynamicParticle *)
const G4ThreeVector & GetMomentumDirection() const
const G4ThreeVector & GetVertexPosition() const
G4double GetPDGMass() const
int G4lrint(double ad)
Definition: templates.hh:163
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
G4int GetProcessSubType() const
Definition: G4VProcess.hh:426
void HistoManager::ScoreNewTrack ( const G4Track )
void HistoManager::SetBeamEnergy ( G4double  val)
inline

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

109 {fBeamEnergy = val;};
void HistoManager::SetDefaultBeamPositionFlag ( G4bool  f)
inline

Definition at line 97 of file extended/hadronic/Hadr01/include/HistoManager.hh.

97 {fBeamFlag = f;};
void HistoManager::SetDefaultBeamPositionFlag ( G4bool  f)
inline

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

102 {fBeamFlag = f;};
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 }
void HistoManager::SetElementName ( const G4String )
inline
void HistoManager::SetElementName ( const G4String name)
inline

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

Referenced by HistoManagerMessenger::SetNewValue().

118 {
119  fElementName = name;
120 }
const XML_Char * name
void HistoManager::SetEnergyPerChannel ( G4double  value)
inline

Definition at line 144 of file extended/electromagnetic/TestEm8/include/HistoManager.hh.

145 {
146  if(value > 0.0) { fFactorALICE = 1./value; }
147 }
const XML_Char int const XML_Char * value
void HistoManager::SetFileName ( const G4String name)
inline

Definition at line 50 of file advanced/dnageometry/include/HistoManager.hh.

50 { fileName[0] = name;};
const XML_Char * name
void HistoManager::SetFileName ( const G4String name)
inline

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

Referenced by HistoMessenger::SetNewValue().

58 { fileName[0] = name;};
const XML_Char * name
void HistoManager::SetFileName ( const G4String name)
inline

Definition at line 59 of file extended/polarisation/Pol01/include/HistoManager.hh.

59 { fileName[0] = name;};
const XML_Char * name
void HistoManager::SetFileName ( const G4String name)
inline

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

63 { fileName[0] = name;};
const XML_Char * name
void HistoManager::SetFileOption ( const G4String name)
inline

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

Referenced by HistoMessenger::SetNewValue().

60 { fileOption = name;};
const XML_Char * name
void HistoManager::SetFileOption ( const G4String name)
inline

Definition at line 61 of file extended/polarisation/Pol01/include/HistoManager.hh.

61 { fileType = name;};
const XML_Char * name
void HistoManager::SetFileType ( const G4String name)
inline

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

Referenced by HistoMessenger::SetNewValue().

59 { fileType = name;};
const XML_Char * name
void HistoManager::SetFileType ( const G4String name)
inline

Definition at line 60 of file extended/polarisation/Pol01/include/HistoManager.hh.

60 { fileType = name;};
const XML_Char * name
void HistoManager::SetFirstEventToDebug ( G4int  val)
inline

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

99 {fEvt1 = val;};
void HistoManager::SetHisto ( G4int  ,
G4int  ,
G4double  ,
G4double  ,
const G4String unit = "none" 
)
void HistoManager::SetHisto ( G4int  ih,
G4int  nbins,
G4double  valmin,
G4double  valmax,
const G4String unit = "none" 
)

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

References G4cout, G4endl, G4UnitDefinition::GetValueOf(), MaxHisto, and title().

Referenced by HistoMessenger::SetNewValue().

182 {
183  if (ih < 1 || ih >= MaxHisto) {
184  G4cout << "---> warning from HistoManager::SetHisto() : histo " << ih
185  << "does not exist" << G4endl;
186  return;
187  }
188 
189  const G4String id[] = { "0", "1", "2", "3", "4", "5" };
190  const G4String title[] =
191  { "dummy", //0
192  "total Evis in Ecal", //1
193  "total Edep in Ecal", //2
194  "Evis profile", //3
195  "Edep profile", //4
196  "Nb of Radiation Length" //5
197  };
198 
199  G4String titl = title[ih];
200  G4double vmin = valmin, vmax = valmax;
201  Unit[ih] = 1.;
202 
203  if (unit != "none") {
204  titl = title[ih] + " (" + unit + ")";
205  Unit[ih] = G4UnitDefinition::GetValueOf(unit);
206  vmin = valmin/Unit[ih]; vmax = valmax/Unit[ih];
207  }
208 
209  exist[ih] = true;
210  Label[ih] = id[ih];
211  Title[ih] = titl;
212  Nbins[ih] = nbins;
213  Vmin[ih] = vmin;
214  Vmax[ih] = vmax;
215  Width[ih] = (valmax-valmin)/nbins;
216 
217  G4cout << "----> SetHisto " << ih << ": " << titl << "; "
218  << nbins << " bins from "
219  << vmin << " " << unit << " to " << vmax << " " << unit << G4endl;
220 
221 }
static G4double GetValueOf(const G4String &)
G4GLOB_DLL std::ostream G4cout
subroutine title(NA, NB, NCA, NCB)
Definition: dpm25nuc7.f:1744
#define G4endl
Definition: G4ios.hh:61
double G4double
Definition: G4Types.hh:76
void HistoManager::SetHisto ( G4int  ,
G4int  ,
G4double  ,
G4double  ,
const G4String unit = "none" 
)
void HistoManager::SetHistoName ( G4String val)
inline
void HistoManager::SetHistoName ( G4String val)
inline

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

Referenced by HistoManagerMessenger::SetNewValue().

153 {
154  fHistoName = val;
155 }
void HistoManager::SetHistoNumber ( G4int  val)
inline

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

97 {fNHisto = val;};
void HistoManager::SetIonPhysics ( const G4String nam)

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

References G4cout, G4endl, G4RunManager::GetRunManager(), G4RunManager::PhysicsHasBeenModified(), and G4VModularPhysicsList::ReplacePhysics().

454 {
455  if(fIonPhysics) {
456  G4cout << "### HistoManager WARNING: Ion Physics is already defined: <"
457  << nam << "> is ignored!" << G4endl;
458  } else if(nam == "DPMJET") {
459  fIonPhysics = new IonDPMJETPhysics(false);
460  fPhysList->ReplacePhysics(fIonPhysics);
462  G4cout << "### SetIonPhysics: Ion Physics DPMJET/Binary is added"
463  << G4endl;
464  } else if(nam == "FTF") {
465  fIonPhysics = new G4IonPhysics();
466  fPhysList->ReplacePhysics(fIonPhysics);
468  G4cout << "### SetIonPhysics: Ion Physics FTFP/Binary is added"
469  << G4endl;
470  } else if(nam == "UrQMD") {
471 #ifdef G4_USE_URQMD
472  fIonPhysics = new IonUrQMDPhysics(1);
473  fPhysList->ReplacePhysics(fIonPhysics);
475  G4cout << "### SetIonPhysics: Ion Physics UrQMD is added"
476  << G4endl;
477 #else
478  G4cout << "Error: Ion Physics UrQMD is requested but is not available"
479  <<G4endl;
480 #endif
481  } else {
482  G4cout << "### HistoManager WARNING: Ion Physics <"
483  << nam << "> is unknown!" << G4endl;
484  }
485 }
G4GLOB_DLL std::ostream G4cout
void PhysicsHasBeenModified()
static G4RunManager * GetRunManager()
Definition: G4RunManager.cc:74
void ReplacePhysics(G4VPhysicsConstructor *)
#define G4endl
Definition: G4ios.hh:61
void HistoManager::SetLastEventToDebug ( G4int  val)
inline

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

101 {fEvt2 = val;};
void HistoManager::SetMaxEnergy ( G4double  value)
inline

Definition at line 129 of file extended/electromagnetic/TestEm8/include/HistoManager.hh.

130 {
131  fMaxEnergy = value;
132 }
const XML_Char int const XML_Char * value
void HistoManager::SetMaxEnergy ( G4double  val)
inline

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

104 {fMaxEnergy = val;};
void HistoManager::SetMaxEnergyDeposit ( G4double  val)
inline

Definition at line 98 of file extended/hadronic/Hadr01/include/HistoManager.hh.

98 {fEdepMax = val;};
void HistoManager::SetMaxEnergyDeposit ( G4double  val)
inline

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

105 {fEdepMax = val;};
void HistoManager::SetMaxKinEnergy ( G4double  val)
inline
void HistoManager::SetMaxKinEnergy ( G4double  val)
inline

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

Referenced by HistoManagerMessenger::SetNewValue().

138 {
139  if(val>fMinKinEnergy) { fMaxKinEnergy = val; }
140 }
void HistoManager::SetMaxMomentum ( G4double  val)
inline

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

Referenced by HistoManagerMessenger::SetNewValue().

148 {
149  if(val>fMinMomentum) { fMaxMomentum = val; }
150 }
void HistoManager::SetMaxMomentum ( G4double  val)
inline
void HistoManager::SetMinKinEnergy ( G4double  val)
inline
void HistoManager::SetMinKinEnergy ( G4double  val)
inline

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

Referenced by HistoManagerMessenger::SetNewValue().

133 {
134  if(val>0 && val<fMaxKinEnergy) { fMinKinEnergy = val; }
135 }
void HistoManager::SetMinMomentum ( G4double  val)
inline
void HistoManager::SetMinMomentum ( G4double  val)
inline

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

Referenced by HistoManagerMessenger::SetNewValue().

143 {
144  if(val>0 && val<fMaxMomentum) { fMinMomentum = val; }
145 }
void HistoManager::SetNtuple ( G4int  nt)

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

References G4cout, G4endl, MaxNtupl, and title().

Referenced by HistoMessenger::SetNewValue().

295 {
296  if (nt < 1 || nt >= MaxNtupl) {
297  G4cout << "---> warning from HistoManager::SetNtuple() : Ntuple " << nt
298  << "does not exist" << G4endl;
299  return;
300  }
301 
302  const G4String id[] = { "100", "101" };
303  const G4String title[] =
304  { "dummy", //0
305  "Energy deposit in subModule" //1
306  };
307 
308  G4String column[MaxNtupl];
309 
310  column[0] = " int dum=0 "; //0
311 
312  column[1] =
313  "double Evis0, Evis1, Evis2, Evis3, Evis4, Evis5, Evis6, Evis7, Evis8, Evis9";
314  column[1] +=
315  ", Evis10, Evis11, Evis12, Evis13, Evis14, Evis15, Evis16, Evis17";
316  column[1] +=
317  ", Edep0, Edep1, Edep2, Edep3, Edep4, Edep5, Edep6, Edep7, Edep8, Edep9";
318  column[1] +=
319  ", Edep10, Edep11, Edep12, Edep13, Edep14, Edep15, Edep16, Edep17";
320 
321  G4String titl = title[nt];
322 
323  existNt[nt] = true;
324  LabelNt[nt] = id[nt];
325  TitleNt[nt] = titl;
326  ColumnNt[nt] = column[nt];
327 
328  G4cout << "----> SetNtuple " << nt << ": " << titl << "; " << G4endl;
329 
330 }
G4GLOB_DLL std::ostream G4cout
subroutine title(NA, NB, NCA, NCB)
Definition: dpm25nuc7.f:1744
#define G4endl
Definition: G4ios.hh:61
void HistoManager::SetNumberBins ( G4int  value)
inline

Definition at line 134 of file extended/electromagnetic/TestEm8/include/HistoManager.hh.

135 {
136  fBinsE = value;
137 }
const XML_Char int const XML_Char * value
void HistoManager::SetNumberBinsCluster ( G4int  value)
inline

Definition at line 139 of file extended/electromagnetic/TestEm8/include/HistoManager.hh.

140 {
141  fBinsCluster = value;
142 }
const XML_Char int const XML_Char * value
void HistoManager::SetNumberOfBinsE ( G4int  val)
inline
void HistoManager::SetNumberOfBinsE ( G4int  val)
inline

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

Referenced by HistoManagerMessenger::SetNewValue().

123 {
124  if(val>0) { fBinsE = val; }
125 }
void HistoManager::SetNumberOfBinsE ( G4int  val)
inline

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

95 {fNBinsE = val;};
void HistoManager::SetNumberOfBinsE ( G4int  val)
inline

Definition at line 96 of file extended/hadronic/Hadr01/include/HistoManager.hh.

96 {fNBinsE = val;};
void HistoManager::SetNumberOfBinsP ( G4int  val)
inline
void HistoManager::SetNumberOfBinsP ( G4int  val)
inline

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

Referenced by HistoManagerMessenger::SetNewValue().

128 {
129  if(val>0) { fBinsP = val; }
130 }
void HistoManager::SetNumberOfSlices ( G4int  val)
inline

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

94 {fNSlices = val;};
void HistoManager::SetNumberOfSlices ( G4int  val)
inline

Definition at line 95 of file extended/hadronic/Hadr01/include/HistoManager.hh.

95 {fNSlices = val;};
void HistoManager::SetParticleName ( const G4String name)
inline

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

Referenced by HistoManagerMessenger::SetNewValue().

113 {
114  fParticleName = name;
115 }
const XML_Char * name
void HistoManager::SetParticleName ( const G4String )
inline
void HistoManager::SetPhysicsList ( G4VModularPhysicsList p)
inline

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

Referenced by main().

107 {fPhysList = p;};
const char * p
Definition: xmltok.h:285
void HistoManager::SetTargetLength ( G4double  val)
inline

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

93 {fLength = val;};
void HistoManager::SetTargetLength ( G4double  val)
inline

Definition at line 94 of file extended/hadronic/Hadr01/include/HistoManager.hh.

94 {fLength = val;};
void HistoManager::SetTargetMaterial ( const G4Material mat)
inline

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

92 {fMaterial = mat;};
void HistoManager::SetVerbose ( G4int  val)
void HistoManager::SetVerbose ( G4int  val)
void HistoManager::SetVerbose ( G4int  val)
void HistoManager::SetVerbose ( G4int  val)
void HistoManager::SetVerbose ( G4int  value)
inline

Definition at line 149 of file extended/electromagnetic/TestEm8/include/HistoManager.hh.

Referenced by HistoManagerMessenger::SetNewValue().

150 {
151  fVerbose = value;
152 }
const XML_Char int const XML_Char * value
void HistoManager::SetVerbose ( G4int  val)
inline

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

95 {fVerbose = val;};

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