ATLAS Offline Software
Functions
G4AtlasAlg.cxx File Reference
#include "G4AtlasAlg.h"
#include "G4AtlasFluxRecorder.h"
#include "G4AtlasAlg/G4AtlasActionInitialization.h"
#include "AthenaKernel/RNGWrapper.h"
#include "CxxUtils/checker_macros.h"
#include "G4AtlasAlg/G4AtlasMTRunManager.h"
#include "G4AtlasAlg/G4AtlasWorkerRunManager.h"
#include "G4AtlasAlg/G4AtlasUserWorkerThreadInitialization.h"
#include "G4AtlasAlg/G4AtlasRunManager.h"
#include "G4StateManager.hh"
#include "G4TransportationManager.hh"
#include "G4RunManagerKernel.hh"
#include "G4EventManager.hh"
#include "G4Navigator.hh"
#include "G4PropagatorInField.hh"
#include "G4TrackingManager.hh"
#include "G4StackManager.hh"
#include "G4UImanager.hh"
#include "G4ScoringManager.hh"
#include "G4VUserPhysicsList.hh"
#include "G4VModularPhysicsList.hh"
#include "G4ParallelWorldPhysics.hh"
#include "G4GDMLParser.hh"
#include "CLHEP/Random/RandomEngine.h"
#include "StoreGate/ReadHandle.h"
#include "StoreGate/WriteHandle.h"
#include "MCTruthBase/TruthStrategyManager.h"
#include "GeoModelInterfaces/IGeoModelSvc.h"
#include "GaudiKernel/IThreadInitTool.h"
#include "GeneratorObjects/HepMcParticleLink.h"
#include "PathResolver/PathResolver.h"
#include <mutex>

Go to the source code of this file.

Functions

StatusCode G4AtlasAlg::initialize ATLAS_NOT_THREAD_SAFE ()
 Install fatal handler with default options. More...
 

Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

StatusCode G4AtlasAlg::initialize ATLAS_NOT_THREAD_SAFE ( )
inline

Install fatal handler with default options.

This is meant to be easy to call from python via ctypes.

Install fatal handler with default options.

getLorentzAngle() Read LorentzAngle from HIST and write out into local DB

getBSErrors() Read BSErrors from Monitoring HIST and write out into local DB

getEfficiency() Read Efficiency from Monitoring HIST and write out into local DB

getRawOccupancy() Read RawOccupancy from Monitoring HIST and write out into local DB

getNoiseOccupancy() Read NoiseOccupancy from HIST and write out into local DB

getNoisyStrip() Find noisy strips from hitmaps and write out into xml/db formats

beginning of the loop of channels

bad bit newly found

known bad bit

for low noisy cells

for high noisy cells

0.01 is used to scale "PER" to the same order of magnitude to "SIG"

smaller deviation: distorted

checking TmaxAmp, Not mixed with MaxAmp and Width

channel information output

Only dead or distorted, or short known BCs are considered below.

index of bc

Definition at line 67 of file G4AtlasAlg.cxx.

68 {
69  ATH_MSG_DEBUG("Start of initialize()");
70 
71  // Read the simplified geometry for FastCaloSim track transportation if requested
72  if(!m_simplifiedGeoPath.empty()) {
73  std::string geoFile = PathResolverFindCalibFile(m_simplifiedGeoPath);
74 
75  if (geoFile.empty()) {
76  ATH_MSG_FATAL("Could not find simplified geometry file: " << m_simplifiedGeoPath);
77  return StatusCode::FAILURE;
78  }
79 
80  G4GDMLParser parser;
81  parser.Read(geoFile, false);
82  }
83 
84  // Create the scoring manager if requested
85  if (m_recordFlux) G4ScoringManager::GetScoringManager();
86 
87  ATH_CHECK( m_userActionSvc.retrieve() );
88 
89  // One-time initialization
90  try {
91  std::call_once(initializeOnceFlag, &G4AtlasAlg::initializeOnce, this);
92  }
93  catch(const std::exception& e) {
94  ATH_MSG_ERROR("Failure in G4AtlasAlg::initializeOnce: " << e.what());
95  return StatusCode::FAILURE;
96  }
97 
98  ATH_CHECK( m_rndmGenSvc.retrieve() );
99  ATH_CHECK(m_actionTools.retrieve());
100 
101  ATH_CHECK(m_senDetTool.retrieve());
102  ATH_CHECK(m_fastSimTool.retrieve());
103 
104  // Truth
105  ATH_CHECK( m_truthRecordSvc.retrieve() );
106  ATH_MSG_INFO( "- Using ISF TruthRecordSvc : " << m_truthRecordSvc.typeAndName() );
107  ATH_CHECK( m_geoIDSvc.retrieve() );
108  ATH_MSG_INFO( "- Using ISF GeoIDSvc : " << m_geoIDSvc.typeAndName() );
109 
110  TruthStrategyManager& sManager = TruthStrategyManager::GetStrategyManager_nc();
111  sManager.SetISFTruthSvc( &(*m_truthRecordSvc) );
112  sManager.SetISFGeoIDSvc( &(*m_geoIDSvc) );
113 
114  // I/O
115  ATH_CHECK( m_inputTruthCollectionKey.initialize());
116  ATH_CHECK( m_outputTruthCollectionKey.initialize());
117  ATH_CHECK( m_eventInfoKey.initialize() );
118 
119  ATH_CHECK(m_inputConverter.retrieve());
120  if ( not m_truthPreselectionTool.empty() ) {
121  ATH_CHECK(m_truthPreselectionTool.retrieve());
122  }
123 
124  if ( not m_qspatcher.empty() ) {
125  ATH_CHECK( m_qspatcher.retrieve() );
126  }
127 
128  ATH_MSG_DEBUG("End of initialize()");
129  return StatusCode::SUCCESS;
130 }
python.CaloScaleNoiseConfig.parser
parser
Definition: CaloScaleNoiseConfig.py:75
ATH_MSG_FATAL
#define ATH_MSG_FATAL(x)
Definition: AthMsgStreamMacros.h:34
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
TruthStrategyManager::SetISFTruthSvc
void SetISFTruthSvc(ISF::ITruthSvc *truthSvc)
Define which ISF TruthService to use.
Definition: TruthStrategyManager.cxx:53
TruthStrategyManager::SetISFGeoIDSvc
void SetISFGeoIDSvc(ISF::IGeoIDSvc *geoIDSvc)
Define which ISF GeoIDSvc to use.
Definition: TruthStrategyManager.cxx:59
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
calibdata.exception
exception
Definition: calibdata.py:496
TruthStrategyManager
Singleton class for creating truth incidents.
Definition: TruthStrategyManager.h:23
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
PathResolverFindCalibFile
std::string PathResolverFindCalibFile(const std::string &logical_file_name)
Definition: PathResolver.cxx:431
DiTauMassTools::MaxHistStrategyV2::e
e
Definition: PhysicsAnalysis/TauID/DiTauMassTools/DiTauMassTools/HelperFunctions.h:26
G4AtlasAlg::initializeOnce
void initializeOnce()
G4 initialization called only by the first alg instance.
Definition: G4AtlasAlg.cxx:133