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

#include <RE05CalorimeterSD.hh>

Inheritance diagram for RE05CalorimeterSD:
Collaboration diagram for RE05CalorimeterSD:

Public Member Functions

 RE05CalorimeterSD (G4String name)
 
virtual ~RE05CalorimeterSD ()
 
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 RE05CalorimeterSD.hh.

Constructor & Destructor Documentation

RE05CalorimeterSD::RE05CalorimeterSD ( G4String  name)

Definition at line 46 of file RE05CalorimeterSD.cc.

48  fNumberOfCellsInZ(20),fNumberOfCellsInPhi(48)
49 {
50  G4String HCname;
51  collectionName.insert(HCname="calCollection");
52 }
G4VSensitiveDetector(G4String name)
G4CollectionNameVector collectionName

Here is the call graph for this function:

RE05CalorimeterSD::~RE05CalorimeterSD ( )
virtual

Definition at line 56 of file RE05CalorimeterSD.cc.

57 {}

Member Function Documentation

void RE05CalorimeterSD::clear ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 129 of file RE05CalorimeterSD.cc.

130 {}
void RE05CalorimeterSD::DrawAll ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 134 of file RE05CalorimeterSD.cc.

135 {}
void RE05CalorimeterSD::EndOfEvent ( G4HCofThisEvent HCE)
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 119 of file RE05CalorimeterSD.cc.

120 {
121  static G4int HCID = -1;
122  if(HCID<0)
123  { HCID = GetCollectionID(0); }
124  HCE->AddHitsCollection( HCID, fCalCollection );
125 }
int G4int
Definition: G4Types.hh:78
virtual G4int GetCollectionID(G4int i)
void AddHitsCollection(G4int HCID, G4VHitsCollection *aHC)

Here is the call graph for this function:

void RE05CalorimeterSD::Initialize ( G4HCofThisEvent HCE)
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 61 of file RE05CalorimeterSD.cc.

62 {
63  fCalCollection = new RE05CalorimeterHitsCollection
65  for(G4int j=0;j<fNumberOfCellsInZ;j++)
66  for(G4int k=0;k<fNumberOfCellsInPhi;k++)
67  {
68  fCellID[j][k] = -1;
69  }
70  verboseLevel = 0;
71 }
G4THitsCollection< RE05CalorimeterHit > RE05CalorimeterHitsCollection
int G4int
Definition: G4Types.hh:78
G4CollectionNameVector collectionName
void RE05CalorimeterSD::PrintAll ( void  )
virtual

Reimplemented from G4VSensitiveDetector.

Definition at line 139 of file RE05CalorimeterSD.cc.

140 {}
G4bool RE05CalorimeterSD::ProcessHits ( G4Step aStep,
G4TouchableHistory ROhist 
)
virtual

Implements G4VSensitiveDetector.

Definition at line 75 of file RE05CalorimeterSD.cc.

76 {
77 //***** RE05CalorimeterSD has been migrated to Geant4 version 10 that does not
78 //***** support Readout Geometry in multi-threaded mode. Now RE05CalorimeterSD
79 //***** is assigned to a dedicated parallel world. The pointer "aStep" points to
80 //***** a G4Step object for the parallel world.
81 
82  G4double edep = aStep->GetTotalEnergyDeposit();
83  if(verboseLevel>1) G4cout << "Next step edep(MeV) = " << edep/MeV << G4endl;
84  if(edep==0.) return false;
85 
86  const G4VTouchable* touchable = aStep->GetPreStepPoint()->GetTouchable();
87  G4int copyIDinZ = touchable->GetReplicaNumber(0);
88  G4int copyIDinPhi = touchable->GetReplicaNumber(1);
89 
90  if(fCellID[copyIDinZ][copyIDinPhi]==-1)
91  {
92  RE05CalorimeterHit* calHit
93  = new RE05CalorimeterHit
94  (touchable->GetVolume()->GetLogicalVolume(),copyIDinZ,copyIDinPhi);
95  calHit->SetEdep( edep );
96  G4AffineTransform aTrans = touchable->GetHistory()->GetTopTransform();
97  aTrans.Invert();
98  calHit->SetPos(aTrans.NetTranslation());
99  calHit->SetRot(aTrans.NetRotation());
100  G4int icell = fCalCollection->insert( calHit );
101  fCellID[copyIDinZ][copyIDinPhi] = icell - 1;
102  if(verboseLevel>0)
103  { G4cout << " New Calorimeter Hit on fCellID "
104  << copyIDinZ << " " << copyIDinPhi << G4endl; }
105  }
106  else
107  {
108  (*fCalCollection)[fCellID[copyIDinZ][copyIDinPhi]]->AddEdep(edep);
109  if(verboseLevel>0)
110  { G4cout << " Energy added to fCellID "
111  << copyIDinZ << " " << copyIDinPhi << G4endl; }
112  }
113 
114  return true;
115 }
void SetRot(G4RotationMatrix rmat)
G4ThreeVector NetTranslation() const
virtual const G4NavigationHistory * GetHistory() const
Definition: G4VTouchable.cc:86
G4int insert(T *aHit)
const G4VTouchable * GetTouchable() const
void SetEdep(G4double de)
int G4int
Definition: G4Types.hh:78
G4StepPoint * GetPreStepPoint() const
G4AffineTransform & Invert()
G4GLOB_DLL std::ostream G4cout
void SetPos(G4ThreeVector xyz)
G4double GetTotalEnergyDeposit() const
G4RotationMatrix NetRotation() const
G4LogicalVolume * GetLogicalVolume() const
virtual G4VPhysicalVolume * GetVolume(G4int depth=0) const
Definition: G4VTouchable.cc:44
virtual G4int GetReplicaNumber(G4int depth=0) const
Definition: G4VTouchable.cc:58
#define G4endl
Definition: G4ios.hh:61
static constexpr double MeV
Definition: G4SIunits.hh:214
const G4AffineTransform & GetTopTransform() const
double G4double
Definition: G4Types.hh:76

Here is the call graph for this function:


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