Geant4  10.02.p03
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
 

Private Attributes

DMXScintHitsCollectionscintillatorCollection
 
G4int HitID
 

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::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::~DMXScintSD ( )

Definition at line 69 of file DMXScintSD.cc.

69 { }

Member Function Documentation

◆ clear()

void DMXScintSD::clear ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 137 of file DMXScintSD.cc.

138 {}

◆ DrawAll()

void DMXScintSD::DrawAll ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 142 of file DMXScintSD.cc.

143 {}

◆ EndOfEvent()

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)
126 
128  if (verboseLevel>=1)
129  G4cout << " LXe collection: " << nHits << " hits" << G4endl;
130  if (verboseLevel>=2)
132 
133 }
G4int GetCollectionID(G4String colName)
Definition: G4SDManager.cc:135
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
DMXScintHitsCollection * scintillatorCollection
Definition: DMXScintSD.hh:70
Here is the call graph for this function:

◆ Initialize()

void DMXScintSD::Initialize ( G4HCofThisEvent )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 73 of file DMXScintSD.cc.

74 {
77 
78  HitID = -1;
79 }
G4THitsCollection< DMXScintHit > DMXScintHitsCollection
Definition: DMXScintHit.hh:96
G4int HitID
Definition: DMXScintSD.hh:71
G4CollectionNameVector collectionName
DMXScintHitsCollection * scintillatorCollection
Definition: DMXScintSD.hh:70

◆ PrintAll()

void DMXScintSD::PrintAll ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 147 of file DMXScintSD.cc.

148 {}

◆ ProcessHits()

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 
111 
112  return true;
113 }
void SetParticle(G4String name)
Definition: DMXScintHit.hh:72
void SetPos(G4ThreeVector xyz)
Definition: DMXScintHit.hh:71
Double_t edep
const G4String & GetParticleName() const
G4int HitID
Definition: DMXScintSD.hh:71
void SetParticleEnergy(G4double e1)
Definition: DMXScintHit.hh:73
void SetTime(G4double t2)
Definition: DMXScintHit.hh:74
static G4OpticalPhoton * OpticalPhotonDefinition()
DMXScintHitsCollection * scintillatorCollection
Definition: DMXScintSD.hh:70
double G4double
Definition: G4Types.hh:76
void SetEdep(G4double de)
Definition: DMXScintHit.hh:70
G4double GetPDGCharge() const
Here is the call graph for this function:

Member Data Documentation

◆ HitID

G4int DMXScintSD::HitID
private

Definition at line 71 of file DMXScintSD.hh.

◆ scintillatorCollection

DMXScintHitsCollection* DMXScintSD::scintillatorCollection
private

Definition at line 70 of file DMXScintSD.hh.


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