Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
ExGflashSensitiveDetector Class Reference

#include <ExGflashSensitiveDetector.hh>

Inheritance diagram for ExGflashSensitiveDetector:
G4VSensitiveDetector G4VGFlashSensitiveDetector

Public Member Functions

 ExGflashSensitiveDetector (G4String, ExGflashDetectorConstruction *det)
 
 ~ExGflashSensitiveDetector ()
 
void Initialize (G4HCofThisEvent *)
 
G4bool ProcessHits (G4Step *, G4TouchableHistory *)
 
G4bool ProcessHits (G4GFlashSpot *aSpot, G4TouchableHistory *)
 
void EndOfEvent (G4HCofThisEvent *)
 
- Public Member Functions inherited from G4VSensitiveDetector
 G4VSensitiveDetector (G4String name)
 
 G4VSensitiveDetector (const G4VSensitiveDetector &right)
 
virtual ~G4VSensitiveDetector ()
 
const 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 44 of file ExGflashSensitiveDetector.hh.

Constructor & Destructor Documentation

ExGflashSensitiveDetector::ExGflashSensitiveDetector ( G4String  name,
ExGflashDetectorConstruction det 
)

Definition at line 45 of file ExGflashSensitiveDetector.cc.

References G4VSensitiveDetector::collectionName, and G4CollectionNameVector::insert().

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

Definition at line 53 of file ExGflashSensitiveDetector.cc.

53 {}

Member Function Documentation

void ExGflashSensitiveDetector::EndOfEvent ( G4HCofThisEvent HCE)
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 63 of file ExGflashSensitiveDetector.cc.

64 {
65  if (HCE){;}
66  // No Hadronic
67  // cout<<"IEndOfEvent " << HCID << endl;
68 }
void ExGflashSensitiveDetector::Initialize ( G4HCofThisEvent HCE)
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 55 of file ExGflashSensitiveDetector.cc.

References G4HCofThisEvent::AddHitsCollection(), G4VSensitiveDetector::collectionName, G4VSensitiveDetector::GetCollectionID(), and G4VSensitiveDetector::SensitiveDetectorName.

56 {
57  if(HCID<0){ HCID = GetCollectionID(0); }
58  fCaloHitsCollection=new
60  HCE->AddHitsCollection( HCID, fCaloHitsCollection );
61 }
virtual G4int GetCollectionID(G4int i)
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
G4THitsCollection< ExGflashHit > ExGflashHitsCollection
Definition: ExGflashHit.hh:101
G4CollectionNameVector collectionName
G4bool ExGflashSensitiveDetector::ProcessHits ( G4Step aStep,
G4TouchableHistory ROhist 
)
virtual

Implements G4VSensitiveDetector.

Definition at line 70 of file ExGflashSensitiveDetector.cc.

References ExGflashDetectorConstruction::GetCristal(), G4StepPoint::GetPosition(), G4Step::GetPreStepPoint(), G4Step::GetTotalEnergyDeposit(), G4StepPoint::GetTouchable(), G4TouchableHistory::GetVolume(), G4THitsCollection< T >::insert(), ExGflashHit::SetCrystalNum(), ExGflashHit::SetEdep(), and ExGflashHit::SetPos().

71 {
73  if(e<=0.)return false;
74 
75  G4TouchableHistory* theTouchable
77 
78  // enrgy deposited -> make Hit
79  //const G4VPhysicalVolume* physVol= aStep->GetPreStepPoint()->GetPhysicalVolume();
80  //G4TouchableHistory* theTouchable =
81  // (G4TouchableHistory*)(aStep->GetPreStepPoint()->GetTouchable());
82  ExGflashHit* caloHit=new ExGflashHit();
83  caloHit->SetEdep(e);
84  caloHit->SetPos(aStep->GetPreStepPoint()->GetPosition());
85  fCaloHitsCollection->insert(caloHit);
86  if (ROhist){;}
87  G4VPhysicalVolume* physVol = theTouchable->GetVolume();
88  G4int crystalnum=0;
89  for(int i=0;i<100;i++) //@@@@@@@ ExGflashSensitiveDetector:vorsichty
90  {
91  if(physVol == fDetector->GetCristal(i)) crystalnum= i;
92  }
93  caloHit->SetCrystalNum(crystalnum);
94 
95  return true;
96 }
const G4VPhysicalVolume * GetCristal(int num__crystal)
G4VPhysicalVolume * GetVolume(G4int depth=0) const
const G4VTouchable * GetTouchable() const
int G4int
Definition: G4Types.hh:78
void SetCrystalNum(G4int num)
Definition: ExGflashHit.hh:83
G4StepPoint * GetPreStepPoint() const
const G4ThreeVector & GetPosition() const
G4double GetTotalEnergyDeposit() const
double G4double
Definition: G4Types.hh:76
void SetEdep(G4double de)
Definition: ExGflashHit.hh:73
void SetPos(G4ThreeVector xyz)
Definition: ExGflashHit.hh:79
G4bool ExGflashSensitiveDetector::ProcessHits ( G4GFlashSpot aSpot,
G4TouchableHistory ROhist 
)
virtual

Implements G4VGFlashSensitiveDetector.

Definition at line 99 of file ExGflashSensitiveDetector.cc.

References ExGflashDetectorConstruction::GetCristal(), GFlashEnergySpot::GetEnergy(), G4GFlashSpot::GetEnergySpot(), GFlashEnergySpot::GetPosition(), G4GFlashSpot::GetTouchableHandle(), G4VTouchable::GetVolume(), G4THitsCollection< T >::insert(), ExGflashHit::SetCrystalNum(), ExGflashHit::SetEdep(), and ExGflashHit::SetPos().

100 { //cout<<"This is ProcessHits GFLASH"<<endl;
101  G4double e=aSpot->GetEnergySpot()->GetEnergy();
102  if(e<=0.)return false;
103 
104  G4VPhysicalVolume* pCurrentVolume = aSpot->GetTouchableHandle()->GetVolume();
105 
106  ExGflashHit* caloHit=new ExGflashHit();
107  caloHit->SetEdep(e);
108  caloHit->SetPos(aSpot->GetEnergySpot()->GetPosition());
109  fCaloHitsCollection->insert(caloHit);
110  if (ROhist){;}
111  //cout <<pCurrentVolume->GetName() << endl;
112  G4int crystalnum=0;
113  for(int i=0;i<100;i++) //@@@@@@@ ExGflashSensitiveDetector:vorsichty
114  {
115  if(pCurrentVolume == fDetector->GetCristal(i)) crystalnum= i;
116  }
117  caloHit->SetCrystalNum(crystalnum);
118 
119  return true;
120 }
const G4VPhysicalVolume * GetCristal(int num__crystal)
G4TouchableHandle GetTouchableHandle() const
Definition: G4GFlashSpot.hh:62
const GFlashEnergySpot * GetEnergySpot() const
Definition: G4GFlashSpot.hh:58
G4double GetEnergy() const
int G4int
Definition: G4Types.hh:78
void SetCrystalNum(G4int num)
Definition: ExGflashHit.hh:83
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
Definition: G4VTouchable.cc:44
double G4double
Definition: G4Types.hh:76
void SetEdep(G4double de)
Definition: ExGflashHit.hh:73
G4ThreeVector GetPosition() const
void SetPos(G4ThreeVector xyz)
Definition: ExGflashHit.hh:79

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