ATLAS Offline Software
PhysicsValidationUserActionTool.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 namespace G4UA
8 {
9 
10  namespace iGeant4
11  {
12 
14  PhysicsValidationUserActionTool(const std::string& type,
15  const std::string& name,
16  const IInterface* parent)
18  {
19  declareProperty("ValidationOutput",
21  "If turned on, write out a ROOT tree.");
22  declareProperty("ValidationStreamName",
24  "Name of the output stream");
25  declareProperty("THistService",
27  "The THistSvc");
28  declareProperty("GeoIDSvc" , m_config.geoIDSvc , "ISF GeoID Svc" );
29  declareProperty("ID_Rmax",m_config.idR);
30  declareProperty("ID_Zmax",m_config.idZ);
31  declareProperty("CaloRmean",m_config.caloRmean);
32  declareProperty("CaloZmean",m_config.caloZmean);
33  declareProperty("MuonRmean",m_config.muonRmean);
34  declareProperty("MuonZmean",m_config.muonZmean);
35  declareProperty("CavernRmean",m_config.cavernRmean);
36  declareProperty("CavernZmean",m_config.cavernZmean);
37  }
38 
39  std::unique_ptr<PhysicsValidationUserAction>
41  {
42  ATH_MSG_DEBUG("Constructing a PhysicsValidationUserAction");
44  else if(msgLvl(MSG::DEBUG)) { m_config.verboseLevel = MSG::DEBUG; }
45  else if(msgLvl(MSG::INFO)) { m_config.verboseLevel = MSG::INFO; }
46  else if(msgLvl(MSG::WARNING)) { m_config.verboseLevel = MSG::WARNING; }
47  else if(msgLvl(MSG::ERROR)) { m_config.verboseLevel = MSG::ERROR; }
48  else if(msgLvl(MSG::FATAL)) { m_config.verboseLevel = MSG::FATAL; }
49  auto action = std::make_unique<PhysicsValidationUserAction>(m_config);
50  actionList.runActions.push_back( action.get() );
51  actionList.eventActions.push_back( action.get() );
52  actionList.trackingActions.push_back( action.get() );
53  actionList.steppingActions.push_back( action.get() );
54  return action;
55  }
56 
57  } // iGeant4
58 
59 } // namespace G4UA
G4UA::iGeant4::PhysicsValidationUserAction::Config::muonZmean
double muonZmean
Definition: PhysicsValidationUserAction.h:52
G4UA::G4AtlasUserActions
Struct for passing around user actions.
Definition: IUserActionTool.h:32
PhysicsValidationUserActionTool.h
G4UA::iGeant4::PhysicsValidationUserActionTool::makeAndFillAction
virtual std::unique_ptr< PhysicsValidationUserAction > makeAndFillAction(G4AtlasUserActions &) override final
Create an action for this thread.
Definition: PhysicsValidationUserActionTool.cxx:40
python.Constants.FATAL
int FATAL
Definition: Control/AthenaCommon/python/Constants.py:19
G4UA
for nSW
Definition: CalibrationDefaultProcessing.h:19
G4UA::iGeant4::PhysicsValidationUserAction::Config::thistSvc
ServiceHandle< ITHistSvc > thistSvc
Definition: PhysicsValidationUserAction.h:43
G4UA::G4AtlasUserActions::trackingActions
std::vector< G4UserTrackingAction * > trackingActions
Definition: IUserActionTool.h:35
G4UA::iGeant4::PhysicsValidationUserAction::Config::validationOutput
bool validationOutput
Definition: PhysicsValidationUserAction.h:41
G4UA::iGeant4::PhysicsValidationUserAction
Definition: PhysicsValidationUserAction.h:34
G4UA::iGeant4::PhysicsValidationUserAction::Config::cavernZmean
double cavernZmean
Definition: PhysicsValidationUserAction.h:54
G4UA::iGeant4::PhysicsValidationUserAction::Config::muonRmean
double muonRmean
Definition: PhysicsValidationUserAction.h:51
G4UA::iGeant4::PhysicsValidationUserAction::Config::caloRmean
double caloRmean
Definition: PhysicsValidationUserAction.h:49
G4UA::iGeant4::PhysicsValidationUserActionTool::PhysicsValidationUserActionTool
PhysicsValidationUserActionTool(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
Definition: PhysicsValidationUserActionTool.cxx:14
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
test_pyathena.parent
parent
Definition: test_pyathena.py:15
G4UA::iGeant4::PhysicsValidationUserActionTool::m_config
PhysicsValidationUserAction::Config m_config
Configuration parameters.
Definition: PhysicsValidationUserActionTool.h:37
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
G4UA::G4AtlasUserActions::runActions
std::vector< G4UserRunAction * > runActions
Definition: IUserActionTool.h:33
G4UA::UserActionToolBase
abstract template utility base-class for G4 user-action tools.
Definition: UserActionToolBase.h:33
G4UA::iGeant4::PhysicsValidationUserAction::Config::validationStream
std::string validationStream
Definition: PhysicsValidationUserAction.h:42
G4UA::iGeant4::PhysicsValidationUserAction::Config::cavernRmean
double cavernRmean
Definition: PhysicsValidationUserAction.h:53
python.CaloScaleNoiseConfig.action
action
Definition: CaloScaleNoiseConfig.py:77
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
DEBUG
#define DEBUG
Definition: page_access.h:11
G4UA::iGeant4::PhysicsValidationUserAction::Config::idR
double idR
Definition: PhysicsValidationUserAction.h:47
G4UA::G4AtlasUserActions::eventActions
std::vector< G4UserEventAction * > eventActions
Definition: IUserActionTool.h:34
python.Constants.VERBOSE
int VERBOSE
Definition: Control/AthenaCommon/python/Constants.py:14
G4UA::iGeant4::PhysicsValidationUserAction::Config::idZ
double idZ
Definition: PhysicsValidationUserAction.h:48
G4UA::iGeant4::PhysicsValidationUserAction::Config::caloZmean
double caloZmean
Definition: PhysicsValidationUserAction.h:50
G4UA::iGeant4::PhysicsValidationUserAction::Config::geoIDSvc
ServiceHandle< ISF::IGeoIDSvc > geoIDSvc
Definition: PhysicsValidationUserAction.h:44
G4UA::G4AtlasUserActions::steppingActions
std::vector< G4UserSteppingAction * > steppingActions
Definition: IUserActionTool.h:36
G4UA::iGeant4::PhysicsValidationUserAction::Config::verboseLevel
MSG::Level verboseLevel
Definition: PhysicsValidationUserAction.h:40
iGeant4
Definition: Geant4TruthIncident.h:35