ATLAS Offline Software
Public Member Functions | Private Attributes | List of all members
QuirksPhysicsTool Class Reference

#include <QuirkPhysicsTool.h>

Inheritance diagram for QuirksPhysicsTool:
Collaboration diagram for QuirksPhysicsTool:

Public Member Functions

 QuirksPhysicsTool (const std::string &type, const std::string &name, const IInterface *parent)
 Standard constructor. More...
 
virtual ~QuirksPhysicsTool ()
 Destructor. More...
 
virtual StatusCode initialize () override final
 Initialize method. More...
 
virtual void ConstructParticle () override final
 
virtual void ConstructProcess () override final
 
virtual QuirksPhysicsToolGetPhysicsOption () override final
 

Private Attributes

G4double m_mass
 
G4double m_charge
 
G4int m_pdgid
 
G4double m_stringForce
 
G4double m_firstStringLength
 
G4double m_maxBoost
 
G4double m_maxMergeT
 
G4double m_maxMergeMag
 
G4int m_enableDebug
 
G4double m_debugStep
 
G4int m_numDebugSteps
 

Detailed Description

Tool for the concrete implementation of a Physics List selection class

Author
Edoardo Farina
Date
15-05-2015

Definition at line 20 of file QuirkPhysicsTool.h.

Constructor & Destructor Documentation

◆ QuirksPhysicsTool()

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

Standard constructor.

Definition at line 49 of file QuirkPhysicsTool.cxx.

51  : base_class ( type, nam , parent )
52 {
53  m_physicsOptionType = G4AtlasPhysicsOption::Type::BSMPhysics;
54  std::ifstream f;
55  f.open("quirks_setup.txt");
56  f >> m_mass; m_mass *= CLHEP::MeV;
58  f >> m_pdgid;
61  f >> m_maxBoost;
64  f >> m_enableDebug;
65  if (m_enableDebug) {
67  f >> m_numDebugSteps;
68  }
69  f.close();
70 }

◆ ~QuirksPhysicsTool()

QuirksPhysicsTool::~QuirksPhysicsTool ( )
virtual

Destructor.

Definition at line 76 of file QuirkPhysicsTool.cxx.

77 {
78 
79 }

Member Function Documentation

◆ ConstructParticle()

void QuirksPhysicsTool::ConstructParticle ( )
finaloverridevirtual

Definition at line 97 of file QuirkPhysicsTool.cxx.

98 {
99  ATH_MSG_DEBUG("ConstructParticle for the Quirks being run");
100 
101  Quirk* q1 = new Quirk(
102  /*name*/ "quirk+", m_mass, /*width*/ 0.0, +m_charge,
103  /*2*spin*/ 1, /*parity*/ 0, /*C-conjugation*/ 0,
104  /*2*Isospin*/ 0, /*2*Isospin3*/ 0, /*G-parity*/ 0,
105  /*type*/ "lepton", /*lepton number*/ +1, /*baryon number*/ 0, +m_pdgid,
106  /*stable*/ true, /*lifetime*/ -1.0, /*decay table*/ 0,
107  /*shortlived*/ false
108  );
109  new Quirk(
110  /*name*/ "quirk-", m_mass, /*width*/ 0.0, -m_charge,
111  /*2*spin*/ 1, /*parity*/ 0, /*C-conjugation*/ 0,
112  /*2*Isospin*/ 0, /*2*Isospin3*/ 0, /*G-parity*/ 0,
113  /*type*/ "lepton", /*lepton number*/ -1, /*baryon number*/ 0, -m_pdgid,
114  /*stable*/ true, /*lifetime*/ -1.0, /*decay table*/ 0,
115  /*shortlived*/ false
116  );
117 
118  InfracolorForce& s = q1->GetStringIn();
119  s.SetStringForce(m_stringForce);
120  s.SetFirstStringLength(m_firstStringLength);
121  s.SetMaxBoost(m_maxBoost);
122  s.SetMaxMergeT(m_maxMergeT);
123  s.SetMaxMergeMag(m_maxMergeMag);
124 }

