ATLAS Offline Software
Functions
G4HadIntProcessor.cxx File Reference
#include "ISF_FatrasToolsG4/G4HadIntProcessor.h"
#include "ISF_Event/ISFParticle.h"
#include "ISF_Event/ISFParticleContainer.h"
#include "ISF_Event/ParticleClipboard.h"
#include "ISF_Event/ParticleUserInformation.h"
#include "ISF_Interfaces/IParticleBroker.h"
#include "ISF_Geant4Tools/IG4RunManagerHelper.h"
#include "ISF_Interfaces/ITruthSvc.h"
#include "ISF_Event/ISFTruthIncident.h"
#include <G4HadronElasticProcess.hh>
#include "TrkGeometry/MaterialProperties.h"
#include "G4Material.hh"
#include "G4RunManager.hh"
#include "G4ParticleGun.hh"
#include "G4Box.hh"
#include "G4LogicalVolume.hh"
#include "G4PVPlacement.hh"
#include "QGSP_BERT.hh"
#include "QGSP_BIC.hh"
#include "FTFP_BERT.hh"
#include "G4UImanager.hh"
#include "G4NistManager.hh"
#include "G4VEnergyLossProcess.hh"
#include <G4MaterialCutsCouple.hh>
#include <G4HadronInelasticProcess.hh>
#include "globals.hh"
#include "G4CrossSectionDataStore.hh"
#include "G4Element.hh"
#include "G4ElementVector.hh"
#include "G4IsotopeVector.hh"
#include "G4Neutron.hh"
#include "G4ProductionCutsTable.hh"
#include "G4ios.hh"
#include "TruthUtils/MagicNumbers.h"
#include "CLHEP/Units/SystemOfUnits.h"
#include "AtlasHepMC/GenParticle.h"
#include "AtlasHepMC/GenVertex.h"
#include "CLHEP/Random/RandExponential.h"
#include "CLHEP/Random/RandFlat.h"
#include <math.h>

Go to the source code of this file.

Functions

StatusCode iFatras::G4HadIntProcessor::initG4RunManager ATLAS_NOT_THREAD_SAFE ()
 Install fatal handler with default options. More...
 

Function Documentation

◆ ATLAS_NOT_THREAD_SAFE()

StatusCode iFatras::G4HadIntProcessor::initG4RunManager 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

now add branches and leaves to the tree

now add branches and leaves to the tree

Definition at line 244 of file G4HadIntProcessor.cxx.

244  {
245 
246  ATH_MSG_DEBUG("[ g4sim ] Initializing G4RunManager");
247 
248  // Get the G4RunManagerHelper ( no initialization of G4RunManager done )
249  ATH_CHECK( m_g4RunManagerHelper.retrieve() );
250 
251  G4RunManager* g4runManager = m_g4RunManagerHelper->fastG4RunManager();
252  g4runManager->SetVerboseLevel(10);
253 
254  initProcessPDG( 211);
255  initProcessPDG(-211);
256  initProcessPDG(2212);
257  initProcessPDG(-2212);
258  initProcessPDG(2112);
259  initProcessPDG( 130);
260  initProcessPDG( 321);
261  initProcessPDG( 111);
262  initProcessPDG(-321);
263 
264  // define the available G4Material
265  m_g4Material.clear();
266 
267  G4NistManager* G4Nist = G4NistManager::Instance();
268  G4Material* air = G4Nist->G4NistManager::FindOrBuildMaterial("G4_AIR");
269  if (air) {
270  G4MaterialCutsCouple airCuts = G4MaterialCutsCouple(air);
271  // airCuts->SetIndex(0); // ?
272  std::pair<G4Material*,G4MaterialCutsCouple> airMat(air,airCuts);
273  m_g4Material.push_back(std::pair<float,std::pair<G4Material*,G4MaterialCutsCouple> >(0.,airMat));
274  }
275  G4Material* h = G4Nist->G4NistManager::FindOrBuildMaterial("G4_H");
276  if (h) {
277  G4MaterialCutsCouple hCuts = G4MaterialCutsCouple(h);
278  std::pair<G4Material*,G4MaterialCutsCouple> hMat(h,hCuts);
279  m_g4Material.push_back(std::pair<float,std::pair<G4Material*,G4MaterialCutsCouple> >(1.,hMat));
280  }
281  G4Material* al = G4Nist->G4NistManager::FindOrBuildMaterial("G4_Al");
282  if (al) {
283  G4MaterialCutsCouple alCuts = G4MaterialCutsCouple(al);
284  std::pair<G4Material*,G4MaterialCutsCouple> alMat(al,alCuts);
285  m_g4Material.push_back(std::pair<float,std::pair<G4Material*,G4MaterialCutsCouple> >(13.,alMat));
286  }
287  G4Material* si = G4Nist->G4NistManager::FindOrBuildMaterial("G4_Si");
288  if (si) {
289  G4MaterialCutsCouple siCuts = G4MaterialCutsCouple(si);
290  std::pair<G4Material*,G4MaterialCutsCouple> siMat(si,siCuts);
291  m_g4Material.push_back(std::pair<float,std::pair<G4Material*,G4MaterialCutsCouple> >(14.,siMat));
292  }
293  G4Material* ar = G4Nist->G4NistManager::FindOrBuildMaterial("G4_Ar");
294  if (ar) {
295  G4MaterialCutsCouple arCuts = G4MaterialCutsCouple(ar);
296  std::pair<G4Material*,G4MaterialCutsCouple> arMat(ar,arCuts);
297  m_g4Material.push_back(std::pair<float,std::pair<G4Material*,G4MaterialCutsCouple> >(18.,arMat));
298  }
299  G4Material* fe = G4Nist->G4NistManager::FindOrBuildMaterial("G4_Fe");
300  if (fe) {
301  G4MaterialCutsCouple feCuts = G4MaterialCutsCouple(fe);
302  std::pair<G4Material*,G4MaterialCutsCouple> feMat(fe,feCuts);
303  m_g4Material.push_back(std::pair<float,std::pair<G4Material*,G4MaterialCutsCouple> >(26.,feMat));
304  }
305  G4Material* pb = G4Nist->G4NistManager::FindOrBuildMaterial("G4_Pb");
306  if (pb) {
307  G4MaterialCutsCouple pbCuts = G4MaterialCutsCouple(pb);
308  std::pair<G4Material*,G4MaterialCutsCouple> pbMat(pb,pbCuts);
309  m_g4Material.push_back(std::pair<float,std::pair<G4Material*,G4MaterialCutsCouple> >(82.,pbMat));
310  }
311 
312  ATH_MSG_INFO("material vector size for had interaction:"<< m_g4Material.size());
313 
314  //G4cout << *(G4Material::GetMaterialTable()) << std::endl;
315 
316  // Flush the G4 cout/cerr: ATLASSIM-5137
317  G4cout << std::flush;
318  G4cerr << std::flush;
319 
320  return StatusCode::SUCCESS;
321 }
keylayer_zslicemap.pb
pb
Definition: keylayer_zslicemap.py:188
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
FullCPAlgorithmsTest_eljob.flush
flush
Definition: FullCPAlgorithmsTest_eljob.py:182
ATH_MSG_DEBUG
#define ATH_MSG_DEBUG(x)
Definition: AthMsgStreamMacros.h:29
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
h