Geant4  10.03.p02
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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)
 

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 ( G4String  name,
ExGflashDetectorConstruction det 
)

Definition at line 45 of file ExGflashSensitiveDetector.cc.

47  : G4VSensitiveDetector(name), G4VGFlashSensitiveDetector(), fDetector(det), fHCID(-1)
48 {
49  G4String caloname="ExGflashCollection";
50  collectionName.insert(caloname);
51 }
G4VSensitiveDetector(G4String name)
G4CollectionNameVector collectionName

Here is the call graph for this function:

ExGflashSensitiveDetector::~ExGflashSensitiveDetector ( )

Definition at line 55 of file ExGflashSensitiveDetector.cc.

56 {}

Member Function Documentation

void ExGflashSensitiveDetector::EndOfEvent ( G4HCofThisEvent )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 70 of file ExGflashSensitiveDetector.cc.

71 {}
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); }
63  fCaloHitsCollection=new
65  HCE->AddHitsCollection( fHCID, fCaloHitsCollection );
66 }
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:

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

Implements G4VSensitiveDetector.

Definition at line 75 of file ExGflashSensitiveDetector.cc.

76 {
78  if(e<=0.)return false;
79 
80  G4TouchableHistory* theTouchable
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)
G4VPhysicalVolume * GetVolume(G4int depth=0) const
G4int insert(T *aHit)
const G4VTouchable * GetTouchable() const
int G4int
Definition: G4Types.hh:78
void SetCrystalNum(G4int num)
Definition: ExGflashHit.hh:82
G4StepPoint * GetPreStepPoint() const
const G4ThreeVector & GetPosition() const
G4double GetTotalEnergyDeposit() const
double G4double
Definition: G4Types.hh:76
void SetEdep(G4double de)
Definition: ExGflashHit.hh:72
void SetPos(G4ThreeVector xyz)
Definition: ExGflashHit.hh:78

Here is the call graph for this function:

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)
G4TouchableHandle GetTouchableHandle() const
Definition: G4GFlashSpot.hh:62
const GFlashEnergySpot * GetEnergySpot() const
Definition: G4GFlashSpot.hh:58
G4int insert(T *aHit)
G4double GetEnergy() 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
double G4double
Definition: G4Types.hh:76
void SetEdep(G4double de)
Definition: ExGflashHit.hh:72
G4ThreeVector GetPosition() const
void SetPos(G4ThreeVector xyz)
Definition: ExGflashHit.hh:78

Here is the call graph for this function:


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