◆ ConstructProcess()

void QuirksPhysicsTool::ConstructProcess ( )
finaloverridevirtual

Definition at line 126 of file QuirkPhysicsTool.cxx.

127 {
128  ATH_MSG_DEBUG(" ConstructProcess for Quirks being run");
129  PARTICLEITERATOR->reset();
130  while( (*PARTICLEITERATOR)() ){
131  G4ParticleDefinition* particle = PARTICLEITERATOR->value();
132  if (dynamic_cast<Quirk*>(particle) != 0) {
133  G4ProcessManager* pmanager = particle->GetProcessManager();
134  //G4cout << "# processes = " << pmanager->GetProcessListLength() << G4endl;
135  //for (int i = 0; i < pmanager->GetProcessList()->size(); i++) {
136  // G4cout << "process i: " << (*pmanager->GetProcessList())[i]->GetProcessName() << G4endl;
137  //}
138  while (pmanager->GetProcessListLength() != 0) pmanager->RemoveProcess(0);
139  G4VProcess* aTransportation = new QuirkTransportation;
140  pmanager->AddProcess(aTransportation);
141  pmanager->SetProcessOrderingToFirst(aTransportation, idxAlongStep);
142  pmanager->SetProcessOrderingToFirst(aTransportation, idxPostStep);
143  pmanager->AddProcess(new G4hMultipleScattering,-1, 1, 1);
144  pmanager->AddProcess(new G4hIonisation, -1, 2, 2);
145  pmanager->AddProcess(new G4hBremsstrahlung, -1, 3, 3);
146  pmanager->AddProcess(new G4hPairProduction, -1, 4, 4);
147  //pmanager->AddProcess(new TestProcess, -1, 1, 1);
148  pmanager->AddProcess(new QuirkWatcher, -1,-1, 5);
149  //G4cout << "# processes = " << pmanager->GetProcessListLength() << G4endl;
150  //for (int i = 0; i < pmanager->GetProcessList()->size(); i++) {
151  // G4cout << "process i: " << (*pmanager->GetProcessList())[i]->GetProcessName() << G4endl;
152  //}
153  }
154  }
155  G4RunManager* runManager = G4RunManager::GetRunManager();
156  runManager->SetNumberOfAdditionalWaitingStacks(1);
157  G4UserStackingAction* defaultStackingAction = G4EventManager::GetEventManager()->GetUserStackingAction();
158  ATH_MSG_WARNING("This tool is interfering with the normal G4Atlas workflow, by forcing a differentcustom StackingAction instead of the default one. This is acceptable only as a temporary solution, and should be fixed asap.");
159  runManager->SetUserAction(new QuirkStackingAction(defaultStackingAction));
160 
161  // ADS this must be done on the python side
162  //f (m_enableDebug) {
163  // DebugSteppingAction* debugger = new DebugSteppingAction(m_debugStep, m_numDebugSteps);
164  //#//f QUIRKS_STANDALONE
165  // runManager->SetUserAction(debugger);
166  //#//
167  // FADS::FadsSteppingAction::GetSteppingAction()->RegisterAction(debugger);
168  //#//f
169  //
170 }

◆ GetPhysicsOption()

QuirksPhysicsTool * QuirksPhysicsTool::GetPhysicsOption ( )
finaloverridevirtual

Definition at line 92 of file QuirkPhysicsTool.cxx.

93 {
94  return this;
95 }

◆ initialize()

StatusCode QuirksPhysicsTool::initialize ( )
finaloverridevirtual

Initialize method.

Definition at line 84 of file QuirkPhysicsTool.cxx.

85 {
86  ATH_MSG_DEBUG("QuirksPhysicsTool initialize( )");
87  this->SetPhysicsName(name());
88  return StatusCode::SUCCESS;
89 }

Member Data Documentation

◆ m_charge

G4double QuirksPhysicsTool::m_charge
private

Definition at line 38 of file QuirkPhysicsTool.h.

◆ m_debugStep

G4double QuirksPhysicsTool::m_debugStep
private

