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

#include <RMC01SD.hh>

Inheritance diagram for RMC01SD:
Collaboration diagram for RMC01SD:

Public Member Functions

 RMC01SD (G4String name)
 
virtual ~RMC01SD ()
 
virtual void Initialize (G4HCofThisEvent *HCE)
 
virtual G4bool ProcessHits (G4Step *aStep, G4TouchableHistory *ROhist)
 
virtual void EndOfEvent (G4HCofThisEvent *HCE)
 
virtual void Clear ()
 
virtual void DrawAll ()
 
virtual void PrintAll ()
 
- Public Member Functions inherited from G4VSensitiveDetector
 G4VSensitiveDetector (G4String name)
 
 G4VSensitiveDetector (const G4VSensitiveDetector &right)
 
virtual ~G4VSensitiveDetector ()
 
G4VSensitiveDetectoroperator= (const G4VSensitiveDetector &right)
 
G4int operator== (const G4VSensitiveDetector &right) const
 
G4int operator!= (const G4VSensitiveDetector &right) const
 
virtual void clear ()
 
G4bool Hit (G4Step *aStep)
 
void SetROgeometry (G4VReadOutGeometry *value)
 
void SetFilter (G4VSDFilter *value)
 
G4int GetNumberOfCollections () const
 
G4String GetCollectionName (G4int id) const
 
void SetVerboseLevel (G4int vl)
 
void Activate (G4bool activeFlag)
 
G4bool isActive () const
 
G4String GetName () const
 
G4String GetPathName () const
 
G4String GetFullPathName () const
 
G4VReadOutGeometryGetROgeometry () const
 
G4VSDFilterGetFilter () const
 
virtual G4VSensitiveDetectorClone () const
 

Additional Inherited Members

- Protected Member Functions inherited from G4VSensitiveDetector
virtual G4int GetCollectionID (G4int i)
 
- Protected Attributes inherited from G4VSensitiveDetector
G4CollectionNameVector collectionName
 
G4String SensitiveDetectorName
 
G4String thePathName
 
G4String fullPathName
 
G4int verboseLevel
 
G4bool active
 
G4VReadOutGeometryROgeometry
 
G4VSDFilterfilter
 

Detailed Description

Definition at line 66 of file RMC01SD.hh.

Constructor & Destructor Documentation

RMC01SD::RMC01SD ( G4String  name)

Definition at line 66 of file RMC01SD.cc.

68  fTotalEventEdep(0.),fEventEdepCollection(0),
69  fProtonCurrentCollection(0),fGammaCurrentCollection(0),
70  fElectronCurrentCollection(0)
71 {
72  collectionName.insert("edep");
73  collectionName.insert("current_electron");
74  collectionName.insert("current_proton");
75  collectionName.insert("current_gamma");
76 }
G4VSensitiveDetector(G4String name)
G4CollectionNameVector collectionName

Here is the call graph for this function:

RMC01SD::~RMC01SD ( )
virtual

Definition at line 80 of file RMC01SD.cc.

81 {;
82 }

Member Function Documentation

void RMC01SD::Clear ( )
virtual

Definition at line 148 of file RMC01SD.cc.

149 {;
150 }
void RMC01SD::DrawAll ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 154 of file RMC01SD.cc.

155 {;
156 }
void RMC01SD::EndOfEvent ( G4HCofThisEvent HCE)
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 140 of file RMC01SD.cc.

141 {
142  fEventEdepCollection->insert(
143  new RMC01DoubleWithWeightHit(fTotalEventEdep,1.));
144 }
G4int insert(T *aHit)

Here is the call graph for this function:

void RMC01SD::Initialize ( G4HCofThisEvent HCE)
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 86 of file RMC01SD.cc.

87 {
88  fTotalEventEdep=0.;
89  static G4int HCID = -1;
90 
91  fEventEdepCollection = new G4THitsCollection<RMC01DoubleWithWeightHit>
93  HCID = GetCollectionID(0);
94  HCE->AddHitsCollection(HCID,fEventEdepCollection);
95 
96  fElectronCurrentCollection = new G4THitsCollection<RMC01DoubleWithWeightHit>
98  HCID = GetCollectionID(1);
99  HCE->AddHitsCollection(HCID,fElectronCurrentCollection);
100 
101  fProtonCurrentCollection = new G4THitsCollection<RMC01DoubleWithWeightHit>
103  HCID = GetCollectionID(2);
104  HCE->AddHitsCollection(HCID,fProtonCurrentCollection);
105 
106  fGammaCurrentCollection = new G4THitsCollection<RMC01DoubleWithWeightHit>
108  HCID = GetCollectionID(3);
109  HCE->AddHitsCollection(HCID,fGammaCurrentCollection);
110 }
int G4int
Definition: G4Types.hh:78
virtual G4int GetCollectionID(G4int i)
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
G4CollectionNameVector collectionName

Here is the call graph for this function:

void RMC01SD::PrintAll ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 160 of file RMC01SD.cc.

161 {;
162 }
G4bool RMC01SD::ProcessHits ( G4Step aStep,
G4TouchableHistory ROhist 
)
virtual

Implements G4VSensitiveDetector.

Definition at line 114 of file RMC01SD.cc.

115 {
116  G4double weight =aStep->GetTrack()->GetWeight();
117  G4double edep= aStep->GetTotalEnergyDeposit();
118  if (edep >0) fEventEdepCollection->insert(
119  new RMC01DoubleWithWeightHit(edep,weight));
120 
121  G4StepPoint* preStepPoint =aStep->GetPreStepPoint();
122 
123  if (preStepPoint->GetStepStatus() == fGeomBoundary ){
124  // Entering the sensitive volume
125  weight=preStepPoint->GetWeight();
126  G4double eKin = preStepPoint->GetKineticEnergy();
127  G4ParticleDefinition* thePartDef = aStep->GetTrack()->GetDefinition();
128  if (thePartDef == G4Electron::Electron()) fElectronCurrentCollection->
129  insert(new RMC01DoubleWithWeightHit(eKin,weight));
130  else if (thePartDef == G4Gamma::Gamma()) fGammaCurrentCollection->
131  insert(new RMC01DoubleWithWeightHit(eKin,weight));
132  else if (thePartDef == G4Proton::Proton()) fProtonCurrentCollection->
133  insert(new RMC01DoubleWithWeightHit(eKin,weight));
134  }
135  return true;
136 }
G4ParticleDefinition * GetDefinition() const
G4double GetWeight() const
G4StepStatus GetStepStatus() const
G4int insert(T *aHit)
G4StepPoint * GetPreStepPoint() const
static G4Proton * Proton()
Definition: G4Proton.cc:93
static G4Gamma * Gamma()
Definition: G4Gamma.cc:86
G4double GetTotalEnergyDeposit() const
G4double GetWeight() const
static G4Electron * Electron()
Definition: G4Electron.cc:94
G4double GetKineticEnergy() const
double G4double
Definition: G4Types.hh:76
G4Track * GetTrack() const

Here is the call graph for this function:


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