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

#include <DMXScintSD.hh>

Inheritance diagram for DMXScintSD:
Collaboration diagram for DMXScintSD:

Public Member Functions

 DMXScintSD (G4String)
 
 ~DMXScintSD ()
 
void Initialize (G4HCofThisEvent *)
 
G4bool ProcessHits (G4Step *, G4TouchableHistory *)
 
void EndOfEvent (G4HCofThisEvent *)
 
void clear ()
 
void DrawAll ()
 
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
 
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 54 of file DMXScintSD.hh.

Constructor & Destructor Documentation

DMXScintSD::DMXScintSD ( G4String  name)

Definition at line 60 of file DMXScintSD.cc.

62 {
63  G4String HCname="scintillatorCollection";
64  collectionName.insert(HCname);
65 }
G4VSensitiveDetector(G4String name)
G4CollectionNameVector collectionName

Here is the call graph for this function:

DMXScintSD::~DMXScintSD ( )

Definition at line 69 of file DMXScintSD.cc.

69 { }

Member Function Documentation

void DMXScintSD::clear ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 137 of file DMXScintSD.cc.

138 {}
void DMXScintSD::DrawAll ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 142 of file DMXScintSD.cc.

143 {}
void DMXScintSD::EndOfEvent ( G4HCofThisEvent HCE)
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 118 of file DMXScintSD.cc.

119 {
120 
121  G4String HCname = collectionName[0];
122  static G4int HCID = -1;
123  if(HCID<0)
125  HCE->AddHitsCollection(HCID,scintillatorCollection);
126 
127  G4int nHits = scintillatorCollection->entries();
128  if (verboseLevel>=1)
129  G4cout << " LXe collection: " << nHits << " hits" << G4endl;
130  if (verboseLevel>=2)
131  scintillatorCollection->PrintAllHits();
132 
133 }
G4int GetCollectionID(G4String colName)
Definition: G4SDManager.cc:135
virtual void PrintAllHits()
G4int entries() const
int G4int
Definition: G4Types.hh:78
G4GLOB_DLL std::ostream G4cout
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
static G4SDManager * GetSDMpointer()
Definition: G4SDManager.cc:40
#define G4endl
Definition: G4ios.hh:61
G4CollectionNameVector collectionName

Here is the call graph for this function:

void DMXScintSD::Initialize ( G4HCofThisEvent )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 73 of file DMXScintSD.cc.

74 {
75  scintillatorCollection = new DMXScintHitsCollection
77 
78  HitID = -1;
79 }
G4THitsCollection< DMXScintHit > DMXScintHitsCollection
Definition: DMXScintHit.hh:96
G4CollectionNameVector collectionName
void DMXScintSD::PrintAll ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 147 of file DMXScintSD.cc.

148 {}
G4bool DMXScintSD::ProcessHits ( G4Step aStep,
G4TouchableHistory  
)
virtual

Implements G4VSensitiveDetector.

Definition at line 83 of file DMXScintSD.cc.

84 {
85 
86  //need to know if this is an optical photon and exclude it:
87  if(aStep->GetTrack()->GetDefinition()
89 
90 
91  G4double edep = aStep->GetTotalEnergyDeposit();
92  G4ParticleDefinition* particleType = aStep->GetTrack()->GetDefinition();
93  G4String particleName = particleType->GetParticleName();
94 
95  G4double stepl = 0.;
96  if (particleType->GetPDGCharge() != 0.)
97  stepl = aStep->GetStepLength();
98 
99  if ((edep==0.)&&(stepl==0.)) return false;
100 
101 
102  // fill in hit
103  DMXScintHit* newHit = new DMXScintHit();
104  newHit->SetEdep(edep);
105  newHit->SetPos(aStep->GetPostStepPoint()->GetPosition());
106  newHit->SetTime(aStep->GetPreStepPoint()->GetGlobalTime());
107  newHit->SetParticle(particleName);
108  newHit->SetParticleEnergy(aStep->GetPreStepPoint()->GetKineticEnergy() );
109 
110  HitID = scintillatorCollection->insert(newHit);
111 
112  return true;
113 }
void SetParticle(G4String name)
Definition: DMXScintHit.hh:72
G4ParticleDefinition * GetDefinition() const
G4double GetStepLength() const
void SetPos(G4ThreeVector xyz)
Definition: DMXScintHit.hh:71
G4int insert(T *aHit)
const G4String & GetParticleName() const
G4StepPoint * GetPreStepPoint() const
const G4ThreeVector & GetPosition() const
void SetParticleEnergy(G4double e1)
Definition: DMXScintHit.hh:73
G4double GetTotalEnergyDeposit() const
void SetTime(G4double t2)
Definition: DMXScintHit.hh:74
G4StepPoint * GetPostStepPoint() const
G4double GetGlobalTime() const
static G4OpticalPhoton * OpticalPhotonDefinition()
G4double GetKineticEnergy() const
double G4double
Definition: G4Types.hh:76
G4Track * GetTrack() const
G4double GetPDGCharge() const
void SetEdep(G4double de)
Definition: DMXScintHit.hh:70

Here is the call graph for this function:


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