Definition at line 46 of file QuirkPhysicsTool.h.

◆ m_enableDebug

G4int QuirksPhysicsTool::m_enableDebug
private

Definition at line 45 of file QuirkPhysicsTool.h.

◆ m_firstStringLength

G4double QuirksPhysicsTool::m_firstStringLength
private

Definition at line 41 of file QuirkPhysicsTool.h.

◆ m_mass

G4double QuirksPhysicsTool::m_mass
private

Definition at line 37 of file QuirkPhysicsTool.h.

◆ m_maxBoost

G4double QuirksPhysicsTool::m_maxBoost
private

Definition at line 42 of file QuirkPhysicsTool.h.

◆ m_maxMergeMag

G4double QuirksPhysicsTool::m_maxMergeMag
private

Definition at line 44 of file QuirkPhysicsTool.h.

◆ m_maxMergeT

G4double QuirksPhysicsTool::m_maxMergeT
private

Definition at line 43 of file QuirkPhysicsTool.h.

◆ m_numDebugSteps

G4int QuirksPhysicsTool::m_numDebugSteps
private

Definition at line 47 of file QuirkPhysicsTool.h.

◆ m_pdgid

G4int QuirksPhysicsTool::m_pdgid
private

Definition at line 39 of file QuirkPhysicsTool.h.

◆ m_stringForce

G4double QuirksPhysicsTool::m_stringForce
private

Definition at line 40 of file QuirkPhysicsTool.h.


The documentation for this class was generated from the following files:
PARTICLEITERATOR
#define PARTICLEITERATOR
Definition: QuirkPhysicsTool.cxx:43
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
Trk::ParticleSwitcher::particle
constexpr ParticleHypothesis particle[PARTICLEHYPOTHESES]
the array of masses
Definition: ParticleHypothesis.h:76
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
QuirkTransportation
Definition: QuirkTransportation.h:60
QuirksPhysicsTool::m_pdgid
G4int m_pdgid
Definition: QuirkPhysicsTool.h:39
python.SystemOfUnits.MeV
int MeV
Definition: SystemOfUnits.py:154
QuirksPhysicsTool::m_numDebugSteps
G4int m_numDebugSteps
Definition: QuirkPhysicsTool.h:47
Quirk::GetStringIn
const InfracolorForce & GetStringIn() const
Definition: Quirk.h:29
QuirksPhysicsTool::m_debugStep
G4double m_debugStep
Definition: QuirkPhysicsTool.h:46
QuirkWatcher
Definition: QuirkWatcher.h:11
QuirksPhysicsTool::m_firstStringLength
G4double m_firstStringLength
Definition: QuirkPhysicsTool.h:41
QuirksPhysicsTool::m_maxMergeT
G4double m_maxMergeT
Definition: QuirkPhysicsTool.h:43
Quirk
Definition: Quirk.h:12
InfracolorForce
Definition: InfracolorForce.h:14
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
QuirksPhysicsTool::m_enableDebug
G4int m_enableDebug
Definition: QuirkPhysicsTool.h:45
QuirksPhysicsTool::m_charge
G4double m_charge
Definition: QuirkPhysicsTool.h:38
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
QuirksPhysicsTool::m_mass
G4double m_mass
Definition: QuirkPhysicsTool.h:37
python.SystemOfUnits.mm
int mm
Definition: SystemOfUnits.py:83
QuirksPhysicsTool::m_stringForce
G4double m_stringForce
Definition: QuirkPhysicsTool.h:40
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
QuirksPhysicsTool::m_maxMergeMag
G4double m_maxMergeMag
Definition: QuirkPhysicsTool.h:44
QuirkStackingAction
Definition: QuirkStackingAction.h:11
python.SystemOfUnits.eplus
int eplus
Definition: SystemOfUnits.py:137
QuirksPhysicsTool::m_maxBoost
G4double m_maxBoost
Definition: QuirkPhysicsTool.h:42
G4AtlasPhysicsOption::BSMPhysics
@ BSMPhysics
Definition: IPhysicsOptionTool.h:22