Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
RE06Run Class Reference

#include <RE06Run.hh>

Inheritance diagram for RE06Run:
Collaboration diagram for RE06Run:

Public Member Functions

 RE06Run ()
 
virtual ~RE06Run ()
 
virtual void RecordEvent (const G4Event *)
 
virtual void Merge (const G4Run *)
 
G4double GetTotalE (G4int i) const
 
G4double GetNGamma (G4int i) const
 
G4double GetNElectron (G4int i) const
 
G4double GetNPositron (G4int i) const
 
G4double GetTotalL (G4int i) const
 
G4double GetNStep (G4int i) const
 
G4double GetEMinGamma (G4int i) const
 
G4double GetEMinElectron (G4int i) const
 
G4double GetEMinPositron (G4int i) const
 
G4double GetParaValue (G4int i, G4int j, G4int k) const
 
- Public Member Functions inherited from G4Run
 G4Run ()
 
virtual ~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

Definition at line 42 of file RE06Run.hh.

Constructor & Destructor Documentation

RE06Run::RE06Run ( )

Definition at line 39 of file RE06Run.cc.

40  : G4Run()
41 {
42  G4String detName[6]
43  = {"Calor-A_abs","Calor-A_gap",
44  "Calor-B_abs","Calor-B_gap",
45  "Calor-C_abs","Calor-C_gap"};
46 
47  G4String primNameSum[6]
48  = {"eDep","nGamma","nElectron","nPositron","trackLength","nStep"};
49 
50  G4String primNameMin[3]
51  = {"minEkinGamma","minEkinElectron","minEkinPositron"};
52 
53  G4String paraName[3]
54  = {"Calor-AP_para","Calor-BP_para","Calor-CP_para"};
55 
57  G4String fullName;
58  size_t i,j;
59  for(i=0;i<6;i++)
60  {
61  for(j=0;j<6;j++)
62  {
63  fullName = detName[i]+"/"+primNameSum[j];
64  fColIDSum[i][j] = SDMan->GetCollectionID(fullName);
65  }
66  for(j=0;j<3;j++)
67  {
68  fullName = detName[i]+"/"+primNameMin[j];
69  fColIDMin[i][j] = SDMan->GetCollectionID(fullName);
70  }
71  }
72  for(i=0;i<3;i++)
73  {
74  for(j=0;j<6;j++)
75  {
76  fullName = paraName[i]+"/"+primNameSum[j];
77  fColIDPara[i][j] = SDMan->GetCollectionID(fullName);
78  }
79  }
80 
81 }
G4int GetCollectionID(G4String colName)
Definition: G4SDManager.cc:135
G4Run()
Definition: G4Run.cc:34
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40

Here is the call graph for this function:

RE06Run::~RE06Run ( )
virtual

Definition at line 85 of file RE06Run.cc.

86 {;}

Member Function Documentation

G4double RE06Run::GetEMinElectron ( G4int  i) const
inline

Definition at line 59 of file RE06Run.hh.

59 { return FindMinimum(fMapMin[i][1]);}

Here is the caller graph for this function:

G4double RE06Run::GetEMinGamma ( G4int  i) const
inline

Definition at line 58 of file RE06Run.hh.

58 { return FindMinimum(fMapMin[i][0]);}

Here is the caller graph for this function:

G4double RE06Run::GetEMinPositron ( G4int  i) const
inline

Definition at line 60 of file RE06Run.hh.

60 { return FindMinimum(fMapMin[i][2]);}

Here is the caller graph for this function:

G4double RE06Run::GetNElectron ( G4int  i) const
inline

Definition at line 53 of file RE06Run.hh.

53 { return GetTotal(fMapSum[i][2]); }

Here is the caller graph for this function:

G4double RE06Run::GetNGamma ( G4int  i) const
inline

Definition at line 52 of file RE06Run.hh.

52 { return GetTotal(fMapSum[i][1]); }

Here is the caller graph for this function:

G4double RE06Run::GetNPositron ( G4int  i) const
inline

Definition at line 54 of file RE06Run.hh.

54 { return GetTotal(fMapSum[i][3]); }

Here is the caller graph for this function:

G4double RE06Run::GetNStep ( G4int  i) const
inline

Definition at line 56 of file RE06Run.hh.

56 { return GetTotal(fMapSum[i][5]); }

Here is the caller graph for this function:

G4double RE06Run::GetParaValue ( G4int  i,
G4int  j,
G4int  k 
) const
inline

