CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
CMSHepEmTrackingManager Class Referencefinal

#include <CMSHepEmTrackingManager.h>

Inheritance diagram for CMSHepEmTrackingManager:

Public Member Functions

void BuildPhysicsTable (const G4ParticleDefinition &) override
 
 CMSHepEmTrackingManager (G4double highEnergyLimit)
 
void HandOverOneTrack (G4Track *aTrack) override
 
void PreparePhysicsTable (const G4ParticleDefinition &) override
 
 ~CMSHepEmTrackingManager () override
 

Private Attributes

G4double fHighEnergyLimit
 

Detailed Description

Definition at line 6 of file CMSHepEmTrackingManager.h.

Constructor & Destructor Documentation

◆ CMSHepEmTrackingManager()

CMSHepEmTrackingManager::CMSHepEmTrackingManager ( G4double  highEnergyLimit)

Definition at line 8 of file CMSHepEmTrackingManager.cc.

8 : fHighEnergyLimit(highEnergyLimit) {}

◆ ~CMSHepEmTrackingManager()

CMSHepEmTrackingManager::~CMSHepEmTrackingManager ( )
overridedefault

Member Function Documentation

◆ BuildPhysicsTable()

void CMSHepEmTrackingManager::BuildPhysicsTable ( const G4ParticleDefinition &  part)
override

Definition at line 12 of file CMSHepEmTrackingManager.cc.

References dqmiolumiharvest::j.

12  {
13  G4HepEmTrackingManager::BuildPhysicsTable(part);
14 
15  G4ProcessManager* pManager = part.GetProcessManager();
16  G4ProcessManager* pManagerShadow = part.GetMasterProcessManager();
17 
18  G4ProcessVector* pVector = pManager->GetProcessList();
19  for (std::size_t j = 0; j < pVector->size(); ++j) {
20  if (pManagerShadow == pManager) {
21  (*pVector)[j]->BuildPhysicsTable(part);
22  } else {
23  (*pVector)[j]->BuildWorkerPhysicsTable(part);
24  }
25  }
26 }
part
Definition: HCALResponse.h:20

◆ HandOverOneTrack()

void CMSHepEmTrackingManager::HandOverOneTrack ( G4Track *  aTrack)
override

Definition at line 44 of file CMSHepEmTrackingManager.cc.

References fHighEnergyLimit.

44  {
45  if (aTrack->GetKineticEnergy() < fHighEnergyLimit) {
46  // Fully track with G4HepEm.
47  G4HepEmTrackingManager::HandOverOneTrack(aTrack);
48  } else {
49  // Track with the Geant4 kernel and all registered processes.
50  G4EventManager* eventManager = G4EventManager::GetEventManager();
51  G4TrackingManager* trackManager = eventManager->GetTrackingManager();
52 
53  trackManager->ProcessOneTrack(aTrack);
54  if (aTrack->GetTrackStatus() != fStopAndKill) {
55  G4Exception("CMSHepEmTrackingManager::HandOverOneTrack", "NotStopped", FatalException, "track was not stopped");
56  }
57 
58  G4TrackVector* secondaries = trackManager->GimmeSecondaries();
59  eventManager->StackTracks(secondaries);
60  delete aTrack;
61  }
62 }

◆ PreparePhysicsTable()

void CMSHepEmTrackingManager::PreparePhysicsTable ( const G4ParticleDefinition &  part)
override

Definition at line 28 of file CMSHepEmTrackingManager.cc.

References dqmiolumiharvest::j.

28  {
29  G4HepEmTrackingManager::PreparePhysicsTable(part);
30 
31  G4ProcessManager* pManager = part.GetProcessManager();
32  G4ProcessManager* pManagerShadow = part.GetMasterProcessManager();
33 
34  G4ProcessVector* pVector = pManager->GetProcessList();
35  for (std::size_t j = 0; j < pVector->size(); ++j) {
36  if (pManagerShadow == pManager) {
37  (*pVector)[j]->PreparePhysicsTable(part);
38  } else {
39  (*pVector)[j]->PrepareWorkerPhysicsTable(part);
40  }
41  }
42 }
part
Definition: HCALResponse.h:20

Member Data Documentation

◆ fHighEnergyLimit

G4double CMSHepEmTrackingManager::fHighEnergyLimit
private

Definition at line 18 of file CMSHepEmTrackingManager.h.

Referenced by HandOverOneTrack().