ATLAS Offline Software
Public Member Functions | Protected Attributes | List of all members
TRTPhysicsTool Class Referencefinal

#include "TRT:TR_Process/TRTPhysicsTool.h"

Inheritance diagram for TRTPhysicsTool:
Collaboration diagram for TRTPhysicsTool:

Public Member Functions

 TRTPhysicsTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor. More...
 
virtual ~TRTPhysicsTool ()
 
virtual StatusCode initialize () override
 Destructor. More...
 
virtual void ConstructParticle () override
 
virtual void ConstructProcess () override
 
virtual G4VPhysicsConstructor * GetPhysicsOption () override
 IPhysicsOptionTool method; simply returns self. More...
 

Protected Attributes

std::string m_xmlFile
 

Detailed Description

Author
Edoardo Farina
Date
18-05-2015

Definition at line 26 of file TRTPhysicsTool.h.

Constructor & Destructor Documentation

◆ TRTPhysicsTool()

TRTPhysicsTool::TRTPhysicsTool ( const std::string &  type,
const std::string &  name,
const IInterface *  parent 
)

Standard constructor.

Definition at line 35 of file TRTPhysicsTool.cxx.

37  : G4VPhysicsConstructor(nam), base_class ( type, nam , parent )
38 {
39  m_physicsOptionType = G4AtlasPhysicsOption::Type::GlobalProcesses;
40 
41  declareProperty("XMLFile", m_xmlFile="TRgeomodelgeometry.xml");
42 }

◆ ~TRTPhysicsTool()

virtual TRTPhysicsTool::~TRTPhysicsTool ( )
inlinevirtual

Definition at line 33 of file TRTPhysicsTool.h.

33 {};

Member Function Documentation

◆ ConstructParticle()

void TRTPhysicsTool::ConstructParticle ( )
overridevirtual

Definition at line 66 of file TRTPhysicsTool.cxx.

67 {
68 }

◆ ConstructProcess()

void TRTPhysicsTool::ConstructProcess ( )
overridevirtual

Definition at line 73 of file TRTPhysicsTool.cxx.

74 {
75  ATH_MSG_DEBUG("TRTPhysicsTool::ConstructProcess() - start");
76 
77  // Use the Geant4 garbage collection mechanism to clean this up.
78  // It's just a convenient way to clean up in multi-threading.
79  auto trProc = new TRTTransitionRadiation("XTR", m_xmlFile) ;
80  G4AutoDelete::Register(trProc);
81 
82  PARTICLEITERATOR->reset();
83  while( (*PARTICLEITERATOR)() ) {
84  G4ParticleDefinition* particle = PARTICLEITERATOR->value();
85  G4ProcessManager* pmanager = particle->GetProcessManager();
86  if ( particle->GetPDGCharge() != 0.0 && particle->GetPDGMass() != 0.0 ) {
87  trProc->SetVerboseLevel(1);
88  ATH_MSG_DEBUG("TRT Process Added to "<<particle->GetParticleName());
89  pmanager->AddDiscreteProcess(trProc);
90  }
91  }
92  ATH_MSG_DEBUG("TRTPhysicsTool::ConstructProcess() - end");
93 }

◆ GetPhysicsOption()

G4VPhysicsConstructor * TRTPhysicsTool::GetPhysicsOption ( )
overridevirtual

IPhysicsOptionTool method; simply returns self.

Definition at line 57 of file TRTPhysicsTool.cxx.

58 {
59  // I am the physics constructor, so return self.
60  return this;
61 }

◆ initialize()

StatusCode TRTPhysicsTool::initialize ( )
overridevirtual

Destructor.

Initialize method

Definition at line 47 of file TRTPhysicsTool.cxx.

48 {
49  ATH_MSG_DEBUG("TRTPhysicsTool initialize()");
50  this->SetPhysicsName(name());
51  return StatusCode::SUCCESS;
52 }

Member Data Documentation

◆ m_xmlFile

std::string TRTPhysicsTool::m_xmlFile
protected

Definition at line 45 of file TRTPhysicsTool.h.


The documentation for this class was generated from the following files:
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
TRTTransitionRadiation
Definition: TRTTransitionRadiation.h:24
TRTPhysicsTool::m_xmlFile
std::string m_xmlFile
Definition: TRTPhysicsTool.h:45
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
G4AtlasPhysicsOption::GlobalProcesses
@ GlobalProcesses
Definition: IPhysicsOptionTool.h:25
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
declareProperty
#define declareProperty(n, p, h)
Definition: BaseFakeBkgTool.cxx:15
PARTICLEITERATOR
#define PARTICLEITERATOR
Definition: TRTPhysicsTool.cxx:28