Definition at line 62 of file RE06Run.hh.

63  {
64  G4double* p = fMapPara[i][j][k];
65  if(p) return *p;
66  return 0.;
67  }
const char * p
Definition: xmltok.h:285
double G4double
Definition: G4Types.hh:76

Here is the caller graph for this function:

G4double RE06Run::GetTotalE ( G4int  i) const
inline

Definition at line 51 of file RE06Run.hh.

51 { return GetTotal(fMapSum[i][0]); }

Here is the caller graph for this function:

G4double RE06Run::GetTotalL ( G4int  i) const
inline

Definition at line 55 of file RE06Run.hh.

55 { return GetTotal(fMapSum[i][4]); }

Here is the caller graph for this function:

void RE06Run::Merge ( const G4Run aRun)
virtual

Reimplemented from G4Run.

Definition at line 133 of file RE06Run.cc.

133  {
134  const RE06Run * localRun = static_cast<const RE06Run *>(aRun);
135 
136  for(G4int i = 0; i < 6; i++) {
137  for(G4int j = 0; j < 6; j++) {
138  fMapSum[i][j] += localRun->fMapSum[i][j];
139  }
140 
141  for(G4int j = 0; j < 3; j++) {
142  std::map<G4int, G4double*>::iterator itr = localRun->fMapMin[i][j].GetMap()->begin();
143  for(; itr != localRun->fMapMin[i][j].GetMap()->end(); itr++) {
144  G4int key = itr->first;
145  G4double val = *(itr->second);
146  G4double * mapP = fMapMin[i][j][key];
147  if(!mapP || val < *mapP) fMapMin[i][j].set(key, val);
148  }
149  }
150  }
151 
152  for(G4int i = 0; i < 3; i++) {
153  for(G4int j = 0; j < 6; j++) {
154  fMapPara[i][j] += localRun->fMapPara[i][j];
155  }
156  }
157 
158  G4Run::Merge(aRun);
159 }
virtual void Merge(const G4Run *)
Definition: G4Run.cc:54
G4int set(const G4int &key, T *&aHit) const
Definition: G4THitsMap.hh:156
int G4int
Definition: G4Types.hh:78
std::map< G4int, T * > * GetMap() const
Definition: G4THitsMap.hh:99
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:

void RE06Run::RecordEvent ( const G4Event evt)
virtual

Reimplemented from G4Run.

Definition at line 90 of file RE06Run.cc.

91 {
92  G4HCofThisEvent* HCE = evt->GetHCofThisEvent();
93  if(!HCE) return;
94  numberOfEvent++;
95  size_t i,j;
96  for(i=0;i<6;i++)
97  {
98  for(j=0;j<6;j++)
99  {
100  G4THitsMap<G4double>* evtMap
101  = (G4THitsMap<G4double>*)(HCE->GetHC(fColIDSum[i][j]));
102  fMapSum[i][j] += *evtMap;
103  }
104 
105  for(j=0;j<3;j++)
106  {
107  G4THitsMap<G4double>* evtMap
108  = (G4THitsMap<G4double>*)(HCE->GetHC(fColIDMin[i][j]));
109  std::map<G4int,G4double*>::iterator itr = evtMap->GetMap()->begin();
110  for(; itr != evtMap->GetMap()->end(); itr++)
111  {
112  G4int key = (itr->first);
113  G4double val = *(itr->second);
114  G4double* mapP = fMapMin[i][j][key];
115  if( mapP && (val>*mapP) ) continue;
116  fMapMin[i][j].set(key,val);
117  }
118  }
119 
120  }
121  for(i=0;i<3;i++)
122  {
123  for(j=0;j<6;j++)
124  {
125  G4THitsMap<G4double>* evtMap
126  = (G4THitsMap<G4double>*)(HCE->GetHC(fColIDPara[i][j]));
127  fMapPara[i][j] += *evtMap;
128  }
129  }
130 }
G4int numberOfEvent
Definition: G4Run.hh:59
G4int set(const G4int &key, T *&aHit) const
Definition: G4THitsMap.hh:156
G4VHitsCollection * GetHC(G4int i)
int G4int
Definition: G4Types.hh:78
std::map< G4int, T * > * GetMap() const
Definition: G4THitsMap.hh:99
G4HCofThisEvent * GetHCofThisEvent() const
Definition: G4Event.hh:185
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:


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