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 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /examples/extended/hadronic/Hadr01/include/HistoManager.hh (Version 11.3.0) and /examples/extended/hadronic/Hadr01/include/HistoManager.hh (Version 9.6.p4)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 /// \file hadronic/Hadr01/include/HistoManager     26 /// \file hadronic/Hadr01/include/HistoManager.hh
 27 /// \brief Definition of the HistoManager clas     27 /// \brief Definition of the HistoManager class
 28 //                                                 28 //
                                                   >>  29 // $Id$
                                                   >>  30 //
 29 //--------------------------------------------     31 //---------------------------------------------------------------------------
 30 //                                                 32 //
 31 // ClassName:   HistoManager                       33 // ClassName:   HistoManager
 32 //                                                 34 //
 33 // Description: Singleton class to hold parame     35 // Description: Singleton class to hold parameters and build histograms.
 34 //              User cannot access to the cons     36 //              User cannot access to the constructor.
 35 //              The pointer of the only existi     37 //              The pointer of the only existing object can be got via
 36 //              HistoManager::GetPointer() sta     38 //              HistoManager::GetPointer() static method.
 37 //              The first invokation of this s     39 //              The first invokation of this static method makes
 38 //              the singleton object.              40 //              the singleton object.
 39 //                                                 41 //
 40 // Author:      V.Ivanchenko 27/09/00              42 // Author:      V.Ivanchenko 27/09/00
 41 //                                                 43 //
 42 // Modified:                                       44 // Modified:
 43 // 04.06.2006 Adoptation of Hadr01 (V.Ivanchen     45 // 04.06.2006 Adoptation of Hadr01 (V.Ivanchenko)
 44 // 03.10.2006 Add csFlag (V.Ivanchenko)            46 // 03.10.2006 Add csFlag (V.Ivanchenko)
 45 // 16.11.2006 Add beamFlag (V.Ivanchenko)          47 // 16.11.2006 Add beamFlag (V.Ivanchenko)
 46 //                                                 48 //
 47 //--------------------------------------------     49 //----------------------------------------------------------------------------
 48 //                                                 50 //
 49                                                    51 
 50 #ifndef HistoManager_h                             52 #ifndef HistoManager_h
 51 #define HistoManager_h 1                           53 #define HistoManager_h 1
 52                                                    54 
 53 #include "G4Element.hh"                        << 
 54 #include "G4Material.hh"                       << 
 55 #include "globals.hh"                              55 #include "globals.hh"
                                                   >>  56 #include "G4Material.hh"
                                                   >>  57 #include "G4Element.hh"
 56                                                    58 
 57 //....oooOO0OOooo........oooOO0OOooo........oo     59 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo....
 58                                                    60 
 59 class Histo;                                       61 class Histo;
 60 class G4Track;                                     62 class G4Track;
 61 class G4Step;                                      63 class G4Step;
 62 class G4ParticleDefinition;                        64 class G4ParticleDefinition;
 63                                                    65 
 64 class HistoManager                                 66 class HistoManager
 65 {                                                  67 {
 66   public:                                      <<  68 public:
 67     static HistoManager* GetPointer();         <<  69 
                                                   >>  70   static HistoManager* GetPointer();
 68                                                    71 
 69   private:                                     <<  72 private:
 70     HistoManager();                            << 
 71                                                    73 
 72   public:                                      <<  74   HistoManager();
 73     ~HistoManager();                           << 
 74                                                    75 
 75     void BookHisto();                          <<  76 public: 
 76                                                <<  77 
 77     void BeginOfRun();                         <<  78   ~HistoManager();
 78     void EndOfRun();                           <<  79 
 79     void BeginOfEvent();                       <<  80   void bookHisto();
 80     void EndOfEvent();                         <<  81 
 81     void Fill(G4int id, G4double x, G4double w <<  82   void BeginOfRun();
 82                                                <<  83   void EndOfRun();
 83     void ScoreNewTrack(const G4Track*);        <<  84   void BeginOfEvent();
 84     void AddTargetStep(const G4Step*);         <<  85   void EndOfEvent();
 85     void AddLeakingParticle(const G4Track*);   <<  86   void Fill(G4int id, G4double x, G4double w);
 86                                                <<  87 
 87     void SetVerbose(G4int val);                <<  88   void ScoreNewTrack(const G4Track*);
 88                                                <<  89   void AddTargetStep(const G4Step*);
 89     inline void SetTargetRadius(G4double val)  <<  90   void AddLeakingParticle(const G4Track*);
 90     {                                          <<  91 
 91       fRadius = val;                           <<  92   void SetVerbose(G4int val);        
 92       fR2 = val * val;                         <<  93 
 93     };                                         <<  94   inline void SetTargetLength(G4double val)            {fLength  = val;};
 94     inline void SetTargetLength(G4double val)  <<  95   inline void SetNumberOfSlices(G4int val)             {fNSlices = val;};
 95     inline void SetNumberOfSlices(G4int val) { <<  96   inline void SetNumberOfBinsE(G4int val)              {fNBinsE  = val;};
 96     inline void SetNumberOfBinsE(G4int val) {  <<  97   inline void SetDefaultBeamPositionFlag(G4bool f)     {fBeamFlag = f;};        
 97     inline void SetDefaultBeamPositionFlag(G4b <<  98   inline void SetMaxEnergyDeposit(G4double val)        {fEdepMax = val;};
 98     inline void SetMaxEnergyDeposit(G4double v <<  99 
 99                                                << 100   inline G4double Length()         const               {return fLength;};
100     inline G4double Radius() const { return fR << 101   inline G4bool   DefaultBeamPosition() const          {return fBeamFlag;};
101     inline G4double Length() const { return fL << 102   inline G4int    NumberOfSlices() const               {return fNSlices;};
102     inline G4bool DefaultBeamPosition() const  << 103   inline G4int    GetVerbose()     const               {return fVerbose;};
103     inline G4int NumberOfSlices() const { retu << 104 
104     inline G4int GetVerbose() const { return f << 105 private:
105                                                << 106 
106     inline G4int PrintBertiniXS() const { retu << 107   static HistoManager* fManager;
107     inline void SetPrintBertiniXS(G4int key) { << 108 
108                                                << 109   const G4ParticleDefinition* fPrimaryDef;
109   private:                                     << 110   const G4ParticleDefinition* fNeutron;
110     static HistoManager* fManager;             << 111 
111                                                << 112   G4double fEdepMax;
112     const G4ParticleDefinition* fPrimaryDef;   << 113   G4double fEdepEvt;
113     const G4ParticleDefinition* fNeutron;      << 114   G4double fEdepEM;
114                                                << 115   G4double fEdepPI;
115     G4double fR2 = 0.0;                        << 116   G4double fEdepP;
116     G4double fRadius;                          << 117   G4double fEdepSum;
117     G4double fLength;                          << 118   G4double fEdepSum2;
118     G4double fEdepMax;                         << 119   G4double fBeamEnergy;
119     G4double fEdepEvt = 0.0;                   << 120   G4double fLength;
120     G4double fEdepEM = 0.0;                    << 121   G4double fAbsZ0;
121     G4double fEdepPI = 0.0;                    << 122   G4double fPrimaryKineticEnergy;
122     G4double fEdepP = 0.0;                     << 123  
123     G4double fEdepSum = 0.0;                   << 124   G4int fVerbose;
124     G4double fEdepSum2 = 0.0;                  << 125   G4int fNBinsE;
125     G4double fAbsZ0 = 0.0;                     << 126   G4int fNSlices;
126     G4double fPrimaryKineticEnergy = 0.0;      << 127 
127                                                << 128   G4int fNevt;
128     G4int fVerbose = 0;                        << 129   G4int fNelec;
129     G4int fNBinsE = 100;                       << 130   G4int fNposit;
130     G4int fNSlices = 300;                      << 131   G4int fNgam;
131                                                << 132   G4int fNprot_leak;
132     G4int fNevt = 0;                           << 133   G4int fNpiofNleak;
133     G4int fNelec = 0;                          << 134   G4int fNcpions;
134     G4int fNposit = 0;                         << 135   G4int fNpi0;
135     G4int fNgam = 0;                           << 136   G4int fNkaons;
136     G4int fNprot_leak = 0;                     << 137   G4int fNmuons;
137     G4int fNpiofNleak = 0;                     << 138   G4int fNions;
138     G4int fNcpions = 0;                        << 139   G4int fNdeut;
139     G4int fNpi0 = 0;                           << 140   G4int fNalpha;
140     G4int fNkaons = 0;                         << 141   G4int fNneutron;
141     G4int fNmuons = 0;                         << 142   G4int fNproton;
142     G4int fNions = 0;                          << 143   G4int fNaproton;
143     G4int fNdeut = 0;                          << 144   G4int fNneu_forw;
144     G4int fNalpha = 0;                         << 145   G4int fNneu_leak;
145     G4int fNneutron = 0;                       << 146   G4int fNneu_back;
146     G4int fNproton = 0;                        << 147   G4int fNstep;
147     G4int fNaproton = 0;                       << 148   G4int fNHisto;
148     G4int fNneu_forw = 0;                      << 
149     G4int fNneu_leak = 0;                      << 
150     G4int fNneu_back = 0;                      << 
151     G4int fNstep = 0;                          << 
152     G4int fNHisto = 28;                        << 
153     G4int fPrintBertiniXS = -1;  // 0 - all    << 
154                                                   149 
155     G4bool fBeamFlag = true;                   << 150   G4bool fBeamFlag;
156     G4bool fHistoBooked = false;               << 151   G4bool fHistoBooked;
157                                                   152 
158     Histo* fHisto;                             << 153   Histo* fHisto;
159 };                                                154 };
160                                                   155 
161 #endif                                            156 #endif
162                                                   157