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

#include <B4bRunData.hh>

Inheritance diagram for B4bRunData:
G4Run

Public Member Functions

 B4bRunData ()
 
virtual ~B4bRunData ()
 
void Add (G4int id, G4double de, G4double dl)
 
void FillPerEvent ()
 
void Reset ()
 
G4String GetVolumeName (G4int id) const
 
G4double GetEdep (G4int id) const
 
G4double GetTrackLength (G4int id) const
 
- Public Member Functions inherited from G4Run
 G4Run ()
 
virtual ~G4Run ()
 
virtual void RecordEvent (const G4Event *)
 
virtual void Merge (const G4Run *)
 
G4int GetRunID () const
 
G4int GetNumberOfEvent () const
 
G4int GetNumberOfEventToBeProcessed () const
 
const G4HCtableGetHCtable () const
 
const G4DCtableGetDCtable () const
 
const G4StringGetRandomNumberStatus () const
 
void SetRunID (G4int id)
 
void SetNumberOfEventToBeProcessed (G4int n_ev)
 
void SetHCtable (G4HCtable *HCtbl)
 
void SetDCtable (G4DCtable *DCtbl)
 
void SetRandomNumberStatus (G4String &st)
 
void StoreEvent (G4Event *evt)
 
const std::vector< const
G4Event * > * 
GetEventVector () const
 

Additional Inherited Members

- Protected Attributes inherited from G4Run
G4int runID
 
G4int numberOfEvent
 
G4int numberOfEventToBeProcessed
 
G4HCtableHCtable
 
G4DCtableDCtable
 
G4String randomNumberStatus
 
std::vector< const G4Event * > * eventVector
 

Detailed Description

Run data class

It defines data members to hold the energy deposit and track lengths of charged particles in Absober and Gap layers.

In order to reduce the number of data members a 2-dimensions array is introduced for each quantity:

The data are collected step by step in B4bSteppingAction, and the accumulated values are filled in histograms and entuple event by event in B4EventAction.

Definition at line 58 of file B4bRunData.hh.

Constructor & Destructor Documentation

B4bRunData::B4bRunData ( )

Definition at line 39 of file B4bRunData.cc.

References kDim.

39  : G4Run()
40 {
41  fVolumeNames[0] = "Absorber";
42  fVolumeNames[1] = "Gap";
43 
44  for ( G4int i=0; i<kDim; i++) {
45  fEdep[i] = 0.;
46  fTrackLength[i] = 0.;
47  }
48 }
int G4int
Definition: G4Types.hh:78
G4Run()
Definition: G4Run.cc:34
B4bRunData::~B4bRunData ( )
virtual

Definition at line 52 of file B4bRunData.cc.

53 {;}

Member Function Documentation

void B4bRunData::Add ( G4int  id,
G4double  de,
G4double  dl 
)
inline

Definition at line 82 of file B4bRunData.hh.

Referenced by B4bSteppingAction::UserSteppingAction().

82  {
83  fEdep[id] += de;
84  fTrackLength[id] += dl;
85 }
void B4bRunData::FillPerEvent ( )

Definition at line 57 of file B4bRunData.cc.

References kDim.

Referenced by B4bEventAction::EndOfEventAction().

58 {
59  // get analysis manager
60  G4AnalysisManager* analysisManager = G4AnalysisManager::Instance();
61  //accumulate statistic
62  //
63 
64  for ( G4int i=0; i<kDim; i++) {
65  // fill histograms
66  analysisManager->FillH1(i+1, fEdep[i]);
67  analysisManager->FillH1(kDim+i+1, fTrackLength[i]);
68 
69  // fill ntuple
70  analysisManager->FillNtupleDColumn(i, fEdep[i]);
71  analysisManager->FillNtupleDColumn(kDim+i, fTrackLength[i]);
72  }
73 
74  analysisManager->AddNtupleRow();
75 }
int G4int
Definition: G4Types.hh:78
ExG4HbookAnalysisManager G4AnalysisManager
Definition: g4hbook_defs.hh:46
G4double B4bRunData::GetEdep ( G4int  id) const
inline

Definition at line 91 of file B4bRunData.hh.

Referenced by B4bEventAction::EndOfEventAction().

91  {
92  return fEdep[id];
93 }
G4double B4bRunData::GetTrackLength ( G4int  id) const
inline

Definition at line 95 of file B4bRunData.hh.

Referenced by B4bEventAction::EndOfEventAction().

95  {
96  return fTrackLength[id];
97 }
G4String B4bRunData::GetVolumeName ( G4int  id) const
inline

Definition at line 87 of file B4bRunData.hh.

87  {
88  return fVolumeNames[id];
89 }
void B4bRunData::Reset ( )

Definition at line 79 of file B4bRunData.cc.

References kDim.

Referenced by B4bEventAction::BeginOfEventAction().

80 {
81  for ( G4int i=0; i<kDim; i++) {
82  fEdep[i] = 0.;
83  fTrackLength[i] = 0.;
84  }
85 }
int G4int
Definition: G4Types.hh:78

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