Geant4  10.02.p03
ExGflashSensitiveDetector Class Reference

#include <ExGflashSensitiveDetector.hh>

Inheritance diagram for ExGflashSensitiveDetector:
Collaboration diagram for ExGflashSensitiveDetector:

Public Member Functions

 ExGflashSensitiveDetector (G4String, ExGflashDetectorConstruction *det)
 
 ~ExGflashSensitiveDetector ()
 
virtual void Initialize (G4HCofThisEvent *)
 
virtual G4bool ProcessHits (G4Step *, G4TouchableHistory *)
 
virtual G4bool ProcessHits (G4GFlashSpot *aSpot, G4TouchableHistory *)
 
virtual void EndOfEvent (G4HCofThisEvent *)
 
- 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 ()
 
virtual void DrawAll ()
 
virtual void PrintAll ()
 
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
 
- Public Member Functions inherited from G4VGFlashSensitiveDetector
 G4VGFlashSensitiveDetector ()
 
 G4VGFlashSensitiveDetector (const G4VGFlashSensitiveDetector &)
 
virtual ~G4VGFlashSensitiveDetector ()
 
G4int operator== (const G4VGFlashSensitiveDetector &right) const
 
G4int operator!= (const G4VGFlashSensitiveDetector &right) const
 
G4bool Hit (G4GFlashSpot *aSpot)
 

Private Attributes

ExGflashHitsCollectionfCaloHitsCollection
 
ExGflashDetectorConstructionfDetector
 
G4int fHCID
 

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 46 of file ExGflashSensitiveDetector.hh.

Constructor & Destructor Documentation

◆ ExGflashSensitiveDetector()

ExGflashSensitiveDetector::ExGflashSensitiveDetector ( G4String  name,
ExGflashDetectorConstruction det 
)

Definition at line 45 of file ExGflashSensitiveDetector.cc.

Here is the call graph for this function:

◆ ~ExGflashSensitiveDetector()

ExGflashSensitiveDetector::~ExGflashSensitiveDetector ( )

Definition at line 55 of file ExGflashSensitiveDetector.cc.

56 {}

Member Function Documentation

◆ EndOfEvent()

void ExGflashSensitiveDetector::EndOfEvent ( G4HCofThisEvent )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 70 of file ExGflashSensitiveDetector.cc.

71 {}

◆ Initialize()

void ExGflashSensitiveDetector::Initialize ( G4HCofThisEvent HCE)
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 60 of file ExGflashSensitiveDetector.cc.

61 {
62  if(fHCID<0){ fHCID = GetCollectionID(0); }
66 }
ExGflashHitsCollection * fCaloHitsCollection
virtual G4int GetCollectionID(G4int i)
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
G4THitsCollection< ExGflashHit > ExGflashHitsCollection
Definition: ExGflashHit.hh:99
G4CollectionNameVector collectionName
Here is the call graph for this function:

◆ ProcessHits() [1/2]

G4bool ExGflashSensitiveDetector::ProcessHits ( G4Step *  aStep,
G4TouchableHistory ROhist 
)
virtual

Implements G4VSensitiveDetector.

Definition at line 75 of file ExGflashSensitiveDetector.cc.

76 {
77  G4double e=aStep->GetTotalEnergyDeposit();
78  if(e<=0.)return false;
79 
80  G4TouchableHistory* theTouchable
81  = (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable());
82 
83  // enrgy deposited -> make Hit
84  //const G4VPhysicalVolume* physVol= aStep->GetPreStepPoint()->GetPhysicalVolume();
85  //G4TouchableHistory* theTouchable =
86  // (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable());
87  ExGflashHit* caloHit=new ExGflashHit();
88  caloHit->SetEdep(e);
89  caloHit->SetPos(aStep->GetPreStepPoint()->GetPosition());
90  fCaloHitsCollection->insert(caloHit);
91  if (ROhist){;}
92  G4VPhysicalVolume* physVol = theTouchable->GetVolume();
93  G4int crystalnum=0;
94  for(int i=0;i<100;i++) //@@@@@@@ ExGflashSensitiveDetector:vorsichty
95  {
96  if(physVol == fDetector->GetCristal(i)) crystalnum= i;
97  }
98  caloHit->SetCrystalNum(crystalnum);
99 
100  return true;
101 }
const G4VPhysicalVolume * GetCristal(int num__crystal)
ExGflashHitsCollection * fCaloHitsCollection
int G4int
Definition: G4Types.hh:78
void SetCrystalNum(G4int num)
Definition: ExGflashHit.hh:82
G4VPhysicalVolume * GetVolume(G4int depth=0) const
double G4double
Definition: G4Types.hh:76
ExGflashDetectorConstruction * fDetector
void SetEdep(G4double de)
Definition: ExGflashHit.hh:72
void SetPos(G4ThreeVector xyz)
Definition: ExGflashHit.hh:78
Here is the call graph for this function:

◆ ProcessHits() [2/2]

G4bool ExGflashSensitiveDetector::ProcessHits ( G4GFlashSpot aSpot,
G4TouchableHistory ROhist 
)
virtual

Implements G4VGFlashSensitiveDetector.

Definition at line 106 of file ExGflashSensitiveDetector.cc.

107 { //cout<<"This is ProcessHits GFLASH"<<endl;
108  G4double e=aSpot->GetEnergySpot()->GetEnergy();
109  if(e<=0.)return false;
110 
111  G4VPhysicalVolume* pCurrentVolume = aSpot->GetTouchableHandle()->GetVolume();
112 
113  ExGflashHit* caloHit=new ExGflashHit();
114  caloHit->SetEdep(e);
115  caloHit->SetPos(aSpot->GetEnergySpot()->GetPosition());
116  fCaloHitsCollection->insert(caloHit);
117  if (ROhist){;}
118  //cout <<pCurrentVolume->GetName() << endl;
119  G4int crystalnum=0;
120  for(int i=0;i<100;i++) //@@@@@@@ ExGflashSensitiveDetector:vorsichty
121  {
122  if(pCurrentVolume == fDetector->GetCristal(i)) crystalnum= i;
123  }
124  caloHit->SetCrystalNum(crystalnum);
125 
126  return true;
127 }
const G4VPhysicalVolume * GetCristal(int num__crystal)
ExGflashHitsCollection * fCaloHitsCollection
const GFlashEnergySpot * GetEnergySpot() const
Definition: G4GFlashSpot.hh:58
G4ThreeVector GetPosition() const
int G4int
Definition: G4Types.hh:78
void SetCrystalNum(G4int num)
Definition: ExGflashHit.hh:82
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
Definition: G4VTouchable.cc:44
G4double GetEnergy() const
double G4double
Definition: G4Types.hh:76
ExGflashDetectorConstruction * fDetector
G4TouchableHandle GetTouchableHandle() const
Definition: G4GFlashSpot.hh:62
void SetEdep(G4double de)
Definition: ExGflashHit.hh:72
void SetPos(G4ThreeVector xyz)
Definition: ExGflashHit.hh:78
Here is the call graph for this function:

Member Data Documentation

◆ fCaloHitsCollection

ExGflashHitsCollection* ExGflashSensitiveDetector::fCaloHitsCollection
private

Definition at line 58 of file ExGflashSensitiveDetector.hh.

◆ fDetector

ExGflashDetectorConstruction* ExGflashSensitiveDetector::fDetector
private

Definition at line 59 of file ExGflashSensitiveDetector.hh.

◆ fHCID

G4int ExGflashSensitiveDetector::fHCID
private

Definition at line 60 of file ExGflashSensitiveDetector.hh.


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