Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
RE05CalorimeterSD Class Reference

#include <Doxymodules_runAndEvent.h>

Inheritance diagram for RE05CalorimeterSD:
G4VSensitiveDetector

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 ()
 

Private Attributes

RE05CalorimeterHitsCollectionfCalCollection
 
G4int fCellID [20][48]
 
const G4int fNumberOfCellsInZ
 
const G4int fNumberOfCellsInPhi
 

Detailed Description

Definition at line 106 of file Doxymodules_runAndEvent.h.

Constructor & Destructor Documentation

◆ RE05CalorimeterSD()

RE05CalorimeterSD::RE05CalorimeterSD ( G4String  name)

Definition at line 45 of file RE05CalorimeterSD.cc.

48{
49 G4String HCname;
50 collectionName.insert(HCname="calCollection");
51}
const G4int fNumberOfCellsInZ
const G4int fNumberOfCellsInPhi

◆ ~RE05CalorimeterSD()

RE05CalorimeterSD::~RE05CalorimeterSD ( )
virtual

Definition at line 55 of file RE05CalorimeterSD.cc.

56{}

Member Function Documentation

◆ Initialize()

void RE05CalorimeterSD::Initialize ( G4HCofThisEvent HCE)
virtual

Definition at line 60 of file RE05CalorimeterSD.cc.

61{
63 (SensitiveDetectorName,collectionName[0]);
64 for(G4int j=0;j<fNumberOfCellsInZ;j++)
65 for(G4int k=0;k<fNumberOfCellsInPhi;k++)
66 {
67 fCellID[j][k] = -1;
68 }
69 verboseLevel = 0;
70}
G4THitsCollection< RE05CalorimeterHit > RE05CalorimeterHitsCollection
RE05CalorimeterHitsCollection * fCalCollection

◆ ProcessHits()

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

Definition at line 74 of file RE05CalorimeterSD.cc.

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

◆ EndOfEvent()

void RE05CalorimeterSD::EndOfEvent ( G4HCofThisEvent HCE)
virtual

Definition at line 118 of file RE05CalorimeterSD.cc.

119{
120 static G4int HCID = -1;
121 if(HCID<0)
122 { HCID = GetCollectionID(0); }
123 HCE->AddHitsCollection( HCID, fCalCollection );
124}

◆ clear()

void RE05CalorimeterSD::clear ( )
virtual

Definition at line 128 of file RE05CalorimeterSD.cc.

129{}

◆ DrawAll()

void RE05CalorimeterSD::DrawAll ( )
virtual

Definition at line 133 of file RE05CalorimeterSD.cc.

134{}

◆ PrintAll()

void RE05CalorimeterSD::PrintAll ( )
virtual

Definition at line 138 of file RE05CalorimeterSD.cc.

139{}

Member Data Documentation

◆ fCalCollection

RE05CalorimeterHitsCollection* RE05CalorimeterSD::fCalCollection
private

Definition at line 54 of file RE05CalorimeterSD.hh.

◆ fCellID

G4int RE05CalorimeterSD::fCellID[20][48]
private

Definition at line 55 of file RE05CalorimeterSD.hh.

◆ fNumberOfCellsInZ

const G4int RE05CalorimeterSD::fNumberOfCellsInZ
private

Definition at line 56 of file RE05CalorimeterSD.hh.

◆ fNumberOfCellsInPhi

const G4int RE05CalorimeterSD::fNumberOfCellsInPhi
private

Definition at line 57 of file RE05CalorimeterSD.hh.


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

Applications | User Support | Publications | Collaboration