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

#include <RE05MuonSD.hh>

Inheritance diagram for RE05MuonSD:
Collaboration diagram for RE05MuonSD:

Public Member Functions

 RE05MuonSD (G4String name)
 
virtual ~RE05MuonSD ()
 
virtual void Initialize (G4HCofThisEvent *HCE)
 
virtual G4bool ProcessHits (G4Step *aStep, G4TouchableHistory *ROhist)
 
virtual void EndOfEvent (G4HCofThisEvent *HCE)
 
virtual void clear ()
 
virtual void DrawAll ()
 
virtual 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 41 of file RE05MuonSD.hh.

Constructor & Destructor Documentation

RE05MuonSD::RE05MuonSD ( G4String  name)

Definition at line 43 of file RE05MuonSD.cc.

44 :G4VSensitiveDetector(name),
45  fMuonCollection(0), fPositionResolution(0.)
46 {
47  G4String HCname;
48  collectionName.insert(HCname="muonCollection");
49  fPositionResolution = 5*cm;
50 }
static constexpr double cm
Definition: G4SIunits.hh:119
G4VSensitiveDetector(G4String name)
G4CollectionNameVector collectionName

Here is the call graph for this function:

RE05MuonSD::~RE05MuonSD ( )
virtual

Definition at line 54 of file RE05MuonSD.cc.

55 {}

Member Function Documentation

void RE05MuonSD::clear ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 106 of file RE05MuonSD.cc.

107 {}
void RE05MuonSD::DrawAll ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 111 of file RE05MuonSD.cc.

112 {}
void RE05MuonSD::EndOfEvent ( G4HCofThisEvent HCE)
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 101 of file RE05MuonSD.cc.

102 {}
void RE05MuonSD::Initialize ( G4HCofThisEvent HCE)
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 59 of file RE05MuonSD.cc.

60 {
61  static int HCID = -1;
62  fMuonCollection = new RE05MuonHitsCollection
64  if(HCID<0)
65  { HCID = GetCollectionID(0); }
66  HCE->AddHitsCollection(HCID,fMuonCollection);
67 }
virtual G4int GetCollectionID(G4int i)
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)
G4THitsCollection< RE05MuonHit > RE05MuonHitsCollection
Definition: RE05MuonHit.hh:79
G4CollectionNameVector collectionName

Here is the call graph for this function:

void RE05MuonSD::PrintAll ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 116 of file RE05MuonSD.cc.

117 {}
G4bool RE05MuonSD::ProcessHits ( G4Step aStep,
G4TouchableHistory ROhist 
)
virtual

Implements G4VSensitiveDetector.

Definition at line 71 of file RE05MuonSD.cc.

72 {
73  G4double edep = aStep->GetTotalEnergyDeposit();
74 
75  if(edep==0.) return true;
76 
77  RE05MuonHit* aHit;
78  int nHit = fMuonCollection->entries();
79  G4ThreeVector hitpos = aStep->GetPreStepPoint()->GetPosition();
80  for(int i=0;i<nHit;i++)
81  {
82  aHit = (*fMuonCollection)[i];
83  G4ThreeVector pos = aHit->GetPos();
84  G4double dist2 = sqr(pos.x()-hitpos.x())
85  +sqr(pos.y()-hitpos.y())+sqr(pos.z()-hitpos.z());
86  if(dist2<=sqr(fPositionResolution))
87  aHit->AddEdep(edep);
88  return true;
89  }
90 
91  aHit = new RE05MuonHit();
92  aHit->SetEdep( edep );
93  aHit->SetPos( aStep->GetPreStepPoint()->GetPosition() );
94  fMuonCollection->insert( aHit );
95 
96  return true;
97 }
double x() const
G4int entries() const
G4int insert(T *aHit)
double z() const
G4StepPoint * GetPreStepPoint() const
const G4ThreeVector & GetPosition() const
void SetEdep(G4double de)
Definition: RE05MuonHit.hh:67
G4double GetTotalEnergyDeposit() const
void AddEdep(G4double de)
Definition: RE05MuonHit.hh:69
double y() const
G4ThreeVector GetPos()
Definition: RE05MuonHit.hh:75
T sqr(const T &x)
Definition: templates.hh:145
double G4double
Definition: G4Types.hh:76
void SetPos(G4ThreeVector xyz)
Definition: RE05MuonHit.hh:73
static const G4double pos

Here is the call graph for this function:


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